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 83920198005 for ; Sun, 24 Feb 2013 00:34:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 77830E0618; Sun, 24 Feb 2013 00:34:53 +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 6FDA6E04EB for ; Sun, 24 Feb 2013 00:34:52 +0000 (UTC) Received: from [192.168.4.5] (blfd-4db13500.pool.mediaWays.net [77.177.53.0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hasufell) by smtp.gentoo.org (Postfix) with ESMTPSA id AEF4633DF04; Sun, 24 Feb 2013 00:34:50 +0000 (UTC) Message-ID: <51296027.705@gentoo.org> Date: Sun, 24 Feb 2013 01:34:47 +0100 From: hasufell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130123 Thunderbird/17.0.2 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 CC: Samuli Suominen , mgorny@gentoo.org Subject: [gentoo-dev] New eclass: autotools-multilib-minimal X-Enigmail-Version: 1.5 Content-Type: multipart/mixed; boundary="------------010407000600050406070208" X-Archives-Salt: 9b2a75ca-f3bc-4be8-a886-77fcb8647b43 X-Archives-Hash: d4905802b6457892d1de529dcc7d626a This is a multi-part message in MIME format. --------------010407000600050406070208 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Some people seem to feel uncomfortable with autotools-multilib, because it depends on autotools-utils. Instead of arguing whether it makes sense or not I'd propose a similar autotools related eclass. I also attach an example conversion of media-libs/libexif (the maintainer wants to keep the changes minimal). Effectively I am only (almost) changing the function names and not the ebuild code. Feel free to propose a different eclass name. --------------010407000600050406070208 Content-Type: text/plain; charset=UTF-8; name="autotools-multilib-minimal.eclass" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="autotools-multilib-minimal.eclass" # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # @ECLASS: autotools-multilib-minimal.eclass # @MAINTAINER: # Julian Ospald # @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions # @DESCRIPTION: # # src_configure, src_compile, src_test and src_install are exported # use multilib_src_* instead of src_* which runs this phase for # all enabled ABIs # # if you need generic install rules, use multilib_src_install_all function # @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD # @DEFAULT_UNSET # @DESCRIPTION: # Set to enable in-source build. # If you enable this, ensure that prepabisources is called # at the END of src_prepare! # EAPI=5 is required for meaningful MULTILIB_USEDEP. case ${EAPI:-0} in 5) ;; *) die "EAPI=${EAPI} is not supported" ;; esac inherit multilib-build EXPORT_FUNCTIONS src_configure src_compile src_test src_install prepabisources() { if [[ $AUTOTOOLS_IN_SOURCE_BUILD ]] ; then einfo "Copying sources to abi-specific dirs" prepabisources() { cp -pR "${S}" "${BUILD_DIR}" || die "failed to copy sources" } multilib_foreach_abi prepabisources fi } autotools-multilib-minimal_src_configure() { local myeconfsource if [[ $AUTOTOOLS_IN_SOURCE_BUILD ]] ; then myeconfsource=. else myeconfsource="${S}" fi _autotools-multilib-minimal_src_configure() { einfo "Configuring for ${ABI}" mkdir -p "${BUILD_DIR}" || die pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_configure >/dev/null ; then ECONF_SOURCE="${myeconfsource}" multilib_src_configure else ECONF_SOURCE="${myeconfsource}" default_src_configure fi popd >/dev/null || die } multilib_foreach_abi _autotools-multilib-minimal_src_configure } autotools-multilib-minimal_src_compile() { _autotools-multilib-minimal_src_compile() { einfo "Compiling for ${ABI}" pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_compile >/dev/null ; then multilib_src_compile else default_src_compile fi popd >/dev/null || die } multilib_foreach_abi _autotools-multilib-minimal_src_compile } autotools-multilib-minimal_src_test() { _autotools-multilib-minimal_src_test() { einfo "Testing for ${ABI}" pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_test >/dev/null ; then multilib_src_test else default_src_test fi popd >/dev/null || die } multilib_foreach_abi _autotools-multilib-minimal_src_test } autotools-multilib-minimal_src_install() { _autotools-multilib-minimal_src_install() { einfo "Installing for ${ABI}" pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_install >/dev/null ; then multilib_src_install else default_src_install fi multilib_check_headers popd >/dev/null || die } multilib_foreach_abi _autotools-multilib-minimal_src_install if declare -f multilib_src_install_all >/dev/null ; then multilib_src_install_all fi } --------------010407000600050406070208 Content-Type: text/plain; charset=UTF-8; name="libexif-0.6.21.ebuild.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libexif-0.6.21.ebuild.diff" --- media-libs/libexif/libexif-0.6.21.ebuild +++ media-libs/libexif/libexif-0.6.21-r1.ebuild @@ -2,8 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-libs/libexif/libexif-0.6.21.ebuild,v 1.8 2012/11/07 19:03:58 grobian Exp $ -EAPI=4 -inherit eutils libtool +EAPI=5 +inherit autotools-multilib-minimal eutils libtool DESCRIPTION="Library for parsing, editing, and saving EXIF data" HOMEPAGE="http://libexif.sourceforge.net/" @@ -11,7 +11,7 @@ LICENSE="LGPL-2.1" SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" IUSE="doc nls static-libs" RDEPEND="nls? ( virtual/libintl )" @@ -26,7 +26,7 @@ elibtoolize # For *-bsd } -src_configure() { +multilib_src_configure() { econf \ $(use_enable static-libs static) \ $(use_enable nls) \ @@ -34,8 +34,11 @@ --with-doc-dir="${EPREFIX}"/usr/share/doc/${PF} } -src_install() { +multilib_src_install() { emake DESTDIR="${D}" install +} + +multilib_src_install_all() { prune_libtool_files rm -f "${ED}"/usr/share/doc/${PF}/{ABOUT-NLS,COPYING} } --------------010407000600050406070208--