Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/perl/, dev-lang/perl/files/eblits/
Date: Fri, 03 Jun 2016 23:29:57
Message-Id: 1464996584.c5cd8381c25b1b4943e7b3eec5466f053d360ae6.dilfridge@gentoo
1 commit: c5cd8381c25b1b4943e7b3eec5466f053d360ae6
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 3 23:28:31 2016 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 23:29:44 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5cd8381
7
8 dev-lang/perl: Add revbump (unkeyworded, work in progress) for adding some patches. Add fix for bug 584890 by Benda Xu.
9
10 Package-Manager: portage-2.3.0_rc1
11
12 dev-lang/perl/files/eblits/common-v50240002.eblit | 71 ++++++++
13 .../files/eblits/src_configure-v50240002.eblit | 192 +++++++++++++++++++++
14 dev-lang/perl/perl-5.24.0-r1.ebuild | 126 ++++++++++++++
15 3 files changed, 389 insertions(+)
16
17 diff --git a/dev-lang/perl/files/eblits/common-v50240002.eblit b/dev-lang/perl/files/eblits/common-v50240002.eblit
18 new file mode 100644
19 index 0000000..94e01a2
20 --- /dev/null
21 +++ b/dev-lang/perl/files/eblits/common-v50240002.eblit
22 @@ -0,0 +1,71 @@
23 +# Copyright 1999-2016 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +src_remove_dual_file() {
28 + local i pkg ver
29 + pkg="$1"
30 + ver="$2"
31 + shift 2
32 + case "${EBUILD_PHASE:-none}" in
33 + postinst|postrm)
34 + for i in "$@" ; do
35 + alternatives_auto_makesym "${i}" "${i}-[0-9]*"
36 + done
37 + ;;
38 + setup)
39 + for i in "$@" ; do
40 + if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
41 + has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
42 + break
43 + fi
44 + done
45 + ;;
46 + install)
47 + for i in "$@" ; do
48 + if ! [[ -f "${ED}"${i} ]] ; then
49 + ewarn "${i} does not exist!"
50 + continue
51 + fi
52 + mv "${ED}"${i}{,-${ver}-${P}} || die
53 + done
54 + ;;
55 + esac
56 +}
57 +
58 +src_remove_dual_man() {
59 + local i pkg ver ff
60 + pkg="$1"
61 + ver="$2"
62 + shift 2
63 + case "${EBUILD_PHASE:-none}" in
64 + postinst|postrm)
65 + for i in "$@" ; do
66 + ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
67 + ff=${ff##*${i#${i%.[0-9]}}}
68 + alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
69 + done
70 + ;;
71 + install)
72 + for i in "$@" ; do
73 + if ! [[ -f "${ED}"${i} ]] ; then
74 + ewarn "${i} does not exist!"
75 + continue
76 + fi
77 + mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
78 + done
79 + ;;
80 + esac
81 +}
82 +
83 +src_remove_dual() {
84 + local i pkg ver
85 + pkg="$1"
86 + ver="$2"
87 + shift 2
88 + for i in "$@" ; do
89 + src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
90 + src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
91 + done
92 +}
93 +
94
95 diff --git a/dev-lang/perl/files/eblits/src_configure-v50240002.eblit b/dev-lang/perl/files/eblits/src_configure-v50240002.eblit
96 new file mode 100644
97 index 0000000..058171e
98 --- /dev/null
99 +++ b/dev-lang/perl/files/eblits/src_configure-v50240002.eblit
100 @@ -0,0 +1,192 @@
101 +# Copyright 1999-2016 Gentoo Foundation
102 +# Distributed under the terms of the GNU General Public License v2
103 +# $Id$
104 +
105 +myconf() {
106 + # the myconf array is declared in src_configure
107 + myconf=( "${myconf[@]}" "$@" )
108 +}
109 +
110 +eblit-perl-src_configure() {
111 + declare -a myconf
112 +
113 + export LC_ALL="C"
114 + [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
115 +
116 + # some arches and -O do not mix :)
117 + use ppc && replace-flags -O? -O1
118 + # Perl has problems compiling with -Os in your flags with glibc
119 + use elibc_uclibc || replace-flags "-Os" "-O2"
120 + # This flag makes compiling crash in interesting ways
121 + filter-flags "-malign-double"
122 + # Fixes bug #97645
123 + use ppc && filter-flags "-mpowerpc-gpopt"
124 + # Fixes bug #143895 on gcc-4.1.1
125 + filter-flags "-fsched2-use-superblocks"
126 +
127 + use sparc && myconf -Ud_longdbl
128 +
129 + export BUILD_BZIP2=0
130 + export BZIP2_INCLUDE=${EPREFIX}/usr/include
131 + export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir)
132 +
133 + export BUILD_ZLIB=False
134 + export ZLIB_INCLUDE=${EPREFIX}/usr/include
135 + export ZLIB_LIB=${EPREFIX}/usr/$(get_libdir)
136 +
137 + # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
138 +
139 + myndbm='U'
140 + mygdbm='U'
141 + mydb='U'
142 +
143 + if use gdbm ; then
144 + mygdbm='D'
145 + myndbm='D'
146 + fi
147 + if use berkdb ; then
148 + mydb='D'
149 + has_version '=sys-libs/db-1*' && myndbm='D'
150 + fi
151 +
152 + myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
153 +
154 + if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
155 + ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
156 + myconf -Ui_db -Ui_ndbm
157 + fi
158 +
159 + use ithreads && myconf -Dusethreads
160 +
161 + if use debug ; then
162 + append-cflags "-g"
163 + myconf -DDEBUGGING
164 + elif [[ ${CFLAGS} == *-g* ]] ; then
165 + myconf -DDEBUGGING=-g
166 + else
167 + myconf -DDEBUGGING=none
168 + fi
169 +
170 + if [[ -n ${PERL_OLDVERSEN} ]] ; then
171 + local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
172 + myconf -Dinc_version_list="${inclist}"
173 + fi
174 +
175 + [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
176 +
177 + # Make sure we can do the final link #523730, need to set deployment
178 + # target to override hardcoded 10.3 which breaks on modern OSX
179 + [[ ${CHOST} == *-darwin* ]] && \
180 + myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
181 +
182 + # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
183 + # Prefix itself we don't do multilib either, so make sure perl can find
184 + # something compatible.
185 + if use prefix ; then
186 + # Set a hook to check for each detected library whether it actually works.
187 + export libscheck="
188 + ( echo 'main(){}' > '${T}'/conftest.c &&
189 + $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
190 + ) || xxx=/dev/null"
191 +
192 + # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
193 + local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
194 + myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
195 + elif [[ $(get_libdir) != "lib" ]] ; then
196 + # We need to use " and not ', as the written config.sh use ' ...
197 + myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
198 + fi
199 +
200 + # don't try building ODBM, bug #354453
201 + disabled_extensions="ODBM_File"
202 +
203 + if ! use gdbm ; then
204 + # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
205 + disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
206 + fi
207 +
208 + myconf -Dnoextensions="${disabled_extensions}"
209 +
210 + echo Configuring Perl as follows:
211 + echo sh Configure \
212 + -des \
213 + -Duseshrplib \
214 + -Darchname="${myarch}" \
215 + -Dcc="$(tc-getCC)" \
216 + -Doptimize="${CFLAGS}" \
217 + -Dldflags="${LDFLAGS}" \
218 + -Dprefix="${EPREFIX}"'/usr' \
219 + -Dinstallprefix="${EPREFIX}"'/usr' \
220 + -Dsiteprefix="${EPREFIX}"'/usr/local' \
221 + -Dvendorprefix="${EPREFIX}"'/usr' \
222 + -Dscriptdir="${EPREFIX}"'/usr/bin' \
223 + -Dprivlib="${EPREFIX}${PRIV_LIB}" \
224 + -Darchlib="${EPREFIX}${ARCH_LIB}" \
225 + -Dsitelib="${EPREFIX}${SITE_LIB}" \
226 + -Dsitearch="${EPREFIX}${SITE_ARCH}" \
227 + -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
228 + -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
229 + -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
230 + -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
231 + -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
232 + -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
233 + -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
234 + -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
235 + -Dman1ext='1' \
236 + -Dman3ext='3pm' \
237 + -Dlibperl="${LIBPERL}" \
238 + -Dlocincpth="${EPREFIX}"'/usr/include ' \
239 + -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
240 + -Duselargefiles \
241 + -Dd_semctl_semun \
242 + -Dcf_by='Gentoo' \
243 + -Dmyhostname='localhost' \
244 + -Dperladmin='root@localhost' \
245 + -Dinstallusrbinperl='n' \
246 + -Ud_csh \
247 + -Dsh="${EPREFIX}"/bin/sh \
248 + -Dtargetsh="${EPREFIX}"/bin/sh \
249 + -Uusenm \
250 + "${myconf[@]}"
251 +
252 + sh Configure \
253 + -des \
254 + -Duseshrplib \
255 + -Darchname="${myarch}" \
256 + -Dcc="$(tc-getCC)" \
257 + -Doptimize="${CFLAGS}" \
258 + -Dldflags="${LDFLAGS}" \
259 + -Dprefix="${EPREFIX}"'/usr' \
260 + -Dinstallprefix="${EPREFIX}"'/usr' \
261 + -Dsiteprefix="${EPREFIX}"'/usr/local' \
262 + -Dvendorprefix="${EPREFIX}"'/usr' \
263 + -Dscriptdir="${EPREFIX}"'/usr/bin' \
264 + -Dprivlib="${EPREFIX}${PRIV_LIB}" \
265 + -Darchlib="${EPREFIX}${ARCH_LIB}" \
266 + -Dsitelib="${EPREFIX}${SITE_LIB}" \
267 + -Dsitearch="${EPREFIX}${SITE_ARCH}" \
268 + -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
269 + -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
270 + -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
271 + -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
272 + -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
273 + -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
274 + -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
275 + -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
276 + -Dman1ext='1' \
277 + -Dman3ext='3pm' \
278 + -Dlibperl="${LIBPERL}" \
279 + -Dlocincpth="${EPREFIX}"'/usr/include ' \
280 + -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
281 + -Duselargefiles \
282 + -Dd_semctl_semun \
283 + -Dcf_by='Gentoo' \
284 + -Dmyhostname='localhost' \
285 + -Dperladmin='root@localhost' \
286 + -Dinstallusrbinperl='n' \
287 + -Ud_csh \
288 + -Dsh="${EPREFIX}"/bin/sh \
289 + -Dtargetsh="${EPREFIX}"/bin/sh \
290 + -Uusenm \
291 + "${myconf[@]}" || die "Unable to configure"
292 +}
293
294 diff --git a/dev-lang/perl/perl-5.24.0-r1.ebuild b/dev-lang/perl/perl-5.24.0-r1.ebuild
295 new file mode 100644
296 index 0000000..1f34989
297 --- /dev/null
298 +++ b/dev-lang/perl/perl-5.24.0-r1.ebuild
299 @@ -0,0 +1,126 @@
300 +# Copyright 1999-2016 Gentoo Foundation
301 +# Distributed under the terms of the GNU General Public License v2
302 +# $Id$
303 +
304 +EAPI=6
305 +
306 +inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
307 +
308 +PATCH_VER=1
309 +
310 +PERL_OLDVERSEN=""
311 +MODULE_AUTHOR=RJBS
312 +
313 +SHORT_PV="${PV%.*}"
314 +MY_P="perl-${PV/_rc/-RC}"
315 +MY_PV="${PV%_rc*}"
316 +
317 +DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
318 +
319 +SRC_URI="
320 + mirror://cpan/src/5.0/${MY_P}.tar.bz2
321 + mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2
322 + mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.xz
323 + https://dev.gentoo.org/~dilfridge/distfiles/${MY_P}-patches-${PATCH_VER}.tar.xz
324 +"
325 +HOMEPAGE="http://www.perl.org/"
326 +
327 +LICENSE="|| ( Artistic GPL-1+ )"
328 +SLOT="0/${SHORT_PV}"
329 +#KEYWORDS="~alpha ~amd64 ~amd64-fbsd ~amd64-linux ~arm ~arm64 ~hppa ~hppa-hpux ~ia64 ~ia64-hpux ~ia64-linux ~m68k ~m68k-mint ~mips ~ppc ~ppc64 ~ppc-aix ~ppc-macos ~s390 ~sh ~sparc ~sparc64-solaris ~sparc-solaris ~x64-freebsd ~x64-macos ~x64-solaris ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~x86-linux ~x86-macos ~x86-solaris"
330 +IUSE="berkdb debug doc gdbm ithreads"
331 +
332 +RDEPEND="
333 + berkdb? ( sys-libs/db:* )
334 + gdbm? ( >=sys-libs/gdbm-1.8.3 )
335 + app-arch/bzip2
336 + sys-libs/zlib
337 +"
338 +DEPEND="${RDEPEND}
339 + !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
340 +"
341 +PDEPEND="
342 + >=app-admin/perl-cleaner-2.5
343 + >=virtual/perl-File-Temp-0.230.400-r2
344 + >=virtual/perl-Data-Dumper-2.154.0
345 + virtual/perl-Test-Harness
346 +"
347 +# bug 390719, bug 523624
348 +# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
349 +
350 +S="${WORKDIR}/${MY_P}"
351 +
352 +dual_scripts() {
353 + src_remove_dual perl-core/Archive-Tar 2.40.0 ptar ptardiff ptargrep
354 + src_remove_dual perl-core/Digest-SHA 5.950.0 shasum
355 + src_remove_dual perl-core/CPAN 2.110.0 cpan
356 + src_remove_dual perl-core/Encode 2.800.0 enc2xs piconv
357 + src_remove_dual perl-core/ExtUtils-MakeMaker 7.100.100_rc instmodsh
358 + src_remove_dual perl-core/ExtUtils-ParseXS 3.310.0 xsubpp
359 + src_remove_dual perl-core/IO-Compress 2.69.0 zipdetails
360 + src_remove_dual perl-core/JSON-PP 2.273.0 json_pp
361 + src_remove_dual perl-core/Module-CoreList 5.201.605.60 corelist
362 + src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
363 + src_remove_dual perl-core/Pod-Perldoc 3.250.200_rc perldoc
364 + src_remove_dual perl-core/Test-Harness 3.360.0 prove
365 + src_remove_dual perl-core/podlators 4.70.0 pod2man pod2text
366 + src_remove_dual_man perl-core/podlators 4.70.0 /usr/share/man/man1/perlpodstyle.1
367 +}
368 +
369 +# eblit-include [--skip] <function> [version]
370 +eblit-include() {
371 + local skipable=false
372 + [[ $1 == "--skip" ]] && skipable=true && shift
373 + [[ $1 == pkg_* ]] && skipable=true
374 +
375 + local e v func=$1 ver=$2
376 + [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
377 + for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
378 + e="${FILESDIR}/eblits/${func}${v}.eblit"
379 + if [[ -e ${e} ]] ; then
380 + . "${e}"
381 + return 0
382 + fi
383 + done
384 + ${skipable} && return 0
385 + die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
386 +}
387 +
388 +# eblit-run-maybe <function>
389 +# run the specified function if it is defined
390 +eblit-run-maybe() {
391 + [[ $(type -t "$@") == "function" ]] && "$@"
392 +}
393 +
394 +# eblit-run <function> [version]
395 +# aka: src_unpack() { eblit-run src_unpack ; }
396 +eblit-run() {
397 + eblit-include --skip common "${*:2}"
398 + eblit-include "$@"
399 + eblit-run-maybe eblit-$1-pre
400 + eblit-${PN}-$1
401 + eblit-run-maybe eblit-$1-post
402 +}
403 +
404 +src_prepare() { eblit-run src_prepare v50240001 ; }
405 +
406 +src_configure() { eblit-run src_configure v50240002 ; }
407 +
408 +#src_compile() { eblit-run src_compile v50160001 ; }
409 +
410 +src_test() {
411 + export NO_GENTOO_NETWORK_TESTS=1;
412 + eblit-run src_test v50160001 ;
413 +}
414 +
415 +src_install() { eblit-run src_install v50240001 ; }
416 +
417 +# FILESDIR might not be available during binpkg install
418 +# FIXME: version passing
419 +for x in setup {pre,post}{inst,rm} ; do
420 + e="${FILESDIR}/eblits/pkg_${x}-v50240001.eblit"
421 + if [[ -e ${e} ]] ; then
422 + . "${e}"
423 + eval "pkg_${x}() { eblit-run pkg_${x} v50240001 ; }"
424 + fi
425 +done