Lines 2-8
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/openipmi/openipmi-2.0.18.ebuild,v 1.2 2012/05/04 07:33:12 jdhore Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/openipmi/openipmi-2.0.18.ebuild,v 1.2 2012/05/04 07:33:12 jdhore Exp $ |
4 |
|
4 |
|
5 |
inherit eutils autotools python |
5 |
EAPI=5 |
|
|
6 |
PYTHON_COMPAT=( python{2_6,2_7} ) |
7 |
|
8 |
inherit eutils autotools python-single-r1 |
6 |
|
9 |
|
7 |
DESCRIPTION="Library interface to IPMI" |
10 |
DESCRIPTION="Library interface to IPMI" |
8 |
HOMEPAGE="http://sourceforge.net/projects/openipmi/" |
11 |
HOMEPAGE="http://sourceforge.net/projects/openipmi/" |
Lines 22-28
Link Here
|
22 |
crypt? ( dev-libs/openssl ) |
25 |
crypt? ( dev-libs/openssl ) |
23 |
snmp? ( net-analyzer/net-snmp ) |
26 |
snmp? ( net-analyzer/net-snmp ) |
24 |
perl? ( dev-lang/perl ) |
27 |
perl? ( dev-lang/perl ) |
25 |
python? ( dev-lang/python ) |
28 |
python? ( ${PYTHON_DEPS} ) |
26 |
tcl? ( dev-lang/tcl )" |
29 |
tcl? ( dev-lang/tcl )" |
27 |
DEPEND="${RDEPEND} |
30 |
DEPEND="${RDEPEND} |
28 |
>=dev-lang/swig-1.3.21 |
31 |
>=dev-lang/swig-1.3.21 |
Lines 30-35
Link Here
|
30 |
# Gui is broken! |
33 |
# Gui is broken! |
31 |
# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )" |
34 |
# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )" |
32 |
|
35 |
|
|
|
36 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
37 |
|
33 |
# Upstream doesn't use --without properly |
38 |
# Upstream doesn't use --without properly |
34 |
use_yesno() { |
39 |
use_yesno() { |
35 |
yesmsg="yes" |
40 |
yesmsg="yes" |
Lines 41-49
Link Here
|
41 |
fi |
46 |
fi |
42 |
} |
47 |
} |
43 |
|
48 |
|
44 |
src_unpack() { |
49 |
pkg_setup() { |
45 |
unpack ${A} |
50 |
python-single-r1_pkg_setup |
46 |
cd "${S}" |
51 |
} |
|
|
52 |
|
53 |
src_prepare() { |
47 |
# Bug #338499: The installed OpenIPMIpthread.pc depends on a non-existing |
54 |
# Bug #338499: The installed OpenIPMIpthread.pc depends on a non-existing |
48 |
# pthread.pc. We patch it to link -lpthread directly instead. |
55 |
# pthread.pc. We patch it to link -lpthread directly instead. |
49 |
epatch "${FILESDIR}/${PN}-2.0.16-pthreads.patch" |
56 |
epatch "${FILESDIR}/${PN}-2.0.16-pthreads.patch" |
Lines 53-64
Link Here
|
53 |
sed -r -i \ |
60 |
sed -r -i \ |
54 |
-e '/INSTALL.*\.py[oc] /d' \ |
61 |
-e '/INSTALL.*\.py[oc] /d' \ |
55 |
-e '/install-exec-local/s,OpenIPMI.pyc OpenIPMI.pyo,,g' \ |
62 |
-e '/install-exec-local/s,OpenIPMI.pyc OpenIPMI.pyo,,g' \ |
56 |
swig/python/Makefile.{am,in} |
63 |
swig/python/Makefile.{am,in} || die |
57 |
|
64 |
|
58 |
# Bug #298250: parallel install fix. |
65 |
# Bug #298250: parallel install fix. |
59 |
sed -r -i \ |
66 |
sed -r -i \ |
60 |
-e '/^install-data-local:/s,$, install-exec-am,g' \ |
67 |
-e '/^install-data-local:/s,$, install-exec-am,g' \ |
61 |
cmdlang/Makefile.{am,in} |
68 |
cmdlang/Makefile.{am,in} || die |
62 |
|
69 |
|
63 |
# We touch the .in and .am above because if we use the below, the Perl stuff |
70 |
# We touch the .in and .am above because if we use the below, the Perl stuff |
64 |
# is very fragile, and often fails to link. |
71 |
# is very fragile, and often fails to link. |
Lines 67-73
Link Here
|
67 |
#eautoreconf |
74 |
#eautoreconf |
68 |
} |
75 |
} |
69 |
|
76 |
|
70 |
src_compile() { |
77 |
src_configure() { |
71 |
local myconf="" |
78 |
local myconf="" |
72 |
myconf="${myconf} `use_with snmp ucdsnmp yes`" |
79 |
myconf="${myconf} `use_with snmp ucdsnmp yes`" |
73 |
myconf="${myconf} `use_with crypt openssl yes`" |
80 |
myconf="${myconf} `use_with crypt openssl yes`" |
Lines 87-106
Link Here
|
87 |
myconf="${myconf} --without-tkinter" |
94 |
myconf="${myconf} --without-tkinter" |
88 |
myconf="${myconf} --with-glib --with-swig" |
95 |
myconf="${myconf} --with-glib --with-swig" |
89 |
# these binaries are for root! |
96 |
# these binaries are for root! |
90 |
econf ${myconf} --bindir=/usr/sbin || die "econf failed" |
97 |
econf ${myconf} --bindir=/usr/sbin |
91 |
emake || die "emake $i failed" |
|
|
92 |
} |
98 |
} |
93 |
|
99 |
|
94 |
src_install() { |
100 |
src_install() { |
95 |
emake DESTDIR="${D}" install || die |
101 |
default |
96 |
dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.emulator |
102 |
dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.emulator |
97 |
newdoc cmdlang/README README.cmdlang |
103 |
newdoc cmdlang/README README.cmdlang |
98 |
} |
104 |
use python && python_optimize "${ED}"/$(python_get_sitedir) |
99 |
|
|
|
100 |
pkg_postinst() { |
101 |
use python && python_mod_optimize $(python_get_sitedir)/OpenIPMI.py |
102 |
} |
103 |
|
104 |
pkg_postrm() { |
105 |
use python && python_mod_cleanup $(python_get_sitedir)/OpenIPMI.py |
106 |
} |
105 |
} |