1 |
commit: d9c291f907f5f37f1a1ef254f5efa6e9c90e9cd7 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 2 13:52:31 2020 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 2 13:52:31 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9c291f9 |
7 |
|
8 |
dev-php/PEAR-PEAR: Version bump for 1.10.12 |
9 |
|
10 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
11 |
|
12 |
dev-php/PEAR-PEAR/Manifest | 1 + |
13 |
dev-php/PEAR-PEAR/PEAR-PEAR-1.10.12.ebuild | 177 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 178 insertions(+) |
15 |
|
16 |
diff --git a/dev-php/PEAR-PEAR/Manifest b/dev-php/PEAR-PEAR/Manifest |
17 |
index 95bac54215a..7892fd4e44f 100644 |
18 |
--- a/dev-php/PEAR-PEAR/Manifest |
19 |
+++ b/dev-php/PEAR-PEAR/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
+DIST PEAR-1.10.12.tgz 293220 BLAKE2B fb25123852a60e4bd2c041d1fb58174b3053b24ff8ec19b44efe02aee041bbed102b14b270dc1c9764150eea7c85862ad78adefdc1d789540da18ec0f3aeae68 SHA512 1ce478800a150d7906f8aa4fa4371d3d190fa2af44691c9aa193babfe76f1b031b493f48df15b93e93dd5518a6d62ba6a7d5b1799b62d5a968f7a84f3677b971 |
22 |
DIST PEAR-1.10.6.tgz 291529 BLAKE2B 7a75c89df2b34b368564e745a727292e5c5ee3a145995c15d338901b235664d0a783ca0efc9cd1d321cc2c496e88395db376ce7bbd6ccbf55d484d7f1021cd2b SHA512 ccd436a2cb9d30b434a78483432c51a8fa5b3e96e79ca3b28131b8dcd37bbae0b782efd762eb92dc40db24d3f61025c64ec5d29aed10fd80a6b28c224c4f1e2a |
23 |
DIST PEAR-1.10.7.tgz 291786 BLAKE2B 7e760c2782832fab2a35f86e2f9072058d622918cdc2b61b7066d2f17787488d228186948e96e602bb412b76b806004642e7ba83db00950a822996869dae9cd4 SHA512 ebe93cff5546ad3a80d3d1c0284e34a46ec8dbdb7d015a11350231244baca75a57596e446c1386bc40650525f59c04617e73b1071a0fe77210dc5979edb5151f |
24 |
DIST PEAR-1.10.9.tgz 291931 BLAKE2B b9120d9b643be926e80aac33aafd0f22cacca11c10b857d99b6d51a7315467ad18d79246ab2752b962de92957fe14fc65e1d01570eb73b562b0e6e030dfb7162 SHA512 072d2eda510c05649f8d1481665bdd42efa060e6098b4b0d0353c95cf79d342ec601dd36dab3e6583b612582d2f03672a7b5de1518e3a0e8fd190ea698a17e60 |
25 |
|
26 |
diff --git a/dev-php/PEAR-PEAR/PEAR-PEAR-1.10.12.ebuild b/dev-php/PEAR-PEAR/PEAR-PEAR-1.10.12.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..eda65ff33c7 |
29 |
--- /dev/null |
30 |
+++ b/dev-php/PEAR-PEAR/PEAR-PEAR-1.10.12.ebuild |
31 |
@@ -0,0 +1,177 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+MY_PN="${PN/PEAR-/}" |
38 |
+MY_P="${MY_PN}-${PV}" |
39 |
+ |
40 |
+DESCRIPTION="PEAR Base System" |
41 |
+HOMEPAGE="https://pear.php.net/package/PEAR" |
42 |
+SRC_URI="https://pear.php.net/get/${MY_P}.tgz" |
43 |
+LICENSE="MIT" |
44 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" |
45 |
+SLOT="0" |
46 |
+IUSE="" |
47 |
+ |
48 |
+DEPEND="" |
49 |
+RDEPEND="dev-lang/php:*[cli(-),xml(-),zlib(-)] |
50 |
+ >=dev-php/PEAR-Archive_Tar-1.4.9 |
51 |
+ >=dev-php/PEAR-Console_Getopt-1.4.1 |
52 |
+ dev-php/PEAR-Exception |
53 |
+ >=dev-php/PEAR-Structures_Graph-1.1.0 |
54 |
+ >=dev-php/PEAR-XML_Util-1.4.0" |
55 |
+ |
56 |
+S="${WORKDIR}/${MY_P}" |
57 |
+ |
58 |
+PATCHES=( "${FILESDIR}/gentoo-libtool-mismatch-fix-v2.patch" ) |
59 |
+ |
60 |
+pkg_setup() { |
61 |
+ [[ -z "${PEAR_CACHEDIR}" ]] && PEAR_CACHEDIR="${EPREFIX}/var/cache/pear" |
62 |
+ [[ -z "${PEAR_DOWNLOADDIR}" ]] && PEAR_DOWNLOADDIR="${EPREFIX}/var/tmp/pear" |
63 |
+ [[ -z "${PEAR_TEMPDIR}" ]] && PEAR_TEMPDIR="${EPREFIX}/tmp" |
64 |
+ |
65 |
+ elog |
66 |
+ elog "cache_dir is set to: ${PEAR_CACHEDIR}" |
67 |
+ elog "download_dir is set to: ${PEAR_DOWNLOADDIR}" |
68 |
+ elog "temp_dir is set to: ${PEAR_TEMPDIR}" |
69 |
+ elog |
70 |
+ elog "If you want to change the above values, you need to set" |
71 |
+ elog "PEAR_CACHEDIR, PEAR_DOWNLOADDIR and PEAR_TEMPDIR variable(s)" |
72 |
+ elog "accordingly in /etc/portage/make.conf and re-emerge ${PN}." |
73 |
+ elog |
74 |
+} |
75 |
+ |
76 |
+src_prepare() { |
77 |
+ default |
78 |
+ # Exception.php is part of dev-php/PEAR-Exception. |
79 |
+ rm PEAR/Exception.php || die "failed to remove PEAR/Exception.php" |
80 |
+} |
81 |
+ |
82 |
+src_install() { |
83 |
+ insinto /usr/share/php |
84 |
+ doins -r PEAR/ |
85 |
+ doins -r OS/ |
86 |
+ doins PEAR.php System.php |
87 |
+ doins scripts/pearcmd.php |
88 |
+ doins scripts/peclcmd.php |
89 |
+ |
90 |
+ newbin scripts/pear.sh pear |
91 |
+ newbin scripts/peardev.sh peardev |
92 |
+ newbin scripts/pecl.sh pecl |
93 |
+ |
94 |
+ # adjust some scripts for current version |
95 |
+ [[ -z "${PEAR}" ]] && PEAR="${PV}" |
96 |
+ for i in pearcmd.php peclcmd.php ; do |
97 |
+ sed "s:@pear_version@:${PEAR}:g" -i "${D}/usr/share/php/${i}" \ |
98 |
+ || die "failed to sed pear_version" |
99 |
+ done |
100 |
+ |
101 |
+ for i in pear peardev pecl ; do |
102 |
+ sed "s:@bin_dir@:${EPREFIX}/usr/bin:g" -i "${D}/usr/bin/${i}" \ |
103 |
+ || die "failed to sed @bin_dir@ in ${i}" |
104 |
+ sed "s:@php_dir@:${EPREFIX}/usr/share/php:g" -i "${D}/usr/bin/${i}" \ |
105 |
+ || die "failed to sed @php_dir@ in ${i}" |
106 |
+ done |
107 |
+ |
108 |
+ sed "s:-d output_buffering=1:-d output_buffering=1 -d memory_limit=32M:g" \ |
109 |
+ -i "${D}/usr/bin/pear" \ |
110 |
+ || die "failed to set PHP ini values in pear executable" |
111 |
+ |
112 |
+ sed "s:@package_version@:${PEAR}:g" \ |
113 |
+ -i "${D}/usr/share/php/PEAR/Command/Package.php" \ |
114 |
+ || die "failed to sed @package_version@" |
115 |
+ |
116 |
+ sed "s:@PEAR-VER@:${PEAR}:g" \ |
117 |
+ -i "${D}/usr/share/php/PEAR/Dependency2.php" \ |
118 |
+ || die "failed to sed @PEAR-VER@ in Dependency2.php" |
119 |
+ |
120 |
+ sed "s:@PEAR-VER@:${PEAR}:g" \ |
121 |
+ -i "${D}/usr/share/php/PEAR/PackageFile/Parser/v1.php" \ |
122 |
+ || die "failed to sed @PEAR-VER@ in v1.php" |
123 |
+ |
124 |
+ sed "s:@PEAR-VER@:${PEAR}:g" \ |
125 |
+ -i "${D}/usr/share/php/PEAR/PackageFile/Parser/v2.php" \ |
126 |
+ || die "failed to sed @PEAR-VER@ in v2.php" |
127 |
+ |
128 |
+ # finalize install |
129 |
+ insinto /etc |
130 |
+ newins "${FILESDIR}"/pear.conf-r2 pear.conf |
131 |
+ |
132 |
+ sed "s|s:PHPCLILEN:\"PHPCLI\"|s:${#PHPCLI}:\"${PHPCLI}\"|g" \ |
133 |
+ -i "${D}/etc/pear.conf" \ |
134 |
+ || die "failed to sed PHPCLILEN in pear.conf" |
135 |
+ |
136 |
+ sed "s|s:CACHEDIRLEN:\"CACHEDIR\"|s:${#PEAR_CACHEDIR}:\"${PEAR_CACHEDIR}\"|g" \ |
137 |
+ -i "${D}/etc/pear.conf" \ |
138 |
+ || die "failed to sed CACHEDIRLEN in pear.conf" |
139 |
+ |
140 |
+ sed "s|s:DOWNLOADDIRLEN:\"DOWNLOADDIR\"|s:${#PEAR_DOWNLOADDIR}:\"${PEAR_DOWNLOADDIR}\"|g" \ |
141 |
+ -i "${D}/etc/pear.conf" \ |
142 |
+ || die "failed to sed DOWNLOADDIRLEN in pear.conf" |
143 |
+ |
144 |
+ sed "s|s:TEMPDIRLEN:\"TEMPDIR\"|s:${#PEAR_TEMPDIR}:\"${PEAR_TEMPDIR}\"|g" \ |
145 |
+ -i "${D}/etc/pear.conf" \ |
146 |
+ || die "failed to sed TEMPDIRLEN in pear.conf" |
147 |
+ |
148 |
+ # Change the paths for eprefix! |
149 |
+ sed "s|s:19:\"/usr/share/php/docs\"|s:$(( ${#EPREFIX}+19 )):\"${EPREFIX}/usr/share/php/docs\"|g" \ |
150 |
+ -i "${D}/etc/pear.conf" \ |
151 |
+ || die "failed to sed the docs path (prefix) in pear.conf" |
152 |
+ |
153 |
+ sed "s|s:19:\"/usr/share/php/data\"|s:$(( ${#EPREFIX}+19 )):\"${EPREFIX}/usr/share/php/data\"|g" \ |
154 |
+ -i "${D}/etc/pear.conf" \ |
155 |
+ || die "failed to sed the data path (prefix) in pear.conf" |
156 |
+ |
157 |
+ sed "s|s:20:\"/usr/share/php/tests\"|s:$(( ${#EPREFIX}+20 )):\"${EPREFIX}/usr/share/php/tests\"|g" \ |
158 |
+ -i "${D}/etc/pear.conf" \ |
159 |
+ || die "failed to sed the tests path (prefix) in pear.conf" |
160 |
+ |
161 |
+ sed "s|s:14:\"/usr/share/php\"|s:$(( ${#EPREFIX}+14 )):\"${EPREFIX}/usr/share/php\"|g" \ |
162 |
+ -i "${D}/etc/pear.conf" \ |
163 |
+ || die "failed to sed the PHP include path (prefix) in pear.conf" |
164 |
+ |
165 |
+ sed "s|s:8:\"/usr/bin\"|s:$(( ${#EPREFIX}+8 )):\"${EPREFIX}/usr/bin\"|g" \ |
166 |
+ -i "${D}/etc/pear.conf" \ |
167 |
+ || die "failed to sed the bin path (prefix) in pear.conf" |
168 |
+ |
169 |
+ [[ "${PEAR_TEMPDIR}" != "/tmp" ]] && keepdir "${PEAR_TEMPDIR#${EPREFIX}}" |
170 |
+ keepdir "${PEAR_CACHEDIR#${EPREFIX}}" |
171 |
+ diropts -m1777 |
172 |
+ keepdir "${PEAR_DOWNLOADDIR#${EPREFIX}}" |
173 |
+ |
174 |
+ insinto /usr/share/php/.packagexml |
175 |
+ newins "${WORKDIR}/package.xml" "${MY_P}.xml" |
176 |
+} |
177 |
+ |
178 |
+pkg_config() { |
179 |
+ # Update PEAR/PECL channels as needed, add new ones to the list if needed |
180 |
+ elog "Updating PEAR/PECL channels" |
181 |
+ local pearchans="pear.php.net pecl.php.net pear.symfony-project.com" |
182 |
+ |
183 |
+ for chan in ${pearchans} ; do |
184 |
+ # The first command may fail if, for example, the channels have |
185 |
+ # already been initialized. |
186 |
+ pear channel-discover ${chan} |
187 |
+ pear channel-update ${chan} || die "failed to update channels: ${chan}" |
188 |
+ done |
189 |
+} |
190 |
+ |
191 |
+pkg_postinst() { |
192 |
+ pear clear-cache || die "failed to clear PEAR cache" |
193 |
+ |
194 |
+ elog "Run 'emerge --config =${PF}' to automatically update the PEAR/PECL channels while online." |
195 |
+ |
196 |
+ # Register the package from the package.xml file |
197 |
+ # It is not critical to complete so only warn on failure |
198 |
+ if [[ -f "${EROOT}/usr/share/php/.packagexml/${MY_P}.xml" ]] ; then |
199 |
+ "${EROOT}/usr/bin/peardev" install -nrO --force \ |
200 |
+ "${EROOT}/usr/share/php/.packagexml/${MY_P}.xml" 2> /dev/null \ |
201 |
+ || ewarn "Failed to insert package into local PEAR database" |
202 |
+ fi |
203 |
+} |
204 |
+ |
205 |
+pkg_prerm() { |
206 |
+ # Uninstall known dependency |
207 |
+ "${EROOT}/usr/bin/peardev" uninstall -nrO "pear.php.net/PEAR" |
208 |
+} |