/[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.10 - (show annotations) (download)
Sat Feb 26 18:18:37 2011 UTC (7 years, 6 months ago) by arfrever
Branch: MAIN
Changes since 1.9: +64 -4 lines
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)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/lcms/lcms-1.19.ebuild,v 1.9 2010/09/28 16:19:42 ssuominen Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="python? 2"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="3.* *-jython"
9
10 inherit autotools eutils multilib python
11
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 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
19 IUSE="jpeg python static-libs tiff zlib"
20
21 RDEPEND="tiff? ( media-libs/tiff )
22 jpeg? ( virtual/jpeg )
23 zlib? ( sys-libs/zlib )"
24 DEPEND="${RDEPEND}
25 python? ( >=dev-lang/swig-1.3.31 )"
26
27 pkg_setup() {
28 if use python; then
29 python_pkg_setup
30 fi
31 }
32
33 src_prepare() {
34 # 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 # run swig to regenerate lcms_wrap.cxx and lcms.py (bug #148728)
42 if use python; then
43 cd python
44 ./swig_lcms || die
45 fi
46 }
47
48 src_configure() {
49 econf \
50 --disable-dependency-tracking \
51 $(use_enable static-libs static) \
52 $(use_with jpeg) \
53 $(use_with python) \
54 $(use_with tiff) \
55 $(use_with zlib)
56 }
57
58 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 src_install() {
76 emake \
77 DESTDIR="${D}" \
78 BINDIR="${D}"/usr/bin \
79 libdir=/usr/$(get_libdir) \
80 install || die
81
82 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 insinto /usr/share/lcms/profiles
97 doins testbed/*.icm
98
99 dodoc AUTHORS README* INSTALL NEWS doc/*
100
101 find "${D}" -name '*.la' -exec rm -f '{}' +
102 }
103
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