Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 08 Oct 2016 11:55:36
Message-Id: 1475926146.919456b0027522a51188286a433384f615c3dcf1.pacho@gentoo
1 commit: 919456b0027522a51188286a433384f615c3dcf1
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 8 11:29:06 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 8 11:29:06 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=919456b0
7
8 Remove some masked for removal eclasses
9
10 eclass/horde.eclass | 189 -------------------
11 eclass/java-mvn-src.eclass | 55 ------
12 eclass/phpconfutils.eclass | 462 ---------------------------------------------
13 3 files changed, 706 deletions(-)
14
15 diff --git a/eclass/horde.eclass b/eclass/horde.eclass
16 deleted file mode 100644
17 index 3db1a3a..00000000
18 --- a/eclass/horde.eclass
19 +++ /dev/null
20 @@ -1,189 +0,0 @@
21 -# Copyright 1999-2011 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
24 -#
25 -# @DEAD
26 -# This eclass is deprecated and no longer used. It will be removed
27 -# in 30 days, #587818
28 -
29 -
30 -# Help manage the horde project http://www.horde.org/
31 -#
32 -# Author: Mike Frysinger <vapier@g.o>
33 -# CVS additions by Chris Aniszczyk <zx@×××××××××.net>
34 -# SNAP additions by Jonathan Polansky <jpolansky@×××××××××.edu>
35 -#
36 -# This eclass provides generic functions to make the writing of horde
37 -# ebuilds fairly trivial since there are many horde applications and
38 -# they all share the same basic install process.
39 -
40 -# EHORDE_SNAP
41 -# This variable tracks whether the user is using a snapshot version
42 -#
43 -# EHORDE_SNAP_BRANCH
44 -# You set this via the ebuild to whatever branch you wish to grab a
45 -# snapshot of. Typically this is 'HEAD' or 'RELENG'.
46 -#
47 -# EHORDE_CVS
48 -# This variable tracks whether the user is using a cvs version
49 -
50 -inherit webapp eutils
51 -[[ ${PN} != ${PN/-cvs} ]] && inherit cvs
52 -
53 -IUSE="vhosts"
54 -
55 -EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
56 -
57 -[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/horde-}"
58 -[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
59 -
60 -EHORDE_CVS="false"
61 -EHORDE_SNAP="false"
62 -if [[ ${PN} != ${PN/-cvs} ]] ; then
63 - EHORDE_CVS="true"
64 - HORDE_PN=${HORDE_PN/-cvs}
65 -
66 - ECVS_SERVER="anoncvs.horde.org:/repository"
67 - ECVS_MODULE="${HORDE_PN}"
68 - ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src/${PN}"
69 - ECVS_USER="cvsread"
70 - ECVS_PASS="horde"
71 -
72 - SRC_URI=""
73 - S=${WORKDIR}/${HORDE_PN}
74 -
75 -elif [[ ${PN} != ${PN/-snap} ]] ; then
76 - EHORDE_SNAP="true"
77 - EHORDE_SNAP_BRANCH=${EHORDE_SNAP_BRANCH:-HEAD}
78 - SNAP_PV=${PV:0:4}-${PV:4:2}-${PV:6:2}
79 -
80 - HORDE_PN=${HORDE_PN/-snap}
81 -
82 - SRC_URI="http://ftp.horde.org/pub/snaps/${SNAP_PV}/${HORDE_PN}-${EHORDE_SNAP_BRANCH}-${SNAP_PV}.tar.gz"
83 - S=${WORKDIR}/${HORDE_PN}
84 -
85 -else
86 - SRC_URI="http://ftp.horde.org/pub/${HORDE_PN}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}.tar.gz"
87 - S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}
88 -fi
89 -HOMEPAGE="http://www.horde.org/${HORDE_PN}"
90 -
91 -LICENSE="LGPL-2"
92 -
93 -# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
94 -INSTALL_DIR="/horde"
95 -[[ ${HORDE_PN} != "horde" && ${HORDE_PN} != "horde-groupware" && ${HORDE_PN} != "horde-webmail" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
96 -
97 -HORDE_APPLICATIONS="${HORDE_APPLICATIONS} ."
98 -
99 -horde_pkg_setup() {
100 - webapp_pkg_setup
101 -
102 - if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
103 - local param
104 - if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
105 - param="-o"
106 - HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
107 - fi
108 - if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
109 - echo
110 - if [[ ${param} == "-o" ]] ; then
111 - eerror "You MUST re-emerge php with at least one of"
112 - else
113 - eerror "You MUST re-emerge php with all of"
114 - fi
115 - eerror "the following options in your USE:"
116 - eerror " ${HORDE_PHP_FEATURES}"
117 - die "current php install cannot support ${HORDE_PN}"
118 - fi
119 - fi
120 -}
121 -
122 -horde_src_unpack() {
123 - if [[ ${EHORDE_CVS} = "true" ]] ; then
124 - cvs_src_unpack
125 - else
126 - unpack ${A}
127 - fi
128 - cd "${S}"
129 -
130 - [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
131 -
132 - for APP in ${HORDE_APPLICATIONS}
133 - do
134 - [[ -f ${APP}/test.php ]] && chmod 000 ${APP}/test.php
135 - done
136 -}
137 -
138 -horde_src_install() {
139 - webapp_src_preinst
140 -
141 - local destdir=${MY_HTDOCSDIR}
142 -
143 - # Work-around when dealing with CVS sources
144 - [[ ${EHORDE_CVS} = "true" ]] && cd ${HORDE_PN}
145 -
146 - # Install docs and then delete them (except for CREDITS which
147 - # many horde apps include in their help page #121003)
148 - dodoc README docs/*
149 - mv docs/CREDITS "${T}"/
150 - rm -rf COPYING LICENSE README docs/*
151 - mv "${T}"/CREDITS docs/
152 -
153 - dodir ${destdir}
154 - cp -r . "${D}"/${destdir}/ || die "install files"
155 -
156 - for APP in ${HORDE_APPLICATIONS}
157 - do
158 - for DISTFILE in ${APP}/config/*.dist
159 - do
160 - if [[ -f ${DISTFILE/.dist/} ]] ; then
161 - webapp_configfile "${MY_HTDOCSDIR}"/${DISTFILE/.dist/}
162 - fi
163 - done
164 - if [[ -f ${APP}/config/conf.php ]] ; then
165 - webapp_serverowned "${MY_HTDOCSDIR}"/${APP}/config/conf.php
166 - webapp_configfile "${MY_HTDOCSDIR}"/${APP}/config/conf.php
167 - fi
168 - done
169 -
170 - [[ -n ${HORDE_RECONFIG} ]] && webapp_hook_script ${HORDE_RECONFIG}
171 - [[ -n ${HORDE_POSTINST} ]] && webapp_postinst_txt en ${HORDE_POSTINST}
172 -
173 - webapp_src_install
174 -}
175 -
176 -horde_pkg_postinst() {
177 - if [ -e ${ROOT}/usr/share/doc/${PF}/INSTALL* ] ; then
178 - elog "Please read the INSTALL file in /usr/share/doc/${PF}."
179 - fi
180 -
181 - einfo "Before this package will work, you have to setup the configuration files."
182 - einfo "Please review the config/ subdirectory of ${HORDE_PN} in the webroot."
183 -
184 - if [ -e ${ROOT}/usr/share/doc/${PF}/SECURITY* ] ; then
185 - ewarn
186 - ewarn "Users are HIGHLY recommended to consult the SECURITY guide in"
187 - ewarn "/usr/share/doc/${PF} before going into production with Horde."
188 - fi
189 -
190 - if [[ ${HORDE_PN} != "horde" && ${HORDE_PN} != "horde-groupware" && ${HORDE_PN} != "horde-webmail" ]] ; then
191 - ewarn
192 - ewarn "Make sure ${HORDE_PN} is accounted for in Horde's root"
193 - ewarn " config/registry.php"
194 - fi
195 -
196 - if [[ ${EHORDE_CVS} = "true" ]] ; then
197 - ewarn
198 - ewarn "Use these CVS versions at your own risk."
199 - ewarn "They tend to break things when working with the non CVS versions of horde."
200 - fi
201 -
202 - if use vhosts ; then
203 - ewarn
204 - ewarn "When installing Horde into a vhost dir, you will need to use the"
205 - ewarn "-d option so that it is installed into the proper location."
206 - fi
207 -
208 - webapp_pkg_postinst
209 -}
210
211 diff --git a/eclass/java-mvn-src.eclass b/eclass/java-mvn-src.eclass
212 deleted file mode 100644
213 index 497732b..00000000
214 --- a/eclass/java-mvn-src.eclass
215 +++ /dev/null
216 @@ -1,55 +0,0 @@
217 -# Copyright 2004-2015 Gentoo Foundation
218 -# Distributed under the terms of the GNU General Public License v2
219 -# $Id$
220 -
221 -# @DEAD
222 -# This eclass is deprecated and no longer used. It will be removed
223 -# in 30 days, #587824.
224 -
225 -
226 -# @ECLASS: java-mvn-src.eclass
227 -# @MAINTAINER:
228 -# java@g.o
229 -# @AUTHOR:
230 -# Java maintainers (java@g.o)
231 -# @BLURB: Eclass for Java packages from bare sources exported by Maven
232 -# @DESCRIPTION:
233 -# This class is intended to build pure Java packages from the sources exported
234 -# from the source:jar goal of Maven 2. These archives contain bare Java source
235 -# files, with no build instructions or additional resource files. They are
236 -# unsuitable for packages that require resources besides compiled class files.
237 -# The benefit is that for artifacts developed with Maven, these source files
238 -# are often released together with binary packages, whereas the full build
239 -# environment might be contained in some revision control system or not
240 -# available at all.
241 -
242 -inherit java-pkg-simple
243 -
244 -# @ECLASS-VARIABLE: GROUP_ID
245 -# @DESCRIPTION:
246 -# The groupId of the artifact, in dotted notation. Default value is ${PN}.
247 -: ${GROUP_ID:=${PN}}
248 -
249 -# @ECLASS-VARIABLE: ARTIFACT_ID
250 -# @DESCRIPTION:
251 -# The artifactId of the artifact. Default value is ${PN}.
252 -: ${ARTIFACT_ID:=${PN}}
253 -
254 -# @ECLASS-VARIABLE: MAVEN2_REPOSITORIES
255 -# @DESCRIPTION:
256 -# The repositories to search for the artifacts. Must follow Maven2 layout.
257 -# Default value is the following string:
258 -# "http://repo2.maven.org/maven2 http://download.java.net/maven/2"
259 -: ${MAVEN2_REPOSITORIES:="http://repo2.maven.org/maven2 http://download.java.net/maven/2"}
260 -
261 -# @ECLASS-VARIABLE: RELATIVE_SRC_URI
262 -# @DESCRIPTION:
263 -# The path of the source artifact relative to the root of the repository.
264 -# Will be set by the eclass to follow Maven 2 repository layout.
265 -RELATIVE_SRC_URI=${GROUP_ID//./\/}/${ARTIFACT_ID}/${PV}/${ARTIFACT_ID}-${PV}-sources.jar
266 -
267 -# Look for source jar in all listed repositories
268 -for repo in ${MAVEN2_REPOSITORIES}; do
269 - SRC_URI="${SRC_URI} ${repo}/${RELATIVE_SRC_URI}"
270 -done
271 -unset repo
272
273 diff --git a/eclass/phpconfutils.eclass b/eclass/phpconfutils.eclass
274 deleted file mode 100644
275 index 31f3cbf..00000000
276 --- a/eclass/phpconfutils.eclass
277 +++ /dev/null
278 @@ -1,462 +0,0 @@
279 -# Copyright 1999-2011 Gentoo Foundation
280 -# Distributed under the terms of the GNU General Public License v2
281 -# $Id$
282 -
283 -# @DEAD
284 -# This eclass is deprecated and no longer used. It will be removed
285 -# in 30 days, #587826.
286 -
287 -# @ECLASS: phpconfutils.eclass
288 -# @MAINTAINER:
289 -# Gentoo PHP team <php-bugs@g.o>
290 -# @AUTHOR:
291 -# Based on Stuart's work on the original confutils eclass
292 -# Luca Longinotti <chtekk@g.o>
293 -# @BLURB: Provides utility functions to help with configuring PHP.
294 -# @DESCRIPTION:
295 -# This eclass provides utility functions to help with configuring PHP.
296 -# It is only used by other php eclasses currently and the functions
297 -# are not generally intended for direct use in ebuilds.
298 -
299 -
300 -# ========================================================================
301 -# List of USE flags that need deps that aren't yet in Portage
302 -# or that can't be (fex. certain commercial apps)
303 -#
304 -# You must define PHPCONFUTILS_MISSING_DEPS if you need this
305 -
306 -# ========================================================================
307 -# phpconfutils_sort_flags()
308 -#
309 -# Sort and remove duplicates of the auto-enabled USE flags
310 -#
311 -
312 -phpconfutils_sort_flags() {
313 - # Sort the list of auto-magically enabled USE flags
314 - PHPCONFUTILS_AUTO_USE="$(echo ${PHPCONFUTILS_AUTO_USE} | tr '\040\010' '\012\012' | sort -u)"
315 -}
316 -
317 -# ========================================================================
318 -# phpconfutils_init()
319 -#
320 -# Call this function from your src_compile() function to initialise
321 -# this eclass first
322 -#
323 -
324 -phpconfutils_init() {
325 - # Define wheter we shall support shared extensions or not
326 - if use "sharedext" ; then
327 - shared="=shared"
328 - else
329 - shared=""
330 - fi
331 -
332 - phpconfutils_sort_flags
333 -}
334 -
335 -# ========================================================================
336 -# phpconfutils_usecheck()
337 -#
338 -# Check if the USE flag we want enabled is part of the auto-magical ones
339 -#
340 -
341 -phpconfutils_usecheck() {
342 - local x
343 - local use="$1"
344 -
345 - for x in ${PHPCONFUTILS_AUTO_USE} ; do
346 - if [[ "${use}+" == "${x}+" ]] ; then
347 - return 0
348 - fi
349 - done
350 -
351 - # If we get here, the USE is not among the auto-enabled ones
352 - return 1
353 -}
354 -
355 -# ========================================================================
356 -# phpconfutils_require_any()
357 -#
358 -# Use this function to ensure one or more of the specified USE flags have
359 -# been enabled and output the results
360 -#
361 -# $1 - message to output everytime a flag is found
362 -# $2 - message to output everytime a flag is not found
363 -# $3 .. - flags to check
364 -#
365 -
366 -phpconfutils_require_any() {
367 - local success_msg="$1"
368 - shift
369 - local fail_msg="$1"
370 - shift
371 -
372 - local required_flags="$@"
373 - local default_flag="$1"
374 - local success="0"
375 -
376 - while [[ -n "$1" ]] ; do
377 - if use "$1" ; then
378 - einfo "${success_msg} $1"
379 - success="1"
380 - else
381 - einfo "${fail_msg} $1"
382 - fi
383 - shift
384 - done
385 -
386 - # Did we find what we are looking for?
387 - if [[ "${success}" == "1" ]] ; then
388 - return
389 - fi
390 -
391 - # If we get here, then none of the required USE flags were enabled
392 - eerror
393 - eerror "You should enable one or more of the following USE flags:"
394 - eerror " ${required_flags}"
395 - eerror
396 - eerror "You can do this by enabling these flags in /etc/portage/package.use:"
397 - eerror " =${CATEGORY}/${PN}-${PVR} ${required_flags}"
398 - eerror
399 - eerror "The ${default_flag} USE flag was automatically enabled now."
400 - eerror
401 - PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE} ${default_flag}"
402 -}
403 -
404 -# ========================================================================
405 -# phpconfutils_use_conflict()
406 -#
407 -# Use this function to automatically complain to the user if USE flags
408 -# that directly conflict have been enabled
409 -#
410 -# $1 - flag that conflicts with other flags
411 -# $2 .. - flags that conflict
412 -#
413 -
414 -phpconfutils_use_conflict() {
415 - phpconfutils_sort_flags
416 -
417 - if ! use "$1" && ! phpconfutils_usecheck "$1" ; then
418 - return
419 - fi
420 -
421 - local my_flag="$1"
422 - shift
423 -
424 - local my_present=""
425 - local my_remove=""
426 -
427 - while [[ "$1+" != "+" ]] ; do
428 - if use "$1" || phpconfutils_usecheck "$1" ; then
429 - my_present="${my_present} $1"
430 - my_remove="${my_remove} -$1"
431 - fi
432 - shift
433 - done
434 -
435 - if [[ -n "${my_present}" ]] ; then
436 - eerror
437 - eerror "USE flag '${my_flag}' conflicts with these USE flag(s):"
438 - eerror " ${my_present}"
439 - eerror
440 - eerror "You must disable these conflicting flags before you can emerge this package."
441 - eerror "You can do this by disabling these flags in /etc/portage/package.use:"
442 - eerror " =${CATEGORY}/${PN}-${PVR} ${my_remove}"
443 - eerror
444 - die "Conflicting USE flags found"
445 - fi
446 -}
447 -
448 -# ========================================================================
449 -# phpconfutils_use_depend_all()
450 -#
451 -# Use this function to specify USE flags that depend on eachother,
452 -# they will be automatically enabled and used for checks later
453 -#
454 -# $1 - flag that depends on other flags
455 -# $2 .. - the flags that must be set for $1 to be valid
456 -#
457 -
458 -phpconfutils_use_depend_all() {
459 - phpconfutils_sort_flags
460 -
461 - if ! use "$1" && ! phpconfutils_usecheck "$1" ; then
462 - return
463 - fi
464 -
465 - local my_flag="$1"
466 - shift
467 -
468 - local my_missing=""
469 -
470 - while [[ "$1+" != "+" ]] ; do
471 - if ! use "$1" && ! phpconfutils_usecheck "$1" ; then
472 - my_missing="${my_missing} $1"
473 - fi
474 - shift
475 - done
476 -
477 - if [[ -n "${my_missing}" ]] ; then
478 - PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE} ${my_missing}"
479 - ewarn
480 - ewarn "USE flag '${my_flag}' needs these additional flag(s) set:"
481 - ewarn " ${my_missing}"
482 - ewarn
483 - ewarn "'${my_missing}' was automatically enabled and the required extensions will be"
484 - ewarn "built. In any case it is recommended to enable those flags for"
485 - ewarn "future reference, by adding the following to /etc/portage/package.use:"
486 - ewarn " =${CATEGORY}/${PN}-${PVR} ${my_missing}"
487 - ewarn
488 - fi
489 -}
490 -
491 -# ========================================================================
492 -# phpconfutils_use_depend_any()
493 -#
494 -# Use this function to automatically complain to the user if a USE flag
495 -# depends on another USE flag that hasn't been enabled
496 -#
497 -# $1 - flag that depends on other flags
498 -# $2 - flag that is used as default if none is enabled
499 -# $3 .. - flags that must be set for $1 to be valid
500 -#
501 -
502 -phpconfutils_use_depend_any() {
503 - phpconfutils_sort_flags
504 -
505 - if ! use "$1" && ! phpconfutils_usecheck "$1" ; then
506 - return
507 - fi
508 -
509 - local my_flag="$1"
510 - shift
511 -
512 - local my_default_flag="$1"
513 - shift
514 -
515 - local my_found=""
516 - local my_missing=""
517 -
518 - while [[ "$1+" != "+" ]] ; do
519 - if use "$1" || phpconfutils_usecheck "$1" ; then
520 - my_found="${my_found} $1"
521 - else
522 - my_missing="${my_missing} $1"
523 - fi
524 - shift
525 - done
526 -
527 - if [[ -z "${my_found}" ]] ; then
528 - PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE} ${my_default_flag}"
529 - ewarn
530 - ewarn "USE flag '${my_flag}' needs one of these additional flag(s) set:"
531 - ewarn " ${my_missing}"
532 - ewarn
533 - ewarn "'${my_default_flag}' was automatically selected and enabled."
534 - ewarn "You can change that by enabling/disabling those flags accordingly"
535 - ewarn "in /etc/portage/package.use."
536 - ewarn
537 - fi
538 -}
539 -
540 -# ========================================================================
541 -# phpconfutils_extension_disable()
542 -#
543 -# Use this function to disable an extension that is enabled by default.
544 -# This is provided for those rare configure scripts that don't support
545 -# a --enable for the corresponding --disable
546 -#
547 -# $1 - extension name
548 -# $2 - USE flag
549 -# $3 - optional message to einfo() to the user
550 -#
551 -
552 -phpconfutils_extension_disable() {
553 - if ! use "$2" && ! phpconfutils_usecheck "$2" ; then
554 - my_conf="${my_conf} --disable-$1"
555 - [[ -n "$3" ]] && einfo " Disabling $1"
556 - else
557 - [[ -n "$3" ]] && einfo " Enabling $1"
558 - fi
559 -}
560 -
561 -# ========================================================================
562 -# phpconfutils_extension_enable()
563 -#
564 -# This function is like use_enable(), except that it knows about
565 -# enabling modules as shared libraries, and it supports passing
566 -# additional data with the switch
567 -#
568 -# $1 - extension name
569 -# $2 - USE flag
570 -# $3 - 1 = support shared, 0 = never support shared
571 -# $4 - additional setting for configure
572 -# $5 - additional message to einfo out to the user
573 -#
574 -
575 -phpconfutils_extension_enable() {
576 - local my_shared
577 -
578 - if [[ "$3" == "1" ]] ; then
579 - if [[ "${shared}+" != "+" ]] ; then
580 - my_shared="${shared}"
581 - if [[ "$4+" != "+" ]] ; then
582 - my_shared="${my_shared},$4"
583 - fi
584 - elif [[ "$4+" != "+" ]] ; then
585 - my_shared="=$4"
586 - fi
587 - else
588 - if [[ "$4+" != "+" ]] ; then
589 - my_shared="=$4"
590 - fi
591 - fi
592 -
593 - if use "$2" || phpconfutils_usecheck "$2" ; then
594 - my_conf="${my_conf} --enable-$1${my_shared}"
595 - einfo " Enabling $1"
596 - else
597 - my_conf="${my_conf} --disable-$1"
598 - einfo " Disabling $1"
599 - fi
600 -}
601 -
602 -# ========================================================================
603 -# phpconfutils_extension_without()
604 -#
605 -# Use this function to disable an extension that is enabled by default
606 -# This function is provided for those rare configure scripts that support
607 -# --without but not the corresponding --with
608 -#
609 -# $1 - extension name
610 -# $2 - USE flag
611 -# $3 - optional message to einfo() to the user
612 -#
613 -
614 -phpconfutils_extension_without() {
615 - if ! use "$2" && ! phpconfutils_usecheck "$2" ; then
616 - my_conf="${my_conf} --without-$1"
617 - einfo " Disabling $1"
618 - else
619 - einfo " Enabling $1"
620 - fi
621 -}
622 -
623 -# ========================================================================
624 -# phpconfutils_extension_with()
625 -#
626 -# This function is a replacement for use_with. It supports building
627 -# extensions as shared libraries,
628 -#
629 -# $1 - extension name
630 -# $2 - USE flag
631 -# $3 - 1 = support shared, 0 = never support shared
632 -# $4 - additional setting for configure
633 -# $5 - optional message to einfo() out to the user
634 -#
635 -
636 -phpconfutils_extension_with() {
637 - local my_shared
638 -
639 - if [[ "$3" == "1" ]] ; then
640 - if [[ "${shared}+" != "+" ]] ; then
641 - my_shared="${shared}"
642 - if [[ "$4+" != "+" ]] ; then
643 - my_shared="${my_shared},$4"
644 - fi
645 - elif [[ "$4+" != "+" ]] ; then
646 - my_shared="=$4"
647 - fi
648 - else
649 - if [[ "$4+" != "+" ]] ; then
650 - my_shared="=$4"
651 - fi
652 - fi
653 -
654 - if use "$2" || phpconfutils_usecheck "$2" ; then
655 - my_conf="${my_conf} --with-$1${my_shared}"
656 - einfo " Enabling $1"
657 - else
658 - my_conf="${my_conf} --without-$1"
659 - einfo " Disabling $1"
660 - fi
661 -}
662 -
663 -# ========================================================================
664 -# phpconfutils_warn_about_external_deps()
665 -#
666 -# This will output a warning to the user if he enables commercial or other
667 -# software not currently present in Portage
668 -#
669 -
670 -phpconfutils_warn_about_external_deps() {
671 - phpconfutils_sort_flags
672 -
673 - local x
674 - local my_found="0"
675 -
676 - for x in ${PHPCONFUTILS_MISSING_DEPS} ; do
677 - if use "${x}" || phpconfutils_usecheck "${x}" ; then
678 - ewarn "USE flag ${x} enables support for software not present in Portage!"
679 - my_found="1"
680 - fi
681 - done
682 -
683 - if [[ "${my_found}" == "1" ]] ; then
684 - ewarn
685 - ewarn "This ebuild will continue, but if you haven't already installed the"
686 - ewarn "software required to satisfy the list above, this package will probably"
687 - ewarn "fail to compile later on."
688 - ewarn "*DO NOT* file bugs about compile failures or issues you're having"
689 - ewarn "when using one of those flags, as we aren't able to support them."
690 - ewarn "|=|=|=|=|=|=| You are on your own if you use them! |=|=|=|=|=|=|"
691 - ewarn
692 - ebeep 5
693 - fi
694 -}
695 -
696 -# ========================================================================
697 -# phpconfutils_built_with_use()
698 -#
699 -# Sobstitute for built_with_use() to support the magically enabled USE flags
700 -#
701 -
702 -phpconfutils_built_with_use() {
703 - local opt="$1"
704 - [[ ${opt:0:1} = "-" ]] && shift || opt="-a"
705 -
706 - local PHP_PKG=$(best_version $1)
707 - shift
708 -
709 - local PHP_USEFILE="${ROOT}/var/lib/php-pkg/${PHP_PKG}/PHP_USEFILE"
710 -
711 - [[ ! -e "${PHP_USEFILE}" ]] && return 0
712 -
713 - local PHP_USE_BUILT=$(<${PHP_USEFILE})
714 - while [[ $# -gt 0 ]] ; do
715 - if [[ ${opt} = "-o" ]] ; then
716 - has $1 ${PHP_USE_BUILT} && return 0
717 - else
718 - has $1 ${PHP_USE_BUILT} || return 1
719 - fi
720 - shift
721 - done
722 - [[ ${opt} = "-a" ]]
723 -}
724 -
725 -# ========================================================================
726 -# phpconfutils_generate_usefile()
727 -#
728 -# Generate the file used by phpconfutils_built_with_use() to check it's
729 -# USE flags
730 -#
731 -
732 -phpconfutils_generate_usefile() {
733 - phpconfutils_sort_flags
734 -
735 - local PHP_USEFILE="${D}/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/PHP_USEFILE"
736 -
737 - # Write the auto-enabled USEs into the correct file
738 - dodir "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
739 - echo "${PHPCONFUTILS_AUTO_USE}" > "${PHP_USEFILE}"
740 -}