/[gentoo-x86]/sys-apps/pciutils/pciutils-3.2.0.ebuild
Gentoo

Contents of /sys-apps/pciutils/pciutils-3.2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Sat Jan 18 04:55:35 2014 UTC (8 months, 1 week ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +3 -3 lines
Add arm64 love.

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

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-apps/pciutils/pciutils-3.2.0.ebuild,v 1.13 2013/09/05 09:53:58 vapier Exp $
4
5 EAPI="5"
6
7 inherit eutils multilib toolchain-funcs
8
9 DESCRIPTION="Various utilities dealing with the PCI bus"
10 HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ http://git.kernel.org/?p=utils/pciutils/pciutils.git"
11 SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux"
16 IUSE="+kmod static-libs zlib"
17
18 # Have the sub-libs in RDEPEND with [static-libs] since, logically,
19 # our libssl.a depends on libz.a/etc... at runtime.
20 LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )"
21 DEPEND="kmod? ( sys-apps/kmod )
22 static-libs? ( ${LIB_DEPEND} )
23 !static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )"
24 RDEPEND="${DEPEND}
25 sys-apps/hwids"
26 DEPEND="${DEPEND}
27 kmod? ( virtual/pkgconfig )"
28
29 src_prepare() {
30 epatch "${FILESDIR}"/${PN}-3.1.9-static-pc.patch
31
32 if use static-libs ; then
33 cp -pPR "${S}" "${S}.static" || die
34 fi
35 }
36
37 pemake() {
38 emake \
39 HOST="${CHOST}" \
40 CROSS_COMPILE="${CHOST}-" \
41 CC="$(tc-getCC)" \
42 DNS="yes" \
43 IDSDIR='$(SHAREDIR)/misc' \
44 MANDIR='$(SHAREDIR)/man' \
45 PREFIX="${EPREFIX}/usr" \
46 SHARED="yes" \
47 STRIP="" \
48 ZLIB=$(usex zlib) \
49 PCI_COMPRESSED_IDS=0 \
50 PCI_IDS=pci.ids \
51 LIBDIR="\${PREFIX}/$(get_libdir)" \
52 LIBKMOD="$(usex kmod)" \
53 "$@"
54 }
55
56 src_compile() {
57 pemake OPT="${CFLAGS}" all
58 if use static-libs ; then
59 pemake \
60 -C "${S}.static" \
61 OPT="${CFLAGS}" \
62 SHARED="no" \
63 lib/libpci.a
64 fi
65 }
66
67 src_install() {
68 pemake DESTDIR="${D}" install install-lib
69 use static-libs && dolib.a "${S}.static/lib/libpci.a"
70 dodoc ChangeLog README TODO
71
72 rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \
73 "${ED}"/usr/share/man/man8/update-pciids.8*
74
75 newinitd "${FILESDIR}"/init.d-pciparm pciparm
76 newconfd "${FILESDIR}"/conf.d-pciparm pciparm
77 }
78
79 pkg_postinst() {
80 if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then
81 elog "The 'network-cron' USE flag is gone; if you want a more up-to-date"
82 elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)."
83 fi
84 }

  ViewVC Help
Powered by ViewVC 1.1.20