Simplify ebuild.
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
Tue, 20 Apr 2010 23:49:39 +0000 (23:49 +0000)
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
Tue, 20 Apr 2010 23:49:39 +0000 (23:49 +0000)
Package-Manager: portage-HEAD/cvs/Linux x86_64

media-libs/ming/Manifest
media-libs/ming/ming-0.4.3.ebuild

index 6f35ca48614f7b27601ab4d8076bcad654959fea..f67f04dcfc9c119deb5110d4b0273358a0580299 100644 (file)
@@ -10,6 +10,6 @@ DIST ming_0.3.0-13.diff.gz 44050 RMD160 391c3ebeae85e93523c32d93cd99913cd405335d
 DIST ming_0.3.0.orig.tar.gz 369259 RMD160 d1484c8ed5442f82d3311fe6164beb5dc9ce2ad9 SHA1 e9231132cca3a6e46d8d7988a490871c5c3fa112 SHA256 1eec7136f2b8548476f79335e2dc9cea78f31a0c09a1cccd07782ee4d74959d9
 EBUILD ming-0.3.0-r1.ebuild 3029 RMD160 c418cecf4606f9dc6f45fabfb20a67e40d7872b6 SHA1 e7b8dbe4d40fd7c3429d173853d30e6671a42a8c SHA256 c28729e015182580230a84df67f7c633005186d972f3372e1451642ea84c5d3b
 EBUILD ming-0.4.0_rc2.ebuild 2446 RMD160 6b1aa265865f7b651274a75b7169d7b471340353 SHA1 54e114276899b66df07d7fbdaece111ef7ed4185 SHA256 719c5518613baccfaedff17359c10db74667e5543fe075411505dc4a168570b5
-EBUILD ming-0.4.3.ebuild 2554 RMD160 6a22729d7b7497fbefdb345d6706eda0daf818e9 SHA1 fd34ebb2eb496bac51b68ce31f93c5f1f6ec59fa SHA256 b7a5de021e3cd3d91520e8afd9234030c2678ef7906cd0b534eee833cdf87be5
+EBUILD ming-0.4.3.ebuild 2310 RMD160 656cbc2382479a9407e91ac0ac6bfd2162467862 SHA1 b4445e5725d15f0b1c4a1a11d43a0965ccb761a2 SHA256 3690735f88ca755cbe249560c36e39bc1210428276e4f51abb31b1f92a41bdf7
 MISC ChangeLog 8262 RMD160 15f63a7bf07e1402a5125ba5018cab13989aa91c SHA1 f6af534c1318426c825ed683efab7f10ae94d451 SHA256 1eb3ee82b40bce4be5fe11fb6a9efc0ad1241df4e0fdd8881c83a9ab80a5047f
 MISC metadata.xml 236 RMD160 92f49f8275e75caf57b88a3172d5204eaa4e33ae SHA1 dd1a8550a514e55ab0ed6190ab4794bb090994f8 SHA256 56075995f83836ae824c7cb01931b98d6745f6d5a7764299c8262e801486b829
index 447044b17873398bfea6278255321bfc439ffed7..5ba48294a462d9831c2748660d8434aa729b8f76 100644 (file)
@@ -1,13 +1,13 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/ming/ming-0.4.3.ebuild,v 1.2 2010/04/20 23:37:26 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/ming/ming-0.4.3.ebuild,v 1.3 2010/04/20 23:49:39 arfrever Exp $
 
-EAPI=1
+EAPI="3"
 
 PHP_EXT_NAME=ming
 PYTHON_DEPEND="python? 2"
 
-inherit eutils autotools flag-o-matic multilib php-ext-source-r1 perl-module distutils python
+inherit eutils autotools flag-o-matic multilib php-ext-source-r1 perl-module python
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
 DESCRIPTION="An Open Source library for Flash movie generation."
@@ -28,20 +28,16 @@ DEPEND="${DEPEND}
 
 S=${WORKDIR}/${P/_/.}
 
-#Tests only work when the package is tested on a system
-#which does not presently have any version of ming installed.
+# Tests only work when the package is tested on a system
+# which does not presently have any version of ming installed.
 RESTRICT="test"
-RESTRICT_PYTHON_ABIS="3"
 
 pkg_setup() {
        use python && python_set_active_version 2
 }
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
-
-       #Let's get rid of the TEXTRELS, link dynamic. Use gif.
+src_prepare() {
+       # Let's get rid of the TEXTRELS, link dynamic. Use gif.
        sed -i \
                -e 's/libming.a/libming.so/' \
                -e 's/lungif/lgif/' \
@@ -59,12 +55,14 @@ src_unpack() {
        eautoreconf
 }
 
-src_compile() {
+src_configure() {
        # build is sensitive to -O3 (bug #297437)
        replace-flags -O3 -O2
 
-       econf   $(use_enable perl) \
-               $(use_enable python) || die "econf failed"
+       econf $(use_enable perl) $(use_enable python)
+}
+
+src_compile() {
        emake -j1 DESTDIR="${D}" || die "emake failed"
 
        if use php; then
@@ -85,8 +83,8 @@ src_install() {
 
        fixlocalpod
 
-       #Get rid of the precompiled stuff, we generate it later.
-       rm -f $(find "${D}" -name '*.pyc')
+       # Get rid of the precompiled stuff, we generate it later.
+       find "${ED}" -name "*.pyc" -print0 | xargs -0 rm -f
 
        if use php; then
                cd "${S}"/php_ext
@@ -96,18 +94,7 @@ src_install() {
 
 pkg_postinst() {
        use perl && perl-module_pkg_postinst
-
-       if use python
-       then
-               ebegin "Compiling ming.py"
-               python_mod_compile $(python_get_sitedir)/ming.py \
-                       || die "Failed to compile ming.py"
-               eend $?
-
-               ebegin "Compiling mingc.py"
-               python_mod_compile $(python_get_sitedir)/mingc.py || die "mingc.py failed"
-               eend $?
-       fi
+       use python && python_mod_optimize ming.py mingc.py
 }
 
 pkg_prerm() {
@@ -116,5 +103,5 @@ pkg_prerm() {
 
 pkg_postrm() {
        use perl && perl-module_pkg_postrm
-       use python && distutils_pkg_postrm
+       use python && python_mod_cleanup ming.py mingc.py
 }