Gentoo Archives: gentoo-commits

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