1 |
commit: 17f237bb5a0825ffe32a39e13158808fc0f7b326 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 29 18:01:20 2016 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 29 18:01:20 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17f237bb |
7 |
|
8 |
dev-php/PEAR-PEAR: Revbump to move pkg_postinst from dev-php/pear |
9 |
|
10 |
Also adjust one patch to be -p1 compliant |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
dev-php/PEAR-PEAR/PEAR-PEAR-1.10.1-r1.ebuild | 151 +++++++++++++++++++++ |
15 |
.../files/gentoo-libtool-mismatch-fix-v2.patch | 4 +- |
16 |
2 files changed, 153 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-php/PEAR-PEAR/PEAR-PEAR-1.10.1-r1.ebuild b/dev-php/PEAR-PEAR/PEAR-PEAR-1.10.1-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 0000000..86cc5ef |
21 |
--- /dev/null |
22 |
+++ b/dev-php/PEAR-PEAR/PEAR-PEAR-1.10.1-r1.ebuild |
23 |
@@ -0,0 +1,151 @@ |
24 |
+# Copyright 1999-2016 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+# $Id$ |
27 |
+ |
28 |
+EAPI=6 |
29 |
+ |
30 |
+MY_PN="${PN/PEAR-/}" |
31 |
+MY_P="${MY_PN}-${PV}" |
32 |
+ |
33 |
+DESCRIPTION="PEAR Base System" |
34 |
+HOMEPAGE="http://pear.php.net/package/${MY_PN}" |
35 |
+SRC_URI="http://pear.php.net/get/${MY_P}.tgz" |
36 |
+LICENSE="MIT" |
37 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos" |
38 |
+SLOT="0" |
39 |
+IUSE="" |
40 |
+ |
41 |
+DEPEND="" |
42 |
+RDEPEND="dev-lang/php:*[cli,xml,zlib] |
43 |
+ >=dev-php/PEAR-Archive_Tar-1.4.0 |
44 |
+ >=dev-php/PEAR-Console_Getopt-1.4.1 |
45 |
+ >=dev-php/PEAR-Structures_Graph-1.1.0 |
46 |
+ >=dev-php/PEAR-XML_Util-1.3.0" |
47 |
+ |
48 |
+S="${WORKDIR}/${MY_P}" |
49 |
+ |
50 |
+PATCHES=( "${FILESDIR}/gentoo-libtool-mismatch-fix-v2.patch" ) |
51 |
+ |
52 |
+pkg_setup() { |
53 |
+ [[ -z "${PEAR_CACHEDIR}" ]] && PEAR_CACHEDIR="${EPREFIX}/var/cache/pear" |
54 |
+ [[ -z "${PEAR_DOWNLOADDIR}" ]] && PEAR_DOWNLOADDIR="${EPREFIX}/var/tmp/pear" |
55 |
+ [[ -z "${PEAR_TEMPDIR}" ]] && PEAR_TEMPDIR="${EPREFIX}/tmp" |
56 |
+ |
57 |
+ elog |
58 |
+ elog "cache_dir is set to: ${PEAR_CACHEDIR}" |
59 |
+ elog "download_dir is set to: ${PEAR_DOWNLOADDIR}" |
60 |
+ elog "temp_dir is set to: ${PEAR_TEMPDIR}" |
61 |
+ elog |
62 |
+ elog "If you want to change the above values, you need to set" |
63 |
+ elog "PEAR_CACHEDIR, PEAR_DOWNLOADDIR and PEAR_TEMPDIR variable(s)" |
64 |
+ elog "accordingly in /etc/portage/make.conf and re-emerge ${PN}." |
65 |
+ elog |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ insinto /usr/share/php |
70 |
+ doins -r PEAR/ |
71 |
+ doins -r OS/ |
72 |
+ doins PEAR.php System.php |
73 |
+ doins scripts/pearcmd.php |
74 |
+ doins scripts/peclcmd.php |
75 |
+ |
76 |
+ newbin scripts/pear.sh pear |
77 |
+ newbin scripts/peardev.sh peardev |
78 |
+ newbin scripts/pecl.sh pecl |
79 |
+ |
80 |
+ # adjust some scripts for current version |
81 |
+ for i in pearcmd.php peclcmd.php ; do |
82 |
+ sed "s:@pear_version@:${PEAR}:g" -i "${D}/usr/share/php/${i}" \ |
83 |
+ || die "failed to sed pear_version" |
84 |
+ done |
85 |
+ |
86 |
+ for i in pear peardev pecl ; do |
87 |
+ sed "s:@bin_dir@:${EPREFIX}/usr/bin:g" -i "${D}/usr/bin/${i}" \ |
88 |
+ || die "failed to sed @bin_dir@ in ${i}" |
89 |
+ sed "s:@php_dir@:${EPREFIX}/usr/share/php:g" -i "${D}/usr/bin/${i}" \ |
90 |
+ || die "failed to sed @php_dir@ in ${i}" |
91 |
+ done |
92 |
+ |
93 |
+ sed "s:-d output_buffering=1:-d output_buffering=1 -d memory_limit=32M:g" \ |
94 |
+ -i "${D}/usr/bin/pear" \ |
95 |
+ || die "failed to set PHP ini values in pear executable" |
96 |
+ |
97 |
+ sed "s:@package_version@:${PEAR}:g" \ |
98 |
+ -i "${D}/usr/share/php/PEAR/Command/Package.php" \ |
99 |
+ || die "failed to sed @package_version@" |
100 |
+ |
101 |
+ sed "s:@PEAR-VER@:${PEAR}:g" \ |
102 |
+ -i "${D}/usr/share/php/PEAR/Dependency2.php" \ |
103 |
+ || die "failed to sed @PEAR-VER@ in Dependency2.php" |
104 |
+ |
105 |
+ sed "s:@PEAR-VER@:${PEAR}:g" \ |
106 |
+ -i "${D}/usr/share/php/PEAR/PackageFile/Parser/v1.php" \ |
107 |
+ || die "failed to sed @PEAR-VER@ in v1.php" |
108 |
+ |
109 |
+ sed "s:@PEAR-VER@:${PEAR}:g" \ |
110 |
+ -i "${D}/usr/share/php/PEAR/PackageFile/Parser/v2.php" \ |
111 |
+ || die "failed to sed @PEAR-VER@ in v2.php" |
112 |
+ |
113 |
+ # finalize install |
114 |
+ insinto /etc |
115 |
+ newins "${FILESDIR}"/pear.conf-r2 pear.conf |
116 |
+ |
117 |
+ sed "s|s:PHPCLILEN:\"PHPCLI\"|s:${#PHPCLI}:\"${PHPCLI}\"|g" \ |
118 |
+ -i "${D}/etc/pear.conf" \ |
119 |
+ || die "failed to sed PHPCLILEN in pear.conf" |
120 |
+ |
121 |
+ sed "s|s:CACHEDIRLEN:\"CACHEDIR\"|s:${#PEAR_CACHEDIR}:\"${PEAR_CACHEDIR}\"|g" \ |
122 |
+ -i "${D}/etc/pear.conf" \ |
123 |
+ || die "failed to sed CACHEDIRLEN in pear.conf" |
124 |
+ |
125 |
+ sed "s|s:DOWNLOADDIRLEN:\"DOWNLOADDIR\"|s:${#PEAR_DOWNLOADDIR}:\"${PEAR_DOWNLOADDIR}\"|g" \ |
126 |
+ -i "${D}/etc/pear.conf" \ |
127 |
+ || die "failed to sed DOWNLOADDIRLEN in pear.conf" |
128 |
+ |
129 |
+ sed "s|s:TEMPDIRLEN:\"TEMPDIR\"|s:${#PEAR_TEMPDIR}:\"${PEAR_TEMPDIR}\"|g" \ |
130 |
+ -i "${D}/etc/pear.conf" \ |
131 |
+ || die "failed to sed TEMPDIRLEN in pear.conf" |
132 |
+ |
133 |
+ # Change the paths for eprefix! |
134 |
+ sed "s|s:19:\"/usr/share/php/docs\"|s:$(( ${#EPREFIX}+19 )):\"${EPREFIX}/usr/share/php/docs\"|g" \ |
135 |
+ -i "${D}/etc/pear.conf" \ |
136 |
+ || die "failed to sed the docs path (prefix) in pear.conf" |
137 |
+ |
138 |
+ sed "s|s:19:\"/usr/share/php/data\"|s:$(( ${#EPREFIX}+19 )):\"${EPREFIX}/usr/share/php/data\"|g" \ |
139 |
+ -i "${D}/etc/pear.conf" \ |
140 |
+ || die "failed to sed the data path (prefix) in pear.conf" |
141 |
+ |
142 |
+ sed "s|s:20:\"/usr/share/php/tests\"|s:$(( ${#EPREFIX}+20 )):\"${EPREFIX}/usr/share/php/tests\"|g" \ |
143 |
+ -i "${D}/etc/pear.conf" \ |
144 |
+ || die "failed to sed the tests path (prefix) in pear.conf" |
145 |
+ |
146 |
+ sed "s|s:14:\"/usr/share/php\"|s:$(( ${#EPREFIX}+14 )):\"${EPREFIX}/usr/share/php\"|g" \ |
147 |
+ -i "${D}/etc/pear.conf" \ |
148 |
+ || die "failed to sed the PHP include path (prefix) in pear.conf" |
149 |
+ |
150 |
+ sed "s|s:8:\"/usr/bin\"|s:$(( ${#EPREFIX}+8 )):\"${EPREFIX}/usr/bin\"|g" \ |
151 |
+ -i "${D}/etc/pear.conf" \ |
152 |
+ || die "failed to sed the bin path (prefix) in pear.conf" |
153 |
+ |
154 |
+ [[ "${PEAR_TEMPDIR}" != "/tmp" ]] && keepdir "${PEAR_TEMPDIR#${EPREFIX}}" |
155 |
+ keepdir "${PEAR_CACHEDIR#${EPREFIX}}" |
156 |
+ diropts -m1777 |
157 |
+ keepdir "${PEAR_DOWNLOADDIR#${EPREFIX}}" |
158 |
+} |
159 |
+ |
160 |
+pkg_postinst() { |
161 |
+ pear clear-cache || die "failed to clear PEAR cache" |
162 |
+ |
163 |
+ # Update PEAR/PECL channels as needed, add new ones to the list if needed |
164 |
+ elog "Updating PEAR/PECL channels" |
165 |
+ local pearchans="pear.php.net pecl.php.net pear.phing.info " |
166 |
+ pearchans+="pear.symfony-project.com pear.agavi.org" |
167 |
+ |
168 |
+ for chan in ${pearchans} ; do |
169 |
+ # The first command may fail if, for example, the channels have |
170 |
+ # already been initialized. |
171 |
+ pear channel-discover ${chan} |
172 |
+ pear channel-update ${chan} || die "failed to update channels" |
173 |
+ done |
174 |
+} |
175 |
|
176 |
diff --git a/dev-php/PEAR-PEAR/files/gentoo-libtool-mismatch-fix-v2.patch b/dev-php/PEAR-PEAR/files/gentoo-libtool-mismatch-fix-v2.patch |
177 |
index 0a7effe..f9a8941 100644 |
178 |
--- a/dev-php/PEAR-PEAR/files/gentoo-libtool-mismatch-fix-v2.patch |
179 |
+++ b/dev-php/PEAR-PEAR/files/gentoo-libtool-mismatch-fix-v2.patch |
180 |
@@ -1,6 +1,6 @@ |
181 |
diff -aruN PEAR.orig/Builder.php PEAR/Builder.php |
182 |
---- PEAR.orig/Builder.php 2014-07-12 08:25:32.000000000 -0400 |
183 |
-+++ PEAR/Builder.php 2015-01-16 13:43:14.927894013 -0500 |
184 |
+--- a/PEAR/Builder.php 2014-07-12 08:25:32.000000000 -0400 |
185 |
++++ b/PEAR/Builder.php 2015-01-16 13:43:14.927894013 -0500 |
186 |
@@ -340,6 +340,11 @@ |
187 |
} |
188 |
// }}} end of interactive part |