/[gentoo-x86]/sys-libs/openipmi/openipmi-2.0.18.ebuild
Gentoo

Contents of /sys-libs/openipmi/openipmi-2.0.18.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jan 29 13:36:56 2014 UTC (5 years, 11 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -3 lines
Stable for HPPA too.

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --ignore-arches, signed Manifest commit with key A792A613)

1 # Copyright 1999-2014 Gentoo Foundation
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.3 2013/10/30 15:55:09 jer Exp $
4
5 inherit eutils autotools python
6
7 DESCRIPTION="Library interface to IPMI"
8 HOMEPAGE="http://sourceforge.net/projects/openipmi/"
9 MY_PN="OpenIPMI"
10 MY_P="${MY_PN}-${PV}"
11 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
12
13 LICENSE="LGPL-2.1 GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 hppa ~ia64 ~ppc ~x86"
16 IUSE="crypt snmp perl tcl python"
17 S="${WORKDIR}/${MY_P}"
18 RESTRICT='test'
19
20 RDEPEND="dev-libs/glib
21 sys-libs/gdbm
22 crypt? ( dev-libs/openssl )
23 snmp? ( net-analyzer/net-snmp )
24 perl? ( dev-lang/perl )
25 python? ( dev-lang/python )
26 tcl? ( dev-lang/tcl )"
27 DEPEND="${RDEPEND}
28 >=dev-lang/swig-1.3.21
29 virtual/pkgconfig"
30 # Gui is broken!
31 # python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )"
32
33 # Upstream doesn't use --without properly
34 use_yesno() {
35 yesmsg="yes"
36 [ -n "$3" ] && yesmsg="$3"
37 if use $1; then
38 echo "--with-$2=${yesmsg}"
39 else
40 echo "--without-$2"
41 fi
42 }
43
44 src_unpack() {
45 unpack ${A}
46 cd "${S}"
47 # Bug #338499: The installed OpenIPMIpthread.pc depends on a non-existing
48 # pthread.pc. We patch it to link -lpthread directly instead.
49 epatch "${FILESDIR}/${PN}-2.0.16-pthreads.patch"
50 # Bug #290763: The buildsys tries to compile+optimize the py file during
51 # install, when the .so might not be been added yet. We just skip the files
52 # and use python_mod_optimize ourselves later instead.
53 sed -r -i \
54 -e '/INSTALL.*\.py[oc] /d' \
55 -e '/install-exec-local/s,OpenIPMI.pyc OpenIPMI.pyo,,g' \
56 swig/python/Makefile.{am,in}
57
58 # Bug #298250: parallel install fix.
59 sed -r -i \
60 -e '/^install-data-local:/s,$, install-exec-am,g' \
61 cmdlang/Makefile.{am,in}
62
63 # 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.
65 #cd "${S}"
66 #elibtoolize
67 #eautoreconf
68 }
69
70 src_compile() {
71 local myconf=""
72 myconf="${myconf} `use_with snmp ucdsnmp yes`"
73 myconf="${myconf} `use_with crypt openssl yes`"
74 myconf="${myconf} `use_with perl perl yes`"
75 myconf="${myconf} `use_with tcl tcl yes`"
76 myconf="${myconf} `use_with python python yes`"
77
78 # GUI is broken
79 #use tk && use python && use !tcl && \
80 # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
81 #if use python && use tcl; then
82 # myconf="${myconf} `use_yesno tk tkinter yes`"
83 #else
84 # myconf="${myconf} `use_yesno tk tkinter no`"
85 #fi
86
87 myconf="${myconf} --without-tkinter"
88 myconf="${myconf} --with-glib --with-swig"
89 # these binaries are for root!
90 econf ${myconf} --bindir=/usr/sbin || die "econf failed"
91 emake || die "emake $i failed"
92 }
93
94 src_install() {
95 emake DESTDIR="${D}" install || die
96 dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.emulator
97 newdoc cmdlang/README README.cmdlang
98 }
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 }

  ViewVC Help
Powered by ViewVC 1.1.20