1 |
# Copyright 1999-2012 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgsf/libgsf-1.14.22.ebuild,v 1.6 2012/05/05 02:16:32 tetromino Exp $ |
4 |
|
5 |
EAPI="4" |
6 |
GCONF_DEBUG="no" |
7 |
GNOME2_LA_PUNT="yes" |
8 |
PYTHON_DEPEND="python? 2:2.6" |
9 |
SUPPORT_PYTHON_ABIS="1" |
10 |
RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython *-pypy-*" |
11 |
|
12 |
inherit autotools eutils gnome2 python multilib |
13 |
|
14 |
DESCRIPTION="The GNOME Structured File Library" |
15 |
HOMEPAGE="http://projects.gnome.org/libgsf/" |
16 |
|
17 |
LICENSE="GPL-2 LGPL-2.1" |
18 |
SLOT="0" |
19 |
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~sh ~sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
20 |
IUSE="bzip2 doc gtk python" |
21 |
|
22 |
RDEPEND=">=dev-libs/glib-2.16:2 |
23 |
>=dev-libs/libxml2-2.4.16:2 |
24 |
sys-libs/zlib |
25 |
bzip2? ( app-arch/bzip2 ) |
26 |
gtk? ( x11-libs/gtk+:2 ) |
27 |
python? ( |
28 |
>=dev-python/pygobject-2.10:2 |
29 |
>=dev-python/pygtk-2.10:2 )" |
30 |
|
31 |
DEPEND="${RDEPEND} |
32 |
>=dev-util/intltool-0.35.0 |
33 |
dev-util/gtk-doc-am |
34 |
virtual/pkgconfig |
35 |
doc? ( >=dev-util/gtk-doc-1 )" |
36 |
|
37 |
pkg_setup() { |
38 |
DOCS="AUTHORS BUGS ChangeLog HACKING NEWS README TODO" |
39 |
G2CONF="${G2CONF} |
40 |
--with-gio |
41 |
--disable-static |
42 |
$(use_with bzip2 bz2) |
43 |
$(use_with python) |
44 |
$(use_with gtk gdk-pixbuf)" |
45 |
|
46 |
if use python; then |
47 |
python_pkg_setup |
48 |
fi |
49 |
} |
50 |
|
51 |
src_prepare() { |
52 |
# Drop DEPRECATED flags |
53 |
sed -i -e "s/ -DG_DISABLE_DEPRECATED//" configure.in configure || die |
54 |
|
55 |
# Python bindings are built/installed manually. |
56 |
sed -e "/SUBDIRS += python/d" -i Makefile.am || die |
57 |
|
58 |
intltoolize --force --copy --automake || die "intltoolize failed" |
59 |
eautoreconf |
60 |
|
61 |
# disable pyc compiling |
62 |
echo '#!/bin/sh' > py-compile |
63 |
|
64 |
gnome2_src_prepare |
65 |
} |
66 |
|
67 |
src_compile() { |
68 |
gnome2_src_compile |
69 |
|
70 |
if use python; then |
71 |
python_copy_sources python |
72 |
|
73 |
building() { |
74 |
emake \ |
75 |
PYTHON_INCLUDES="-I$(python_get_includedir)" \ |
76 |
pyexecdir="$(python_get_sitedir)" \ |
77 |
pythondir="$(python_get_sitedir)" |
78 |
} |
79 |
python_execute_function -s --source-dir python building |
80 |
fi |
81 |
} |
82 |
|
83 |
src_install() { |
84 |
gnome2_src_install |
85 |
|
86 |
if use python; then |
87 |
installation() { |
88 |
emake \ |
89 |
DESTDIR="${D}" \ |
90 |
pyexecdir="$(python_get_sitedir)" \ |
91 |
pythondir="$(python_get_sitedir)" \ |
92 |
install |
93 |
} |
94 |
python_execute_function -s --source-dir python installation |
95 |
|
96 |
python_clean_installation_image |
97 |
fi |
98 |
} |
99 |
|
100 |
pkg_preinst() { |
101 |
gnome2_pkg_preinst |
102 |
preserve_old_lib /usr/$(get_libdir)/libgsf-1.so.1 |
103 |
preserve_old_lib /usr/$(get_libdir)/libgsf-gnome-1.so.1 |
104 |
} |
105 |
|
106 |
pkg_postinst() { |
107 |
gnome2_pkg_postinst |
108 |
|
109 |
if use python; then |
110 |
python_mod_optimize gsf |
111 |
fi |
112 |
|
113 |
preserve_old_lib_notify /usr/$(get_libdir)/libgsf-1.so.1 |
114 |
preserve_old_lib_notify /usr/$(get_libdir)/libgsf-gnome-1.so.1 |
115 |
} |
116 |
|
117 |
pkg_postrm() { |
118 |
gnome2_pkg_postrm |
119 |
|
120 |
if use python; then |
121 |
python_mod_cleanup gsf |
122 |
fi |
123 |
} |