Lines 25-32
Link Here
|
25 |
# So, for example, with the bonobo bindings, the original package is libbonobo |
25 |
# So, for example, with the bonobo bindings, the original package is libbonobo |
26 |
# and the packages is named dev-python/libbonobo-python |
26 |
# and the packages is named dev-python/libbonobo-python |
27 |
|
27 |
|
|
|
28 |
SUPPORT_PYTHON_ABIS="1" |
29 |
PYTHON_DEPEND="2" |
30 |
RESTRICT_PYTHON_ABIS="3.*" |
31 |
|
28 |
inherit versionator python autotools gnome2 |
32 |
inherit versionator python autotools gnome2 |
29 |
|
33 |
|
|
|
34 |
case "${EAPI:-0}" in |
35 |
0|1) |
36 |
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_postrm |
37 |
;; |
38 |
*) |
39 |
EXPORT_FUNCTIONS pkg_setup src_configure src_prepare src_compile src_install pkg_postinst pkg_postrm |
40 |
;; |
41 |
esac |
42 |
|
30 |
G_PY_PN=${G_PY_PN:-gnome-python} |
43 |
G_PY_PN=${G_PY_PN:-gnome-python} |
31 |
G_PY_BINDINGS=${G_PY_BINDINGS:-${PN%-python}} |
44 |
G_PY_BINDINGS=${G_PY_BINDINGS:-${PN%-python}} |
32 |
|
45 |
|
Lines 56-61
Link Here
|
56 |
|
69 |
|
57 |
# Enable the required bindings as specified by the G_PY_BINDINGS variable |
70 |
# Enable the required bindings as specified by the G_PY_BINDINGS variable |
58 |
gnome-python-common_pkg_setup() { |
71 |
gnome-python-common_pkg_setup() { |
|
|
72 |
python_pkg_setup |
73 |
|
59 |
G2CONF="${G2CONF} --disable-allbindings" |
74 |
G2CONF="${G2CONF} --disable-allbindings" |
60 |
for binding in ${G_PY_BINDINGS}; do |
75 |
for binding in ${G_PY_BINDINGS}; do |
61 |
G2CONF="${G2CONF} --enable-${binding}" |
76 |
G2CONF="${G2CONF} --enable-${binding}" |
Lines 65-75
Link Here
|
65 |
gnome-python-common_src_unpack() { |
80 |
gnome-python-common_src_unpack() { |
66 |
gnome2_src_unpack |
81 |
gnome2_src_unpack |
67 |
|
82 |
|
|
|
83 |
has ${EAPI:-0} 0 1 && gnome-python-common_src_prepare |
84 |
} |
85 |
|
86 |
gnome-python-common_src_prepare() { |
87 |
gnome2_src_prepare |
88 |
|
68 |
# disable pyc compiling |
89 |
# disable pyc compiling |
69 |
if [[ -f py-compile ]]; then |
90 |
if [[ -f py-compile ]]; then |
70 |
rm py-compile |
91 |
rm py-compile |
71 |
ln -s $(type -P true) py-compile |
92 |
ln -s $(type -P true) py-compile |
72 |
fi |
93 |
fi |
|
|
94 |
|
95 |
# The .pc file is installed by respective gnome-python*-base package |
96 |
sed -i '/^pkgconfig_DATA/d' Makefile.in || die "sed failed" |
97 |
sed -i '/^pkgconfigdir/d' Makefile.in || die "sed failed" |
98 |
|
99 |
python_copy_sources |
100 |
} |
101 |
|
102 |
gnome-python-common_src_configure() { |
103 |
python_execute_function -s gnome2_src_configure "$@" |
104 |
} |
105 |
|
106 |
gnome-python-common_src_compile() { |
107 |
has ${EAPI:-0} 0 1 && gnome-python-common_src_configure "$@" |
108 |
python_src_compile "$@" |
109 |
} |
110 |
|
111 |
gnome-python-common_src_test() { |
112 |
python_src_test "$@" |
73 |
} |
113 |
} |
74 |
|
114 |
|
75 |
# Do a regular gnome2 src_install and then install examples if required. |
115 |
# Do a regular gnome2 src_install and then install examples if required. |
Lines 77-87
Link Here
|
77 |
# (to install a directory recursively, specify it with a trailing '/' - for |
117 |
# (to install a directory recursively, specify it with a trailing '/' - for |
78 |
# example, foo/bar/) |
118 |
# example, foo/bar/) |
79 |
gnome-python-common_src_install() { |
119 |
gnome-python-common_src_install() { |
80 |
# The .pc file is installed by respective gnome-python*-base package |
120 |
python_execute_function -s gnome2_src_install "$@" |
81 |
sed -i '/^pkgconfig_DATA/d' Makefile || die "sed failed" |
121 |
python_clean_installation_image |
82 |
sed -i '/^pkgconfigdir/d' Makefile || die "sed failed" |
|
|
83 |
|
84 |
gnome2_src_install |
85 |
|
122 |
|
86 |
if hasq examples ${IUSE} && use examples; then |
123 |
if hasq examples ${IUSE} && use examples; then |
87 |
insinto /usr/share/doc/${PF}/examples |
124 |
insinto /usr/share/doc/${PF}/examples |
Lines 94-114
Link Here
|
94 |
fi |
131 |
fi |
95 |
done |
132 |
done |
96 |
fi |
133 |
fi |
97 |
|
|
|
98 |
# Python does not need these, bug #299243 |
99 |
find "${D%/}${EPREFIX}$(python_get_sitedir)" -name "*.la" -delete \ |
100 |
|| die "failed to remove la files" |
101 |
|
102 |
} |
134 |
} |
103 |
|
135 |
|
104 |
gnome-python-common_pkg_postinst() { |
136 |
gnome-python-common_pkg_postinst() { |
105 |
python_version |
137 |
python_mod_optimize gtk-2.0 |
106 |
python_need_rebuild |
|
|
107 |
python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0 |
108 |
} |
138 |
} |
109 |
|
139 |
|
110 |
gnome-python-common_pkg_postrm() { |
140 |
gnome-python-common_pkg_postrm() { |
111 |
python_mod_cleanup |
141 |
python_mod_cleanup gtk-2.0 |
112 |
} |
142 |
} |
113 |
|
|
|
114 |
EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm |