Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-alt
(I prefer using the -alt mailing list)
On 04-03-2009 18:47:43 +0100, Timothy Redaelli wrote:
> I start to implement a gnulib.eclass that allows to include the modules that
> the ebuild wants.
>
> IMHO it's better than the pre-compiled libgnu.a with some modules, since we
> cannot know if an ebuild wants another module.
At one point we just went for this and decided to just extend gnulib
with a version bump if needed.
> diff --git a/app-portage/portage-utils/portage-utils-0.1.29-r00.1.ebuild b/app-portage/portage-utils/portage-utils-0.1.29-r00.1.ebuild
> index f20afce..da0921d 100644
> --- a/app-portage/portage-utils/portage-utils-0.1.29-r00.1.ebuild
> +++ b/app-portage/portage-utils/portage-utils-0.1.29-r00.1.ebuild
> @@ -4,7 +4,7 @@
>
> EAPI="prefix"
>
> -inherit toolchain-funcs eutils flag-o-matic
> +inherit toolchain-funcs eutils flag-o-matic gnulib
>
> DESCRIPTION="small and fast portage helper tools written in C"
> HOMEPAGE="http://www.gentoo.org/"
> @@ -16,16 +16,19 @@ KEYWORDS="~ppc-aix ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos
> IUSE=""
>
> DEPEND="
> - ppc-aix? ( dev-libs/gnulib )
> - sparc-solaris? ( dev-libs/gnulib )
> - sparc64-solaris? ( dev-libs/gnulib )
> - x86-solaris? ( dev-libs/gnulib )
> - x64-solaris? ( dev-libs/gnulib )
> + ppc-aix? ( >=dev-libs/gnulib-2009.03.03.14.07.45 )
> + sparc-solaris? ( >=dev-libs/gnulib-2009.03.03.14.07.45 )
> + sparc64-solaris? ( >=dev-libs/gnulib-2009.03.03.14.07.45 )
> + x86-solaris? ( >=dev-libs/gnulib-2009.03.03.14.07.45 )
> + x64-solaris? ( >=dev-libs/gnulib-2009.03.03.14.07.45 )
> "
>
> +[[ ${CHOST} == *-aix* || ${CHOST} == *-solaris* ]] && \
> + WANT_GNULIB_MODULES="alphasort getopt scandir setenv stdint strcasestr xvasprintf"
This idea looks good to me
Does it mean gnulib is recompiled all the time? Especially configuring
it is a beast...
> src_unpack() {
> unpack ${A}
> - cd ${S}
> + cd "${S}"
In general, don't do this in Prefix.
> epatch "${FILESDIR}"/${P}-solaris.patch
> epatch "${FILESDIR}"/${P}-darwin.patch
> @@ -33,15 +36,15 @@ src_unpack() {
> epatch "${FILESDIR}"/${P}-aix.patch
> epatch "${FILESDIR}"/${P}-interix.patch
> eprefixify main.c qlop.c
> +
> + gnulib_src_unpack
I guess gnulib_src_unpack extracts the gnulib sources?
> - if [[ ${CHOST} == *-aix* || ${CHOST} == *-solaris* ]]; then
> - append-flags -I"${EPREFIX}"/usr/$(get_libdir)/gnulib/include
> - append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/gnulib/lib
> - append-libs -lgnu
> - fi
> + gnulib_build
> + gnulib_append-flags
what does this do? The -I stuff?
> + gnulib_append-lib-as-ldflags
What does this do? A joint of append-ldflags and append-libs?
> emake || die
Maybe the eclass could set this stuff by itself? Would make sense to
me.
--
Fabian Groffen
Gentoo on a different level
|
|