From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9AA341381F3 for ; Thu, 2 May 2013 12:26:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8987EE0A97; Thu, 2 May 2013 12:26:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F70DE0A53 for ; Thu, 2 May 2013 12:26:42 +0000 (UTC) Received: from localhost (77-255-24-177.adsl.inetia.pl [77.255.24.177]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 676D233DFAE; Thu, 2 May 2013 12:26:40 +0000 (UTC) Date: Thu, 2 May 2013 14:26:11 +0200 From: =?ISO-8859-2?B?TWljaGGzIEfzcm55?= To: Gentoo Developer Mailing List Cc: reavertm@gentoo.org, multilib@gentoo.org Subject: [gentoo-dev] [PATCHES] Sub-phase functions in autotools-utils & autotools-multilib Message-ID: <20130502142611.18a76960@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) 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 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/t_=f.3aMfdD_1ZbeSdiq/58"; protocol="application/pgp-signature" X-Archives-Salt: bea03557-63b3-48ae-ace5-9d679779ac92 X-Archives-Hash: 0be2ebd011e5972099a99b1d2cf40bb7 --Sig_/t_=f.3aMfdD_1ZbeSdiq/58 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Hi, 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. The idea is that current ebuild looking like: src_prepare() { sed ... autotools-utils_src_prepare } src_configure() { local myeconfargs=3D( --with-foo --with-bar ) autotools-utils_src_configure } src_install() { use doc && local HTML_DOCS=3D... autotools-utils_src_install doinitd ... dobin "${BUILD_DIR}"/something/something } could be written as: autotools_configure() { local myeconfargs=3D( --with-foo --with-bar ) edefault } autotools_install() { edefault dobin something/something } autotools_install_all() { use doc && local HTML_DOCS=3D... edefault doinitd ... } While this seems rather cosmetic, it becomes incredibly helpful when it comes to multilib or working inside BUILD_DIR. The sub-phases without '_all' suffix are run inside BUILD_DIR, and repeated for each multilib ABI. The sub-phases with '_all' are always run only once, and inside S. This provides a meaningful split between the two parts of autotools-utils_src_install (and default_src_install too), and makes it possible to hack stuff in multilib without having to rewrite the 'multilib_foreach_impl' lines all the time. For example: src_configure() { my_configure() { local myeconfargs=3D( ... # something ABI-conditional here ) autotools-utils_src_configure } multilib_parallel_foreach_abi my_configure } can be replaced with much simpler: autotools_configure() { local myeconfargs=3D( ... # something ABI-conditional here ) edefault } What are your thoughts? The patch is sent in reply to this mail. --=20 Best regards, Micha=B3 G=F3rny --Sig_/t_=f.3aMfdD_1ZbeSdiq/58 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRgltjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKmx8P/j9eTp8Aa5L3dMoNxNxWrhMP lCS4GoPzW0Md1ztNQH+ymQaNWrB+prnBKkECkIYdz7k1lCF9skSJAb+MnmxivYfm 6B4w/AknZfjoqLzQGavbqkO4ODDBWEs+pGipTvtgRQNTxgJLskt8bNzjaVCh8/70 GpserTpTQlKohXOYthfdj6Z7wPIZveyAoxv6x9Jg6L3NDtqnA8DS4JU4wNevcmrW WBcAIenpWtbUABnSXboactsvAxKvp8P+RiqWVzQNreM0Ce2N4bSqTxi2JEbmd4DP T4yk3dz1ofzT/TLrMqLZv3ujHS+bUjpbBD4V5Ae/GrOL4KUeuH0v1JCrQqH3ALm8 FNmIJ8NR6YjE4NosUC087eGWAD9TfMtS2MEBqRkJR25dim1jW2odvNoGtPhSwW1+ RkPP0ybWZjZTak9JOQp3jzrFmMY9hACNC5pfqOG1LBSlZO3eMhJBv6IAU8bgp9bf JSR/PtSd/3GgItiTZrjA/2nnTAcQd2Z+0cuaBj6tDUFVZugifFSM+jE0R+9QdtH0 8uahfPfWu2Sum1EzgbRJtI1Su7qk1+0sYQlBO4cMDGsktZY7mJCHnH5LlTHeuBIY fiMC1Db5vL+lBT18w3vopH3u537wik12sjXWw7eE7i0x4BoQj1/+77iCSBjJ9pl9 V3/yhDRwetlqJ6YUUd4o =n7o/ -----END PGP SIGNATURE----- --Sig_/t_=f.3aMfdD_1ZbeSdiq/58--