From 45bd9ff89e1ae0229980a373a9476c63ab3aef77 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 17 Feb 2022 11:21:22 +0100 Subject: [PATCH] eclass: Drop unused eclasses --- .../eclass/depend.apache.eclass | 381 ------------- .../portage-stable/eclass/fox.eclass | 229 -------- .../portage-stable/eclass/obs-download.eclass | 42 -- .../portage-stable/eclass/obs-service.eclass | 112 ---- .../portage-stable/eclass/qmail.eclass | 535 ------------------ .../portage-stable/eclass/xfconf.eclass | 161 ------ 6 files changed, 1460 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/depend.apache.eclass delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/fox.eclass delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/obs-download.eclass delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/obs-service.eclass delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/qmail.eclass delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/xfconf.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/depend.apache.eclass b/sdk_container/src/third_party/portage-stable/eclass/depend.apache.eclass deleted file mode 100644 index 79bfdcc493..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/depend.apache.eclass +++ /dev/null @@ -1,381 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: depend.apache.eclass -# @MAINTAINER: -# apache-devs@gentoo.org -# @SUPPORTED_EAPIS: 0 2 3 4 5 6 -# @BLURB: Functions to allow ebuilds to depend on apache -# @DESCRIPTION: -# This eclass handles depending on apache in a sane way and provides information -# about where certain binaries and configuration files are located. -# -# To make use of this eclass simply call one of the need/want_apache functions -# described below. Make sure you use the need/want_apache call after you have -# defined DEPEND and RDEPEND. Also note that you can not rely on the automatic -# RDEPEND=DEPEND that portage does if you use this eclass. -# -# See Bug 107127 for more information. -# -# @EXAMPLE: -# -# Here is an example of an ebuild depending on apache: -# -# @CODE -# DEPEND="virtual/Perl-CGI" -# RDEPEND="${DEPEND}" -# need_apache2 -# @CODE -# -# Another example which demonstrates non-standard IUSE options for optional -# apache support: -# -# @CODE -# DEPEND="server? ( virtual/Perl-CGI )" -# RDEPEND="${DEPEND}" -# want_apache2 server -# -# pkg_setup() { -# depend.apache_pkg_setup server -# } -# @CODE - -case ${EAPI:-0} in - 0|2|3|4|5) - inherit multilib - ;; - 6) - ;; - *) - die "EAPI=${EAPI} is not supported by depend.apache.eclass" - ;; -esac - -# ============================================================================== -# INTERNAL VARIABLES -# ============================================================================== - -# @ECLASS-VARIABLE: APACHE_VERSION -# @DESCRIPTION: -# Stores the version of apache we are going to be ebuilding. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APXS -# @DESCRIPTION: -# Path to the apxs tool. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APACHE_BIN -# @DESCRIPTION: -# Path to the apache binary. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APACHE_CTL -# @DESCRIPTION: -# Path to the apachectl tool. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APACHE_BASEDIR -# @DESCRIPTION: -# Path to the server root directory. -# This variable is set by the want/need_apache functions (EAPI=0 through 5) -# or depend.apache_pkg_setup (EAPI=6 and later). - -# @ECLASS-VARIABLE: APACHE_CONFDIR -# @DESCRIPTION: -# Path to the configuration file directory. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APACHE_MODULES_CONFDIR -# @DESCRIPTION: -# Path where module configuration files are kept. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APACHE_VHOSTS_CONFDIR -# @DESCRIPTION: -# Path where virtual host configuration files are kept. -# This variable is set by the want/need_apache functions. - -# @ECLASS-VARIABLE: APACHE_MODULESDIR -# @DESCRIPTION: -# Path where we install modules. -# This variable is set by the want/need_apache functions (EAPI=0 through 5) -# or depend.apache_pkg_setup (EAPI=6 and later). - -# @ECLASS-VARIABLE: APACHE_DEPEND -# @DESCRIPTION: -# Dependencies for Apache -APACHE_DEPEND="www-servers/apache" - -# @ECLASS-VARIABLE: APACHE2_DEPEND -# @DESCRIPTION: -# Dependencies for Apache 2.x -APACHE2_DEPEND="=www-servers/apache-2*" - -# @ECLASS-VARIABLE: APACHE2_2_DEPEND -# @DESCRIPTION: -# Dependencies for Apache 2.2.x -APACHE2_2_DEPEND="=www-servers/apache-2.2*" - -# @ECLASS-VARIABLE: APACHE2_4_DEPEND -# @DESCRIPTION: -# Dependencies for Apache 2.4.x -APACHE2_4_DEPEND="=www-servers/apache-2.4*" - - -# ============================================================================== -# INTERNAL FUNCTIONS -# ============================================================================== - -_init_apache2() { - debug-print-function $FUNCNAME $* - - # WARNING: Do not use these variables with anything that is put - # into the dependency cache (DEPEND/RDEPEND/etc) - APACHE_VERSION="2" - APXS="/usr/bin/apxs" - APACHE_BIN="/usr/sbin/apache2" - APACHE_CTL="/usr/sbin/apache2ctl" - APACHE_INCLUDEDIR="/usr/include/apache2" - APACHE_CONFDIR="/etc/apache2" - APACHE_MODULES_CONFDIR="${APACHE_CONFDIR}/modules.d" - APACHE_VHOSTS_CONFDIR="${APACHE_CONFDIR}/vhosts.d" - - case ${EAPI:-0} in - 0|2|3|4|5) - _init_apache2_late - ;; - esac -} - -_init_apache2_late() { - APACHE_BASEDIR="/usr/$(get_libdir)/apache2" - APACHE_MODULESDIR="${APACHE_BASEDIR}/modules" -} - -_init_no_apache() { - debug-print-function $FUNCNAME $* - APACHE_VERSION="0" -} - -# ============================================================================== -# PUBLIC FUNCTIONS -# ============================================================================== - -# @FUNCTION: depend.apache_pkg_setup -# @USAGE: [myiuse] -# @DESCRIPTION: -# An ebuild calls this in pkg_setup() to initialize variables for optional -# apache-2.x support. If the myiuse parameter is not given it defaults to -# apache2. -depend.apache_pkg_setup() { - debug-print-function $FUNCNAME $* - - if [[ "${EBUILD_PHASE}" != "setup" ]]; then - die "$FUNCNAME() should be called in pkg_setup()" - fi - - local myiuse=${1:-apache2} - - case ${EAPI:-0} in - 0|2|3|4|5) - if has ${myiuse} ${IUSE}; then - if use ${myiuse}; then - _init_apache2 - else - _init_no_apache - fi - fi - ;; - *) - if in_iuse ${myiuse}; then - if use ${myiuse}; then - _init_apache2 - _init_apache2_late - else - _init_no_apache - fi - fi - ;; - esac -} - -# @FUNCTION: want_apache -# @USAGE: [myiuse] -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for optional apache -# support. If the myiuse parameter is not given it defaults to apache2. -# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() -# with the same myiuse parameter. -want_apache() { - debug-print-function $FUNCNAME $* - want_apache2 "$@" -} - -# @FUNCTION: want_apache2 -# @USAGE: [myiuse] -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for optional apache-2.x -# support. If the myiuse parameter is not given it defaults to apache2. -# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() -# with the same myiuse parameter. -want_apache2() { - debug-print-function $FUNCNAME $* - - local myiuse=${1:-apache2} - IUSE="${IUSE} ${myiuse}" - DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" - RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" -} - -# @FUNCTION: want_apache2_2 -# @USAGE: [myiuse] -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for optional -# apache-2.2.x support. If the myiuse parameter is not given it defaults to -# apache2. -# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() -# with the same myiuse parameter. -want_apache2_2() { - debug-print-function $FUNCNAME $* - - local myiuse=${1:-apache2} - IUSE="${IUSE} ${myiuse}" - DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" - RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" -} - -# @FUNCTION: want_apache2_4 -# @USAGE: [myiuse] -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for optional -# apache-2.4.x support. If the myiuse parameter is not given it defaults to -# apache2. -# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() -# with the same myiuse parameter. -want_apache2_4() { - debug-print-function $FUNCNAME $* - - local myiuse=${1:-apache2} - IUSE="${IUSE} ${myiuse}" - DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_4_DEPEND} )" - RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_4_DEPEND} )" -} - -# @FUNCTION: need_apache -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for apache. -need_apache() { - debug-print-function $FUNCNAME $* - need_apache2 -} - -# @FUNCTION: need_apache2 -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for apache-2.x. -need_apache2() { - debug-print-function $FUNCNAME $* - - DEPEND="${DEPEND} ${APACHE2_DEPEND}" - RDEPEND="${RDEPEND} ${APACHE2_DEPEND}" - _init_apache2 -} - -# @FUNCTION: need_apache2_2 -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for apache-2.2.x. -need_apache2_2() { - debug-print-function $FUNCNAME $* - - DEPEND="${DEPEND} ${APACHE2_2_DEPEND}" - RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}" - _init_apache2 -} - -# @FUNCTION: need_apache2_4 -# @DESCRIPTION: -# An ebuild calls this to get the dependency information for apache-2.4.x. -need_apache2_4() { - debug-print-function $FUNCNAME $* - - DEPEND="${DEPEND} ${APACHE2_4_DEPEND}" - RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}" - _init_apache2 -} - -# @FUNCTION: has_apache -# @DESCRIPTION: -# An ebuild calls this to get runtime variables for an indirect apache -# dependency without USE-flag, in which case want_apache does not work. -# DO NOT call this function in global scope. -has_apache() { - debug-print-function $FUNCNAME $* - - if has_version '>=www-servers/apache-2'; then - _init_apache2 - else - _init_no_apache - fi -} - -# @FUNCTION: has_apache_threads -# @USAGE: [myflag] -# @DESCRIPTION: -# An ebuild calls this to make sure thread-safety is enabled if apache has been -# built with a threaded MPM. If the myflag parameter is not given it defaults to -# threads. -has_apache_threads() { - debug-print-function $FUNCNAME $* - - case ${EAPI:-0} in - 0|1) - die "depend.apache.eclass: has_apache_threads is not supported for EAPI=${EAPI:-0}" - ;; - esac - - if ! has_version 'www-servers/apache[threads]'; then - return - fi - - local myflag="${1:-threads}" - - if ! use ${myflag}; then - echo - eerror "You need to enable USE flag '${myflag}' to build a thread-safe version" - eerror "of ${CATEGORY}/${PN} for use with www-servers/apache" - die "Need missing USE flag '${myflag}'" - fi -} - -# @FUNCTION: has_apache_threads_in -# @USAGE: [myflag] -# @DESCRIPTION: -# An ebuild calls this to make sure thread-safety is enabled in a foreign -# package if apache has been built with a threaded MPM. If the myflag parameter -# is not given it defaults to threads. -has_apache_threads_in() { - debug-print-function $FUNCNAME $* - - case ${EAPI:-0} in - 0|1) - die "depend.apache.eclass: has_apache_threads_in is not supported for EAPI=${EAPI:-0}" - ;; - esac - - if ! has_version 'www-servers/apache[threads]'; then - return - fi - - local myforeign="$1" - local myflag="${2:-threads}" - - if ! has_version "${myforeign}[${myflag}]"; then - echo - eerror "You need to enable USE flag '${myflag}' in ${myforeign} to" - eerror "build a thread-safe version of ${CATEGORY}/${PN} for use" - eerror "with www-servers/apache" - die "Need missing USE flag '${myflag}' in ${myforeign}" - fi -} - -EXPORT_FUNCTIONS pkg_setup diff --git a/sdk_container/src/third_party/portage-stable/eclass/fox.eclass b/sdk_container/src/third_party/portage-stable/eclass/fox.eclass deleted file mode 100644 index 529f5a2589..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/fox.eclass +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: fox.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @BLURB: Functionality required the FOX Toolkit and it's applications -# @DESCRIPTION: -# This eclass allows building SLOT-able FOX Toolkit installations -# (x11-libs/fox: headers, libs, and docs), which are by design -# parallel-installable, while installing only one version of the utils -# (dev-util/reswrap) and apps (app-editors/adie, sci-calculators/calculator, -# x11-misc/pathfinder, and x11-misc/shutterbug). -# -# Version numbering follows the kernel-style odd-even minor version -# designation. Even-number minor versions are API stable, which patch -# releases aimed mostly at the library; apps generally won't need to be -# bumped for a patch release. -# -# Odd-number versions are development branches with their own SLOT and -# are API unstable; changes are made to the apps, and likely need to be -# bumped together with the library. -# -# Here are sample [R]DEPENDs for the fox apps -# 1.6: 'x11-libs/fox:1.6' -# 1.7: '~x11-libs/fox-${PV}' -# -# EAPI phase trickery borrowed from enlightenment.eclass - -inherit autotools versionator - - -FOX_EXPF="src_unpack src_compile src_install pkg_postinst" -case "${EAPI:-0}" in - 2|3|4|5) FOX_EXPF+=" src_prepare src_configure" ;; - *) ;; -esac -EXPORT_FUNCTIONS ${FOX_EXPF} - -# @ECLASS-VARIABLE: FOX_PV -# @DESCRIPTION: -# The version of the FOX Toolkit provided or required by the package -: ${FOX_PV:=${PV}} - -# @ECLASS-VARIABLE: FOXVER -# @INTERNAL -# @DESCRIPTION: -# The major.minor version of FOX_PV, usually acts as $SLOT and is used in -# building the applications -FOXVER=$(get_version_component_range 1-2 ${FOX_PV}) - -# @ECLASS-VARIABLE: FOX_APPS -# @INTERNAL -# @DESCRIPTION: -# The applications originally packaged in the FOX Toolkit -FOX_APPS="adie calculator pathfinder shutterbug" - -# @ECLASS-VARIABLE: FOXCONF -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set this to add additional configuration options during src_configure - -DESCRIPTION="C++ Toolkit for developing Graphical User Interfaces easily and effectively" -HOMEPAGE="http://www.fox-toolkit.org/" -SRC_URI="ftp://ftp.fox-toolkit.org/pub/fox-${FOX_PV}.tar.gz" - -IUSE="debug doc profile" - -if [[ ${PN} != fox ]] ; then - FOX_COMPONENT="${FOX_COMPONENT:-${PN}}" -fi - -if [[ -z ${FOX_COMPONENT} ]] ; then - DOXYGEN_DEP="doc? ( app-doc/doxygen )" -fi - -if [[ ${PN} != reswrap ]] ; then - RESWRAP_DEP="dev-util/reswrap" -fi - -DEPEND="${DOXYGEN_DEP} - ${RESWRAP_DEP} - >=sys-apps/sed-4" - -S="${WORKDIR}/fox-${FOX_PV}" - -fox_src_unpack() { - unpack ${A} - cd "${S}" - - has src_prepare ${FOX_EXPF} || fox_src_prepare -} - -fox_src_prepare() { - # fox changed from configure.in to configure.am in 1.6.38 - local confFile="configure.ac" - [[ -r "configure.in" ]] && confFile="configure.in" - - # Respect system CXXFLAGS - sed -i -e 's:CXXFLAGS=""::' $confFile || die "sed ${confFile} error" - - # don't strip binaries - sed -i -e '/LDFLAGS="-s ${LDFLAGS}"/d' $confFile || die "sed ${confFile} error" - - # don't build apps from top-level (i.e. x11-libs/fox) - # utils == reswrap - local d - for d in ${FOX_APPS} utils windows ; do - sed -i -e "s:${d}::" Makefile.am || die "sed Makefile.am error" - done - - # use the installed reswrap for everything else - for d in ${FOX_APPS} chart controlpanel tests ; do - [[ -d ${d} ]] && - (sed -i -e 's:$(top_builddir)/utils/reswrap:reswrap:' \ - ${d}/Makefile.am || die "sed ${d}/Makefile.am error") - done - - # use the installed headers and library for apps - for d in ${FOX_APPS} ; do - sed -i \ - -e "s:-I\$(top_srcdir)/include -I\$(top_builddir)/include:-I\$(includedir)/fox-${FOXVER}:" \ - -e 's:$(top_builddir)/src/libFOX:-lFOX:' \ - -e 's:$(top_builddir)/lib/libFOX:-lFOX:' \ - -e 's:\.la::' \ - ${d}/Makefile.am || die "sed ${d}/Makefile.am error" - done - - eautoreconf -} - -fox_src_configure() { - use debug && FOXCONF+=" --enable-debug" \ - || FOXCONF+=" --enable-release" - - econf ${FOXCONF} \ - $(use_with profile profiling) -} - - -fox_src_compile() { - has src_configure ${FOX_EXPF} || fox_src_configure - - cd "${S}/${FOX_COMPONENT}" - emake || die "compile error" - - # build class reference docs (FOXVER >= 1.2) - if use doc && [[ -z ${FOX_COMPONENT} ]] ; then - emake -C "${S}"/doc docs || die "doxygen error" - fi -} - -fox_src_install() { - cd "${S}/${FOX_COMPONENT}" - - emake install \ - DESTDIR="${D}" \ - htmldir=/usr/share/doc/${PF}/html \ - artdir=/usr/share/doc/${PF}/html/art \ - screenshotsdir=/usr/share/doc/${PF}/html/screenshots \ - || die "install error" - - # create desktop menu items for apps - case ${FOX_COMPONENT} in - adie) - newicon big_gif.gif adie.gif - make_desktop_entry adie "Adie Text Editor" adie.gif - ;; - calculator) - newicon bigcalc.gif foxcalc.gif - make_desktop_entry calculator "FOX Calculator" foxcalc.gif - ;; - pathfinder) - newicon iconpath.gif pathfinder.gif - make_desktop_entry PathFinder "PathFinder" pathfinder.gif "FileManager" - ;; - shutterbug) - doicon shutterbug.gif - make_desktop_entry shutterbug "ShutterBug" shutterbug.gif "Graphics" - ;; - esac - - for doc in ADDITIONS AUTHORS LICENSE_ADDENDUM README TRACING ; do - [ -f $doc ] && dodoc $doc - done - - # remove documentation if USE=-doc - use doc || rm -fr "${D}/usr/share/doc/${PF}/html" - - # install class reference docs if USE=doc - if use doc && [[ -z ${FOX_COMPONENT} ]] ; then - dohtml -r "${S}/doc/ref" - fi - - # slot fox-config - if [[ -f ${D}/usr/bin/fox-config ]] ; then - mv "${D}/usr/bin/fox-config" "${D}/usr/bin/fox-${FOXVER}-config" \ - || die "failed to install fox-config" - fi -} - -fox_pkg_postinst() { - if [ -z "${FOX_COMPONENT}" ] ; then - echo - einfo "Multiple versions of the FOX Toolkit library may now be installed" - einfo "in parallel SLOTs on the same system." - einfo - einfo "The reswrap utility and the applications included in the FOX Toolkit" - einfo "(adie, calculator, pathfinder, shutterbug) are now available as" - einfo "separate ebuilds." - echo - - if version_is_at_least "1.7.25"; then - einfo "Fox versions after 1.7.25 ships a pkg-config file called fox17.pc" - einfo "instead of the previous fox-config tool." - einfo "You now get all info via pkg-config:" - einfo - einfo "pkg-config fox17 --libs (etc.)" - else - einfo "The fox-config script has been installed as fox-${FOXVER}-config." - einfo "The fox-wrapper package is used to direct calls to fox-config" - einfo "to the correct versioned script, based on the WANT_FOX variable." - einfo "For example:" - einfo - einfo " WANT_FOX=\"${FOXVER}\" fox-config " - fi - einfo - fi -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/obs-download.eclass b/sdk_container/src/third_party/portage-stable/eclass/obs-download.eclass deleted file mode 100644 index e40cdd2876..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/obs-download.eclass +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: obs-download.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @BLURB: Simplifies downloading from openSUSE Build Service. -# @DESCRIPTION: -# This eclass constructs OBS_URI based on provided project in openSUSE Build -# Service and package name. It can be used by packages/eclasses to download -# actual files. -# -# All you need to do in order to use it is set OBS_PROJECT and OBS_PACKAGE and -# inherit this eclass. It will provide OBS_URI in return which you will prepend -# to your files and use it in SRC_URI. Alternatively you can just set -# OPENSUSE_RELEASE and OBS_PACKAGE and it will give you back OBS_URI for -# downloading files from obs project corresponding to the specified openSUSE -# release. - -# @ECLASS-VARIABLE: OPENSUSE_RELEASE -# @DEFAULT_UNSET -# @DESCRIPTION: -# From which openSUSE realease to take files. -# Eg.: 12.1, 12.2, Factory - -# @ECLASS-VARIABLE: OBS_PROJECT -# @DEFAULT_UNSET -# @DESCRIPTION: -# In which obs project pakage is. -# This variable does not have to be set and is overridden, if -# OPENSUSE_RELEASE is provided. - -# @ECLASS-VARIABLE: OBS_PACKAGE -# @DESCRIPTION: -# Name of the package we want to take files from. -# By default taken from ${PN}. - -[[ -z ${OPENSUSE_RELEASE} ]] || OBS_PROJECT="openSUSE:${OPENSUSE_RELEASE}" -[[ -n ${OBS_PROJECT} ]] || die "OBS_PROJECT not set!" -[[ -n ${OBS_PACKAGE} ]] || OBS_PACKAGE="${PN}" - -OBS_URI="https://api.opensuse.org/public/source/${OBS_PROJECT}/${OBS_PACKAGE}" diff --git a/sdk_container/src/third_party/portage-stable/eclass/obs-service.eclass b/sdk_container/src/third_party/portage-stable/eclass/obs-service.eclass deleted file mode 100644 index faa879c063..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/obs-service.eclass +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: obs-service.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: Reduces code duplication in the Open Build Service services. -# @DESCRIPTION: -# This eclass makes it easier to package Open Build Service services. Based on -# provided information it will set all needed variables and takes care of -# installation. -# -# @EXAMPLE: -# Typical ebuild using obs-service.eclass: -# -# @CODE -# EAPI=4 -# -# inherit obs-service -# -# KEYWORDS="" -# -# DEPEND="" -# RDEPEND="${DEPEND}" -# -# @CODE - -# @ECLASS-VARIABLE: OBS_SERVICE_NAME -# @DESCRIPTION: -# Name of the service. If not set, it is taken from ${PN}. - -# @ECLASS-VARIABLE: ADDITIONAL_FILES -# @DEFAULT_UNSET -# @DESCRIPTION: -# If any additional files are needed. - -case "${EAPI:-0}" in - 4|5) : ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -HOMEPAGE="http://en.opensuse.org/openSUSE:OSC" -LICENSE="GPL-2" -SLOT="0" -IUSE="" - -RDEPEND=" - dev-util/osc - dev-util/suse-build -" - -[[ -n ${OBS_SERVICE_NAME} ]] || OBS_SERVICE_NAME=${PN/obs-service-/} -OBS_PROJECT="openSUSE:Tools" - -DESCRIPTION="Open Build Service client module - ${OBS_SERVICE_NAME} service" - -inherit obs-download - -# As it aint versioned at all use arrows to deal with it -SRC_URI="${OBS_URI}/${OBS_SERVICE_NAME} -> ${OBS_SERVICE_NAME}-${PV}" -SRC_URI+=" ${OBS_URI}/${OBS_SERVICE_NAME}.service -> ${OBS_SERVICE_NAME}-${PV}.service" - -for i in ${ADDITIONAL_FILES}; do - SRC_URI+=" ${OBS_URI}/${i} -> ${i}-${PV}" -done - -# @FUNCTION: obs-service_src_unpack -# @DESCRIPTION: -# Just copy files. Files are not compressed. -obs-service_src_unpack() { - debug-print-function ${FUNCNAME} "$@" - cd "${DISTDIR}" - mkdir -p "${S}" - cp ${A} "${S}" -} - -# @FUNCTION: obs-service_src_prepare -# @DESCRIPTION: -# Replaces all /usr/lib/build directories with /usr/share/suse-build to reflect -# where suse-build is installed in Gentoo. -obs-service_src_prepare() { - debug-print-function ${FUNCNAME} "$@" - debug-print "Replacing all paths to find suse-build in Gentoo" - find "${S}" -type f -exec \ - sed -i 's|/usr/lib/build|/usr/libexec/suse-build|g' {} + - debug-print "Replacing all paths from hardcoded suse libexec" - find "${S}" -type f -exec \ - sed -i 's|/usr/lib/obs|/usr/libexec/obs|g' {} + -} - -# @FUNCTION: obs-service_src_install -# @DESCRIPTION: -# Does the installation of the downloaded files. -obs-service_src_install() { - debug-print-function ${FUNCNAME} "$@" - debug-print "Installing service \"${OBS_SERVICE_NAME}\"" - exeinto /usr/libexec/obs/service - newexe "${S}"/${OBS_SERVICE_NAME}-${PV} ${OBS_SERVICE_NAME} - insinto /usr/libexec/obs/service - newins "${S}"/${OBS_SERVICE_NAME}-${PV}.service ${OBS_SERVICE_NAME}.service - if [[ -n ${ADDITIONAL_FILES} ]]; then - debug-print "Installing following additional files:" - debug-print " ${ADDITIONAL_FILES}" - exeinto /usr/libexec/obs/service/${OBS_SERVICE_NAME}.files - for i in ${ADDITIONAL_FILES}; do - newexe "${S}"/${i}-${PV} ${i} - done - fi -} - -EXPORT_FUNCTIONS src_install src_prepare src_unpack diff --git a/sdk_container/src/third_party/portage-stable/eclass/qmail.eclass b/sdk_container/src/third_party/portage-stable/eclass/qmail.eclass deleted file mode 100644 index 6ebbff442c..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/qmail.eclass +++ /dev/null @@ -1,535 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: qmail.eclass -# @MAINTAINER: -# qmail-bugs@gentoo.org -# @BLURB: common qmail functions - -inherit flag-o-matic toolchain-funcs fixheadtails user - -# hardcoded paths -QMAIL_HOME="/var/qmail" -TCPRULES_DIR="/etc/tcprules.d" -SUPERVISE_DIR="/var/qmail/supervise" - -# source files and directories -GENQMAIL_F=genqmail-${GENQMAIL_PV}.tar.bz2 -GENQMAIL_S="${WORKDIR}"/genqmail-${GENQMAIL_PV} - -QMAIL_SPP_F=qmail-spp-${QMAIL_SPP_PV}.tar.gz -QMAIL_SPP_S="${WORKDIR}"/qmail-spp-${QMAIL_SPP_PV} - -# @FUNCTION: primes -# @USAGE: -# @DESCRIPTION: -# Prints a list of primes between min and max inclusive -# Note: this functions gets very slow when used with large numbers. -primes() { - local min=${1} max=${2} - local result= primelist=2 i p - - [[ ${min} -le 2 ]] && result="${result} 2" - - for ((i = 3; i <= max; i += 2)) - do - for p in ${primelist} - do - [[ $[i % p] == 0 || $[p * p] -gt ${i} ]] && \ - break - done - if [[ $[i % p] != 0 ]] - then - primelist="${primelist} ${i}" - [[ ${i} -ge ${min} ]] && \ - result="${result} ${i}" - fi - done - - echo ${result} -} - -# @FUNCTION: is_prima -# @USAGE: -# @DESCRIPTION: -# Checks wether a number is a prime number -is_prime() { - local number=${1} i - for i in $(primes ${number} ${number}) - do - [[ ${i} == ${number} ]] && return 0 - done - return 1 -} - -dospp() { - insinto "${QMAIL_HOME}"/plugins/ - insopts -o root -g "$GROUP_ROOT" -m 0755 - newins $1 ${2:-$(basename $1)} -} - -# @FUNCTION: dosupervise -# @USAGE: dosupervise [ ] -# @DESCRIPTION: -# Install runfiles for services and logging to supervise directory -dosupervise() { - local service=$1 - local runfile=${2:-${service}} logfile=${3:-${service}-log} - [[ -z "${service}" ]] && die "no service given" - - insopts -o root -g "$GROUP_ROOT" -m 0755 - diropts -o root -g "$GROUP_ROOT" -m 0755 - - dodir ${SUPERVISE_DIR}/${service}{,/log} - fperms +t ${SUPERVISE_DIR}/${service}{,/log} - - insinto ${SUPERVISE_DIR}/${service} - newins ${runfile} run - - insinto ${SUPERVISE_DIR}/${service}/log - newins ${logfile} run -} - -# @FUNCTION: qmail_set_cc -# @DESCRIPTION: -# The following commands patch the conf-{cc,ld} files to use the user's -# specified CFLAGS and LDFLAGS. These rather complex commands are needed -# because a user supplied patch might apply changes to these files, too. -# See bug #165981. -qmail_set_cc() { - local cc=$(head -n 1 ./conf-cc | sed -e "s#^g\?cc\s\+\(-O2\)\?#$(tc-getCC) #") - local ld=$(head -n 1 ./conf-ld | sed -e "s#^g\?cc\s\+\(-s\)\?#$(tc-getCC) #") - - echo "${cc} ${CFLAGS} ${CPPFLAGS}" > ./conf-cc || die 'Patching conf-cc failed.' - echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.' -} - -# @FUNCTION: qmail_create_groups -# @DESCRIPTION: -# Keep qmail groups in sync across ebuilds -qmail_create_groups() { - einfo "Creating qmail groups" - enewgroup nofiles 200 - enewgroup qmail 201 -} - -# @FUNCTION: qmail_create_users -# @DESCRIPTION: -# Keep qmail users in sync across ebuilds -qmail_create_users() { - qmail_create_groups - - einfo "Creating qmail users" - enewuser alias 200 -1 "${QMAIL_HOME}"/alias 200 - enewuser qmaild 201 -1 "${QMAIL_HOME}" 200 - enewuser qmaill 202 -1 "${QMAIL_HOME}" 200 - enewuser qmailp 203 -1 "${QMAIL_HOME}" 200 - enewuser qmailq 204 -1 "${QMAIL_HOME}" 201 - enewuser qmailr 205 -1 "${QMAIL_HOME}" 201 - enewuser qmails 206 -1 "${QMAIL_HOME}" 201 -} - -genqmail_src_unpack() { - cd "${WORKDIR}" - [[ -n ${GENQMAIL_PV} ]] && unpack "${GENQMAIL_F}" -} - -qmail_spp_src_unpack() { - cd "${WORKDIR}" - [[ -n ${QMAIL_SPP_PV} ]] && unpack "${QMAIL_SPP_F}" -} - -# @FUNCTION: qmail_src_postunpack -# @DESCRIPTION: -# Unpack common config files, apply custom patches if supplied and -# set built configuration (CFLAGS, LDFLAGS, etc) -qmail_src_postunpack() { - cd "${S}" - - qmail_set_cc - - mysplit=${QMAIL_CONF_SPLIT:-23} - is_prime ${mysplit} || die "QMAIL_CONF_SPLIT is not a prime number." - einfo "Using conf-split value of ${mysplit}." - echo -n ${mysplit} > "${S}"/conf-split -} - -qmail_src_compile() { - cd "${S}" - emake it man "$@" || die "make failed" -} - -qmail_spp_src_compile() { - cd "${GENQMAIL_S}"/spp/ - emake || die "make spp failed" -} - -qmail_base_install() { - einfo "Setting up basic directory hierarchy" - diropts -o root -g qmail -m 755 - keepdir "${QMAIL_HOME}"/{,bin,control} - - einfo "Installing basic qmail software" - insinto "${QMAIL_HOME}"/bin - - insopts -o root -g qmail -m 755 - doins datemail elq forward maildir2mbox maildirmake \ - maildirwatch mailsubj pinq predate qail \ - qmail-{inject,qmqpc,showctl} sendmail - - einfo "Adding env.d entry for qmail" - doenvd "${GENQMAIL_S}"/conf/99qmail - - declare -F qmail_base_install_hook >/dev/null && \ - qmail_base_install_hook -} - -qmail_full_install() { - einfo "Setting up full directory hierarchy" - keepdir "${QMAIL_HOME}"/users - diropts -o alias -g qmail -m 755 - keepdir "${QMAIL_HOME}"/alias - - einfo "Installing all qmail software" - insopts -o root -g qmail -m 755 - doins bouncesaying condredirect config-fast except preline qbiff \ - qmail-{pop3d,qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \ - qreceipt qsmhook tcp-env - - insopts -o root -g qmail -m 711 - doins qmail-{clean,getpw,local,popup,pw2u,remote,rspawn,send} splogger - - insopts -o root -g qmail -m 700 - doins qmail-{lspawn,newmrh,newu,start} - - insopts -o qmailq -g qmail -m 4711 - doins qmail-queue - - declare -F qmail_full_install_hook >/dev/null && \ - qmail_full_install_hook -} - -qmail_config_install() { - einfo "Installing stock configuration files" - insinto "${QMAIL_HOME}"/control - insopts -o root -g "$GROUP_ROOT" -m 644 - doins "${GENQMAIL_S}"/control/{conf-*,defaultdelivery} - - einfo "Installing configuration sanity checker and launcher" - insinto "${QMAIL_HOME}"/bin - insopts -o root -g "$GROUP_ROOT" -m 644 - doins "${GENQMAIL_S}"/control/qmail-config-system - - declare -F qmail_config_install_hook >/dev/null && \ - qmail_config_install_hook -} - -qmail_man_install() { - einfo "Installing manpages and documentation" - - # those are tagged for section 8 but named for - # section 9 (which does not exist anyway) - for i in *.9; do - mv ${i} ${i/.9/.8} - done - - into /usr - doman *.[1578] - dodoc BLURB* CHANGES FAQ INSTALL* PIC* README* REMOVE* SECURITY \ - SENDMAIL SYSDEPS TEST* THANKS* THOUGHTS TODO* \ - UPGRADE VERSION* - - declare -F qmail_man_install_hook >/dev/null && \ - qmail_man_install_hook -} - -qmail_sendmail_install() { - einfo "Installing sendmail replacement" - diropts -m 755 - dodir /usr/sbin /usr/lib - - dosym "${QMAIL_HOME}"/bin/sendmail /usr/sbin/sendmail - dosym "${QMAIL_HOME}"/bin/sendmail /usr/lib/sendmail - - declare -F qmail_sendmail_install_hook >/dev/null && \ - qmail_sendmail_install_hook -} - -qmail_maildir_install() { - # use the correct maildirmake - # the courier-imap one has some extensions that are nicer - MAILDIRMAKE="${D}${QMAIL_HOME}/bin/maildirmake" - [[ -e /usr/bin/maildirmake ]] && \ - MAILDIRMAKE="/usr/bin/maildirmake" - - einfo "Setting up the default aliases" - diropts -o alias -g qmail -m 700 - "${MAILDIRMAKE}" "${D}${QMAIL_HOME}"/alias/.maildir - keepdir "${QMAIL_HOME}"/alias/.maildir/{cur,new,tmp} - - for i in "${QMAIL_HOME}"/alias/.qmail-{mailer-daemon,postmaster,root}; do - if [[ ! -f "${ROOT}${i}" ]]; then - touch "${D}${i}" - fowners alias:qmail "${i}" - fi - done - - einfo "Setting up default maildirs in the account skeleton" - diropts -o root -g "$GROUP_ROOT" -m 755 - insinto /etc/skel - insopts -o root -g "$GROUP_ROOT" -m 644 - newins "${GENQMAIL_S}"/control/defaultdelivery .qmail.sample - "${MAILDIRMAKE}" "${D}"/etc/skel/.maildir - keepdir /etc/skel/.maildir/{cur,new,tmp} - - declare -F qmail_maildir_install_hook >/dev/null && \ - qmail_maildir_install_hook -} - -qmail_tcprules_install() { - dodir "${TCPRULES_DIR}" - insinto "${TCPRULES_DIR}" - insopts -o root -g "$GROUP_ROOT" -m 0644 - doins "${GENQMAIL_S}"/tcprules/Makefile.qmail - doins "${GENQMAIL_S}"/tcprules/tcp.qmail-* - use ssl || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd -} - -qmail_supervise_install() { - einfo "Installing supervise scripts" - - cd "${GENQMAIL_S}"/supervise - - for i in qmail-{send,smtpd,qmtpd,qmqpd,pop3d}; do - dosupervise ${i} - diropts -o qmaill -g "$GROUP_ROOT" -m 755 - keepdir /var/log/qmail/${i} - done - - if use ssl; then - dosupervise qmail-pop3sd - diropts -o qmaill -g "$GROUP_ROOT" -m 755 - keepdir /var/log/qmail/qmail-pop3sd - fi - - declare -F qmail_supervise_install_hook >/dev/null && \ - qmail_supervise_install_hook -} - -qmail_spp_install() { - einfo "Installing qmail-spp configuration files" - insinto "${QMAIL_HOME}"/control/ - insopts -o root -g "$GROUP_ROOT" -m 0644 - doins "${GENQMAIL_S}"/spp/smtpplugins - - einfo "Installing qmail-spp plugins" - keepdir "${QMAIL_HOME}"/plugins/ - for i in authlog mfdnscheck ifauthnext tarpit; do - dospp "${GENQMAIL_S}"/spp/${i} - done - - declare -F qmail_spp_install_hook >/dev/null && \ - qmail_spp_install_hook -} - -qmail_ssl_install() { - use gencertdaily && \ - CRON_FOLDER=cron.daily || \ - CRON_FOLDER=cron.hourly - - einfo "Installing SSL Certificate creation script" - insinto "${QMAIL_HOME}"/control - insopts -o root -g "$GROUP_ROOT" -m 0644 - doins "${GENQMAIL_S}"/ssl/servercert.cnf - - insinto "${QMAIL_HOME}"/bin - insopts -o root -g "$GROUP_ROOT" -m 0755 - doins "${GENQMAIL_S}"/ssl/mkservercert - - einfo "Installing RSA key generation cronjob" - insinto /etc/${CRON_FOLDER} - insopts -o root -g "$GROUP_ROOT" -m 0755 - doins "${GENQMAIL_S}"/ssl/qmail-genrsacert.sh - - keepdir "${QMAIL_HOME}"/control/tlshosts - - declare -F qmail_ssl_install_hook >/dev/null && \ - qmail_ssl_install_hook -} - -qmail_src_install() { - export GROUP_ROOT="$(id -gn root)" - qmail_base_install - qmail_full_install - qmail_config_install - qmail_man_install - qmail_sendmail_install - qmail_maildir_install - qmail_tcprules_install - qmail_supervise_install - - use qmail-spp && qmail_spp_install - use ssl && qmail_ssl_install -} - -qmail_queue_setup() { - if use highvolume; then - myconf="--bigtodo" - else - myconf="--no-bigtodo" - fi - - mysplit=${QMAIL_CONF_SPLIT:-23} - is_prime ${mysplit} || die "QMAIL_CONF_SPLIT is not a prime number." - - einfo "Setting up the message queue hierarchy" - /usr/bin/queue-repair.py --create ${myconf} \ - --split ${mysplit} \ - "${ROOT}${QMAIL_HOME}" >/dev/null || \ - die 'queue-repair failed' -} - -qmail_rootmail_fixup() { - local TMPCMD="ln -sf ${QMAIL_HOME}/alias/.maildir/ ${ROOT}/root/.maildir" - - if [[ -d "${ROOT}"/root/.maildir && ! -L "${ROOT}"/root/.maildir ]] ; then - elog "Previously the qmail ebuilds created /root/.maildir/ but not" - elog "every mail was delivered there. If the directory does not" - elog "contain any mail, please delete it and run:" - elog "${TMPCMD}" - else - ${TMPCMD} - fi - - chown -R alias:qmail "${ROOT}${QMAIL_HOME}"/alias/.maildir 2>/dev/null -} - -qmail_tcprules_fixup() { - mkdir -p "${TCPRULES_DIR}" - for f in {smtp,qmtp,qmqp,pop3}{,.cdb}; do - old="/etc/tcp.${f}" - new="${TCPRULES_DIR}/tcp.qmail-${f}" - fail=0 - if [[ -f "${old}" && ! -f "${new}" ]]; then - einfo "Moving ${old} to ${new}" - cp "${old}" "${new}" || fail=1 - else - fail=1 - fi - if [[ "${fail}" = 1 && -f "${old}" ]]; then - eerror "Error moving ${old} to ${new}, be sure to check the" - eerror "configuration! You may have already moved the files," - eerror "in which case you can delete ${old}" - fi - done -} - -qmail_tcprules_build() { - for f in tcp.qmail-{smtp,qmtp,qmqp,pop3,pop3s}; do - # please note that we don't check if it exists - # as we want it to make the cdb files anyway! - src="${ROOT}${TCPRULES_DIR}/${f}" - cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb" - tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp" - [[ -e "${src}" ]] && tcprules "${cdb}" "${tmp}" < "${src}" - done -} - -qmail_config_notice() { - elog - elog "To setup ${PN} to run out-of-the-box on your system, run:" - elog "emerge --config =${CATEGORY}/${PF}" -} - -qmail_supervise_config_notice() { - elog - elog "To start qmail at boot you have to add svscan to your startup" - elog "and create the following links:" - elog "ln -s ${SUPERVISE_DIR}/qmail-send /service/qmail-send" - elog "ln -s ${SUPERVISE_DIR}/qmail-smtpd /service/qmail-smtpd" - elog - elog "To start the pop3 server as well, create the following link:" - elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d" - elog - if use ssl; then - elog "To start the pop3s server as well, create the following link:" - elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd /service/qmail-pop3sd" - elog - fi - elog "Additionally, the QMTP and QMQP protocols are supported, " - elog "and can be started as:" - elog "ln -s ${SUPERVISE_DIR}/qmail-qmtpd /service/qmail-qmtpd" - elog "ln -s ${SUPERVISE_DIR}/qmail-qmqpd /service/qmail-qmqpd" - elog - elog "Additionally, if you wish to run qmail right now, you should " - elog "run this before anything else:" - elog "source /etc/profile" -} - -qmail_config_fast() { - if [[ ${ROOT} = / ]]; then - local host=$(hostname --fqdn) - - if [[ -z "${host}" ]]; then - eerror - eerror "Cannot determine your fully-qualified hostname" - eerror "Please setup your /etc/hosts as described in" - eerror "https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2_sect4" - eerror - die "cannot determine FQDN" - fi - - if [[ ! -f "${ROOT}${QMAIL_HOME}"/control/me ]]; then - "${ROOT}${QMAIL_HOME}"/bin/config-fast ${host} - fi - else - ewarn "Skipping some configuration as it MUST be run on the final host" - fi -} - -qmail_tcprules_config() { - local localips ip tcpstring line proto f - - einfo "Accepting relaying by default from all ips configured on this machine." - - # Start with iproute2 as ifconfig is deprecated, and ifconfig does not handle - # additional addresses added via iproute2. - # Note: We have to strip off the packed netmask w/e.g. 192.168.0.2/24 - localips=$(ip address show 2>/dev/null | awk '$1 == "inet" {print $2}' | sed 's:/.*::') - if [[ -z ${localips} ]] ; then - # Hello old friend. Maybe you can tell us at least something. - localips=$(ifconfig | awk '$1 == "inet" {print $2}') - fi - - tcpstring=':allow,RELAYCLIENT="",RBLSMTPD=""' - - for ip in ${localips}; do - line="${ip}${tcpstring}" - for proto in smtp qmtp qmqp; do - f="${EROOT}${TCPRULES_DIR}/tcp.qmail-${proto}" - egrep -qs "${line}" "${f}" || echo "${line}" >> "${f}" - done - done -} - -qmail_ssl_generate() { - CRON_FOLDER=cron.hourly - use gencertdaily && CRON_FOLDER=cron.daily - - ebegin "Generating RSA keys for SSL/TLS, this can take some time" - "${ROOT}"/etc/${CRON_FOLDER}/qmail-genrsacert.sh - eend $? - - einfo "Creating a self-signed ssl-certificate:" - "${ROOT}${QMAIL_HOME}"/bin/mkservercert - - einfo "If you want to have a properly signed certificate " - einfo "instead, do the following:" - # space at the end of the string because of the current implementation - # of einfo - einfo "openssl req -new -nodes -out req.pem \\ " - einfo " -config ${QMAIL_HOME}/control/servercert.cnf \\ " - einfo " -keyout ${QMAIL_HOME}/control/servercert.pem" - einfo "Send req.pem to your CA to obtain signed_req.pem, and do:" - einfo "cat signed_req.pem >> ${QMAIL_HOME}/control/servercert.pem" -} diff --git a/sdk_container/src/third_party/portage-stable/eclass/xfconf.eclass b/sdk_container/src/third_party/portage-stable/eclass/xfconf.eclass deleted file mode 100644 index 57bb96db22..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/xfconf.eclass +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# Removal on 2019-06-02. - -# @ECLASS: xfconf.eclass -# @MAINTAINER: -# XFCE maintainers -# @SUPPORTED_EAPIS: 5 -# @BLURB: Default XFCE ebuild layout -# @DESCRIPTION: -# Default XFCE ebuild layout - -# @ECLASS-VARIABLE: EAUTORECONF -# @DESCRIPTION: -# Run eautoreconf instead of elibtoolize if the variable is set - -if [[ -n ${EAUTORECONF} ]] ; then - AUTOTOOLS_AUTO_DEPEND=yes -else - : ${AUTOTOOLS_AUTO_DEPEND:=no} -fi - -# @ECLASS-VARIABLE: XFCONF -# @DESCRIPTION: -# This should be an array defining arguments for econf - -unset _xfconf_live -[[ $PV == *9999* ]] && _xfconf_live=git-2 - -inherit ${_xfconf_live} autotools eutils gnome2-utils libtool xdg-utils - -EGIT_BOOTSTRAP=autogen.sh -EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}" - -_xfconf_deps="" -_xfconf_m4=">=dev-util/xfce4-dev-tools-4.10" - -[[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}" -[[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}" - -RDEPEND="" -DEPEND="${_xfconf_deps}" - -unset _xfconf_deps -unset _xfconf_m4 - -case ${EAPI:-0} in - 5) ;; - *) die "Unknown EAPI." ;; -esac - -[[ -n $_xfconf_live ]] && _xfconf_live=src_unpack - -EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm - -# @FUNCTION: xfconf_use_debug -# @DESCRIPTION: -# If IUSE has debug, return --enable-debug=minimum. -# If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes. -# If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full. -xfconf_use_debug() { - if has debug ${IUSE}; then - if use debug; then - if [[ -n $XFCONF_FULL_DEBUG ]]; then - echo "--enable-debug=full" - else - echo "--enable-debug" - fi - else - echo "--enable-debug=minimum" - fi - else - ewarn "${FUNCNAME} called without debug in IUSE" - fi -} - -# @FUNCTION: xfconf_src_unpack -# @DESCRIPTION: -# Run git-2_src_unpack if required -xfconf_src_unpack() { - NOCONFIGURE=1 git-2_src_unpack -} - -# @FUNCTION: xfconf_src_prepare -# @DESCRIPTION: -# Process PATCHES with epatch and run epatch_user followed by run of -# elibtoolize, or eautoreconf if EAUTORECONF is set. -xfconf_src_prepare() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" - epatch_user - - if [[ -n $EAUTORECONF ]]; then - AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf - else - elibtoolize - fi -} - -# @FUNCTION: xfconf_src_configure -# @DESCRIPTION: -# Run econf with opts from the XFCONF array -xfconf_src_configure() { - debug-print-function ${FUNCNAME} "$@" - [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode ) - econf "${XFCONF[@]}" -} - -# @FUNCTION: xfconf_src_install -# @DESCRIPTION: -# Run emake install to DESTDIR, einstalldocs to process DOCS and -# prune_libtool_files --all to always remove libtool files (.la) -xfconf_src_install() { - debug-print-function ${FUNCNAME} "$@" - - # FIXME - if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then - touch ChangeLog - fi - - emake DESTDIR="${D}" "$@" install - - einstalldocs - - prune_libtool_files --all -} - -# @FUNCTION: xfconf_pkg_preinst -# @DESCRIPTION: -# Run gnome2_icon_savelist -xfconf_pkg_preinst() { - debug-print-function ${FUNCNAME} "$@" - gnome2_icon_savelist -} - -# @FUNCTION: xfconf_pkg_postinst -# @DESCRIPTION: -# Run xdg_{desktop,mimeinfo}_database_update and gnome2_icon_cache_update -xfconf_pkg_postinst() { - debug-print-function ${FUNCNAME} "$@" - xdg_desktop_database_update - xdg_mimeinfo_database_update - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then - gnome2_icon_cache_update - fi -} - -# @FUNCTION: xfconf_pkg_postrm -# @DESCRIPTION: -# Run xdg_{desktop,mimeinfo}_database_update and gnome2_icon_cache_update -xfconf_pkg_postrm() { - debug-print-function ${FUNCNAME} "$@" - xdg_desktop_database_update - xdg_mimeinfo_database_update - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then - gnome2_icon_cache_update - fi -}