From: Matti Bickel <mabi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: fox.eclass update
Date: Mon, 9 Feb 2009 19:22:48 +0100 [thread overview]
Message-ID: <20090209182248.GA9671@pluto> (raw)
In-Reply-To: <1234191710.13899.229.camel@localhost>
[-- Attachment #1.1: Type: text/plain, Size: 626 bytes --]
Peter Volkov <pva@gentoo.org> wrote:
> В Вск, 08/02/2009 в 23:06 +0100, Matti Bickel пишет:
> > +# could probably be lower
> > +WANT_AUTOCONF="latest"
> > +WANT_AUTOMAKE="latest"
>
> These are defaults. You don't need to specify them.
>
> > + eautomake || die "automake error"
>
> eautomake dies on its own. You don't need || die here.
Thanks for the comments, WANT_AUTO* was specified to make some previous
commenter happy, but removed now ;)
Where was that 'which functions || die on their own' table, anyway?
--
Regards, Matti Bickel
Signed/Encrypted email preferred (key 4849EC6C)
[-- Attachment #1.2: fox.eclass.patch --]
[-- Type: text/plain, Size: 7344 bytes --]
--- /usr/portage/eclass/fox.eclass 2008-10-12 14:36:35.000000000 +0200
+++ fox-proposed.eclass 2009-02-09 19:21:03.000000000 +0100
@@ -1,8 +1,12 @@
# 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.8 2008/10/12 12:31:36 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/fox.eclass,v 1.7 2007/01/15 20:27:06 mabi Exp $
-# fox eclass
+# @ECLASS: fox.eclass
+# @MAINTAINER: mabi@gentoo.org
+# @BLURB: Common build and install functions for fox-related apps and library
+# @DESCRIPTION: Used by the x11-libs/fox library and all applications that come
+# with the upstream source tarball.
#
# This eclass allows building SLOT-able FOX Toolkit installations
# (x11-libs/fox: headers, libs, and docs), which are by design
@@ -19,26 +23,18 @@
# 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
-# fox versions that do not use this eclass are blocked in INCOMPAT_DEP below
-# 1.0: '=x11-libs/fox-1.0*'
-# 1.2: '=x11-libs/fox-1.2*'
+# Some concepts borrowed from gst-plugins and gtk-sharp-component eclasses
+#
+# @EXAMPLE: Here are sample [R]DEPENDs for the fox apps
# 1.4: '=x11-libs/fox-1.4*'
# 1.5: '~x11-libs/fox-${PV}'
# 1.6: '=x11-libs/fox-${FOXVER}*'
-#
-# Some concepts borrowed from gst-plugins and gtk-sharp-component eclasses
-
-inherit eutils libtool versionator
+inherit autotools eutils libtool versionator
FOX_PV="${FOX_PV:-${PV}}"
-PVP=(${FOX_PV//[-\._]/ })
-FOXVER="${PVP[0]}.${PVP[1]}"
-
-if [ "${FOXVER}" != "1.0" ] ; then
- FOXVER_SUFFIX="-${FOXVER}"
-fi
+FOXVER=$(get_version_component_range 1-2)
+FOXVER_SUFFIX="-${FOXVER}"
DESCRIPTION="C++ based Toolkit for developing Graphical User Interfaces easily and effectively"
HOMEPAGE="http://www.fox-toolkit.org/"
@@ -46,44 +42,28 @@
IUSE="debug doc profile"
-# from fox-1.0
-FOX_APPS="adie calculator pathfinder"
-# from fox-1.2+
-if [ "${FOXVER}" != "1.0" ] ; then
- FOX_APPS="${FOX_APPS} shutterbug"
- FOX_CHART="chart"
-fi
+# @ECLASS-VARIABLE: FOX_APPS
+# @DESCRIPTION: all applications that come with the fox toolkit source
+FOX_APPS="adie calculator pathfinder shutterbug chart"
if [ "${PN}" != fox ] ; then
FOX_COMPONENT="${FOX_COMPONENT:-${PN}}"
fi
-if [ "${FOXVER}" != "1.0" ] && [ -z "${FOX_COMPONENT}" ] ; then
- DOXYGEN_DEP="doc? ( app-doc/doxygen )"
-fi
-
if [ "${PN}" != reswrap ] ; then
RESWRAP_DEP="dev-util/reswrap"
fi
-# These versions are not compatible with new fox layout
-# and will cause collissions - we need to block them
-INCOMPAT_DEP="!<x11-libs/fox-1.0.53
- !=x11-libs/fox-1.2.4
- !~x11-libs/fox-1.2.6
- !=x11-libs/fox-1.4.11"
-
-DEPEND="${INCOMPAT_DEP}
- ${DOXYGEN_DEP}
- ${RESWRAP_DEP}
- =sys-devel/automake-1.4*
+DEPEND="${RESWRAP_DEP}
+ doc? ( app-doc/doxygen )
+ >=sys-devel/automake-1.4
>=sys-apps/sed-4"
S="${WORKDIR}/fox-${FOX_PV}"
fox_src_unpack() {
unpack ${A}
- cd ${S}
+ cd "${S}"
ebegin "Fixing configure"
@@ -103,14 +83,14 @@
done
# use the installed reswrap for everything else
- for d in ${FOX_APPS} ${FOX_CHART} tests ; do
+ for d in ${FOX_APPS} tests ; do
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
- if version_is_at_least "1.6.34" ${PV} ; then
+ if version_is_at_least "1.6.34" ${PV}; then
sed -i \
-e "s:-I\$(top_srcdir)/include -I\$(top_builddir)/include:-I\$(includedir)/fox${FOXVER_SUFFIX}:" \
-e 's:$(top_builddir)/src/libFOX:-lFOX:' \
@@ -124,19 +104,13 @@
${d}/Makefile.am || die "sed ${d}/Makefile.am error"
fi
done
-
- # Upstream often has trouble with version number transitions
- if [ "${FOXVER}" == "1.5" ] ; then
- sed -i -e 's:1.4:1.5:g' chart/Makefile.am
- fi
-
eend
ebegin "Running automake"
- automake-1.4 -a -c || die "automake error"
+ eautomake
eend
- elibtoolize
+ #elibtoolize
}
fox_src_compile() {
@@ -150,21 +124,21 @@
$(use_with profile profiling) \
|| die "configure error"
- cd ${S}/${FOX_COMPONENT}
+ cd "${S}/${FOX_COMPONENT}"
emake || die "compile error"
# build class reference docs (FOXVER >= 1.2)
- if use doc && [ "${FOXVER}" != "1.0" ] && [ -z "${FOX_COMPONENT}" ] ; then
- cd ${S}/doc
- make docs || die "doxygen error"
+ if use doc && [ -z "${FOX_COMPONENT}" ] ; then
+ cd "${S}/doc"
+ emake docs || die "doxygen error"
fi
}
fox_src_install () {
- cd ${S}/${FOX_COMPONENT}
+ cd "${S}/${FOX_COMPONENT}"
- make install \
- DESTDIR=${D} \
+ emake install \
+ DESTDIR="${D}" \
htmldir=/usr/share/doc/${PF}/html \
artdir=/usr/share/doc/${PF}/html/art \
screenshotsdir=/usr/share/doc/${PF}/html/screenshots \
@@ -195,41 +169,37 @@
done
# remove documentation if USE=-doc
- if ( ! use doc ) && [ -d ${D}/usr/share/doc/${PF}/html ] ; then
- rm -fr ${D}/usr/share/doc/${PF}/html
+ if ! use doc && [ -d "${D}"/usr/share/doc/${PF}/html ] ; then
+ rm -fr "${D}"/usr/share/doc/${PF}/html
fi
# install class reference docs (FOXVER >= 1.2) if USE=doc
- if use doc && [ "${FOXVER}" != "1.0" ] && [ -z "${FOX_COMPONENT}" ] ; then
- dohtml -r ${S}/doc/ref
+ if use doc && [ -z "${FOX_COMPONENT}" ] ; then
+ dohtml -r "${S}"/doc/ref
fi
# slot fox-config where present (FOXVER >= 1.2)
- if [ -f ${D}/usr/bin/fox-config ] ; then
- mv ${D}/usr/bin/fox-config ${D}/usr/bin/fox-${FOXVER}-config
+ if [ -f "${D}"/usr/bin/fox-config ] ; then
+ mv "${D}"/usr/bin/fox-config "${D}"/usr/bin/fox-${FOXVER}-config
fi
}
fox_pkg_postinst() {
if [ -z "${FOX_COMPONENT}" ] ; then
+ elog "Multiple versions of the FOX Toolkit library may now be installed"
+ elog "in parallel SLOTs on the same system."
+ elog
+ elog "The reswrap utility and the applications included in the FOX Toolkit"
+ elog "(adie, calculator, pathfinder, shutterbug) are now available as"
+ elog "separate ebuilds."
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 [ "${FOXVER}" != "1.0" ] ; 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
- epause
- fi
+ elog "The fox-config script has been installed as fox-${FOXVER}-config."
+ elog "The fox-wrapper package is used to direct calls to fox-config"
+ elog "to the correct versioned script, based on the WANT_FOX variable."
+ elog "For example:"
+ elog
+ elog " WANT_FOX=\"${FOXVER}\" fox-config <options>"
+ elog
fi
}
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-02-09 18:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-12 12:41 [gentoo-dev] RFC: fox.eclass update Matti Bickel
2008-10-13 10:56 ` Petteri Räty
2008-10-13 17:20 ` Donnie Berkholz
2008-10-13 18:28 ` Matti Bickel
2008-10-14 13:20 ` Bo Ørsted Andresen
2009-02-08 22:06 ` Matti Bickel
2009-02-09 15:01 ` Peter Volkov
2009-02-09 18:22 ` Matti Bickel [this message]
2009-02-10 5:10 ` Nirbheek Chauhan
-- strict thread matches above, loose matches on Subject: below --
2010-09-16 13:31 Matti Bickel
2010-09-16 13:39 ` Tomáš Chvátal
2010-09-16 14:24 ` Matti Bickel
2010-09-16 14:41 ` Jeremy Olexa
2010-09-16 15:44 ` Jeroen Roovers
2010-09-16 17:38 ` Peter Volkov
2010-09-16 16:48 ` Matti Bickel
2010-09-16 18:32 ` Peter Volkov
2010-09-16 18:51 ` Matti Bickel
2010-09-16 19:29 ` Mike Frysinger
2010-09-16 19:41 ` Peter Volkov
2010-09-16 22:34 ` Mike Frysinger
2010-09-17 5:06 ` Peter Volkov
2010-09-17 5:24 ` Mike Frysinger
2010-09-16 20:24 ` Matti Bickel
2010-09-16 22:33 ` Mike Frysinger
2010-09-17 8:15 ` Michael Haubenwallner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090209182248.GA9671@pluto \
--to=mabi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox