Line 0
Link Here
|
|
|
1 |
musl does not define an identifier macro like __GLIBC__ or __UCLIBC |
2 |
which is right. So we make sure that we do the right thing and not assume |
3 |
defines |
4 |
|
5 |
Signed-off-by: Khem Raj <raj.khem@gmail.com> |
6 |
Upstream-Status: Pending |
7 |
|
8 |
Index: pciutils-3.2.1/lib/pread.h |
9 |
=================================================================== |
10 |
--- pciutils-3.2.1.orig/lib/pread.h 2014-04-27 03:00:31.918719246 -0700 |
Line 0
Link Here
|
|
|
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.14 2014/01/18 04:55:35 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="amd64 arm ~mips ppc x86" |
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 |
epatch "${FILESDIR}"/${PN}-3.2.0-io.patch |
32 |
epatch "${FILESDIR}"/${PN}-3.2.1-fix-pread-ifdef.patch |
33 |
|
34 |
if use static-libs ; then |
35 |
cp -pPR "${S}" "${S}.static" || die |
36 |
fi |
37 |
} |
38 |
|
39 |
pemake() { |
40 |
emake \ |
41 |
HOST="${CHOST}" \ |
42 |
CROSS_COMPILE="${CHOST}-" \ |
43 |
CC="$(tc-getCC)" \ |
44 |
DNS="yes" \ |
45 |
IDSDIR='$(SHAREDIR)/misc' \ |
46 |
MANDIR='$(SHAREDIR)/man' \ |
47 |
PREFIX="${EPREFIX}/usr" \ |
48 |
SHARED="yes" \ |
49 |
STRIP="" \ |
50 |
ZLIB=$(usex zlib) \ |
51 |
PCI_COMPRESSED_IDS=0 \ |
52 |
PCI_IDS=pci.ids \ |
53 |
LIBDIR="\${PREFIX}/$(get_libdir)" \ |
54 |
LIBKMOD="$(usex kmod)" \ |
55 |
"$@" |
56 |
} |
57 |
|
58 |
src_compile() { |
59 |
pemake OPT="${CFLAGS}" all |
60 |
if use static-libs ; then |
61 |
pemake \ |
62 |
-C "${S}.static" \ |
63 |
OPT="${CFLAGS}" \ |
64 |
SHARED="no" \ |
65 |
lib/libpci.a |
66 |
fi |
67 |
} |
68 |
|
69 |
src_install() { |
70 |
pemake DESTDIR="${D}" install install-lib |
71 |
use static-libs && dolib.a "${S}.static/lib/libpci.a" |
72 |
dodoc ChangeLog README TODO |
73 |
|
74 |
rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \ |
75 |
"${ED}"/usr/share/man/man8/update-pciids.8* |
76 |
|
77 |
newinitd "${FILESDIR}"/init.d-pciparm pciparm |
78 |
newconfd "${FILESDIR}"/conf.d-pciparm pciparm |
79 |
} |
80 |
|
81 |
pkg_postinst() { |
82 |
if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2.0 ]]; then |
83 |
elog "The 'network-cron' USE flag is gone; if you want a more up-to-date" |
84 |
elog "pci.ids file, you should use sys-apps/hwids-99999999 (live ebuild)." |
85 |
fi |
86 |
} |