# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/portage/eclass/fox.eclass,v 1.9 2005/04/13 01:48:24 yaakov Exp $ # fox eclass # # 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 apps against fox: # 1.0: '>=x11-libs/fox-1.0.53 =x11-libs/fox-1.2.15 =x11-libs/fox-1.4.12 = 1.2) if [ -f ${D}/usr/bin/fox-config ] ; then mv ${D}/usr/bin/fox-config ${D}/usr/bin/fox-${FOXVER}-config fi } fox_pkg_postrm() { if [ -z "${FOX_COMPONENT}" ] ; then if has_version '=x11-libs/fox-${FOXVER}*' ; then einfo "Leaving FOX fox-config symlink..." elif has_version '=x11-libs/fox-1.4*' ; then einfo "Restoring fox-config symlink to FOX-1.4..." ln -sfn fox-1.2-config ${ROOT}usr/bin/fox-config elif has_version '=x11-libs/fox-1.2*' ; then einfo "Restoring fox-config symlink to FOX-1.2..." ln -sfn fox-1.2-config ${ROOT}usr/bin/fox-config elif has_version '=x11-libs/fox-1.5*' ; then einfo "Restoring fox-config symlink to FOX-1.5..." ln -sfn fox-1.5-config ${ROOT}usr/bin/fox-config elif ! has_version 'x11-libs/fox' ; then einfo "Removing fox-config symlink..." rm -f ${ROOT}usr/bin/fox-config fi fi } fox_pkg_postinst() { if [ -z "${FOX_COMPONENT}" ] ; then if [ "${FOXVER}" == "1.6" ] ; then if ! has_version '>=x11-libs/fox-1.8' ; then einfo "Making fox-config symlink to FOX-${FOXVER}..." ln -sfn fox-${FOXVER}-config ${ROOT}usr/bin/fox-config fi elif [ "${FOXVER}" == "1.5" ] ; then if ! has_version '=x11-libs/fox-1.6' ; then einfo "Making fox-config symlink to FOX-${FOXVER}..." ln -sfn fox-${FOXVER}-config ${ROOT}usr/bin/fox-config fi elif [ "${FOXVER}" == "1.2" ] ; then if ! has_version '>=x11-libs/fox-1.4' ; then einfo "Making fox-config symlink to FOX-${FOXVER}..." ln -sfn fox-${FOXVER}-config ${ROOT}usr/bin/fox-config fi fi fi } EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postrm pkg_postinst