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

Contents of /sys-libs/openipmi/openipmi-2.0.16-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri May 4 07:33:12 2012 UTC (7 years, 8 months ago) by jdhore
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -3 lines
dev-util/pkgconfig -> virtual/pkgconfig

(Portage version: 2.2.0_alpha101/cvs/Linux i686)

1 # Copyright 1999-2012 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.16-r1.ebuild,v 1.1 2010/10/31 21:01:50 dilfridge 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 ~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 # Bug #338499: The installed OpenIPMIpthread.pc depends on a non-existing
47 # pthread.pc. We patch it to link -lpthread directly instead.
48 epatch "${FILESDIR}/${P}-pthreads.patch"
49 # Bug #290763: The buildsys tries to compile+optimize the py file during
50 # install, when the .so might not be been added yet. We just skip the files
51 # and use python_mod_optimize ourselves later instead.
52 sed -r -i \
53 -e '/INSTALL.*\.py[oc] /d' \
54 -e '/install-exec-local/s,OpenIPMI.pyc OpenIPMI.pyo,,g' \
55 "${S}"/swig/python/Makefile.{am,in}
56
57 # Bug #298250: parallel install fix.
58 sed -r -i \
59 -e '/^install-data-local:/s,$, install-exec-am,g' \
60 "${S}"/cmdlang/Makefile.{am,in}
61
62 # We touch the .in and .am above because if we use the below, the Perl stuff
63 # is very fragile, and often fails to link.
64 #cd "${S}"
65 #elibtoolize
66 #eautoreconf
67 }
68
69 src_compile() {
70 local myconf=""
71 myconf="${myconf} `use_with snmp ucdsnmp yes`"
72 myconf="${myconf} `use_with crypt openssl yes`"
73 myconf="${myconf} `use_with perl perl yes`"
74 myconf="${myconf} `use_with tcl tcl yes`"
75 myconf="${myconf} `use_with python python yes`"
76
77 # GUI is broken
78 #use tk && use python && use !tcl && \
79 # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
80 #if use python && use tcl; then
81 # myconf="${myconf} `use_yesno tk tkinter yes`"
82 #else
83 # myconf="${myconf} `use_yesno tk tkinter no`"
84 #fi
85
86 myconf="${myconf} --without-tkinter"
87 myconf="${myconf} --with-glib --with-swig"
88 # these binaries are for root!
89 econf ${myconf} --bindir=/usr/sbin || die "econf failed"
90 emake || die "emake $i failed"
91 }
92
93 src_install() {
94 emake DESTDIR="${D}" install || die
95 dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.emulator
96 newdoc cmdlang/README README.cmdlang
97 }
98
99 pkg_postinst() {
100 use python && python_mod_optimize $(python_get_sitedir)/OpenIPMI.py
101 }
102
103 pkg_postrm() {
104 use python && python_mod_cleanup $(python_get_sitedir)/OpenIPMI.py
105 }

  ViewVC Help
Powered by ViewVC 1.1.20