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