diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2011-02-26 18:18:37 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2011-02-26 18:18:37 +0000 |
commit | a065f2d3a18607e595e16db949a3a78e9d61298b (patch) | |
tree | 7f51211da4dbed5514e38b553b5be914c85c78de /media-libs | |
parent | depend virtual/jpeg (diff) | |
download | gentoo-2-a065f2d3a18607e595e16db949a3a78e9d61298b.tar.gz gentoo-2-a065f2d3a18607e595e16db949a3a78e9d61298b.tar.bz2 gentoo-2-a065f2d3a18607e595e16db949a3a78e9d61298b.zip |
Set SUPPORT_PYTHON_ABIS, don't install .a files in Python site-packages directories (bug #356601).
(Portage version: 2.2.0_alpha25_p8/cvs/Linux x86_64)
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/lcms/ChangeLog | 9 | ||||
-rw-r--r-- | media-libs/lcms/files/lcms-1.19-disable_static_modules.patch | 20 | ||||
-rw-r--r-- | media-libs/lcms/lcms-1.19.ebuild | 68 |
3 files changed, 91 insertions, 6 deletions
diff --git a/media-libs/lcms/ChangeLog b/media-libs/lcms/ChangeLog index 0738dc309e35..d93b3825e949 100644 --- a/media-libs/lcms/ChangeLog +++ b/media-libs/lcms/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-libs/lcms -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/lcms/ChangeLog,v 1.124 2010/12/12 10:09:25 ssuominen Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/lcms/ChangeLog,v 1.125 2011/02/26 18:18:37 arfrever Exp $ + + 26 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + lcms-1.19.ebuild, +files/lcms-1.19-disable_static_modules.patch: + Set SUPPORT_PYTHON_ABIS, don't install .a files in Python site-packages + directories (bug #356601). *lcms-2.1 (12 Dec 2010) diff --git a/media-libs/lcms/files/lcms-1.19-disable_static_modules.patch b/media-libs/lcms/files/lcms-1.19-disable_static_modules.patch new file mode 100644 index 000000000000..23eeb48cc96d --- /dev/null +++ b/media-libs/lcms/files/lcms-1.19-disable_static_modules.patch @@ -0,0 +1,20 @@ +--- python/Makefile.am ++++ python/Makefile.am +@@ -22,7 +22,7 @@ + + endif + +-_lcms_la_LDFLAGS = -no-undefined -module -avoid-version \ ++_lcms_la_LDFLAGS = -no-undefined -module -avoid-version -shared \ + -L$(LCMS_PYLIB)/config + + _lcms_la_LIBADD = $(top_builddir)/src/liblcms.la -lpython$(PYTHON_VERSION) +@@ -31,7 +31,7 @@ + + _lcms_la_CPPFLAGS = -I$(PYTHON_PREFIX)/include/python$(PYTHON_VERSION) \ + -I$(LCMS_PYINCLUDE) \ +- $(AM_CPPFLAGS) ++ $(AM_CPPFLAGS) -shared + + + EXTRA_DIST = lcms.py lcms.i testbed swig_lcms diff --git a/media-libs/lcms/lcms-1.19.ebuild b/media-libs/lcms/lcms-1.19.ebuild index 0a35abb79f4e..022888f7107e 100644 --- a/media-libs/lcms/lcms-1.19.ebuild +++ b/media-libs/lcms/lcms-1.19.ebuild @@ -1,9 +1,13 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/lcms/lcms-1.19.ebuild,v 1.9 2010/09/28 16:19:42 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/lcms/lcms-1.19.ebuild,v 1.10 2011/02/26 18:18:37 arfrever Exp $ -EAPI=2 -inherit libtool multilib +EAPI="3" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython" + +inherit autotools eutils multilib python DESCRIPTION="A lightweight, speed optimized color management engine" HOMEPAGE="http://www.littlecms.com/" @@ -20,7 +24,20 @@ RDEPEND="tiff? ( media-libs/tiff ) DEPEND="${RDEPEND} python? ( >=dev-lang/swig-1.3.31 )" +pkg_setup() { + if use python; then + python_pkg_setup + fi +} + src_prepare() { + # Python bindings are built/installed manually. + sed -e "/SUBDIRS =/s/ python//" -i Makefile.am + + epatch "${FILESDIR}/${P}-disable_static_modules.patch" + + eautoreconf + # run swig to regenerate lcms_wrap.cxx and lcms.py (bug #148728) if use python; then cd python @@ -38,6 +55,23 @@ src_configure() { $(use_with zlib) } +src_compile() { + default + + if use python; then + python_copy_sources python + + building() { + emake \ + LCMS_PYEXECDIR="$(python_get_sitedir)" \ + LCMS_PYINCLUDE="$(python_get_includedir)" \ + LCMS_PYLIB="$(python_get_libdir)" \ + PYTHON_VERSION="$(python_get_version)" + } + python_execute_function -s --source-dir python building + fi +} + src_install() { emake \ DESTDIR="${D}" \ @@ -45,6 +79,20 @@ src_install() { libdir=/usr/$(get_libdir) \ install || die + if use python; then + installation() { + emake \ + DESTDIR="${D}" \ + LCMS_PYEXECDIR="$(python_get_sitedir)" \ + LCMS_PYLIB="$(python_get_libdir)" \ + PYTHON_VERSION="$(python_get_version)" \ + install + } + python_execute_function -s --source-dir python installation + + python_clean_installation_image + fi + insinto /usr/share/lcms/profiles doins testbed/*.icm @@ -52,3 +100,15 @@ src_install() { find "${D}" -name '*.la' -exec rm -f '{}' + } + +pkg_postinst() { + if use python; then + python_mod_optimize lcms.py + fi +} + +pkg_postrm() { + if use python; then + python_mod_cleanup lcms.py + fi +} |