Lines 4-10
Link Here
|
4 |
|
4 |
|
5 |
EAPI="5" |
5 |
EAPI="5" |
6 |
|
6 |
|
7 |
inherit eutils multilib toolchain-funcs |
7 |
inherit eutils multilib toolchain-funcs multilib-minimal |
8 |
|
8 |
|
9 |
DESCRIPTION="Various utilities dealing with the PCI bus" |
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" |
10 |
HOMEPAGE="http://mj.ucw.cz/sw/pciutils/ http://git.kernel.org/?p=utils/pciutils/pciutils.git" |
Lines 17-32
Link Here
|
17 |
|
17 |
|
18 |
# Have the sub-libs in RDEPEND with [static-libs] since, logically, |
18 |
# Have the sub-libs in RDEPEND with [static-libs] since, logically, |
19 |
# our libssl.a depends on libz.a/etc... at runtime. |
19 |
# our libssl.a depends on libz.a/etc... at runtime. |
20 |
LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )" |
20 |
LIB_DEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+),${MULTILIB_USEDEP}] )" |
21 |
DEPEND="kmod? ( sys-apps/kmod ) |
21 |
DEPEND="kmod? ( sys-apps/kmod ) |
22 |
static-libs? ( ${LIB_DEPEND} ) |
22 |
static-libs? ( ${LIB_DEPEND} ) |
23 |
!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} ) |
23 |
!static-libs? ( ${LIB_DEPEND//static-libs(+),} ) |
24 |
udev? ( virtual/libudev )" |
24 |
udev? ( >=virtual/libudev-208[${MULTILIB_USEDEP}] )" |
25 |
RDEPEND="${DEPEND} |
25 |
RDEPEND="${DEPEND} |
26 |
sys-apps/hwids" |
26 |
sys-apps/hwids" |
27 |
DEPEND="${DEPEND} |
27 |
DEPEND="${DEPEND} |
28 |
kmod? ( virtual/pkgconfig )" |
28 |
kmod? ( virtual/pkgconfig )" |
29 |
|
29 |
|
|
|
30 |
MULTILIB_WRAPPED_HEADERS=( /usr/include/pci/config.h ) |
31 |
|
30 |
switch_config() { |
32 |
switch_config() { |
31 |
[[ $# -ne 2 ]] && return 1 |
33 |
[[ $# -ne 2 ]] && return 1 |
32 |
local opt=$1 val=$2 |
34 |
local opt=$1 val=$2 |
Lines 40-46
Link Here
|
40 |
|
42 |
|
41 |
if use static-libs ; then |
43 |
if use static-libs ; then |
42 |
cp -pPR "${S}" "${S}.static" || die |
44 |
cp -pPR "${S}" "${S}.static" || die |
|
|
45 |
mv "${S}.static" "${S}/static" || die |
43 |
fi |
46 |
fi |
|
|
47 |
|
48 |
multilib_copy_sources |
44 |
} |
49 |
} |
45 |
|
50 |
|
46 |
pemake() { |
51 |
pemake() { |
Lines 48-53
Link Here
|
48 |
HOST="${CHOST}" \ |
53 |
HOST="${CHOST}" \ |
49 |
CROSS_COMPILE="${CHOST}-" \ |
54 |
CROSS_COMPILE="${CHOST}-" \ |
50 |
CC="$(tc-getCC)" \ |
55 |
CC="$(tc-getCC)" \ |
|
|
56 |
AR="$(tc-getAR)" \ |
57 |
RANLIB="$(tc-getRANLIB)" \ |
51 |
DNS=$(usex dns) \ |
58 |
DNS=$(usex dns) \ |
52 |
IDSDIR='$(SHAREDIR)/misc' \ |
59 |
IDSDIR='$(SHAREDIR)/misc' \ |
53 |
MANDIR='$(SHAREDIR)/man' \ |
60 |
MANDIR='$(SHAREDIR)/man' \ |
Lines 58-82
Link Here
|
58 |
PCI_COMPRESSED_IDS=0 \ |
65 |
PCI_COMPRESSED_IDS=0 \ |
59 |
PCI_IDS=pci.ids \ |
66 |
PCI_IDS=pci.ids \ |
60 |
LIBDIR="\${PREFIX}/$(get_libdir)" \ |
67 |
LIBDIR="\${PREFIX}/$(get_libdir)" \ |
61 |
LIBKMOD=$(usex kmod) \ |
68 |
LIBKMOD=$(multilib_native_usex kmod) \ |
62 |
HWDB=$(usex udev) \ |
69 |
HWDB=$(usex udev) \ |
63 |
"$@" |
70 |
"$@" |
64 |
} |
71 |
} |
65 |
|
72 |
|
66 |
src_compile() { |
73 |
multilib_src_compile() { |
67 |
pemake OPT="${CFLAGS}" all |
74 |
pemake OPT="${CFLAGS}" all |
68 |
if use static-libs ; then |
75 |
if use static-libs ; then |
69 |
pemake \ |
76 |
pemake \ |
70 |
-C "${S}.static" \ |
77 |
-C "${BUILD_DIR}/static" \ |
71 |
OPT="${CFLAGS}" \ |
78 |
OPT="${CFLAGS}" \ |
72 |
SHARED="no" \ |
79 |
SHARED="no" \ |
73 |
lib/libpci.a |
80 |
lib/libpci.a |
74 |
fi |
81 |
fi |
75 |
} |
82 |
} |
76 |
|
83 |
|
77 |
src_install() { |
84 |
multilib_src_install() { |
78 |
pemake DESTDIR="${D}" install install-lib |
85 |
pemake DESTDIR="${D}" install install-lib |
79 |
use static-libs && dolib.a "${S}.static/lib/libpci.a" |
86 |
use static-libs && dolib.a "${BUILD_DIR}/static/lib/libpci.a" |
|
|
87 |
} |
88 |
|
89 |
multilib_src_install_all() { |
80 |
dodoc ChangeLog README TODO |
90 |
dodoc ChangeLog README TODO |
81 |
|
91 |
|
82 |
rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \ |
92 |
rm "${ED}"/usr/sbin/update-pciids "${ED}"/usr/share/misc/pci.ids \ |