public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: reavertm@gentoo.org, multilib@gentoo.org
Subject: Re: [gentoo-dev] [PATCHES] Sub-phase functions in autotools-utils & autotools-multilib
Date: Sat, 4 May 2013 09:28:20 +0200	[thread overview]
Message-ID: <20130504092820.586f889b@gentoo.org> (raw)
In-Reply-To: <20130502142611.18a76960@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 3148 bytes --]

On Thu, 2 May 2013 14:26:11 +0200
Michał Górny <mgorny@gentoo.org> wrote:

> I've thought for a bit and got the conclusion that the best solution
> for quite an irritating syntax of autotools-multilib is to use
> sub-phase functions. To increase consistency between ebuilds, the same
> phases can be used in autotools-utils directly.

For example, the alsa-lib ebuild could be changed like the following:

Index: alsa-lib-1.0.27-r3.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.27-r3.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 alsa-lib-1.0.27-r3.ebuild
--- alsa-lib-1.0.27-r3.ebuild	3 May 2013 14:38:28 -0000	1.1
+++ alsa-lib-1.0.27-r3.ebuild	4 May 2013 07:26:08 -0000
@@ -4,9 +4,11 @@
 
 EAPI=5
 
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
 PYTHON_COMPAT=( python2_7 )
 
-inherit autotools eutils multilib multilib-minimal python-single-r1
+inherit autotools-multilib multilib python-single-r1
 
 DESCRIPTION="Advanced Linux Sound Architecture Library"
 HOMEPAGE="http://www.alsa-project.org/"
@@ -27,47 +29,47 @@
 	use python && python-single-r1_pkg_setup
 }
 
-src_prepare() {
+autotools_prepare_all() {
 	# dlclose, pcm, kernel, inline, inline-2 are all from upstream
-	epatch \
+	local PATCHES=(
 		"${FILESDIR}"/1.0.25-extraneous-cflags.diff \
 		"${FILESDIR}"/${P}-{dlclose,pcm,kernel}.patch \
 		"${FILESDIR}"/${P}-inline{,-2}.patch
+	)
 
 	sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466980
 
-	epatch_user
-
-	eautoreconf
 	# if eautoreconf'd with recent autoconf, then epunt_cxx is
 	# unncessary wrt #460974
 #	epunt_cxx
+
+	edefault
 }
 
-multilib_src_configure() {
-	local myconf
+autotools_configure() {
+	local myeconfargs=(
+		--enable-shared
+		--disable-resmgr
+		--enable-rawmidi
+		--enable-seq
+		--enable-aload
+		$(use_with debug)
+		$(use_enable alisp)
+	)
+
 	# enable Python only on final ABI
 	if [[ ${ABI} == ${DEFAULT_ABI} ]]; then
-		myconf="$(use_enable python)"
+		myeconfargs+=( $(use_enable python) )
 	else
-		myconf="--disable-python"
+		myeconfargs+=( --disable-python )
 	fi
-	use elibc_uclibc && myconf+=" --without-versioned"
+	use elibc_uclibc && myeconfargs+=( --without-versioned )
 
-	ECONF_SOURCE=${S} \
-	econf \
-		--enable-shared \
-		--disable-resmgr \
-		--enable-rawmidi \
-		--enable-seq \
-		--enable-aload \
-		$(use_with debug) \
-		$(use_enable alisp) \
-		${myconf}
+	edefault
 }
 
-multilib_src_compile() {
-	emake
+autotools_compile() {
+	edefault
 
 	if [[ ${ABI} == ${DEFAULT_ABI} ]] && use doc; then
 		emake doc
@@ -76,15 +78,9 @@
 	fi
 }
 
-multilib_src_install() {
-	emake DESTDIR="${D}" install
+autotools_install() {
+	edefault
 	if [[ ${ABI} == ${DEFAULT_ABI} ]] && use doc; then
 		dohtml -r doc/doxygen/html/.
 	fi
 }
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} +
-	dodoc ChangeLog TODO
-}


-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

  parent reply	other threads:[~2013-05-04  7:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 12:26 [gentoo-dev] [PATCHES] Sub-phase functions in autotools-utils & autotools-multilib Michał Górny
2013-05-02 12:26 ` [gentoo-dev] [PATCH] Introduce autotools_* sub-phase functions to make overriding easier Michał Górny
2013-05-04  7:28 ` Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-23 20:59 [gentoo-dev] [PATCHES] Sub-phase functions in autotools-utils & autotools-multilib Greg Turner
2013-09-23 21:16 ` Michał Górny
2013-09-23 21:27   ` Greg Turner
2013-09-23 21:28   ` Greg Turner
2013-09-24  8:40   ` Greg Turner
2013-09-24 11:29     ` Michał Górny

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=20130504092820.586f889b@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=multilib@gentoo.org \
    --cc=reavertm@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