| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsmbios/libsmbios-2.2.28.ebuild,v 1.11 2013/04/05 11:52:05 polynomial-c Exp $
|
| 4 |
|
| 5 |
EAPI=5
|
| 6 |
PYTHON_COMPAT=( python2_7 )
|
| 7 |
|
| 8 |
inherit eutils python-single-r1 flag-o-matic autotools
|
| 9 |
|
| 10 |
DESCRIPTION="Provide access to (SM)BIOS information"
|
| 11 |
HOMEPAGE="http://linux.dell.com/libsmbios/main/index.html"
|
| 12 |
SRC_URI="http://linux.dell.com/libsmbios/download/libsmbios/${P}/${P}.tar.bz2"
|
| 13 |
|
| 14 |
LICENSE="GPL-2 OSL-2.0"
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="amd64 ia64 x86"
|
| 17 |
IUSE="doc graphviz nls python static-libs test"
|
| 18 |
|
| 19 |
RDEPEND="dev-libs/libxml2
|
| 20 |
sys-libs/zlib
|
| 21 |
nls? ( virtual/libintl )
|
| 22 |
python? ( ${PYTHON_DEPS} )"
|
| 23 |
DEPEND="${RDEPEND}
|
| 24 |
virtual/pkgconfig
|
| 25 |
doc? ( app-doc/doxygen )
|
| 26 |
graphviz? ( media-gfx/graphviz )
|
| 27 |
nls? ( sys-devel/gettext )
|
| 28 |
test? ( >=dev-util/cppunit-1.9.6 )"
|
| 29 |
|
| 30 |
pkg_setup() {
|
| 31 |
use python && python-single-r1_pkg_setup
|
| 32 |
}
|
| 33 |
|
| 34 |
src_prepare() {
|
| 35 |
epatch \
|
| 36 |
"${FILESDIR}"/${PN}-2.2.28-gcc46.patch \
|
| 37 |
"${FILESDIR}"/${PN}-fix-pie.patch \
|
| 38 |
"${FILESDIR}"/${PN}-2.2.28-cppunit-tests.patch
|
| 39 |
|
| 40 |
>pkg/py-compile
|
| 41 |
|
| 42 |
# dist-lzma was removed from automake-1.12 (bug #422779)
|
| 43 |
sed 's@dist-lzma@dist-xz@' -i "${S}"/configure.ac || die
|
| 44 |
|
| 45 |
eautoreconf
|
| 46 |
}
|
| 47 |
|
| 48 |
src_configure() {
|
| 49 |
#Remove -O3 for bug #290097
|
| 50 |
replace-flags -O3 -O2
|
| 51 |
|
| 52 |
econf \
|
| 53 |
$(use_enable doc doxygen) \
|
| 54 |
$(use_enable graphviz) \
|
| 55 |
$(use_enable nls) \
|
| 56 |
$(use_enable python) \
|
| 57 |
$(use_enable static-libs static)
|
| 58 |
}
|
| 59 |
|
| 60 |
src_install() {
|
| 61 |
emake install DESTDIR="${D}"
|
| 62 |
|
| 63 |
rm -rf "${D}etc/yum"
|
| 64 |
rm -rf "${D}usr/lib/yum-plugins"
|
| 65 |
if ! use python ; then
|
| 66 |
rmdir "${D}libsmbios_c" "${D}usr/share/smbios-utils"
|
| 67 |
rm -rf "${D}etc"
|
| 68 |
else
|
| 69 |
local python_scriptroot="/usr/sbin"
|
| 70 |
python_doscript "${D}"/usr/sbin/smbios-{lcd-brightness,passwd,rbu-bios-update,sys-info,token-ctl,wakeup-ctl,wireless-ctl}
|
| 71 |
fi
|
| 72 |
|
| 73 |
insinto /usr/include/
|
| 74 |
doins -r src/include/smbios/
|
| 75 |
|
| 76 |
dodoc AUTHORS ChangeLog NEWS README TODO
|
| 77 |
|
| 78 |
use static-libs || prune_libtool_files --all
|
| 79 |
}
|