/[gentoo-x86]/media-libs/lcms/lcms-1.19.ebuild
Gentoo

Contents of /media-libs/lcms/lcms-1.19.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download)
Mon Feb 20 08:08:44 2012 UTC (6 years, 7 months ago) by patrick
Branch: MAIN
Changes since 1.11: +3 -3 lines
Restricting pypy #403781

(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)

1 patrick 1.12 # Copyright 1999-2012 Gentoo Foundation
2 pva 1.1 # Distributed under the terms of the GNU General Public License v2
3 patrick 1.12 # $Header: /var/cvsroot/gentoo-x86/media-libs/lcms/lcms-1.19.ebuild,v 1.11 2011/11/13 10:56:24 jlec Exp $
4 pva 1.1
5 arfrever 1.10 EAPI="3"
6     PYTHON_DEPEND="python? 2"
7     SUPPORT_PYTHON_ABIS="1"
8 patrick 1.12 RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
9 arfrever 1.10
10     inherit autotools eutils multilib python
11 pva 1.1
12     DESCRIPTION="A lightweight, speed optimized color management engine"
13     HOMEPAGE="http://www.littlecms.com/"
14     SRC_URI="http://www.littlecms.com/${P}.tar.gz"
15    
16     LICENSE="MIT"
17     SLOT="0"
18 ranger 1.7 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
19 ssuominen 1.9 IUSE="jpeg python static-libs tiff zlib"
20 pva 1.1
21 jlec 1.11 RDEPEND="tiff? ( media-libs/tiff:0 )
22 ssuominen 1.8 jpeg? ( virtual/jpeg )
23 pva 1.1 zlib? ( sys-libs/zlib )"
24     DEPEND="${RDEPEND}
25     python? ( >=dev-lang/swig-1.3.31 )"
26    
27 arfrever 1.10 pkg_setup() {
28     if use python; then
29     python_pkg_setup
30     fi
31     }
32    
33 pva 1.1 src_prepare() {
34 arfrever 1.10 # Python bindings are built/installed manually.
35     sed -e "/SUBDIRS =/s/ python//" -i Makefile.am
36    
37     epatch "${FILESDIR}/${P}-disable_static_modules.patch"
38    
39     eautoreconf
40    
41 pva 1.1 # run swig to regenerate lcms_wrap.cxx and lcms.py (bug #148728)
42     if use python; then
43 ssuominen 1.9 cd python
44     ./swig_lcms || die
45 pva 1.1 fi
46     }
47    
48     src_configure() {
49     econf \
50     --disable-dependency-tracking \
51 ssuominen 1.9 $(use_enable static-libs static) \
52 pva 1.1 $(use_with jpeg) \
53     $(use_with python) \
54     $(use_with tiff) \
55     $(use_with zlib)
56     }
57    
58 arfrever 1.10 src_compile() {
59     default
60    
61     if use python; then
62     python_copy_sources python
63    
64     building() {
65     emake \
66     LCMS_PYEXECDIR="$(python_get_sitedir)" \
67     LCMS_PYINCLUDE="$(python_get_includedir)" \
68     LCMS_PYLIB="$(python_get_libdir)" \
69     PYTHON_VERSION="$(python_get_version)"
70     }
71     python_execute_function -s --source-dir python building
72     fi
73     }
74    
75 pva 1.1 src_install() {
76     emake \
77     DESTDIR="${D}" \
78     BINDIR="${D}"/usr/bin \
79     libdir=/usr/$(get_libdir) \
80 ssuominen 1.9 install || die
81 pva 1.1
82 arfrever 1.10 if use python; then
83     installation() {
84     emake \
85     DESTDIR="${D}" \
86     LCMS_PYEXECDIR="$(python_get_sitedir)" \
87     LCMS_PYLIB="$(python_get_libdir)" \
88     PYTHON_VERSION="$(python_get_version)" \
89     install
90     }
91     python_execute_function -s --source-dir python installation
92    
93     python_clean_installation_image
94     fi
95    
96 pva 1.1 insinto /usr/share/lcms/profiles
97     doins testbed/*.icm
98    
99     dodoc AUTHORS README* INSTALL NEWS doc/*
100 ssuominen 1.9
101     find "${D}" -name '*.la' -exec rm -f '{}' +
102 pva 1.1 }
103 arfrever 1.10
104     pkg_postinst() {
105     if use python; then
106     python_mod_optimize lcms.py
107     fi
108     }
109    
110     pkg_postrm() {
111     if use python; then
112     python_mod_cleanup lcms.py
113     fi
114     }

  ViewVC Help
Powered by ViewVC 1.1.20