From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OwG5p-0001u2-4B for garchives@archives.gentoo.org; Thu, 16 Sep 2010 15:09:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BAE62E07DD for ; Thu, 16 Sep 2010 15:09:44 +0000 (UTC) Received: from earth.farbfinsternis.net (earth.farbfinsternis.net [87.118.98.117]) by pigeon.gentoo.org (Postfix) with ESMTP id 6E37FE08C0 for ; Thu, 16 Sep 2010 14:24:21 +0000 (UTC) Received: from [192.168.178.26] (p4FD52F85.dip0.t-ipconnect.de [79.213.47.133]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by earth.farbfinsternis.net (Postfix) with ESMTPSA id 278F37C003E for ; Thu, 16 Sep 2010 16:21:00 +0200 (CEST) Message-ID: <4C922892.6040500@gentoo.org> Date: Thu, 16 Sep 2010 16:24:18 +0200 From: Matti Bickel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100826 Lightning/1.0b1 Thunderbird/3.0.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFC: fox.eclass update References: <4C921C29.6010502@gentoo.org> In-Reply-To: <4C921C29.6010502@gentoo.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig721DA62191273EA5E9C34B79" X-Archives-Salt: 342085c1-4e7e-4135-b732-b215e61d3744 X-Archives-Hash: 8fdcdcace96d00737ec47e5d31e29152 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig721DA62191273EA5E9C34B79 Content-Type: multipart/mixed; boundary="------------090704000406000703030509" This is a multi-part message in MIME format. --------------090704000406000703030509 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 09/16/2010 03:31 PM, Matti Bickel wrote: -- Now complete with attachments :) --------------090704000406000703030509 Content-Type: text/plain; name="fox.eclass" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fox.eclass" # 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 $ # 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/calculat= or, # 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=3D"src_unpack src_compile src_install pkg_postinst" case "${EAPI:-0}" in 2|3|4) FOX_EXPF+=3D" src_prepare src_configure" ;; *) ;; esac EXPORT_FUNCTIONS ${FOX_EXPF} FOX_PV=3D"${FOX_PV:-${PV}}" FOXVER=3D`get_version_component_range 1-2 ${FOX_PV}` FOX_APPS=3D"adie calculator pathfinder shutterbug" FOX_CHART=3D"chart" DESCRIPTION=3D"C++ based Toolkit for developing Graphical User Interfaces= easily and effectively" HOMEPAGE=3D"http://www.fox-toolkit.org/" SRC_URI=3D"http://www.fox-toolkit.org/ftp/fox-${FOX_PV}.tar.gz" IUSE=3D"debug doc profile" if [ "${PN}" !=3D fox ] ; then FOX_COMPONENT=3D"${FOX_COMPONENT:-${PN}}" fi if [ -z "${FOX_COMPONENT}" ] ; then DOXYGEN_DEP=3D"doc? ( app-doc/doxygen )" fi if [ "${PN}" !=3D reswrap ] ; then RESWRAP_DEP=3D"dev-util/reswrap" fi DEPEND=3D"${DOXYGEN_DEP} ${RESWRAP_DEP} =3Dsys-devel/automake-1.4* >=3Dsys-apps/sed-4" S=3D"${WORKDIR}/fox-${FOX_PV}" fox_src_unpack() { unpack ${A} cd "${S}" hasq src_prepare ${FOX_EXPF} || fox_src_prepare } fox_src_prepare() { # fox changed from configure.in to configure.am in 1.6.38 local confFile=3D"configure.ac" [[ -r "configure.in" ]] && confFile=3D"configure.in" # Respect system CXXFLAGS sed -i -e 's:CXXFLAGS=3D""::' $confFile || die "sed ${confFile} error" # don't build apps from top-level (i.e. x11-libs/fox) # utils =3D=3D reswrap 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} ${FOX_CHART} 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 sed -i \ -e "s:-I\$(top_srcdir)/include -I\$(top_builddir)/include:-I\$(include= dir)/fox-${FOXVER}:" \ -e 's:$(top_builddir)/src/libFOX:-lFOX:' \ -e 's:\.la::' \ ${d}/Makefile.am || die "sed ${d}/Makefile.am error" done eautoreconf } fox_src_configure() { local myconf use debug && myconf=3D"${myconf} --enable-debug" \ || myconf=3D"${myconf} --enable-release" econf \ ${FOXCONF} \ ${myconf} \ $(use_with profile profiling) \ || die "configure error" } fox_src_compile() { hasq src_configure ${FOX_EXPF} || fox_src_configure cd "${S}/${FOX_COMPONENT}" emake || die "compile error" # build class reference docs (FOXVER >=3D 1.2) if use doc && [ -z "${FOX_COMPONENT}" ] ; then cd "${S}/doc" make docs || die "doxygen error" fi } fox_src_install() { cd "${S}/${FOX_COMPONENT}" emake install \ DESTDIR=3D"${D}" \ htmldir=3D/usr/share/doc/${PF}/html \ artdir=3D/usr/share/doc/${PF}/html/art \ screenshotsdir=3D/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=3D-doc if ( ! use doc ) && [ -d "${D}/usr/share/doc/${PF}/html" ] ; then rm -fr "${D}/usr/share/doc/${PF}/html" fi # install class reference docs if USE=3Ddoc 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" fi } fox_pkg_postinst() { if [ -z "${FOX_COMPONENT}" ] ; then echo einfo "Multiple versions of the FOX Toolkit library may now be installe= d" einfo "in parallel SLOTs on the same system." einfo einfo "The reswrap utility and the applications included in the FOX Too= lkit" einfo "(adie, calculator, pathfinder, shutterbug) are now available as"= einfo "separate ebuilds." echo einfo "The fox-config script has been installed as fox-${FOXVER}-config= =2E" 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=3D\"${FOXVER}\" fox-config " einfo epause fi } --------------090704000406000703030509 Content-Type: text/x-patch; name="fox.eclass.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fox.eclass.diff" --- /usr/portage/eclass/fox.eclass 2008-10-12 14:36:35.000000000 +0200 +++ fox.eclass 2010-09-15 22:55:45.000000000 +0200 @@ -20,25 +20,26 @@ # 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 b= elow -# 1.0: '=3Dx11-libs/fox-1.0*' -# 1.2: '=3Dx11-libs/fox-1.2*' -# 1.4: '=3Dx11-libs/fox-1.4*' -# 1.5: '~x11-libs/fox-${PV}' -# 1.6: '=3Dx11-libs/fox-${FOXVER}*' +# 1.6: 'x11-libs/fox:1.6' +# 1.7: '~x11-libs/fox-${PV}' # -# Some concepts borrowed from gst-plugins and gtk-sharp-component eclass= es +# EAPI phase trickery borrowed from enlightenment.eclass =20 -inherit eutils libtool versionator +inherit autotools versionator =20 =20 +FOX_EXPF=3D"src_unpack src_compile src_install pkg_postinst" +case "${EAPI:-0}" in + 2|3|4) FOX_EXPF+=3D" src_prepare src_configure" ;; + *) ;; +esac +EXPORT_FUNCTIONS ${FOX_EXPF} + FOX_PV=3D"${FOX_PV:-${PV}}" -PVP=3D(${FOX_PV//[-\._]/ }) -FOXVER=3D"${PVP[0]}.${PVP[1]}" +FOXVER=3D`get_version_component_range 1-2 ${FOX_PV}` =20 -if [ "${FOXVER}" !=3D "1.0" ] ; then - FOXVER_SUFFIX=3D"-${FOXVER}" -fi +FOX_APPS=3D"adie calculator pathfinder shutterbug" +FOX_CHART=3D"chart" =20 DESCRIPTION=3D"C++ based Toolkit for developing Graphical User Interface= s easily and effectively" HOMEPAGE=3D"http://www.fox-toolkit.org/" @@ -46,19 +47,11 @@ =20 IUSE=3D"debug doc profile" =20 -# from fox-1.0 -FOX_APPS=3D"adie calculator pathfinder" -# from fox-1.2+ -if [ "${FOXVER}" !=3D "1.0" ] ; then - FOX_APPS=3D"${FOX_APPS} shutterbug" - FOX_CHART=3D"chart" -fi - if [ "${PN}" !=3D fox ] ; then FOX_COMPONENT=3D"${FOX_COMPONENT:-${PN}}" fi =20 -if [ "${FOXVER}" !=3D "1.0" ] && [ -z "${FOX_COMPONENT}" ] ; then +if [ -z "${FOX_COMPONENT}" ] ; then DOXYGEN_DEP=3D"doc? ( app-doc/doxygen )" fi =20 @@ -66,15 +59,7 @@ RESWRAP_DEP=3D"dev-util/reswrap" fi =20 -# These versions are not compatible with new fox layout -# and will cause collissions - we need to block them -INCOMPAT_DEP=3D"!=3Dsys-apps/sed-4" @@ -83,18 +68,18 @@ =20 fox_src_unpack() { unpack ${A} - cd ${S} - - ebegin "Fixing configure" + cd "${S}" =20 - # Respect system CXXFLAGS - sed -i -e 's:CXXFLAGS=3D""::' configure.in || die "sed configure.in err= or" - touch aclocal.m4 - sed -i -e 's:CXXFLAGS=3D""::' configure || die "sed configure error" + hasq src_prepare ${FOX_EXPF} || fox_src_prepare +} =20 - eend +fox_src_prepare() { + # fox changed from configure.in to configure.am in 1.6.38 + local confFile=3D"configure.ac" + [[ -r "configure.in" ]] && confFile=3D"configure.in" =20 - ebegin "Fixing Makefiles" + # Respect system CXXFLAGS + sed -i -e 's:CXXFLAGS=3D""::' $confFile || die "sed ${confFile} error" =20 # don't build apps from top-level (i.e. x11-libs/fox) # utils =3D=3D reswrap @@ -110,36 +95,17 @@ =20 # use the installed headers and library for apps for d in ${FOX_APPS} ; do - if version_is_at_least "1.6.34" ${PV} ; then - sed -i \ - -e "s:-I\$(top_srcdir)/include -I\$(top_builddir)/include:-I\$(inclu= dedir)/fox${FOXVER_SUFFIX}:" \ - -e 's:$(top_builddir)/src/libFOX:-lFOX:' \ - -e 's:\.la::' \ - ${d}/Makefile.am || die "sed ${d}/Makefile.am error" - else - sed -i \ - -e "s:-I\$(top_srcdir)/include -I\$(top_builddir)/include:-I\$(inclu= dedir)/fox${FOXVER_SUFFIX}:" \ - -e 's:../src/libFOX:-lFOX:' \ - -e 's:\.la::' \ - ${d}/Makefile.am || die "sed ${d}/Makefile.am error" - fi + sed -i \ + -e "s:-I\$(top_srcdir)/include -I\$(top_builddir)/include:-I\$(includ= edir)/fox-${FOXVER}:" \ + -e 's:$(top_builddir)/src/libFOX:-lFOX:' \ + -e 's:\.la::' \ + ${d}/Makefile.am || die "sed ${d}/Makefile.am error" done =20 - # Upstream often has trouble with version number transitions - if [ "${FOXVER}" =3D=3D "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" - eend - - elibtoolize + eautoreconf } =20 -fox_src_compile() { +fox_src_configure() { local myconf use debug && myconf=3D"${myconf} --enable-debug" \ || myconf=3D"${myconf} --enable-release" @@ -149,22 +115,27 @@ ${myconf} \ $(use_with profile profiling) \ || die "configure error" +} + =20 - cd ${S}/${FOX_COMPONENT} +fox_src_compile() { + hasq src_configure ${FOX_EXPF} || fox_src_configure + + cd "${S}/${FOX_COMPONENT}" emake || die "compile error" =20 # build class reference docs (FOXVER >=3D 1.2) - if use doc && [ "${FOXVER}" !=3D "1.0" ] && [ -z "${FOX_COMPONENT}" ] ;= then - cd ${S}/doc + if use doc && [ -z "${FOX_COMPONENT}" ] ; then + cd "${S}/doc" make docs || die "doxygen error" fi } =20 -fox_src_install () { - cd ${S}/${FOX_COMPONENT} +fox_src_install() { + cd "${S}/${FOX_COMPONENT}" =20 - make install \ - DESTDIR=3D${D} \ + emake install \ + DESTDIR=3D"${D}" \ htmldir=3D/usr/share/doc/${PF}/html \ artdir=3D/usr/share/doc/${PF}/html/art \ screenshotsdir=3D/usr/share/doc/${PF}/html/screenshots \ @@ -195,18 +166,18 @@ done =20 # remove documentation if USE=3D-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 =20 - # install class reference docs (FOXVER >=3D 1.2) if USE=3Ddoc - if use doc && [ "${FOXVER}" !=3D "1.0" ] && [ -z "${FOX_COMPONENT}" ] ;= then - dohtml -r ${S}/doc/ref + # install class reference docs if USE=3Ddoc + if use doc && [ -z "${FOX_COMPONENT}" ] ; then + dohtml -r "${S}/doc/ref" fi =20 - # slot fox-config where present (FOXVER >=3D 1.2) - if [ -f ${D}/usr/bin/fox-config ] ; then - mv ${D}/usr/bin/fox-config ${D}/usr/bin/fox-${FOXVER}-config + # slot fox-config + if [ -f "${D}/usr/bin/fox-config" ] ; then + mv "${D}/usr/bin/fox-config" "${D}/usr/bin/fox-${FOXVER}-config" fi } =20 @@ -220,17 +191,13 @@ einfo "(adie, calculator, pathfinder, shutterbug) are now available as= " einfo "separate ebuilds." echo - if [ "${FOXVER}" !=3D "1.0" ] ; then - einfo "The fox-config script has been installed as fox-${FOXVER}-conf= ig." - einfo "The fox-wrapper package is used to direct calls to fox-config"= - einfo "to the correct versioned script, based on the WANT_FOX variabl= e." - einfo "For example:" - einfo - einfo " WANT_FOX=3D\"${FOXVER}\" fox-config " - einfo - epause - fi + einfo "The fox-config script has been installed as fox-${FOXVER}-confi= g." + 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= =2E" + einfo "For example:" + einfo + einfo " WANT_FOX=3D\"${FOXVER}\" fox-config " + einfo + epause fi } - -EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst --------------090704000406000703030509-- --------------enig721DA62191273EA5E9C34B79 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkySKJMACgkQfNMcoUhJ7GyPiACcD+6E5emc31ejPvmEyF2UYU09 ICcAnRA1YEfW6xW1f0lOIx4KY+4zpXeU =1ATS -----END PGP SIGNATURE----- --------------enig721DA62191273EA5E9C34B79--