* [gentoo-dev] [Survey || RFC] autotools-utils.eclass
@ 2010-05-25 11:02 Maciej Mrozowski
2010-05-25 18:31 ` Mike Frysinger
2010-05-25 21:34 ` Maciej Mrozowski
0 siblings, 2 replies; 14+ messages in thread
From: Maciej Mrozowski @ 2010-05-25 11:02 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: Text/Plain, Size: 729 bytes --]
Is anyone interested in cmake-utils like autotools/base wrapper?
Features:
- base.eclass autopatcher (including user patches)
- myeconfargs - econf arguments as Bash array (usage like mycmakeargs in
cmake-utils)
- out of source build (enabled by default) with overridable build dir location
- static archives handling (enable/disable static based on static-libs in
IUSE)
- libtool archives removal (depending on static-libs USE flag)
- enable/disable debug handling (debug in IUSE)
- cmake-utils resemblance (DOCS, HTML_DOCS variables)
- ???
- Profit! ;)
Example usage in attached clucene-0.9.21b-r1.
Also a patch for base.eclass to make it's econf accept arguments + some random
function documentation fix.
--
regards
MM
[-- Attachment #2: base.eclass.diff --]
[-- Type: text/x-patch, Size: 1160 bytes --]
Index: base.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/base.eclass,v
retrieving revision 1.50
diff -u -B -r1.50 base.eclass
--- base.eclass 12 Apr 2010 15:33:03 -0000 1.50
+++ base.eclass 25 May 2010 10:46:31 -0000
@@ -65,7 +65,7 @@
# @FUNCTION: base_src_prepare
# @DESCRIPTION:
# The base src_prepare function, which is exported
-# EAPI is greater or equal to 2.
+# EAPI is greater or equal to 2. Here the PATCHES array is evaluated.
base_src_prepare() {
debug-print-function $FUNCNAME "$@"
debug-print "$FUNCNAME: PATCHES=$PATCHES"
@@ -116,13 +116,12 @@
# @FUNCTION: base_src_configure
# @DESCRIPTION:
# The base src_configure function, which is exported when
-# EAPI is greater or equal to 2. Runs basic econf. Here the PATCHES array is
-# evaluated.
+# EAPI is greater or equal to 2. Runs basic econf.
base_src_configure() {
debug-print-function $FUNCNAME "$@"
# there is no pushd ${S} so we can override its place where to run
- [[ -x ${ECONF_SOURCE:-.}/configure ]] && econf
+ [[ -x ${ECONF_SOURCE:-.}/configure ]] && econf $@
}
# @FUNCTION: base_src_compile
[-- Attachment #3: autotools-utils.eclass --]
[-- Type: text/plain, Size: 4916 bytes --]
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
# reavertm@gentoo.org
# @DESCRIPTION:
# autotools.eclass and base.eclass wrapper providing following features:
# - autopatcher (including user patches)
# - myeconfargs - econf arguments as Bash array
# - out of source build (enabled by default) with overridable build dir location
# - static archives handling (static-libs in IUSE)
# - libtool archives removal (depending on static-libs USE flag)
# - enable/disable debug handling (debug in IUSE)
# - cmake-utils resemblance (DOCS, HTML_DOCS variables)
# Keep variable names synced with cmake-utils!
case ${EAPI:-0} in
2|3|4) ;;
*) DEPEND="EAPI-TOO-OLD" ;;
esac
inherit autotools base
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
# @DESCRIPTION:
# Set to enable in-source build.
# @FUNCTION: _check_build_dir
# @DESCRIPTION:
# Determine using IN or OUT source build
_check_build_dir() {
# @ECLASS-VARIABLE: ECONF_SOURCE
# @DESCRIPTION:
# Sets the directory where we are working with autotools.
# By default it uses ${S}.
: ${ECONF_SOURCE:=${S}}
# @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
# @DESCRIPTION:
# Specify the build directory where all autotools generated
# files should be located.
# For installing binary doins "${AUTOTOOLS_BUILD_DIR}/somefile"
if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then
# we build in source dir
AUTOTOOLS_BUILD_DIR="${ECONF_SOURCE}"
else
: ${AUTOTOOLS_BUILD_DIR:=${WORKDIR}/${P}_build}
fi
echo ">>> Working in BUILD_DIR: \"$AUTOTOOLS_BUILD_DIR\""
}
# @FUNCTION: autotools-utils_src_prepare
# @DESCRIPTION:
# The src_prepare function, which is exported EAPI is greater or equal to 2.
autotools-utils_src_prepare() {
debug-print-function $FUNCNAME "$@"
# TODO Maybe some smart patching and automatic eautoreconf call?
base_src_prepare
}
# @FUNCTION: autotools-utils_src_configure
# @DESCRIPTION:
# The src_configure function, which is exported when EAPI is greater or equal
# to 2. Runs basic econf. Here the PATCHES array is evaluated.
autotools-utils_src_configure() {
debug-print-function $FUNCNAME "$@"
# @ECLASS-VARIABLE: myeconfargs
# @DESCRIPTION:
# econf arguments as Bash array, enable shared libs by default
local econfargs=(
--enable-shared
${myeconfargs[@]}
)
# Handle debug found in IUSE
if has debug ${IUSE//+}; then
econfargs+=($(use_enable debug))
fi
# Handle static-libs found in IUSE, disable them by default
if has static-libs ${IUSE//+}; then
econfargs+=($(use_enable static-libs static))
else
econfargs+=(--disable-static)
fi
_check_build_dir
mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
pushd "${AUTOTOOLS_BUILD_DIR}" &> /dev/null
base_src_configure "${econfargs[@]}"
popd &> /dev/null
}
# @FUNCTION: autotools-utils_src_compile
# @DESCRIPTION:
# The autotools src_compile function, calls src_configure with EAPI older
# than 2.
autotools-utils_src_compile() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" &> /dev/null
base_src_compile "$@"
popd &> /dev/null
}
# @FUNCTION: autotools-utils_src_install
# @DESCRIPTION:
# The autotools src_install function. Runs make install, installs
# documents and html documents from DOCS and HTML_DOCS arrays
# and removes libtool files.
autotools-utils_src_install() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" &> /dev/null
base_src_install
popd &> /dev/null
# Remove libtool archives
if ! use static-libs && has static-libs ${IUSE//+}; then
find "${D}" -type f -name '*.la' -exec rm -f {} + \
|| die 'libtool archive removal failed'
fi
# Manual document installation
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# Documents passed to dodoc command.
[[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die 'dodoc failed' ; }
# @ECLASS-VARIABLE: HTML_DOCS
# @DESCRIPTION:
# Documents passed to dohtml command.
[[ -n "${HTML_DOCS}" ]] && { dohtml -r ${HTML_DOCS} || die 'dohtml failed' ; }
}
# @FUNCTION: autotools-utils_src_test
# @DESCRIPTION:
# The autotools src_test function. Runs emake check in source directory.
autotools-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" &> /dev/null
# Standard implementation of src_test
if emake -j1 check -n &> /dev/null; then
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
if ! emake -j1 check; then
die 'Make check failed. See above for details.'
fi
elif emake -j1 test -n &> /dev/null; then
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
if ! emake -j1 test; then
die 'Make test failed. See above for details.'
fi
else
einfo ">>> Test phase [none]: ${CATEGORY}/${PF}"
fi
popd &> /dev/null
}
[-- Attachment #4: clucene-0.9.21b-r1.ebuild --]
[-- Type: text/plain, Size: 1127 bytes --]
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-cpp/clucene/clucene-0.9.21b-r1.ebuild,v 1.1 2010/05/25 06:41:03 reavertm Exp $
EAPI="2"
inherit autotools-utils
MY_P=${PN}-core-${PV}
DESCRIPTION="High-performance, full-featured text search engine based off of lucene in C++"
HOMEPAGE="http://clucene.sourceforge.net/"
SRC_URI="mirror://sourceforge/clucene/${MY_P}.tar.bz2"
LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
SLOT="1"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="debug doc static-libs threads"
DEPEND="doc? ( >=app-doc/doxygen-1.4.2 )"
RDEPEND=""
PATCHES=(
"${FILESDIR}"/${P}-gcc44.patch #254254
)
S="${WORKDIR}/${MY_P}"
src_configure() {
myeconfargs=(
$(use_enable debug cnddebug)
$(use_enable threads multithreading)
)
autotools-utils_src_configure
}
src_compile() {
autotools-utils_src_compile
use doc && autotools-utils_src_compile doxygen
}
src_install() {
autotools-utils_src_install
use doc && dohtml "${S}"/doc/html/*
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [Survey || RFC] autotools-utils.eclass
2010-05-25 11:02 [gentoo-dev] [Survey || RFC] autotools-utils.eclass Maciej Mrozowski
@ 2010-05-25 18:31 ` Mike Frysinger
2010-05-26 3:59 ` Maciej Mrozowski
2010-05-25 21:34 ` Maciej Mrozowski
1 sibling, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2010-05-25 18:31 UTC (permalink / raw
To: gentoo-dev; +Cc: Maciej Mrozowski
[-- Attachment #1: Type: Text/Plain, Size: 810 bytes --]
internal functions should not be documented with the eclass doc comments
(_check_build_dir)
reusing a PM variable (ECONF_SOURCE) seems a little iffy
the library handling is incorrect. i dont think you can pass around --enable-
shared all the time without having configure generate warnings about unknown
options. default to --disable-static when static-libs doesnt exist is wrong
-- that's the opposite of what you should be doing. ignoring the same issue
as the share option i mentioned above.
pushd/popd should have stdout sent to /dev/null, not stderr too
the src_install func has the static-libs checks in the incorrect order
the src_test func looks like its copying & pasting stuff from the PM. this
really should be kept in the PM without duplicating it everywhere.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-05-25 11:02 [gentoo-dev] [Survey || RFC] autotools-utils.eclass Maciej Mrozowski
2010-05-25 18:31 ` Mike Frysinger
@ 2010-05-25 21:34 ` Maciej Mrozowski
1 sibling, 0 replies; 14+ messages in thread
From: Maciej Mrozowski @ 2010-05-25 21:34 UTC (permalink / raw
To: gentoo-dev
On Tuesday 25 of May 2010 13:02:55 Maciej Mrozowski wrote:
> Also a patch for base.eclass to make it's econf accept arguments + some
> random function documentation fix.
Commited mentioned base.eclass patch + added quoting of positional parameter
expansion.
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-
x86/eclass/base.eclass?r1=1.50&r2=1.52
--
regards
MM
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [Survey || RFC] autotools-utils.eclass
2010-05-25 18:31 ` Mike Frysinger
@ 2010-05-26 3:59 ` Maciej Mrozowski
2010-05-26 4:02 ` Maciej Mrozowski
2010-05-26 4:31 ` Mike Frysinger
0 siblings, 2 replies; 14+ messages in thread
From: Maciej Mrozowski @ 2010-05-26 3:59 UTC (permalink / raw
To: gentoo-dev
On Tuesday 25 of May 2010 20:31:33 Mike Frysinger wrote:
> internal functions should not be documented with the eclass doc comments
> (_check_build_dir)
Fixed.
> reusing a PM variable (ECONF_SOURCE) seems a little iffy
I know, initial idea was to use AUTOTOOLS_USE_DIR (analogy to CMAKE_USE_DIR),
but then I discovered that I'd need to set ECONF_SOURCE anyway. So to avoid
duplicating variables, I opted for ECONF_SOURCE reuse. If it's supposed to
have internal meaning and is not part of public API, then I agree should not
be used. I see it's explicitly mentioned in PMS though.
Waiting for further comments on that matter.
> the library handling is incorrect. i dont think you can pass around
> --enable- shared all the time without having configure generate warnings
> about unknown options.
> default to --disable-static when static-libs
> doesnt exist is wrong -- that's the opposite of what you should be doing.
> ignoring the same issue as the share option i mentioned above.
Right. It its safe to assume that when --disable-static/--enable-static is
available, then --disable-shared/--enable-shared is available as well?
> pushd/popd should have stdout sent to /dev/null, not stderr too
Fixed.
> the src_install func has the static-libs checks in the incorrect order
Fixed.
> the src_test func looks like its copying & pasting stuff from the PM. this
> really should be kept in the PM without duplicating it everywhere.
Unfortunately src_test needs to be called in build dir (which is unknown to
PM).
Calling default_src_test is the best I could come up with.
But what's the most important - is there any interest in having such eclass?
I'm only going to add it when it's flexible enough to effectively phase-out
eutils/base/autotools/libtool individual uses for fully autotools-controlled
buildsystems. Otherwise there's no point in yet another wrapper imho.
I was also thinking of integrating parts of src_prepare from virtuoso.eclass
into autotools-utils.eclass - it provides basic support for package splitting
of well formed (TM) and clean autotools build systems. (example packages are
virtuoso-odbc and virtuoso-server).
Thanks
--
regards
MM
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [Survey || RFC] autotools-utils.eclass
2010-05-26 3:59 ` Maciej Mrozowski
@ 2010-05-26 4:02 ` Maciej Mrozowski
2010-05-26 4:31 ` Mike Frysinger
1 sibling, 0 replies; 14+ messages in thread
From: Maciej Mrozowski @ 2010-05-26 4:02 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: Text/Plain, Size: 61 bytes --]
Bummer...
Forgot to attach file in question.
--
regards
MM
[-- Attachment #2: autotools-utils.eclass --]
[-- Type: text/plain, Size: 3863 bytes --]
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
# reavertm@gentoo.org
# @DESCRIPTION:
# autotools.eclass and base.eclass wrapper providing all inherited features along with:
# - myeconfargs - econf arguments as Bash array
# - out of source build (enabled by default) with overridable build dir location
# - static archives handling (static-libs in IUSE)
# - libtool archives removal (depending on static-libs USE flag)
# - enable/disable debug handling (debug in IUSE)
# Keep variable names synced with cmake-utils and the other way around!
case ${EAPI:-0} in
2|3|4) ;;
*) DEPEND="EAPI-TOO-OLD" ;;
esac
inherit autotools base
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
# Determine using IN or OUT source build
_check_build_dir() {
# @ECLASS-VARIABLE: ECONF_SOURCE
# @DESCRIPTION:
# Sets the directory where we are working with autotools.
# By default it uses ${S}.
: ${ECONF_SOURCE:=${S}}
# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
# @DESCRIPTION:
# Set to enable in-source build.
if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then
# @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
# @DESCRIPTION:
# Specify the build directory where all autotools generated
# files should be located.
# For installing binary doins "${AUTOTOOLS_BUILD_DIR}/somefile"
AUTOTOOLS_BUILD_DIR="${ECONF_SOURCE}"
else
: ${AUTOTOOLS_BUILD_DIR:=${WORKDIR}/${P}_build}
fi
echo ">>> Working in BUILD_DIR: \"$AUTOTOOLS_BUILD_DIR\""
}
# @FUNCTION: autotools-utils_src_prepare
# @DESCRIPTION:
# The src_prepare function, which is exported EAPI is greater or equal to 2.
autotools-utils_src_prepare() {
debug-print-function $FUNCNAME "$@"
# TODO Maybe some smart patching and automatic eautoreconf call?
base_src_prepare
}
# @FUNCTION: autotools-utils_src_configure
# @DESCRIPTION:
# The src_configure function, which is exported when EAPI is greater or equal
# to 2. Runs basic econf. Here the PATCHES array is evaluated.
autotools-utils_src_configure() {
debug-print-function $FUNCNAME "$@"
# @ECLASS-VARIABLE: myeconfargs
# @DESCRIPTION:
# econf arguments as Bash array
local econfargs=(
${myeconfargs[@]}
)
# Handle debug found in IUSE
if has debug ${IUSE//+}; then
econfargs+=($(use_enable debug))
fi
# Handle static-libs found in IUSE, disable them by default
if has static-libs ${IUSE//+}; then
econfargs+=(
--enable-shared
$(use_enable static-libs static)
)
fi
_check_build_dir
mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_configure "${econfargs[@]}"
popd > /dev/null
}
# @FUNCTION: autotools-utils_src_compile
# @DESCRIPTION:
# The autotools src_compile function, calls src_configure with EAPI older
# than 2.
autotools-utils_src_compile() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_compile "$@"
popd > /dev/null
}
# @FUNCTION: autotools-utils_src_install
# @DESCRIPTION:
# The autotools src_install function. Runs make install and removes libtool files.
autotools-utils_src_install() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_install
popd > /dev/null
# Remove libtool archives
if has static-libs ${IUSE//+} && ! use static-libs; then
find "${D}" -type f -name '*.la' -exec rm -f {} + \
|| die 'libtool archive removal failed'
fi
}
# @FUNCTION: autotools-utils_src_test
# @DESCRIPTION:
# The autotools src_test function. Runs emake check in source directory.
autotools-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
default_src_test
popd > /dev/null
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] [Survey || RFC] autotools-utils.eclass
2010-05-26 3:59 ` Maciej Mrozowski
2010-05-26 4:02 ` Maciej Mrozowski
@ 2010-05-26 4:31 ` Mike Frysinger
2010-05-26 9:12 ` [gentoo-dev] " Duncan
1 sibling, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2010-05-26 4:31 UTC (permalink / raw
To: gentoo-dev; +Cc: Maciej Mrozowski
[-- Attachment #1: Type: Text/Plain, Size: 1971 bytes --]
On Tuesday 25 May 2010 23:59:22 Maciej Mrozowski wrote:
> On Tuesday 25 of May 2010 20:31:33 Mike Frysinger wrote:
> > the library handling is incorrect. i dont think you can pass around
> > --enable- shared all the time without having configure generate warnings
> > about unknown options.
> >
> > default to --disable-static when static-libs
> > doesnt exist is wrong -- that's the opposite of what you should be doing.
> > ignoring the same issue as the share option i mentioned above.
>
> Right. It its safe to assume that when --disable-static/--enable-static is
> available, then --disable-shared/--enable-shared is available as well?
i think that's a fair assumption. the vast majority of shared/static
enable/disable flags are coming in via libtool and not custom code. the few
packages doing custom code can simply write their own econf call.
> > the src_test func looks like its copying & pasting stuff from the PM.
> > this really should be kept in the PM without duplicating it everywhere.
>
> Unfortunately src_test needs to be called in build dir (which is unknown to
> PM).
> Calling default_src_test is the best I could come up with.
should be fine
> But what's the most important - is there any interest in having such
> eclass? I'm only going to add it when it's flexible enough to effectively
> phase-out eutils/base/autotools/libtool individual uses for fully
> autotools-controlled buildsystems. Otherwise there's no point in yet
> another wrapper imho.
personally, i probably wouldnt use this. but i dont even like base.eclass.
and considering other people seem to like base.eclass, it's reasonable to
think people would like this.
the out-of-source building will trip up some packages for no reason other than
$builddir != $srcdir, but those packages suck and should be fixed in general
(unrelated to Gentoo). i imagine some maintainers would be annoyed by having
to fix these.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-05-26 4:31 ` Mike Frysinger
@ 2010-05-26 9:12 ` Duncan
2010-05-26 9:38 ` Maciej Mrozowski
0 siblings, 1 reply; 14+ messages in thread
From: Duncan @ 2010-05-26 9:12 UTC (permalink / raw
To: gentoo-dev
Mike Frysinger posted on Wed, 26 May 2010 00:31:21 -0400 as excerpted:
> On Tuesday 25 May 2010 23:59:22 Maciej Mrozowski wrote:
>> On Tuesday 25 of May 2010 20:31:33 Mike Frysinger wrote:
>>> the src_test func looks like its copying & pasting stuff from the PM.
>>> this really should be kept in the PM without duplicating it
>>> everywhere.
>>
>> Unfortunately src_test needs to be called in build dir (which is
>> unknown to PM).
>> Calling default_src_test is the best I could come up with.
>
> should be fine
What about a one-liner explaining why it's here, so the next guy to
look at it won't be having MF's reaction all over again?
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-05-26 9:12 ` [gentoo-dev] " Duncan
@ 2010-05-26 9:38 ` Maciej Mrozowski
2010-05-26 17:27 ` Mike Frysinger
0 siblings, 1 reply; 14+ messages in thread
From: Maciej Mrozowski @ 2010-05-26 9:38 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: Text/Plain, Size: 895 bytes --]
On Wednesday 26 of May 2010 11:12:10 Duncan wrote:
> Mike Frysinger posted on Wed, 26 May 2010 00:31:21 -0400 as excerpted:
> > On Tuesday 25 May 2010 23:59:22 Maciej Mrozowski wrote:
> >> On Tuesday 25 of May 2010 20:31:33 Mike Frysinger wrote:
> >>> the src_test func looks like its copying & pasting stuff from the PM.
> >>> this really should be kept in the PM without duplicating it
> >>> everywhere.
> >>
> >> Unfortunately src_test needs to be called in build dir (which is
> >> unknown to PM).
> >> Calling default_src_test is the best I could come up with.
> >
> > should be fine
>
> What about a one-liner explaining why it's here, so the next guy to
> look at it won't be having MF's reaction all over again?
Again?
I've updated documentation, added example usage and option to keep libtool
files (ltdl.so supposedly needs those as I was told, no idea what for).
--
regards
MM
[-- Attachment #2: autotools-utils.eclass --]
[-- Type: text/plain, Size: 5783 bytes --]
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
# Maciej Mrozowski <reavertm@gentoo.org>
# @BLURB: common ebuild functions for autotools-based packages
# @DESCRIPTION:
# autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper
# providing all inherited features along with econf arguments as Bash array,
# out of source build with overridable build dir location, static archives
# handling, libtool archives removal, enable/disable debug handling.
#
# @EXAMPLE:
# Typical ebuild using autotools-utils.eclass:
#
# @CODE
# EAPI="2"
#
# inherit autotools-utils
#
# DESCRIPTION="Foo bar application"
# HOMEPAGE="http://foo.org/"
# SRC_URI="mirror://sourceforge/foo/${P}.tar.bz2"
#
# LICENSE="LGPL-2.1"
# KEYWORDS=""
# SLOT="0"
# IUSE="debug examples qt4 static-libs tiff"
#
# DEPEND="
# media-libs/libpng:0
# qt4? (
# x11-libs/qt-core:4
# x11-libs/qt-gui:4
# )
# tiff? ( media-libs/tiff:0 )
# "
# RDEPEND="${DEPEND}
# !media-gfx/bar
# "
#
# # bug 123456
# AUTOTOOLS_IN_SOURCE_BUILD=1
#
# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO)
#
# PATCHES=(
# "${FILESDIR}/${P}-gcc44.patch" # bug 123458
# "${FILESDIR}/${P}-as-needed.patch"
# "${FILESDIR}/${P}-unbundle_libpng.patch"
# )
#
# src_configure() {
# myeconfargs=(
# $(use_with qt4)
# $(use_enable threads multithreading)
# $(use_with tiff)
# )
# autotools-utils_src_configure
# }
#
# src_install() {
# autotools-utils_src_install
# if use examples; then
# dobin "${AUTOTOOLS_BUILD_DIR}"/foo_example{1,2,3} \\
# || die 'dobin examples failed'
# fi
# }
#
# @CODE
# Keep variable names synced with cmake-utils and the other way around!
case ${EAPI:-0} in
2|3|4) ;;
*) DEPEND="EAPI-TOO-OLD" ;;
esac
inherit autotools base
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
# @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
# @DESCRIPTION:
# Build directory, location where all autotools generated files should be
# placed. For out of source builds it defaults to ${WORKDIR}/${P}_build.
# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
# @DESCRIPTION:
# Set to enable in-source build.
# @ECLASS-VARIABLE: AUTOTOOLS_KEEP_LA_FILES
# @DESCRIPTION:
# Do not remove libtool files.
# @ECLASS-VARIABLE: ECONF_SOURCE
# @DESCRIPTION:
# Specify location of autotools' configure script. By default it uses ${S}.
# @ECLASS-VARIABLE: myeconfargs
# @DESCRIPTION:
# Optional econf arguments as Bash array. Should be defined before calling src_configure.
# @CODE
# src_configure() {
# myeconfargs=(
# --disable-readline
# --with-confdir="/etc/nasty foo confdir/"
# $(use_enable debug cnddebug)
# $(use_enable threads multithreading)
# )
# autotools-utils_src_configure
# }
# @CODE
# Determine using IN or OUT source build
_check_build_dir() {
: ${ECONF_SOURCE:=${S}}
if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then
AUTOTOOLS_BUILD_DIR="${ECONF_SOURCE}"
else
: ${AUTOTOOLS_BUILD_DIR:=${WORKDIR}/${P}_build}
fi
echo ">>> Working in BUILD_DIR: \"$AUTOTOOLS_BUILD_DIR\""
}
# @FUNCTION: autotools-utils_src_prepare
# @DESCRIPTION:
# The src_prepare function, supporting PATCHES array and user patches.
# See base.eclass(5) for reference.
autotools-utils_src_prepare() {
debug-print-function $FUNCNAME "$@"
# TODO Maybe some smart patching and automatic eautoreconf call?
base_src_prepare
}
# @FUNCTION: autotools-utils_src_configure
# @DESCRIPTION:
# The src_configure function. For out of source build it creates build
# directory and runs econf there. Configuration parameters defined
# in myeconfargs are passed here to econf. Additionally following USE
# flags are known:
#
# IUSE="debug" passes --disable-debug/--enable-debug to econf respectively.
#
# IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
# to econf respectively.
autotools-utils_src_configure() {
debug-print-function $FUNCNAME "$@"
local econfargs=(${myeconfargs[@]})
# Handle debug found in IUSE
if has debug ${IUSE//+}; then
econfargs+=($(use_enable debug))
fi
# Handle static-libs found in IUSE, disable them by default
if has static-libs ${IUSE//+}; then
econfargs+=(
--enable-shared
$(use_enable static-libs static)
)
fi
_check_build_dir
mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_configure "${econfargs[@]}"
popd > /dev/null
}
# @FUNCTION: autotools-utils_src_compile
# @DESCRIPTION:
# The autotools src_compile function, invokes emake in specified AUTOTOOLS_BUILD_DIR.
autotools-utils_src_compile() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_compile "$@"
popd > /dev/null
}
# @FUNCTION: autotools-utils_src_install
# @DESCRIPTION:
# The autotools src_install function. Runs emake install and removes libtool files.
# DOCS and HTML_DOCS variables are supported. See base.eclass(5) for reference.
autotools-utils_src_install() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_install
popd > /dev/null
# Remove libtool archives
if [[ -z ${AUTOTOOLS_KEEP_LA_FILES} ]] && has static-libs ${IUSE//+} && ! use static-libs; then
find "${D}" -type f -name '*.la' -exec rm -f {} + \
|| die 'libtool archive removal failed'
fi
}
# @FUNCTION: autotools-utils_src_test
# @DESCRIPTION:
# The autotools src_test function. Runs emake check in build directory.
autotools-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
# Run default src_test as defined in ebuild.sh
default_src_test
popd > /dev/null
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-05-26 9:38 ` Maciej Mrozowski
@ 2010-05-26 17:27 ` Mike Frysinger
2010-05-31 13:29 ` Maciej Mrozowski
0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2010-05-26 17:27 UTC (permalink / raw
To: gentoo-dev; +Cc: Maciej Mrozowski
[-- Attachment #1: Type: Text/Plain, Size: 437 bytes --]
On Wednesday 26 May 2010 05:38:00 Maciej Mrozowski wrote:
> I've updated documentation, added example usage and option to keep libtool
> files (ltdl.so supposedly needs those as I was told, no idea what for).
more applicable to us w/Linux is that static linking with libtool needs them.
the AUTOTOOLS_KEEP_LA_FILES seems kind of spurious considering current tree
behavior and assumption of gnu-capable linking systems.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-05-26 17:27 ` Mike Frysinger
@ 2010-05-31 13:29 ` Maciej Mrozowski
2010-06-02 23:32 ` Nathan Phillip Brink
0 siblings, 1 reply; 14+ messages in thread
From: Maciej Mrozowski @ 2010-05-31 13:29 UTC (permalink / raw
To: gentoo-dev
On Wednesday 26 of May 2010 19:27:43 Mike Frysinger wrote:
> On Wednesday 26 May 2010 05:38:00 Maciej Mrozowski wrote:
> > I've updated documentation, added example usage and option to keep
> > libtool files (ltdl.so supposedly needs those as I was told, no idea
> > what for).
>
> more applicable to us w/Linux is that static linking with libtool needs
> them. the AUTOTOOLS_KEEP_LA_FILES seems kind of spurious considering
> current tree behavior and assumption of gnu-capable linking systems.
It is spurious when we forget about run-time dynamic linking (plugins) in some
apps.
libtool loader (ltdl.so) needs .la files unfortunately. One example -
imagemagick - removing .la files for coders makes 'convert' unable to locate
them (silly, but hey...).
Using autotools-utils for such packages would mean:
- either not having static-libs in IUSE - barely acceptable
- or having static-libs in IUSE but overriding all autotools-utils provided
phases that make some actions depending on that USE flag - barely convenient
(or not using this eclass, but like I said - I'd prefer it was able to
obsolete all other autotools related eclasses - for ebuild API unification
purpose - in such case it would be adopted by base-system@ most likely - hmm
but then I'd need to add '<'EAPI-2 support, and it means src_unpack which I
want to avoid)
Since .la files aren't unfortunately exclusively related to static libs, I
think it's better to have a simple option to keep .la files and be able to
produce static libs in straightforward way even when this option for most
cases would be simply redundant.
--
regards
MM
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-05-31 13:29 ` Maciej Mrozowski
@ 2010-06-02 23:32 ` Nathan Phillip Brink
2010-07-07 0:16 ` Maciej Mrozowski
0 siblings, 1 reply; 14+ messages in thread
From: Nathan Phillip Brink @ 2010-06-02 23:32 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]
On Mon, May 31, 2010 at 03:29:01PM +0200, Maciej Mrozowski wrote:
> On Wednesday 26 of May 2010 19:27:43 Mike Frysinger wrote:
> > On Wednesday 26 May 2010 05:38:00 Maciej Mrozowski wrote:
> > > I've updated documentation, added example usage and option to keep
> > > libtool files (ltdl.so supposedly needs those as I was told, no idea
> > > what for).
IMO, ltdl.so is probably just being silly. Perhaps these files contain
information that is useful on non-Linux systems for dlopen()ing
plugins.
> > more applicable to us w/Linux is that static linking with libtool needs
> > them. the AUTOTOOLS_KEEP_LA_FILES seems kind of spurious considering
> > current tree behavior and assumption of gnu-capable linking systems.
>
> It is spurious when we forget about run-time dynamic linking (plugins) in some
> apps.
> libtool loader (ltdl.so) needs .la files unfortunately. One example -
> imagemagick - removing .la files for coders makes 'convert' unable to locate
> them (silly, but hey...).
This case can be caught by checking if the .la file has the following in it:
``
# Should we warn about portability when linking against -modules?
shouldnotlink=yes
''
If shouldnotlink=no _and_ the .la file in question is not libltdl.la
itself, it is generally safe to remove. This is the current policy of
the portage-multilib branch of the multilib overlay. libtool archive
files which are safe to remove are removed by portage-multilib after
the install phase. It seems to work well enough.
Removing .la files which are useless on a given system would be very
nice. It would be even more useful if unused .a files could be swept
away at the same time :-).
--
ohnobinki
Look out for missing apostrophes!
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-06-02 23:32 ` Nathan Phillip Brink
@ 2010-07-07 0:16 ` Maciej Mrozowski
2010-07-14 3:54 ` Maciej Mrozowski
0 siblings, 1 reply; 14+ messages in thread
From: Maciej Mrozowski @ 2010-07-07 0:16 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: Text/Plain, Size: 2305 bytes --]
On Thursday 03 of June 2010 01:32:09 Nathan Phillip Brink wrote:
> On Mon, May 31, 2010 at 03:29:01PM +0200, Maciej Mrozowski wrote:
> > On Wednesday 26 of May 2010 19:27:43 Mike Frysinger wrote:
> > > On Wednesday 26 May 2010 05:38:00 Maciej Mrozowski wrote:
> > > > I've updated documentation, added example usage and option to keep
> > > > libtool files (ltdl.so supposedly needs those as I was told, no idea
> > > > what for).
>
> IMO, ltdl.so is probably just being silly. Perhaps these files contain
> information that is useful on non-Linux systems for dlopen()ing
> plugins.
>
> > > more applicable to us w/Linux is that static linking with libtool needs
> > > them. the AUTOTOOLS_KEEP_LA_FILES seems kind of spurious considering
> > > current tree behavior and assumption of gnu-capable linking systems.
> >
> > It is spurious when we forget about run-time dynamic linking (plugins) in
> > some apps.
> > libtool loader (ltdl.so) needs .la files unfortunately. One example -
> > imagemagick - removing .la files for coders makes 'convert' unable to
> > locate them (silly, but hey...).
>
> This case can be caught by checking if the .la file has the following in
> it: ``
> # Should we warn about portability when linking against -modules?
> shouldnotlink=yes
> ''
Excellent. Eclass updated, see attachment. AUTOTOOLS_KEEP_LA_FILES option
removed. Now removing .la files relies only on shouldnotlink value (and
static-libs presence in IUSE that is).
> Removing .la files which are useless on a given system would be very
> nice. It would be even more useful if unused .a files could be swept
> away at the same time :-).
They are - just add static-libs to IUSE and disable said USE flag when
emerging.
I've also had an idea to be smarter and to look for patches (PATCHES array)
updating any .m4, Makefile.{ac,in}, configure.{ac.in} files and to run
eautoreconf automatically in ${eclass}_src_prepare but I've decided it's a bit
too much. I may rethink the idea later though.
If there are no objections nor further comments, I'd like to unleash new
eclass for public consumption within a few days.
Real-world example ebuild attached, also there's more extensive (but purely
academic) example in eclass itself.
--
regards
MM
[-- Attachment #1.2: autotools-utils.eclass --]
[-- Type: text/plain, Size: 5966 bytes --]
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: autotools-utils.eclass
# @MAINTAINER:
# Maciej Mrozowski <reavertm@gentoo.org>
# @BLURB: common ebuild functions for autotools-based packages
# @DESCRIPTION:
# autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper
# providing all inherited features along with econf arguments as Bash array,
# out of source build with overridable build dir location, static archives
# handling, libtool files removal, enable/disable debug handling.
#
# @EXAMPLE:
# Typical ebuild using autotools-utils.eclass:
#
# @CODE
# EAPI="2"
#
# inherit autotools-utils
#
# DESCRIPTION="Foo bar application"
# HOMEPAGE="http://example.org/foo/"
# SRC_URI="mirror://sourceforge/foo/${P}.tar.bz2"
#
# LICENSE="LGPL-2.1"
# KEYWORDS=""
# SLOT="0"
# IUSE="debug doc examples qt4 static-libs tiff"
#
# CDEPEND="
# media-libs/libpng:0
# qt4? (
# x11-libs/qt-core:4
# x11-libs/qt-gui:4
# )
# tiff? ( media-libs/tiff:0 )
# "
# RDEPEND="${CDEPEND}
# !media-gfx/bar
# "
# DEPEND="${CDEPEND}
# doc? ( app-doc/doxygen )
# "
#
# # bug 123456
# AUTOTOOLS_IN_SOURCE_BUILD=1
#
# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO)
#
# PATCHES=(
# "${FILESDIR}/${P}-gcc44.patch" # bug 123458
# "${FILESDIR}/${P}-as-needed.patch"
# "${FILESDIR}/${P}-unbundle_libpng.patch"
# )
#
# src_configure() {
# myeconfargs=(
# $(use_with qt4)
# $(use_enable threads multithreading)
# $(use_with tiff)
# )
# autotools-utils_src_configure
# }
#
# src_compile() {
# autotools-utils_src_compile
# use doc && autotools-utils_src_compile docs
# }
#
# src_install() {
# use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/apidocs/html/")
# autotools-utils_src_install
# if use examples; then
# dobin "${AUTOTOOLS_BUILD_DIR}"/foo_example{1,2,3} \\
# || die 'dobin examples failed'
# fi
# }
#
# @CODE
# Keep variable names synced with cmake-utils and the other way around!
case ${EAPI:-0} in
2|3|4) ;;
*) DEPEND="EAPI-TOO-OLD" ;;
esac
inherit autotools base
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
# @ECLASS-VARIABLE: AUTOTOOLS_BUILD_DIR
# @DESCRIPTION:
# Build directory, location where all autotools generated files should be
# placed. For out of source builds it defaults to ${WORKDIR}/${P}_build.
# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD
# @DESCRIPTION:
# Set to enable in-source build.
# @ECLASS-VARIABLE: ECONF_SOURCE
# @DESCRIPTION:
# Specify location of autotools' configure script. By default it uses ${S}.
# @ECLASS-VARIABLE: myeconfargs
# @DESCRIPTION:
# Optional econf arguments as Bash array. Should be defined before calling src_configure.
# @CODE
# src_configure() {
# myeconfargs=(
# --disable-readline
# --with-confdir="/etc/nasty foo confdir/"
# $(use_enable debug cnddebug)
# $(use_enable threads multithreading)
# )
# autotools-utils_src_configure
# }
# @CODE
# Determine using IN or OUT source build
_check_build_dir() {
: ${ECONF_SOURCE:=${S}}
if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then
AUTOTOOLS_BUILD_DIR="${ECONF_SOURCE}"
else
: ${AUTOTOOLS_BUILD_DIR:=${WORKDIR}/${P}_build}
fi
echo ">>> Working in BUILD_DIR: \"$AUTOTOOLS_BUILD_DIR\""
}
# @FUNCTION: autotools-utils_src_prepare
# @DESCRIPTION:
# The src_prepare function, supporting PATCHES array and user patches.
# See base.eclass(5) for reference.
autotools-utils_src_prepare() {
debug-print-function $FUNCNAME "$@"
base_src_prepare
}
# @FUNCTION: autotools-utils_src_configure
# @DESCRIPTION:
# The src_configure function. For out of source build it creates build
# directory and runs econf there. Configuration parameters defined
# in myeconfargs are passed here to econf. Additionally following USE
# flags are known:
#
# IUSE="debug" passes --disable-debug/--enable-debug to econf respectively.
#
# IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static
# to econf respectively.
autotools-utils_src_configure() {
debug-print-function $FUNCNAME "$@"
local econfargs=(${myeconfargs[@]})
# Handle debug found in IUSE
if has debug ${IUSE//+}; then
econfargs+=($(use_enable debug))
fi
# Handle static-libs found in IUSE, disable them by default
if has static-libs ${IUSE//+}; then
econfargs+=(
--enable-shared
$(use_enable static-libs static)
)
fi
_check_build_dir
mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_configure "${econfargs[@]}"
popd > /dev/null
}
# @FUNCTION: autotools-utils_src_compile
# @DESCRIPTION:
# The autotools src_compile function, invokes emake in specified AUTOTOOLS_BUILD_DIR.
autotools-utils_src_compile() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_compile "$@"
popd > /dev/null
}
# @FUNCTION: autotools-utils_src_install
# @DESCRIPTION:
# The autotools src_install function. Runs emake install and removes libtool files
# when static-libs USE flag is defined and unset.
# DOCS and HTML_DOCS arrays are supported. See base.eclass(5) for reference.
autotools-utils_src_install() {
debug-print-function $FUNCNAME "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
base_src_install
popd > /dev/null
# Remove libtool files
if has static-libs ${IUSE//+} && ! use static-libs; then
local f
for f in $(find "${D}" -type f -name '*.la'); do
# Keep only .la files with shouldnotlink=yes - likely plugins
[[ -n `sed -ne '/^shouldnotlink=yes$/p' "${f}"` ]] || rm -f "${f}"
done
fi
}
# @FUNCTION: autotools-utils_src_test
# @DESCRIPTION:
# The autotools src_test function. Runs emake check in build directory.
autotools-utils_src_test() {
debug-print-function ${FUNCNAME} "$@"
_check_build_dir
pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
# Run default src_test as defined in ebuild.sh
default_src_test
popd > /dev/null
}
[-- Attachment #1.3: plib-1.8.5-r1.ebuild --]
[-- Type: text/plain, Size: 804 bytes --]
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/plib/plib-1.8.5.ebuild,v 1.6 2009/12/26 16:59:50 armin76 Exp $
EAPI=2
WANT_AUTOCONF=2.5
WANT_AUTOMAKE=1.9
inherit autotools-utils
DESCRIPTION="multimedia library used by many games"
HOMEPAGE="http://plib.sourceforge.net/"
SRC_URI="http://plib.sourceforge.net/dist/${P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
IUSE="static-libs"
RDEPEND="
media-libs/libsdl
virtual/glut
virtual/opengl
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${P}-shared-libs.patch"
)
DOCS=(AUTHORS ChangeLog KNOWN_BUGS NOTICE README TODO-1.6 TODO-2.0 TODO_AFTER135)
src_prepare() {
autotools-utils_src_prepare
eautoreconf
}
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
2010-07-07 0:16 ` Maciej Mrozowski
@ 2010-07-14 3:54 ` Maciej Mrozowski
0 siblings, 0 replies; 14+ messages in thread
From: Maciej Mrozowski @ 2010-07-14 3:54 UTC (permalink / raw
To: gentoo-dev
On Wednesday 07 of July 2010 02:16:13 Maciej Mrozowski wrote:
> On Thursday 03 of June 2010 01:32:09 Nathan Phillip Brink wrote:
> > On Mon, May 31, 2010 at 03:29:01PM +0200, Maciej Mrozowski wrote:
> > > On Wednesday 26 of May 2010 19:27:43 Mike Frysinger wrote:
> > > > On Wednesday 26 May 2010 05:38:00 Maciej Mrozowski wrote:
> > > > > I've updated documentation, added example usage and option to keep
> > > > > libtool files (ltdl.so supposedly needs those as I was told, no
> > > > > idea what for).
> >
> > IMO, ltdl.so is probably just being silly. Perhaps these files contain
> > information that is useful on non-Linux systems for dlopen()ing
> > plugins.
> >
> > > > more applicable to us w/Linux is that static linking with libtool
> > > > needs them. the AUTOTOOLS_KEEP_LA_FILES seems kind of spurious
> > > > considering current tree behavior and assumption of gnu-capable
> > > > linking systems.
> > >
> > > It is spurious when we forget about run-time dynamic linking (plugins)
> > > in some apps.
> > > libtool loader (ltdl.so) needs .la files unfortunately. One example -
> > > imagemagick - removing .la files for coders makes 'convert' unable to
> > > locate them (silly, but hey...).
> >
> > This case can be caught by checking if the .la file has the following in
> > it: ``
> > # Should we warn about portability when linking against -modules?
> > shouldnotlink=yes
> > ''
>
> Excellent. Eclass updated, see attachment. AUTOTOOLS_KEEP_LA_FILES option
> removed. Now removing .la files relies only on shouldnotlink value (and
> static-libs presence in IUSE that is).
>
> > Removing .la files which are useless on a given system would be very
> > nice. It would be even more useful if unused .a files could be swept
> > away at the same time :-).
>
> They are - just add static-libs to IUSE and disable said USE flag when
> emerging.
>
> I've also had an idea to be smarter and to look for patches (PATCHES array)
> updating any .m4, Makefile.{ac,in}, configure.{ac.in} files and to run
> eautoreconf automatically in ${eclass}_src_prepare but I've decided it's a
> bit too much. I may rethink the idea later though.
>
> If there are no objections nor further comments, I'd like to unleash new
> eclass for public consumption within a few days.
Before I do so, please comment on the following changes I've made:
- always pass --disable-dependency-tracking
- always remove static libs corresponding to plugins (based on
shouldnotlink=yes)
- add remove_libtool_files [all|none] function
- add some low-profile echo messages showing removed files
- append myeconfargs at the end of econfargs so that eclass defaults can be
overriden at request
http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=history;f=eclass/autotools-
utils.eclass
If there are no further issues, I'll commit it to tree (with announcement)
within three or more days.
--
regards
MM
^ permalink raw reply [flat|nested] 14+ messages in thread
* [gentoo-dev] Re: [Survey || RFC] autotools-utils.eclass
[not found] ` <f61iy-2sa-5@gated-at.bofh.it>
@ 2010-07-14 10:05 ` Vaeth
0 siblings, 0 replies; 14+ messages in thread
From: Vaeth @ 2010-07-14 10:05 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 583 bytes --]
Sorry to post once again with the broken email headers,
but I think I should remark on this.
Maciej Mrozowski wrote:
> - always pass --disable-dependency-tracking
It is probably widely unknown that --disable-dependency-tracking
has an unexpected side effect: It makes the "silent rules" feature
of automake-1.11 useless (more and more projects are beginning to
use this feature).
One may consider this as a bug of automake-1.11, but this is
how it is now, and I do not know whether there are plans to
change it in future versions of automake.
Regards
Martin Väth
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-07-14 10:06 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 11:02 [gentoo-dev] [Survey || RFC] autotools-utils.eclass Maciej Mrozowski
2010-05-25 18:31 ` Mike Frysinger
2010-05-26 3:59 ` Maciej Mrozowski
2010-05-26 4:02 ` Maciej Mrozowski
2010-05-26 4:31 ` Mike Frysinger
2010-05-26 9:12 ` [gentoo-dev] " Duncan
2010-05-26 9:38 ` Maciej Mrozowski
2010-05-26 17:27 ` Mike Frysinger
2010-05-31 13:29 ` Maciej Mrozowski
2010-06-02 23:32 ` Nathan Phillip Brink
2010-07-07 0:16 ` Maciej Mrozowski
2010-07-14 3:54 ` Maciej Mrozowski
2010-05-25 21:34 ` Maciej Mrozowski
[not found] <eO0bg-5jB-27@gated-at.bofh.it>
[not found] ` <eR5Hs-NM-19@gated-at.bofh.it>
[not found] ` <f3qwO-3uY-7@gated-at.bofh.it>
[not found] ` <f61iy-2sa-5@gated-at.bofh.it>
2010-07-14 10:05 ` Vaeth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox