diff options
author | James Broadhead <jamesbroadhead@gmail.com> | 2011-11-15 12:24:18 +0000 |
---|---|---|
committer | James Broadhead <jamesbroadhead@gmail.com> | 2011-11-15 12:24:18 +0000 |
commit | abee522f44056452eacce965e2d878874ff5c165 (patch) | |
tree | bb78161a6afcbbd44837bb5b776701050daa7310 | |
parent | Add rssdler (someone else's ebuild, untested) (diff) | |
download | jamesbroadhead-abee522f44056452eacce965e2d878874ff5c165.tar.gz jamesbroadhead-abee522f44056452eacce965e2d878874ff5c165.tar.bz2 jamesbroadhead-abee522f44056452eacce965e2d878874ff5c165.zip |
Updated versions of fox, with proper SLOTting.
-rw-r--r-- | eclass/fox.eclass | 229 | ||||
-rw-r--r-- | x11-libs/fox-wrapper/Manifest | 2 | ||||
-rw-r--r-- | x11-libs/fox-wrapper/files/fox-wrapper-3.sh | 76 | ||||
-rw-r--r-- | x11-libs/fox-wrapper/fox-wrapper-3-r1.ebuild | 27 | ||||
-rw-r--r-- | x11-libs/fox/Manifest | 4 | ||||
-rw-r--r-- | x11-libs/fox/fox-1.6.43-r1.ebuild | 35 | ||||
-rw-r--r-- | x11-libs/fox/fox-1.7.30.ebuild | 53 |
7 files changed, 426 insertions, 0 deletions
diff --git a/eclass/fox.eclass b/eclass/fox.eclass new file mode 100644 index 0000000..18f2c20 --- /dev/null +++ b/eclass/fox.eclass @@ -0,0 +1,229 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/fox.eclass,v 1.13 2011/08/09 04:26:20 bicatali Exp $ + +# @ECLASS: fox.eclass +# @MAINTAINER: +# mabi@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) 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++ based 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:\.la::' \ + ${d}/Makefile.am || die "sed ${d}/Makefile.am error" + + if [[ "${FOXVER}" < "1.7" ]] ; then + sed -i -e 's:$(top_builddir)/src/libFOX/libFOX:-lFOX:' \ + ${d}/Makefile.am + else + sed -i -e 's:$(top_builddir)/lib/libFOX:-lFOX:' \ + ${d}/Makefile.am + + fi + 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 "The applications bundled with the FOX Toolkit are now available as" + einfo "app-editors/adie, dev-util/reswrap, sci-calculators/calculator," + einfo "x11-misc/pathfinder and x11-misc/shutterbug." + echo + # Version specific. Remove once all fox-1.6* are gone. + if [[ "${FOXVER}" < "1.7" ]] ; then + 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 <options>" + einfo + fi + fi +} diff --git a/x11-libs/fox-wrapper/Manifest b/x11-libs/fox-wrapper/Manifest new file mode 100644 index 0000000..03af955 --- /dev/null +++ b/x11-libs/fox-wrapper/Manifest @@ -0,0 +1,2 @@ +AUX fox-wrapper-3.sh 2013 RMD160 d0813b960964361e992ee23b1078f04d3be51143 SHA1 5198a0d4c373ee7a66b5aecbf47e2bac3cec7686 SHA256 68f18d474869d519a99b06a63abc70ed8f583522da0a0a6965fd047717f2c11b +EBUILD fox-wrapper-3-r1.ebuild 649 RMD160 30a1731ac8aa8c65bfdf05b107f0a5c1d7e890cb SHA1 b09e068a9d1b9188848e66d4251b94fcde49bd10 SHA256 5b26ba224a3cff1538d441ce5381945f9340ee99ece136bb2d839f4ca4d22fb5 diff --git a/x11-libs/fox-wrapper/files/fox-wrapper-3.sh b/x11-libs/fox-wrapper/files/fox-wrapper-3.sh new file mode 100644 index 0000000..4cadc98 --- /dev/null +++ b/x11-libs/fox-wrapper/files/fox-wrapper-3.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox-wrapper/files/fox-wrapper-3.sh,v 1.1 2009/03/01 22:58:16 mabi Exp $ + +# Based on the am-wrapper.sh script (sys-devel/automake-wrapper-1-r1) +# +# Executes the correct fox-config version, based on the value of WANT_FOX. +# All versions of fox after 1.0.x ship with a fox-config script +# +# +# Stable branches first, in descending order, then unstable branches. +# After a new stable branch, prepend the new version and bump (or remove) +# the last unstable branch +# +vers="1.6 1.7" +bindir=/usr/bin + +if [ "${0##*/}" = "fox-wrapper.sh" ] ; then + echo "fox-wrapper: Don't call this script directly, use fox-config instead" >&2 + exit 1 +fi + +if [ -z "${WANT_FOX}" ] ; then + echo "fox-wrapper: Set the WANT_FOX variable to the desired version of fox, e.g.:" >&2 + echo " WANT_FOX=\"1.6\" fox-config $@" + exit 1 +fi + +for v in ${vers} ; do + eval binary_${v/./_}="fox-${v}-config" +done + +# +# Check the WANT_FOX setting +# +for v in ${vers} x ; do + if [ "${v}" = "x" ] ; then + echo "fox-wrapper: WANT_FOX was set to an invalid version ${WANT_FOX}" >&2 + echo " Valid values of WANT_FOX are: ${vers// /, }" + exit 1 + fi + + if [ "${WANT_FOX}" = "${v}" ] ; then + binary="binary_${v/./_}" + binary="${!binary}" + break + fi +done + +if [ "${WANT_FOXWRAPPER_DEBUG}" ] ; then + echo "fox-wrapper: DEBUG: WANT_FOX is set to ${WANT_FOX}" >&2 + echo "fox-wrapper: DEBUG: will execute <$binary>" >&2 +fi + +# +# for further consistency +# +for v in ${vers} ; do + mybin="binary_${v/./_}" + if [ "${binary}" = "${!mybin}" ] ; then + export WANT_FOX="${v}" + fi +done + +# +# Now try to run the binary +# +if [ ! -x "${bindir}/${binary}" ] ; then + echo "fox-wrapper: $binary is missing or not executable." >&2 + echo " Please try emerging the correct version of fox, i.e.:" >&2 + echo " emerge '=x11-libs/${binary/-config/}*'" >&2 + exit 1 +fi + +"$binary" "$@" diff --git a/x11-libs/fox-wrapper/fox-wrapper-3-r1.ebuild b/x11-libs/fox-wrapper/fox-wrapper-3-r1.ebuild new file mode 100644 index 0000000..42439b5 --- /dev/null +++ b/x11-libs/fox-wrapper/fox-wrapper-3-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox-wrapper/fox-wrapper-3.ebuild,v 1.2 2009/05/05 07:36:36 ssuominen Exp $ + +EAPI="4" + +DESCRIPTION="Wrapper for fox-config to manage multiple versions" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +RDEPEND="" +DEPEND="" + +S=${WORKDIR} + +src_install() { + exeinto /usr/lib/misc + newexe "${FILESDIR}"/fox-wrapper-${PV}.sh fox-wrapper.sh + + dodir /usr/bin + dosym ../lib/misc/fox-wrapper.sh /usr/bin/fox-config +} diff --git a/x11-libs/fox/Manifest b/x11-libs/fox/Manifest new file mode 100644 index 0000000..b602952 --- /dev/null +++ b/x11-libs/fox/Manifest @@ -0,0 +1,4 @@ +DIST fox-1.6.43.tar.gz 4368520 RMD160 34c058aec59553469ec53b13bfdf303b9b43f837 SHA1 9c6575e1a59a488c3dd56c6750f7d16c6ae71de5 SHA256 f09fbe0f11a1e369362a66d6e41029ce137b2704c04970cae990213ac80a838e +DIST fox-1.7.30.tar.gz 4934744 RMD160 2cb49c51ab6da5ec13fc8d7dd2f9f49fb1319d9e SHA1 bc3ad42da3b2a49d98cdb9ee9a11745a9b8fc47e SHA256 4eb9af4bde8cfe7243738195b62879d607736fa0b43a12fd5be42ef047692714 +EBUILD fox-1.6.43-r1.ebuild 938 RMD160 0405769c856512815b520d9b2c2821f946cc4464 SHA1 df6da7def3484e49f2173529913969422513f0f2 SHA256 6909cd4f1a49592be45eb826a3abd2abada3abff925e62758f38fd8793a2ff97 +EBUILD fox-1.7.30.ebuild 1319 RMD160 8c3dc91250817c596a81d698af1799f7721b9ac9 SHA1 9b0da9fbe08ffadafeba6cd7d08de66a871a099f SHA256 34f5cc96ea04a84526cc99ec92f87c4f72451d7fcff2ad98aed48ae7d570f69e diff --git a/x11-libs/fox/fox-1.6.43-r1.ebuild b/x11-libs/fox/fox-1.6.43-r1.ebuild new file mode 100644 index 0000000..61eb6c2 --- /dev/null +++ b/x11-libs/fox/fox-1.6.43-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox/fox-1.6.43.ebuild,v 1.2 2011/08/31 06:43:56 mr_bones_ Exp $ + +EAPI="4" + +inherit eutils fox + +LICENSE="LGPL-2.1" +SLOT="1.6" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="bzip2 jpeg opengl png tiff truetype zlib" + +RDEPEND="x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/fox-wrapper + bzip2? ( >=app-arch/bzip2-1.0.2 ) + jpeg? ( virtual/jpeg ) + opengl? ( virtual/opengl ) + png? ( >=media-libs/libpng-1.2.5 ) + tiff? ( >=media-libs/tiff-3.5.7 ) + truetype? ( =media-libs/freetype-2* + x11-libs/libXft ) + zlib? ( >=sys-libs/zlib-1.1.4 )" +DEPEND="${RDEPEND} + x11-proto/xextproto + x11-libs/libXt" + +FOXCONF="$(use_enable bzip2 bz2lib) \ + $(use_enable jpeg) \ + $(use_with opengl) \ + $(use_enable png) \ + $(use_enable tiff) \ + $(use_with truetype xft) \ + $(use_enable zlib)" diff --git a/x11-libs/fox/fox-1.7.30.ebuild b/x11-libs/fox/fox-1.7.30.ebuild new file mode 100644 index 0000000..f55fccb --- /dev/null +++ b/x11-libs/fox/fox-1.7.30.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/fox/fox-1.7.23.ebuild,v 1.2 2011/02/26 22:34:32 signals Exp $ + +EAPI="3" + +inherit fox + +LICENSE="LGPL-2.1" +SLOT="1.7" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="bzip2 jpeg opengl png tiff truetype zlib" + +# newish autoconf needed for working mmap check +RDEPEND="x11-libs/libXrandr + x11-libs/libXcursor + >=sys-devel/autoconf-2.67 + bzip2? ( app-arch/bzip2 ) + jpeg? ( virtual/jpeg ) + opengl? ( virtual/opengl ) + png? ( media-libs/libpng ) + tiff? ( media-libs/tiff ) + truetype? ( media-libs/freetype:2 + x11-libs/libXft ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + media-libs/mesa + x11-proto/xextproto + x11-libs/libXt" + +FOXCONF="$(use_enable bzip2 bz2lib) \ + $(use_enable jpeg) \ + $(use_with opengl) \ + $(use_enable png) \ + $(use_enable tiff) \ + $(use_with truetype xft) \ + $(use_enable zlib)" + +src_install() { + fox_src_install + CP="${D}/usr/bin/ControlPanel" + if [[ -f $CP ]] ; then + mv $CP "${D}/usr/bin/fox-ControlPanel-${FOX_PV}" || \ + die "Failed to install ControlPanel" + fi +} + +pkg_postinst() { + fox_pkg_postinst + + einfo "ControlPanel has been installed to 'fox-ControlPanel-${FOX_PV}' to avoid conflicts" + einfo "with other packages." +} |