summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/bash-completion-r1.eclass136
-rw-r--r--eclass/gnome2-live.eclass145
-rw-r--r--eclass/gnome2-python.eclass54
-rw-r--r--eclass/gnome2-utils.eclass502
-rw-r--r--eclass/gnome2.eclass301
-rw-r--r--eclass/scm-git.eclass186
-rw-r--r--eclass/scm.eclass374
-rw-r--r--eclass/vala.eclass149
8 files changed, 0 insertions, 1847 deletions
diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
deleted file mode 100644
index 4afeb86..0000000
--- a/eclass/bash-completion-r1.eclass
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# @ECLASS: bash-completion-r1.eclass
-# @MAINTAINER:
-# mgorny@gentoo.org
-# @BLURB: A few quick functions to install bash-completion files
-# @EXAMPLE:
-#
-# @CODE
-# EAPI=5
-#
-# src_configure() {
-# econf \
-# --with-bash-completion-dir="$(get_bashcompdir)"
-# }
-#
-# src_install() {
-# default
-#
-# newbashcomp contrib/${PN}.bash-completion ${PN}
-# }
-# @CODE
-
-inherit toolchain-funcs
-
-case ${EAPI:-0} in
- 0|1|2|3|4|5|6|paludis-1) ;;
- *) die "EAPI ${EAPI} unsupported (yet)."
-esac
-
-# @FUNCTION: _bash-completion-r1_get_bashdir
-# @INTERNAL
-# @DESCRIPTION:
-# First argument is name of the string in bash-completion.pc
-# Second argument is the fallback directory if the string is not found
-# @EXAMPLE:
-# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
-_bash-completion-r1_get_bashdir() {
- debug-print-function ${FUNCNAME} "${@}"
-
- if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
- local path
- path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
- # we need to return unprefixed, so strip from what pkg-config returns
- # to us, bug #477692
- echo "${path#${EPREFIX}}"
- else
- echo "${2}"
- fi
-}
-
-# @FUNCTION: _bash-completion-r1_get_bashcompdir
-# @INTERNAL
-# @DESCRIPTION:
-# Get unprefixed bash-completion completions directory.
-_bash-completion-r1_get_bashcompdir() {
- debug-print-function ${FUNCNAME} "${@}"
-
- _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
-}
-
-# @FUNCTION: _bash-completion-r1_get_helpersdir
-# @INTERNAL
-# @DESCRIPTION:
-# Get unprefixed bash-completion helpers directory.
-_bash-completion-r1_get_bashhelpersdir() {
- debug-print-function ${FUNCNAME} "${@}"
-
- _bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
-}
-
-# @FUNCTION: get_bashcompdir
-# @DESCRIPTION:
-# Get the bash-completion completions directory.
-get_bashcompdir() {
- debug-print-function ${FUNCNAME} "${@}"
-
- echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
-}
-
-# @FUNCTION: get_bashhelpersdir
-# @INTERNAL
-# @DESCRIPTION:
-# Get the bash-completion helpers directory.
-get_bashhelpersdir() {
- debug-print-function ${FUNCNAME} "${@}"
-
- echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
-}
-
-# @FUNCTION: dobashcomp
-# @USAGE: file [...]
-# @DESCRIPTION:
-# Install bash-completion files passed as args. Has EAPI-dependant failure
-# behavior (like doins).
-dobashcomp() {
- debug-print-function ${FUNCNAME} "${@}"
-
- (
- insinto "$(_bash-completion-r1_get_bashcompdir)"
- doins "${@}"
- )
-}
-
-# @FUNCTION: newbashcomp
-# @USAGE: file newname
-# @DESCRIPTION:
-# Install bash-completion file under a new name. Has EAPI-dependant failure
-# behavior (like newins).
-newbashcomp() {
- debug-print-function ${FUNCNAME} "${@}"
-
- (
- insinto "$(_bash-completion-r1_get_bashcompdir)"
- newins "${@}"
- )
-}
-
-# @FUNCTION: bashcomp_alias
-# @USAGE: <basename> <alias>...
-# @DESCRIPTION:
-# Alias <basename> completion to one or more commands (<alias>es).
-bashcomp_alias() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
- local base=${1} f
- shift
-
- for f; do
- dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}" \
- || return
- done
-}
diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
deleted file mode 100644
index f01dea0..0000000
--- a/eclass/gnome2-live.eclass
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-#
-# @ECLASS: gnome2-live.eclass
-# @MAINTAINER:
-# gnome@gentoo.org
-# @AUTHOR:
-# Nirbheek Chauhan <nirbheek@gentoo.org>
-# @BLURB: Live ebuild phases for GNOME packages
-# @DESCRIPTION:
-# Exports additional functions used by live ebuilds written for GNOME packages
-# Always to be imported *AFTER* gnome2.eclass
-#
-
-inherit autotools eutils gnome2 gnome2-utils libtool git-r3
-
-# Stolen from git.eclass
-EXPORTED_FUNCTIONS="src_unpack pkg_postinst"
-case "${EAPI:-0}" in
- 2|3|4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
- 0|1) ;;
- *) die "Unknown EAPI, Bug eclass maintainers." ;;
-esac
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
-
-# DEPEND on
-# app-text/gnome-doc-utils for gnome-doc-*
-# dev-util/gtk-doc for gtkdocize
-# dev-util/intltool for intltoolize
-# gnome-base/gnome-common for GNOME_COMMON_INIT
-DEPEND="${DEPEND}
- app-text/gnome-doc-utils
- app-text/yelp-tools
- dev-util/gtk-doc
- dev-util/intltool
- gnome-base/gnome-common
- sys-devel/gettext"
-
-# Extra options passed to elibtoolize
-ELTCONF=${ELTCONF:-}
-
-# @ECLASS-VARIABLE: GNOME_LIVE_MODULE
-# @DESCRIPTION:
-# Default git module name is assumed to be the same as the gnome.org module name
-# used on ftp.gnome.org. We have GNOME_ORG_MODULE because we inherit gnome.org
-: ${GNOME_LIVE_MODULE:="${GNOME_ORG_MODULE}"}
-
-# @ECLASS-VARIABLE: EGIT_REPO_URI
-# @DESCRIPTION:
-# git URI for the project, uses GNOME_LIVE_MODULE by default
-: "${EGIT_REPO_URI:="git://git.gnome.org/${GNOME_LIVE_MODULE}"}"
-
-# @ECLASS-VARIABLE: PATCHES
-# @DESCRIPTION:
-# Whitespace-separated list of patches to apply after cloning
-: ${PATCHES:=""}
-
-# Unset SRC_URI auto-set by gnome2.eclass
-SRC_URI=""
-
-# @FUNCTION: gnome2-live_get_var
-# @DESCRIPTION:
-# Get macro variable values from configure.ac, etc
-gnome2-live_get_var() {
- local var f
- var="$1"
- f="$2"
- echo $(sed -ne "s/${var}(\(.*\))/\1/p" "${f}" | tr -d '[]')
-}
-
-# @FUNCTION: gnome2-live_get_var
-# @DESCRIPTION:
-# Calls git-2_src_unpack, and unpacks ${A} if required.
-# Also calls gnome2-live_src_prepare for older EAPI.
-gnome2-live_src_unpack() {
- if test -n "${A}"; then
- unpack ${A}
- fi
- git-r3_src_unpack
- has src_prepare ${EXPORTED_FUNCTIONS} || gnome2-live_src_prepare
-}
-
-# @FUNCTION: gnome2-live_src_prepare
-# @DESCRIPTION:
-# Lots of magic to workaround autogen.sh quirks in various packages
-# Creates blank ChangeLog and necessary macro dirs. Runs various autotools
-# programs if required, and finally runs eautoreconf.
-gnome2-live_src_prepare() {
- for i in ${PATCHES}; do
- epatch "${i}"
- done
-
- epatch_user
-
- # If ChangeLog doesn't exist, maybe it's autogenerated
- # Avoid a `dodoc` failure by adding an empty ChangeLog
- if ! test -e ChangeLog; then
- echo > ChangeLog
- fi
-
- # eautoreconf is smart enough to run all necessary commands
- eautoreconf
-
- ### Keep this in-sync with gnome2.eclass!
-
- # Don't use the session bus address inherited via the environment
- # causes test and introspection-building failures
- unset DBUS_SESSION_BUS_ADDRESS
-
- # Prevent assorted access violations and test failures
- gnome2_environment_reset
-
- # Prevent scrollkeeper access violations
- gnome2_omf_fix
-
- # Libtool patching
- elibtoolize ${ELTCONF}
-}
-
-# @FUNCTION: gnome2_src_unpack
-# @DESCRIPTION:
-# Defined so that it replaces gnome2_src_unpack in ebuilds that call it
-gnome2_src_unpack() {
- gnome2-live_src_unpack
-}
-
-# @FUNCTION: gnome2_src_prepare
-# @DESCRIPTION:
-# Defined so that it replaces gnome2_src_prepare in ebuilds that call it
-gnome2_src_prepare() {
- gnome2-live_src_prepare
-}
-
-# @FUNCTION: gnome2-live_pkg_postinst
-# @DESCRIPTION:
-# Must be run manually for ebuilds that have a custom pkg_postinst
-gnome2-live_pkg_postinst() {
- gnome2_pkg_postinst
-
- ewarn "This is a live ebuild, upstream trunks will mostly be UNstable"
- ewarn "Do NOT report bugs about this package to Gentoo"
- ewarn "Report upstream bugs (with patches if possible) instead."
-}
diff --git a/eclass/gnome2-python.eclass b/eclass/gnome2-python.eclass
deleted file mode 100644
index 7330f39..0000000
--- a/eclass/gnome2-python.eclass
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# @ECLASS: gnome2-python.eclass
-# @MAINTAINER:
-# Gentoo GNOME Project <gnome@gentoo.org>
-# Gentoo Python Project <python@gentoo.org>
-# @BLURB: Eclass for GNOME Python packages supporting installation for multiple Python ABIs
-# @DESCRIPTION:
-# The gnome2-python eclass defines phase functions for GNOME Python packages supporting
-# installation for multiple Python ABIs.
-
-inherit gnome2 python
-
-# Stolen from git.eclass
-EXPORTED_FUNCTIONS="pkg_setup src_compile src_test src_install"
-case "${EAPI:-0}" in
- 2|3|4) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
- 0|1) ;;
- *) die "Unknown EAPI, bug eclass maintainers." ;;
-esac
-
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
-
-gnome2-python_pkg_setup() {
- python_pkg_setup
-}
-
-gnome2-python_src_prepare() {
- gnome2_src_prepare
- python_clean_py-compile_files
- python_copy_sources
-}
-
-gnome2-python_src_configure() {
- configure() {
- gnome2_src_configure PYTHON=$(PYTHON -a) "$@"
- }
- python_execute_function -s configure
-}
-
-gnome2-python_src_compile() {
- python_execute_function -s gnome2_src_compile "$@"
-}
-
-gnome2-python_src_test() {
- python_execute_function -s -d
-}
-
-gnome2-python_src_install() {
- python_execute_function -s gnome2_src_install
- python_clean_installation_image
-}
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
deleted file mode 100644
index 4c7d0c8..0000000
--- a/eclass/gnome2-utils.eclass
+++ /dev/null
@@ -1,502 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# @ECLASS: gnome2-utils.eclass
-# @MAINTAINER:
-# gnome@gentoo.org
-# @BLURB: Auxiliary functions commonly used by Gnome packages.
-# @DESCRIPTION:
-# This eclass provides a set of auxiliary functions needed by most Gnome
-# packages. It may be used by non-Gnome packages as needed for handling various
-# Gnome stack related functions such as:
-# * Gtk+ icon cache management
-# * GSettings schemas management
-# * GConf schemas management
-# * scrollkeeper (old Gnome help system) management
-
-inherit multilib
-
-case "${EAPI:-0}" in
- 0|1|2|3|4|5) ;;
- *) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-# @ECLASS-VARIABLE: GCONFTOOL_BIN
-# @INTERNAL
-# @DESCRIPTION:
-# Path to gconftool-2
-: ${GCONFTOOL_BIN:="/usr/bin/gconftool-2"}
-
-# @ECLASS-VARIABLE: SCROLLKEEPER_DIR
-# @INTERNAL
-# @DESCRIPTION:
-# Directory where scrollkeeper-update should do its work
-: ${SCROLLKEEPER_DIR:="/var/lib/scrollkeeper"}
-
-# @ECLASS-VARIABLE: SCROLLKEEPER_UPDATE_BIN
-# @INTERNAL
-# @DESCRIPTION:
-# Path to scrollkeeper-update
-: ${SCROLLKEEPER_UPDATE_BIN:="/usr/bin/scrollkeeper-update"}
-
-# @ECLASS-VARIABLE: GTK_UPDATE_ICON_CACHE
-# @INTERNAL
-# @DESCRIPTION:
-# Path to gtk-update-icon-cache
-: ${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"}
-
-# @ECLASS-VARIABLE: GLIB_COMPILE_SCHEMAS
-# @INTERNAL
-# @DESCRIPTION:
-# Path to glib-compile-schemas
-: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of GConf schemas provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_ICONS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of icons provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_SCROLLS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of scrolls (documentation files) provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_GLIB_SCHEMAS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of GSettings schemas provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_GDK_PIXBUF_LOADERS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of gdk-pixbuf loaders provided by the package
-
-DEPEND=">=sys-apps/sed-4"
-
-
-# @FUNCTION: gnome2_environment_reset
-# @DESCRIPTION:
-# Reset various variables inherited from root's evironment to a reasonable
-# default for ebuilds to help avoid access violations and test failures.
-gnome2_environment_reset() {
- # Respected by >=glib-2.30.1-r1
- export G_HOME="${T}"
-
- # GST_REGISTRY is to work around gst utilities trying to read/write /root
- export GST_REGISTRY="${T}/registry.xml"
-
- # XXX: code for resetting XDG_* directories should probably be moved into
- # a separate function in a non-gnome eclass
- export XDG_DATA_HOME="${T}/.local/share"
- export XDG_CONFIG_HOME="${T}/.config"
- export XDG_CACHE_HOME="${T}/.cache"
- export XDG_RUNTIME_DIR="${T}/run"
- mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \
- "${XDG_RUNTIME_DIR}"
- # This directory needs to be owned by the user, and chmod 0700
- # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
- chmod 0700 "${XDG_RUNTIME_DIR}"
-}
-
-# @FUNCTION: gnome2_gconf_savelist
-# @DESCRIPTION:
-# Find the GConf schemas that are about to be installed and save their location
-# in the GNOME2_ECLASS_SCHEMAS environment variable.
-# This function should be called from pkg_preinst.
-gnome2_gconf_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- pushd "${ED}" &> /dev/null
- export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
- popd &> /dev/null
-}
-
-# @FUNCTION: gnome2_gconf_install
-# @DESCRIPTION:
-# Applies any schema files installed by the current ebuild to Gconf's database
-# using gconftool-2.
-# This function should be called from pkg_postinst.
-gnome2_gconf_install() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}${GCONFTOOL_BIN}"
-
- if [[ ! -x "${updater}" ]]; then
- debug-print "${updater} is not executable"
- return
- fi
-
- if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
- debug-print "No GNOME 2 GConf schemas found"
- return
- fi
-
- # We are ready to install the GCONF Scheme now
- unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
- export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
-
- einfo "Installing GNOME 2 GConf schemas"
-
- local F
- for F in ${GNOME2_ECLASS_SCHEMAS}; do
- if [[ -e "${EROOT}${F}" ]]; then
- debug-print "Installing schema: ${F}"
- "${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null
- fi
- done
-
- # have gconf reload the new schemas
- pids=$(pgrep -x gconfd-2)
- if [[ $? == 0 ]] ; then
- ebegin "Reloading GConf schemas"
- kill -HUP ${pids}
- eend $?
- fi
-}
-
-# @FUNCTION: gnome2_gconf_uninstall
-# @DESCRIPTION:
-# Removes schema files previously installed by the current ebuild from Gconf's
-# database.
-gnome2_gconf_uninstall() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}${GCONFTOOL_BIN}"
-
- if [[ ! -x "${updater}" ]]; then
- debug-print "${updater} is not executable"
- return
- fi
-
- if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
- debug-print "No GNOME 2 GConf schemas found"
- return
- fi
-
- unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
- export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
-
- einfo "Uninstalling GNOME 2 GConf schemas"
-
- local F
- for F in ${GNOME2_ECLASS_SCHEMAS}; do
- if [[ -e "${EROOT}${F}" ]]; then
- debug-print "Uninstalling gconf schema: ${F}"
- "${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null
- fi
- done
-
- # have gconf reload the new schemas
- pids=$(pgrep -x gconfd-2)
- if [[ $? == 0 ]] ; then
- ebegin "Reloading GConf schemas"
- kill -HUP ${pids}
- eend $?
- fi
-}
-
-# @FUNCTION: gnome2_icon_savelist
-# @DESCRIPTION:
-# Find the icons that are about to be installed and save their location
-# in the GNOME2_ECLASS_ICONS environment variable.
-# This function should be called from pkg_preinst.
-gnome2_icon_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- pushd "${ED}" &> /dev/null
- export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
- popd &> /dev/null
-}
-
-# @FUNCTION: gnome2_icon_cache_update
-# @DESCRIPTION:
-# Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild
-# have installed anything under that location.
-# This function should be called from pkg_postinst and pkg_postrm.
-gnome2_icon_cache_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}${GTK_UPDATE_ICON_CACHE}"
-
- if [[ ! -x "${updater}" ]] ; then
- debug-print "${updater} is not executable"
- return
- fi
-
- if [[ -z "${GNOME2_ECLASS_ICONS}" ]]; then
- debug-print "No icon cache to update"
- return
- fi
-
- ebegin "Updating icons cache"
-
- local retval=0
- local fails=( )
-
- for dir in ${GNOME2_ECLASS_ICONS}
- do
- if [[ -f "${EROOT}${dir}/index.theme" ]] ; then
- local rv=0
-
- "${updater}" -qf "${EROOT}${dir}"
- rv=$?
-
- if [[ ! $rv -eq 0 ]] ; then
- debug-print "Updating cache failed on ${EROOT}${dir}"
-
- # Add to the list of failures
- fails[$(( ${#fails[@]} + 1 ))]="${EROOT}${dir}"
-
- retval=2
- fi
- elif [[ $(ls "${EROOT}${dir}") = "icon-theme.cache" ]]; then
- # Clear stale cache files after theme uninstallation
- rm "${EROOT}${dir}/icon-theme.cache"
- fi
-
- if [[ -z $(ls "${EROOT}${dir}") ]]; then
- # Clear empty theme directories after theme uninstallation
- rmdir "${EROOT}${dir}"
- fi
- done
-
- eend ${retval}
-
- for f in "${fails[@]}" ; do
- eerror "Failed to update cache with icon $f"
- done
-}
-
-# @FUNCTION: gnome2_omf_fix
-# @DESCRIPTION:
-# Workaround applied to Makefile rules in order to remove redundant
-# calls to scrollkeeper-update and sandbox violations.
-# This function should be called from src_prepare.
-gnome2_omf_fix() {
- local omf_makefiles filename
-
- omf_makefiles="$@"
-
- if [[ -f ${S}/omf.make ]] ; then
- omf_makefiles="${omf_makefiles} ${S}/omf.make"
- fi
-
- if [[ -f ${S}/gnome-doc-utils.make ]] ; then
- omf_makefiles="${omf_makefiles} ${S}/gnome-doc-utils.make"
- fi
-
- # testing fixing of all makefiles found
- # The sort is important to ensure .am is listed before the respective .in for
- # maintainer mode regeneration not kicking in due to .am being newer than .in
- for filename in $(find "${S}" -name "Makefile.in" -o -name "Makefile.am" |sort) ; do
- omf_makefiles="${omf_makefiles} ${filename}"
- done
-
- ebegin "Fixing OMF Makefiles"
-
- local retval=0
- local fails=( )
-
- for omf in ${omf_makefiles} ; do
- sed -i -e 's:scrollkeeper-update:true:' "${omf}"
- retval=$?
-
- if [[ $retval -ne 0 ]] ; then
- debug-print "updating of ${omf} failed"
-
- # Add to the list of failures
- fails[$(( ${#fails[@]} + 1 ))]=$omf
-
- retval=2
- fi
- done
-
- eend $retval
-
- for f in "${fails[@]}" ; do
- eerror "Failed to update OMF Makefile $f"
- done
-}
-
-# @FUNCTION: gnome2_scrollkeeper_savelist
-# @DESCRIPTION:
-# Find the scrolls that are about to be installed and save their location
-# in the GNOME2_ECLASS_SCROLLS environment variable.
-# This function should be called from pkg_preinst.
-gnome2_scrollkeeper_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- pushd "${ED}" &> /dev/null
- export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
- popd &> /dev/null
-}
-
-# @FUNCTION: gnome2_scrollkeeper_update
-# @DESCRIPTION:
-# Updates the global scrollkeeper database.
-# This function should be called from pkg_postinst and pkg_postrm.
-gnome2_scrollkeeper_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}"
-
- if [[ ! -x "${updater}" ]] ; then
- debug-print "${updater} is not executable"
- return
- fi
-
- if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then
- debug-print "No scroll cache to update"
- return
- fi
-
- ebegin "Updating scrollkeeper database ..."
- "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}"
- eend $?
-}
-
-# @FUNCTION: gnome2_schemas_savelist
-# @DESCRIPTION:
-# Find if there is any GSettings schema to install and save the list in
-# GNOME2_ECLASS_GLIB_SCHEMAS variable.
-# This function should be called from pkg_preinst.
-gnome2_schemas_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- pushd "${ED}" &>/dev/null
- export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
- popd &>/dev/null
-}
-
-# @FUNCTION: gnome2_schemas_update
-# @USAGE: gnome2_schemas_update
-# @DESCRIPTION:
-# Updates GSettings schemas if GNOME2_ECLASS_GLIB_SCHEMAS has some.
-# This function should be called from pkg_postinst and pkg_postrm.
-gnome2_schemas_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}"
-
- if [[ ! -x ${updater} ]]; then
- debug-print "${updater} is not executable"
- return
- fi
-
- if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
- debug-print "No GSettings schemas to update"
- return
- fi
-
- ebegin "Updating GSettings schemas"
- ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null
- eend $?
-}
-
-# @FUNCTION: gnome2_gdk_pixbuf_savelist
-# @DESCRIPTION:
-# Find if there is any gdk-pixbuf loader to install and save the list in
-# GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
-# This function should be called from pkg_preinst.
-gnome2_gdk_pixbuf_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- pushd "${ED}" 1>/dev/null
- export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null)
- popd 1>/dev/null
-}
-
-# @FUNCTION: gnome2_gdk_pixbuf_update
-# @USAGE: gnome2_gdk_pixbuf_update
-# @DESCRIPTION:
-# Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
-# This function should be called from pkg_postinst and pkg_postrm.
-gnome2_gdk_pixbuf_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
-
- if [[ ! -x ${updater} ]]; then
- updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders"
- fi
-
- if [[ ! -x ${updater} ]]; then
- debug-print "${updater} is not executable"
- return
- fi
-
- if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
- debug-print "gdk-pixbuf loader cache does not need an update"
- return
- fi
-
- ebegin "Updating gdk-pixbuf loader cache"
- local tmp_file=$(mktemp -t tmp.XXXXXXXXXX_gdkpixbuf)
- ${updater} 1> "${tmp_file}" &&
- chmod 0644 "${tmp_file}" &&
- cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
- rm "${tmp_file}" # don't replace this with mv, required for SELinux support
- eend $?
-}
-
-# @FUNCTION: gnome2_query_immodules_gtk2
-# @USAGE: gnome2_query_immodules_gtk2
-# @DESCRIPTION:
-# Updates gtk2 immodules/gdk-pixbuf loaders listing.
-gnome2_query_immodules_gtk2() {
- local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0
- [[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
-
- "${updater}" --update-cache
-}
-
-# @FUNCTION: gnome2_query_immodules_gtk3
-# @USAGE: gnome2_query_immodules_gtk3
-# @DESCRIPTION:
-# Updates gtk3 immodules/gdk-pixbuf loaders listing.
-gnome2_query_immodules_gtk3() {
- local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0
- [[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
-
- "${updater}" --update-cache
-}
-
-# @FUNCTION: gnome2_disable_deprecation_warning
-# @DESCRIPTION:
-# Disable deprecation warnings commonly found in glib based packages.
-# Should be called from src_prepare.
-gnome2_disable_deprecation_warning() {
- local retval=0
- local fails=( )
- local makefile
-
- ebegin "Disabling deprecation warnings"
- # The sort is important to ensure .am is listed before the respective .in for
- # maintainer mode regeneration not kicking in due to .am being newer than .in
- while read makefile ; do
- if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
- continue
- fi
-
- LC_ALL=C sed -r -i \
- -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
- -e 's:-DGSEAL_ENABLE+[A-Z_]:$(NULL):g' \
- -i "${makefile}"
-
- if [[ $? -ne 0 ]]; then
- # Add to the list of failures
- fails+=( "${makefile}" )
- retval=2
- fi
- done < <(find "${S}" -name "Makefile.in" \
- -o -name "Makefile.am" -o -name "Makefile.decl" \
- | sort; echo configure)
-# TODO: sedding configure.ac can trigger maintainer mode; bug #439602
-# -o -name "configure.ac" -o -name "configure.in" \
-# | sort; echo configure)
- eend ${retval}
-
- for makefile in "${fails[@]}" ; do
- ewarn "Failed to disable deprecation warnings in ${makefile}"
- done
-}
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
deleted file mode 100644
index f77dace..0000000
--- a/eclass/gnome2.eclass
+++ /dev/null
@@ -1,301 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# @ECLASS: gnome2.eclass
-# @MAINTAINER:
-# gnome@gentoo.org
-# @BLURB: Provides phases for Gnome/Gtk+ based packages.
-# @DESCRIPTION:
-# Exports portage base functions used by ebuilds written for packages using the
-# GNOME framework. For additional functions, see gnome2-utils.eclass.
-
-inherit eutils fdo-mime libtool gnome.org gnome2-utils
-
-case "${EAPI:-0}" in
- 0|1)
- eqawarn
- eqawarn "${CATEGORY}/${PF}: EAPI 0/1 support is now deprecated."
- eqawarn "If you are the package maintainer, please"
- eqawarn "update this package to a newer EAPI."
- eqawarn "Support for EAPIs 0 and 1 for gnome2.eclass will be dropped"
- eqawarn "in a month (around 23rd December)."
- eqawarn
- EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm
- ;;
- 2|3|4|5)
- EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
- ;;
- *) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-# @ECLASS-VARIABLE: G2CONF
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Extra configure opts passed to econf
-G2CONF=${G2CONF:-""}
-
-# @ECLASS-VARIABLE: GNOME2_LA_PUNT
-# @DESCRIPTION:
-# Should we delete ALL the .la files?
-# NOT to be used without due consideration.
-if has ${EAPI:-0} 0 1 2 3 4; then
- GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
-else
- GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
-fi
-
-# @ECLASS-VARIABLE: ELTCONF
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Extra options passed to elibtoolize
-ELTCONF=${ELTCONF:-""}
-
-# @ECLASS-VARIABLE: USE_EINSTALL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Should we use EINSTALL instead of DESTDIR. DEPRECATED
-USE_EINSTALL=${USE_EINSTALL:-""}
-
-# @ECLASS-VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String containing documents passed to dodoc command.
-
-# @ECLASS-VARIABLE: GCONF_DEBUG
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Whether to handle debug or not.
-# Some gnome applications support various levels of debugging (yes, no, minimum,
-# etc), but using --disable-debug also removes g_assert which makes debugging
-# harder. This variable should be set to yes for such packages for the eclass
-# to handle it properly. It will enable minimal debug with USE=-debug.
-# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK.
-
-
-if [[ ${GCONF_DEBUG} != "no" ]]; then
- IUSE="debug"
-fi
-
-
-# @FUNCTION: gnome2_src_unpack
-# @DESCRIPTION:
-# Stub function for old EAPI.
-gnome2_src_unpack() {
- unpack ${A}
- cd "${S}"
- has ${EAPI:-0} 0 1 && gnome2_src_prepare
-}
-
-# @FUNCTION: gnome2_src_prepare
-# @DESCRIPTION:
-# Prepare environment for build, fix build of scrollkeeper documentation,
-# run elibtoolize.
-gnome2_src_prepare() {
- # Prevent assorted access violations and test failures
- gnome2_environment_reset
-
- # Prevent scrollkeeper access violations
- gnome2_omf_fix
-
- # Disable all deprecation warnings
- gnome2_disable_deprecation_warning
-
- # Run libtoolize
- if has ${EAPI:-0} 0 1 2 3; then
- elibtoolize ${ELTCONF}
- else
- # Everything is fatal EAPI 4 onwards
- nonfatal elibtoolize ${ELTCONF}
- fi
-
-}
-
-# @FUNCTION: gnome2_src_configure
-# @DESCRIPTION:
-# Gnome specific configure handling
-gnome2_src_configure() {
- # Update the GNOME configuration options
- if [[ ${GCONF_DEBUG} != 'no' ]] ; then
- if use debug ; then
- G2CONF="--enable-debug=yes ${G2CONF}"
- fi
- fi
-
- # Starting with EAPI=5, we consider packages installing gtk-doc to be
- # handled by adding DEPEND="dev-util/gtk-doc-am" which provides tools to
- # relink URLs in documentation to already installed documentation.
- # This decision also greatly helps with constantly broken doc generation.
- # Remember to drop 'doc' USE flag from your package if it was only used to
- # rebuild docs.
- # Preserve old behavior for older EAPI.
- if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
- if has ${EAPI:-0} 0 1 2 3 4 && in_iuse doc ; then
- G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
- else
- G2CONF="--disable-gtk-doc ${G2CONF}"
- fi
- fi
-
- # Pass --disable-maintainer-mode when needed
- if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" \
- "${ECONF_SOURCE:-.}"/configure.*; then
- G2CONF="--disable-maintainer-mode ${G2CONF}"
- fi
-
- # Pass --disable-scrollkeeper when possible
- if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-scrollkeeper ${G2CONF}"
- fi
-
- # Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
- if has ${EAPI:-0} 0 1 2 3 4; then
- if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-silent-rules ${G2CONF}"
- fi
- fi
-
- # Pass --disable-schemas-install when possible
- if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-schemas-install ${G2CONF}"
- fi
-
- # Pass --disable-schemas-compile when possible
- if grep -q "disable-schemas-compile" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--disable-schemas-compile ${G2CONF}"
- fi
-
- # Pass --enable-compile-warnings=minimum as we don't want -Werror* flags, bug #471336
- if grep -q "enable-compile-warnings" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--enable-compile-warnings=minimum ${G2CONF}"
- fi
-
- # Pass --docdir with proper directory, bug #482646
- if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
- G2CONF="--docdir="${EPREFIX}"/usr/share/doc/${PF} ${G2CONF}"
- fi
-
- # Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
- addwrite "$(unset HOME; echo ~)/.gnome2"
-
- econf ${G2CONF} "$@"
-}
-
-# @FUNCTION: gnome2_src_compile
-# @DESCRIPTION:
-# Stub function for old EAPI.
-gnome2_src_compile() {
- has ${EAPI:-0} 0 1 && gnome2_src_configure "$@"
- emake || die "compile failure"
-}
-
-# @FUNCTION: gnome2_src_install
-# @DESCRIPTION:
-# Gnome specific install. Handles typical GConf and scrollkeeper setup
-# in packages and removal of .la files if requested
-gnome2_src_install() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
- # if this is not present, scrollkeeper-update may segfault and
- # create bogus directories in /var/lib/
- local sk_tmp_dir="/var/lib/scrollkeeper"
- dodir "${sk_tmp_dir}" || die "dodir failed"
-
- # we must delay gconf schema installation due to sandbox
- export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
-
- if [[ -z "${USE_EINSTALL}" || "${USE_EINSTALL}" = "0" ]]; then
- debug-print "Installing with 'make install'"
- emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed"
- else
- debug-print "Installing with 'einstall'"
- einstall "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" || die "einstall failed"
- fi
-
- unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
-
- # Handle documentation as 'default' for eapi5 and newer, bug #373131
- if has ${EAPI:-0} 0 1 2 3 4; then
- # Manual document installation
- if [[ -n "${DOCS}" ]]; then
- dodoc ${DOCS} || die "dodoc failed"
- fi
- else
- einstalldocs
- fi
-
- # Do not keep /var/lib/scrollkeeper because:
- # 1. The scrollkeeper database is regenerated at pkg_postinst()
- # 2. ${ED}/var/lib/scrollkeeper contains only indexes for the current pkg
- # thus it makes no sense if pkg_postinst ISN'T run for some reason.
- rm -rf "${ED}${sk_tmp_dir}"
- rmdir "${ED}/var/lib" 2>/dev/null
- rmdir "${ED}/var" 2>/dev/null
-
- # Make sure this one doesn't get in the portage db
- rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
-
- # Delete all .la files
- if has ${EAPI:-0} 0 1 2 3 4; then
- if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
- ebegin "Removing .la files"
- if ! use_if_iuse static-libs ; then
- find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
- fi
- eend
- fi
- else
- case "${GNOME2_LA_PUNT}" in
- yes) prune_libtool_files --modules;;
- no) ;;
- *) prune_libtool_files;;
- esac
- fi
-}
-
-# @FUNCTION: gnome2_pkg_preinst
-# @DESCRIPTION:
-# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
-gnome2_pkg_preinst() {
- gnome2_gconf_savelist
- gnome2_icon_savelist
- gnome2_schemas_savelist
- gnome2_scrollkeeper_savelist
- gnome2_gdk_pixbuf_savelist
-}
-
-# @FUNCTION: gnome2_pkg_postinst
-# @DESCRIPTION:
-# Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
-# database updates.
-gnome2_pkg_postinst() {
- gnome2_gconf_install
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
- gnome2_icon_cache_update
- gnome2_schemas_update
- gnome2_scrollkeeper_update
- gnome2_gdk_pixbuf_update
-
- # This should only be in the overlay
- ewarn "**************************************************************"
- ewarn "This is the *experimental* Gentoo GNOME Overlay"
- ewarn "Please report bugs at #gentoo-desktop @ FreeNode"
- ewarn "Do NOT go to upstream with bugs without checking with us first"
- ewarn "**************************************************************"
-}
-
-# # FIXME Handle GConf schemas removal
-#gnome2_pkg_prerm() {
-# gnome2_gconf_uninstall
-#}
-
-# @FUNCTION: gnome2_pkg_postrm
-# @DESCRIPTION:
-# Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
-gnome2_pkg_postrm() {
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
- gnome2_icon_cache_update
- gnome2_schemas_update
- gnome2_scrollkeeper_update
-}
diff --git a/eclass/scm-git.eclass b/eclass/scm-git.eclass
deleted file mode 100644
index c027085..0000000
--- a/eclass/scm-git.eclass
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 2008 David Leverton <dleverton@exherbo.org>
-# Distributed under the terms of the GNU General Public License v2
-# Based in part upon git.exlib, which is:
-# Copyright 2008 Fernando J. Pereda
-# Based upon 'git.eclass' which is:
-# Copyright 1999-2007 Gentoo Foundation
-
-if [[ -z ${SCM_TYPE} ]]; then
- SCM_TYPE=git
- inherit scm
-fi
-
-scm-git_do_dependencies() {
- local git='>=dev-vcs/git-1.6.0'
- if [[ $(scm_get_var REPOSITORY) == https://* ]]; then
- echo "${git}$(scm_usedeps curl) net-misc/curl$(scm_usedeps ssl)"
- elif [[ $(scm_get_var REPOSITORY) == http://* || $(scm_get_var REPOSITORY) == ftp://* ]]; then
- echo "${git}$(scm_usedeps curl)"
- elif [[ $(scm_get_var REPOSITORY) == rsync://* ]]; then
- echo "${git} net-misc/rsync"
- elif [[ $(scm_get_var REPOSITORY) == ssh://* ]] ||
- [[ $(scm_get_var REPOSITORY) != *://* && $(scm_get_var REPOSITORY) == *:* ]]; then
- echo "${git} net-misc/openssh"
- else
- echo "${git}"
- fi
-
- if [[ -n $(scm_get_var TAG) ]]; then
- local keys
- scm_get_array GIT_TAG_SIGNING_KEYS keys
- [[ ${#keys[@]} -gt 0 ]] && echo app-crypt/gnupg
- fi
-}
-
-scm-git_do_check_vars() {
- [[ -n $(scm_get_var TAG) && -n $(scm_get_var REVISION) ]] \
- && die "for git, $(scm_var_name TAG) must not be set at the same time as $(scm_var_name REVISION)"
- [[ -z $(scm_get_var BRANCH) && -z $(scm_get_var REVISION) &&
- -z $(scm_get_var TAG) ]] && scm_set_var BRANCH master
- local rev=$(scm_get_var REVISION)
- [[ -n ${rev} ]] && [[ ${rev} == *[^0123456789abcdef]* || ${#rev} -ne 40 ]] \
- && die "for git, $(scm_var_name REVISION) must be a 40-character lowercase hexadecimal SHA-1 sum"
- [[ -n $(scm_get_var SUBPATH) ]] && die "for git, $(scm_var_name SUBPATH) must not be set"
-
- scm_modify_var REPOSITORY scm_trim_slashes -scheme -trailing
-}
-
-scm-git_git() {
- local echo=echo
- if [[ ${1} == -q ]]; then
- shift
- echo=:
- fi
-
- local need_git_dir=yes global=( )
- while [[ ${#} -gt 0 && ${1} == -* ]]; do
- global+=( "${1}" )
- [[ ${1} == --git-dir=* ]] && need_git_dir=
- shift
- done
- [[ ${1} != clone && -n ${need_git_dir} ]] && global+=( --git-dir="$(scm_get_var CHECKOUT_TO)" )
-
- ${echo} git "${global[@]}" "${@}"
- GIT_PAGER=cat git "${global[@]}" "${@}" || scm_die_unless_nonfatal "git ${1} failed"
-}
-
-scm-git_do_appraise() {
- local dir=$(scm_get_var CHECKOUT_TO)
-
- if ! scm_nonfatal scm-git_git -q rev-parse 2>/dev/null; then
- echo "${dir} is not a git checkout"
- return 3
- fi
-
- if [[ -n $(scm_get_var REVISION) ]]; then
- if [[ -z $(scm_nonfatal scm-git_git -q cat-file -t $(scm_get_var REVISION) 2>/dev/null) ]]; then
- echo "$(scm_get_var REVISION) is not present in ${dir}"
- return 1
- elif [[ $(scm-git_git -q cat-file -t $(scm_get_var REVISION)) == commit ]]; then
- if [[ -n $(scm_get_var BRANCH) ]] && ! scm-git_git -q rev-list "refs/heads/$(scm_get_var BRANCH)" \
- | grep -Fx $(scm_get_var REVISION) >/dev/null; then
- echo "revision $(scm_get_var REVISION) is not part of branch $(scm_get_var BRANCH) of ${dir}"
- return 1
- fi
- return 2
- else
- die "$(scm_get_var REVISION) is not a commit in ${dir}"
- fi
- fi
-
- local origin=$(scm-git_git -q config remote.origin.url)
- [[ -n ${origin} ]] || die "could not determine origin URL for ${dir}"
- if [[ ${origin} != $(scm_get_var REPOSITORY) ]]; then
- echo "${dir} is a clone of ${origin}, but wanted $(scm_get_var REPOSITORY)"
- return 1
- fi
-
- if [[ -n $(scm_get_var TAG) ]]; then
- if [[ -n $(scm-git_git -q for-each-ref "refs/tags/$(scm_get_var TAG)") ]]; then
- if [[ -n $(scm_get_var BRANCH) ]] && ! scm-git_git -q rev-list "refs/heads/$(scm_get_var BRANCH)" \
- | grep -Fx $(scm-git_git -q rev-parse "refs/tags/$(scm_get_var TAG)") >/dev/null; then
- echo "tag $(scm_get_var TAG) is not part of branch $(scm_get_var BRANCH) of ${dir}"
- return 1
- fi
-
- local keys
- scm_get_array GIT_TAG_SIGNING_KEYS keys
- if [[ ${#keys[@]} -gt 0 ]]; then
- local gpghome=$(mktemp -d -p "${T}" gpg-XXXXXX)
- [[ -n ${gpghome} ]] || die "mktemp failed"
-
- cat >"${gpghome}/gpg" <<-EOF
- #! /usr/bin/env bash
- $(HOME=${gpghome} declare -p HOME)
- $(gpg=$(type -P gpg); declare -p gpg)
- errors=\$("\${gpg}" --keyserver-options no-auto-key-retrieve "\${@}" 2>&1 >/dev/null) && exit
- status=\${?}
- echo "\${errors}" >&2
- exit \${status}
- EOF
- [[ ${?} -eq 0 ]] || die "create gpg wrapper failed"
- chmod +x "${gpghome}/gpg" || die "chmod +x gpg wrapper failed"
-
- PATH=${gpghome}:${PATH} gpg --import "${keys[@]}" || die "gpg --import ${keys[*]} failed"
- PATH=${gpghome}:${PATH} scm-git_git -q verify-tag "$(scm_get_var TAG)" >/dev/null
- fi
-
- return 2
- else
- echo "${dir} does not contain the tag $(scm_get_var TAG)"
- return 1
- fi
- fi
-
- if [[ -n $(scm_get_var BRANCH) && -z $(scm-git_git -q for-each-ref "refs/heads/$(scm_get_var BRANCH)") ]]; then
- echo "${dir} does not contain the branch $(scm_get_var BRANCH)"
- return 1
- fi
-
- return 0
-}
-
-scm-git_do_checkout() {
- scm-git_git clone --bare "$(scm_get_var REPOSITORY)" "$(scm_get_var CHECKOUT_TO)"
- scm-git_git config remote.origin.url "$(scm_get_var REPOSITORY)"
- scm-git_git gc --auto
-}
-
-scm-git_do_update() {
- local old_origin=$(scm-git_git -q config remote.origin.url)
- [[ -n ${old_origin} ]] || die "could not determine origin URL for $(scm_get_var CHECKOUT_TO)"
- if [[ ${old_origin} != $(scm_get_var REPOSITORY) ]]; then
- scm-git_git config remote.origin.url "$(scm_get_var REPOSITORY)"
- eval "$(scm-git_git -q for-each-ref --shell --format "scm-git_git update-ref -d %(refname)" refs/{heads,tags}/\*)"
- fi
-
- local branch=$(scm_get_var BRANCH)
- scm-git_git fetch -f -u origin "refs/heads/${branch:-*}:refs/heads/${branch:-*}"
- scm-git_git gc --auto
- [[ -n ${branch} ]] && scm_set_array FETCHED_BRANCHES "${branch}"
-}
-
-scm-git_do_revision() {
- scm-git_git -q rev-parse $(
- if [[ -n $(scm_get_var TAG) ]]; then
- echo refs/tags/$(scm_get_var TAG)
- elif [[ -n $(scm_get_var REVISION) ]]; then
- scm_get_var REVISION
- else
- echo refs/heads/$(scm_get_var BRANCH)
- fi)
-}
-
-scm-git_do_unpack() {
- scm-git_git clone -s -n "$(scm_get_var CHECKOUT_TO)" "$(scm_get_var UNPACK_TO)"
- scm-git_git --git-dir="$(scm_get_var UNPACK_TO)"/.git --work-tree="$(scm_get_var UNPACK_TO)" checkout -f $(
- if [[ -n $(scm_get_var TAG) ]]; then
- echo refs/tags/$(scm_get_var TAG)
- elif [[ -n $(scm_get_var REVISION) ]]; then
- scm_get_var REVISION
- else
- [[ -n $(scm-git_git -q --git-dir="$(scm_get_var UNPACK_TO)"/.git for-each-ref "refs/heads/$(scm_get_var BRANCH)") ]] \
- || echo -b $(scm_get_var BRANCH) refs/remotes/origin/$(scm_get_var BRANCH)
- fi) --
-}
-
diff --git a/eclass/scm.eclass b/eclass/scm.eclass
deleted file mode 100644
index a509d40..0000000
--- a/eclass/scm.eclass
+++ /dev/null
@@ -1,374 +0,0 @@
-# Copyright 2008 David Leverton <dleverton@exherbo.org>
-# Distributed under the terms of the GNU General Public License v2
-# Based in part upon subversion.eclass, which is:
-# Copyright 1999-2008 Gentoo Foundation
-
-scm_need_extglob() {
- [[ ${#} -eq 1 ]] || die "scm_need_extglob needs exactly one argument"
- [[ -n $(declare -F ${1}) ]] || die "${1} is not a function"
- eval "_scm_need_extglob_$(declare -f ${1})"
- eval "${1}() {
- local oldextglob=\$(shopt -p extglob)
- shopt -s extglob
- _scm_need_extglob_${1} \"\${@}\"
- local status=\${?}
- \${oldextglob}
- return \${status}
- }"
-}
-
-scm_usedeps() {
- [[ ${#} -ge 1 ]] || die "scm_usedeps needs at least one argument"
- local myeapi=$(echo ${EAPI/prefix})
- has ${myeapi:-0} 0 1 && return
- local IFS=,
- local deps="[${*}]"
- [[ ${myeapi:-0} == kdebuild-* ]] && deps=${deps//,/][}
- echo "${deps}"
-}
-
-scm_nonfatal() {
- SCM_NONFATAL=1 "${@}"
-}
-
-scm_die_unless_nonfatal() {
- [[ -z ${SCM_NONFATAL} ]] && die "${@}"
-}
-
-scm_for_each() {
- [[ ${#} -ge 1 ]] || die "scm_for_each needs at least one argument"
-
- [[ -z ${SCM_NO_PRIMARY_REPOSITORY} ]] && SCM_THIS= "${@}"
-
- local t active=true
- local -i level=0
- for t in ${SCM_SECONDARY_REPOSITORIES}; do
- if [[ ${t} == *\? ]]; then
- ${active} && ! use ${t%\?} && active=false
- elif [[ ${t} == \( ]]; then
- ${active} || (( level++ ))
- elif [[ ${t} == \) ]]; then
- if ! ${active}; then
- (( level-- ))
- [[ ${level} -eq 0 ]] && active=true
- fi
- else
- ${active} && SCM_THIS=${t} "${@}"
- fi
- done
-}
-
-scm_var_name() {
- [[ ${#} -eq 1 ]] || die "scm_var_name needs exactly one argument"
- echo SCM${SCM_THIS:+_${SCM_THIS}}_${1}
-}
-
-scm_get_var() {
- [[ ${#} -eq 1 ]] || die "scm_get_var needs exactly one argument"
- local var=$(scm_var_name ${1})
- echo "${!var}"
-}
-
-scm_set_var() {
- [[ ${#} -eq 2 ]] || die "scm_set_var needs exactly two arguments"
- printf -v $(scm_var_name ${1}) %s "${2}"
-}
-
-scm_modify_var() {
- [[ ${#} -ge 2 ]] || die "scm_modify_var needs at least two arguments"
- local var=${1}
- shift
- scm_set_var ${var} "$("${@}" "$(scm_get_var ${var})")"
-}
-
-scm_get_array() {
- [[ ${#} -eq 2 ]] || die "scm_get_array needs exactly two arguments"
- eval "${2}=( \"\${$(scm_var_name ${1})[@]}\" )"
-}
-
-scm_set_array() {
- [[ ${#} -ge 1 ]] || die "scm_set_array needs at least one argument"
- local name=${1}
- shift
- eval "$(scm_var_name ${name})=( \"\${@}\" )"
-}
-
-scm_call() {
- [[ ${#} -ge 1 ]] || die "scm_call needs at least one argument"
- local func=${1} type=$(scm_get_var TYPE)
- shift
- if [[ -n $(declare -F scm-${type}_do_${func}) ]]; then
- scm-${type}_do_${func} "${@}"
- elif [[ -n $(declare -F scm_do_${func}) ]]; then
- scm_do_${func} "${@}"
- else
- die "bug in scm-${type}.eclass: scm-${type}_do_${func} not defined"
- fi
-}
-
-scm_access_checkout() {
- [[ ${#} -ge 1 ]] || die "scm_access_checkout needs at least one argument"
- local dir=$(scm_get_var CHECKOUT_TO)
- local lock=${dir%/*}/.lock-${dir##*/}
-
- local dir_base=${dir%/*}
- if [[ ! -d ${dir_base} ]]; then
- local dir_addwrite=${dir_base}
- local dir_search=${dir_addwrite%/*}
- while [[ ! -d ${dir_search} ]]; do
- dir_addwrite=${dir_search}
- dir_search=${dir_search%/*}
- done
- (
- addwrite "${dir_addwrite}"
- mkdir -p "${dir_base}"
- ) || die "mkdir failed"
- fi
-
- local SANDBOX_WRITE=${SANDBOX_WRITE}
- addwrite "${dir}"
- addwrite "${lock}"
-
- local fd
- for fd in {3..9}; do
- [[ -e /dev/fd/${fd} ]] || break
- done
- [[ -e /dev/fd/${fd} ]] && die "can't find free file descriptor"
-
- eval "
- {
- flock -x \${fd} || die \"flock failed\"
- \"\${@}\"
- local status=\${?}
- :
- } ${fd}>\"\${lock}\" || die \"opening lock file failed\"
- "
-
- return ${status}
-}
-
-scm_do_resolve_externals() {
- :
-}
-
-scm_check_timestamp() {
- [[ -e ${1}/${2} && -n $(find "${1}" -maxdepth 1 -name "${2}" \
- -mmin -$((${SCM_MIN_UPDATE_DELAY} * 60)) -print) ]]
-}
-
-scm_perform_fetch() {
- local dir=$(scm_get_var CHECKOUT_TO)
-
- local whynot status
- if [[ -d ${dir} ]]; then
- whynot=$(scm_call appraise)
- status=${?}
- if [[ ${status} -eq 2 ]]; then
- einfo "Not fetching ${SCM_THIS:-primary repository} because the existing checkout is perfect"
- return
- fi
- else
- whynot="${dir} does not exist"
- status=1
- fi
-
- if [[ -n ${SCM_OFFLINE} ]]; then
- [[ ${status} -ne 0 ]] && die "can't use SCM_OFFLINE for ${SCM_THIS:-primary repository} because ${whynot}"
- einfo "Not fetching ${SCM_THIS:-primary repository} because SCM_OFFLINE is set"
- return
- fi
-
- if [[ -n ${SCM_MIN_UPDATE_DELAY} ]]; then
- [[ ${SCM_MIN_UPDATE_DELAY} == *[^0123456789]* || ${SCM_MIN_UPDATE_DELAY} -eq 0 ]] \
- && die "SCM_MIN_UPDATE_DELAY must be a positive integer"
- local branch=$(scm_get_var BRANCH)
- if scm_check_timestamp "${dir}" .scm.eclass.timestamp ||
- { [[ -n ${branch} ]] && scm_check_timestamp "${dir}" .scm.eclass.timestamp."${branch//\//--}"; }; then
- if [[ ${status} -eq 0 ]]; then
- einfo "Not fetching ${SCM_THIS:-primary repository} because SCM_MIN_UPDATE_DELAY (${SCM_MIN_UPDATE_DELAY}) hours have not passed"
- return
- else
- einfo "Ignoring SCM_MIN_UPDATE_DELAY for ${SCM_THIS:-primary repository} because ${whynot}"
- fi
- fi
- fi
-
- if [[ ${status} -eq 3 ]]; then
- echo rm -rf "${dir}"
- rm -rf "${dir}"
- [[ -d ${dir} ]] && die "rm failed"
- fi
-
- if [[ -d ${dir} ]]; then
- scm_call update
- else
- scm_call checkout
- fi
-
- if [[ -d ${dir} ]]; then
- whynot=$(scm_call appraise)
- [[ ${?} -eq 1 || ${?} -eq 3 ]] && die "${whynot}"
- else
- die "${dir} does not exist"
- fi
-
- local fetched
- scm_get_array FETCHED_BRANCHES fetched
- if [[ ${#fetched[@]} -gt 0 ]]; then
- fetched=( "${fetched[@]//\//--}" )
- touch "${fetched[@]/#/${dir}/.scm.eclass.timestamp.}" || die "touch failed"
- else
- touch "${dir}/.scm.eclass.timestamp" || die "touch failed"
- fi
-}
-
-scm_fetch_one() {
- scm_perform_fetch
- scm_call resolve_externals
-}
-
-scm_src_fetch_extra() {
- scm_{for_each,access_checkout,fetch_one}
-}
-
-scm_scmrevision_one() {
- local rev=$(scm_call revision)
- [[ -n ${rev} ]] || die "could not determine revision for ${SCM_THIS:-primary repository}"
- SCM_PKG_SCM_REVISION_RESULT+=,${SCM_THIS}=${rev}
-}
-
-scm_pkg_scm_revision() {
- local SCM_PKG_SCM_REVISION_RESULT=
- scm_{for_each,access_checkout,scmrevision_one}
- echo ${SCM_PKG_SCM_REVISION_RESULT#,=}
-}
-
-scm_do_unpack() {
- echo cp -pPR "$(scm_get_var CHECKOUT_TO)" "$(scm_get_var UNPACK_TO)"
- cp -pPR "$(scm_get_var CHECKOUT_TO)" "$(scm_get_var UNPACK_TO)" || die "cp failed"
-}
-
-scm_do_set_actual_vars() {
- local rev=$(scm_call revision)
- [[ -n ${rev} ]] || die "could not determine revision for ${SCM_THIS:-primary repository}"
- scm_set_var ACTUAL_REVISION "${rev}"
-}
-
-scm_unpack_one() {
- scm_call resolve_externals
-
- local whynot
- if [[ -d $(scm_get_var CHECKOUT_TO) ]]; then
- whynot=$(scm_call appraise)
- [[ ${?} -eq 1 || ${?} -eq 3 ]] && die "${whynot}"
- else
- die "$(scm_get_var CHECKOUT_TO) does not exist"
- fi
-
- local dir=$(scm_get_var UNPACK_TO)
- if [[ -d ${dir} ]]; then
- rmdir "${dir}" || die "rmdir failed"
- else
- mkdir -p "${dir%/*}" || die mkdir "failed"
- fi
-
- scm_call unpack
- rm -f "${dir}/.scm.eclass.timestamp"{,.*}
- scm_call set_actual_vars
-}
-
-scm_src_unpack() {
- scm_src_fetch_extra
-
- scm_{for_each,access_checkout,unpack_one}
- SCM_IS_BUILT=1
-}
-
-scm_do_info() {
- :
-}
-
-scm_pkg_info() {
- [[ -n ${SCM_IS_BUILT} ]] && scm_{for_each,call} info
-}
-
-scm_trim_slashes() {
- local scheme= leading= trailing=
- while [[ ${#} -gt 0 && ${1} == -* ]]; do
- case ${1} in
- -scheme) scheme=1 ;;
- -leading) leading=1 ;;
- -trailing) trailing=1 ;;
- *) die "scm_trim_slashes: unrecognised switch ${1}"
- esac
- shift
- done
-
- [[ ${#} -eq 1 ]] || die "scm_trim_slashes needs exactly one argument besides switches"
- local value=${1}
-
- local myscheme=
- if [[ -n ${scheme} && ${value} == *://* ]]; then
- myscheme=${value%%://*}://
- value=${value#*://}
- fi
-
- value=${value//+(\/)/\/}
- [[ -n ${leading} ]] && value=${value#/}
- [[ -n ${trailing} ]] && value=${value%/}
-
- echo "${myscheme}${value}"
-}
-scm_need_extglob scm_trim_slashes
-
-scm_do_check_vars() {
- :
-}
-
-scm_global_stuff() {
- if [[ -z $(scm_get_var TYPE) ]]; then
- if [[ -n ${SCM_THIS} ]]; then
- scm_set_var TYPE ${SCM_TYPE}
- else
- die "$(scm_var_name TYPE) must be set"
- fi
- fi
- inherit scm-$(scm_get_var TYPE)
-
- [[ -z $(scm_get_var REPOSITORY) ]] \
- && die "$(scm_var_name REPOSITORY) must be set"
-
- local checkout_to=$(scm_get_var CHECKOUT_TO)
- [[ -z ${checkout_to} ]] && checkout_to=${SCM_THIS:-${PN}}
- [[ ${checkout_to} == /* ]] || checkout_to=${SCM_HOME}/${checkout_to}
- scm_set_var CHECKOUT_TO "$(scm_trim_slashes -trailing "${checkout_to}")"
-
- local unpack_to=$(scm_get_var UNPACK_TO)
- [[ -z ${unpack_to} ]] && unpack_to=${WORKDIR}/${SCM_THIS:-${P}}
- scm_set_var UNPACK_TO "$(scm_trim_slashes -trailing "${unpack_to}")"
-
- scm_call check_vars
-
- DEPEND+=" $(scm_call dependencies)"
-}
-
-SCM_HOME=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/scm
-scm_finalise() {
- DEPEND+=" >=sys-apps/util-linux-2.13_pre2"
-
- [[ -z ${SCM_NO_PRIMARY_REPOSITORY} ]] && SCM_THIS= scm_global_stuff
-
- local t
- for t in ${SCM_SECONDARY_REPOSITORIES}; do
- if [[ ${t} == *\? || ${t} == \( || ${t} == \) ]]; then
- DEPEND+=" ${t}"
- else
- SCM_THIS=${t} scm_global_stuff
- fi
- done
-}
-[[ -z ${SCM_NO_AUTOMATIC_FINALISE} ]] && scm_finalise
-
-#EXPORT_FUNCTIONS src_fetch_extra pkg_scm_revision src_unpack pkg_info
-EXPORT_FUNCTIONS src_unpack pkg_info
-
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
deleted file mode 100644
index 49c9e36..0000000
--- a/eclass/vala.eclass
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# @ECLASS: vala.eclass
-# @MAINTAINER:
-# gnome@gentoo.org
-# @AUTHOR:
-# Alexandre Rostovtsev <tetromino@gentoo.org>
-# @BLURB: Sets up the environment for using a specific version of vala.
-# @DESCRIPTION:
-# This eclass sets up commonly used environment variables for using a specific
-# version of dev-lang/vala to configure and build a package. It is needed for
-# packages whose build systems assume the existence of certain unversioned vala
-# executables, pkgconfig files, etc., which Gentoo does not provide.
-#
-# This eclass provides one phase function: src_prepare.
-
-inherit eutils multilib
-
-case "${EAPI:-0}" in
- 0) die "EAPI=0 is not supported" ;;
- 1) ;;
- *) EXPORT_FUNCTIONS src_prepare ;;
-esac
-
-# @ECLASS-VARIABLE: VALA_MIN_API_VERSION
-# @DESCRIPTION:
-# Minimum vala API version (e.g. 0.20).
-VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.20}
-
-# @ECLASS-VARIABLE: VALA_MAX_API_VERSION
-# @DESCRIPTION:
-# Maximum vala API version (e.g. 0.26).
-VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.26}
-
-# @ECLASS-VARIABLE: VALA_USE_DEPEND
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# USE dependencies that vala must be built with (e.g. vapigen).
-
-# @FUNCTION: vala_api_versions
-# @DESCRIPTION:
-# Outputs a list of vala API versions from VALA_MAX_API_VERSION down to
-# VALA_MIN_API_VERSION.
-vala_api_versions() {
- [[ ${VALA_MIN_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die "Invalid syntax of VALA_MIN_API_VERSION"
- [[ ${VALA_MAX_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die "Invalid syntax of VALA_MAX_API_VERSION"
-
- local minimal_supported_minor_version minor_version
-
- # Dependency atoms are not generated for Vala versions older than 0.${minimal_supported_minor_version}.
- minimal_supported_minor_version="20"
-
- for ((minor_version = ${VALA_MAX_API_VERSION#*.}; minor_version >= ${VALA_MIN_API_VERSION#*.}; minor_version = minor_version - 2)); do
- if ((minor_version >= minimal_supported_minor_version)); then
- echo "0.${minor_version}"
- fi
- done
-}
-
-# @FUNCTION: vala_depend
-# @DESCRIPTION:
-# Outputs a ||-dependency string on vala from VALA_MAX_API_VERSION down to
-# VALA_MIN_API_VERSION
-vala_depend() {
- local u v versions=$(vala_api_versions)
- [[ ${VALA_USE_DEPEND} ]] && u="[${VALA_USE_DEPEND}(+)]"
-
- echo -n "|| ("
- for v in ${versions}; do
- echo -n " dev-lang/vala:${v}${u}"
- done
- echo " )"
-}
-
-# @FUNCTION: vala_best_api_version
-# @DESCRIPTION:
-# Returns the highest installed vala API version satisfying
-# VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
-vala_best_api_version() {
- local u v
- [[ ${VALA_USE_DEPEND} ]] && u="[${VALA_USE_DEPEND}(+)]"
- for v in $(vala_api_versions); do
- has_version "dev-lang/vala:${v}${u}" && echo "${v}" && return
- done
-}
-
-# @FUNCTION: vala_src_prepare
-# @USAGE: [--ignore-use] [--vala-api-version api_version]
-# @DESCRIPTION:
-# Sets up the environment variables and pkgconfig files for the
-# specified API version, or, if no version is specified, for the
-# highest installed vala API version satisfying
-# VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
-# Is a no-op if called without --ignore-use when USE=-vala.
-# Dies if the USE check is passed (or ignored) and a suitable vala
-# version is not available.
-vala_src_prepare() {
- local p d valafoo version ignore_use
-
- while [[ $1 ]]; do
- case $1 in
- "--ignore-use" )
- ignore_use=1 ;;
- "--vala-api-version" )
- shift
- version=$1
- [[ ${version} ]] || die "'--vala-api-version' option requires API version parameter."
- esac
- shift
- done
-
- if [[ -z ${ignore_use} ]]; then
- in_iuse vala && ! use vala && return 0
- fi
-
- if [[ ${version} ]]; then
- has_version "dev-lang/vala:${version}" || die "No installed vala:${version}"
- else
- version=$(vala_best_api_version)
- [[ ${version} ]] || die "No installed vala in $(vala_depend)"
- fi
-
- export VALAC=$(type -P valac-${version})
-
- valafoo=$(type -P vala-gen-introspect-${version})
- [[ ${valafoo} ]] && export VALA_GEN_INTROSPECT="${valafoo}"
-
- valafoo=$(type -P vapigen-${version})
- [[ ${valafoo} ]] && export VAPIGEN="${valafoo}"
-
- valafoo="${EPREFIX}/usr/share/vala/Makefile.vapigen"
- [[ -e ${valafoo} ]] && export VAPIGEN_MAKEFILE="${valafoo}"
-
- export VAPIGEN_VAPIDIR="${EPREFIX}/usr/share/vala/vapi"
-
- mkdir -p "${T}/pkgconfig" || die "mkdir failed"
- for p in libvala vapigen; do
- for d in "${EPREFIX}/usr/$(get_libdir)/pkgconfig" "${EPREFIX}/usr/share/pkgconfig"; do
- if [[ -e ${d}/${p}-${version}.pc ]]; then
- ln -s "${d}/${p}-${version}.pc" "${T}/pkgconfig/${p}.pc" || die "ln failed"
- break
- fi
- done
- done
- : ${PKG_CONFIG_PATH:="${EPREFIX}/usr/$(get_libdir)/pkgconfig:${EPREFIX}/usr/share/pkgconfig"}
- export PKG_CONFIG_PATH="${T}/pkgconfig:${PKG_CONFIG_PATH}"
-}