Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Oleg Vinichenko
committed
Aug 26, 2013
1 parent
02a9a5b
commit 54ea5b7
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST kmod-13.tar.xz 1435864 SHA256 6c36d3abba2f98c84973ae275951c866f8bf304e7356c2fe60633800239d7956 SHA512 6182a043c32944c2dc336101e4d8a9be9ccd0106677f9f7a2e76b83a09ec2fc1333aed9b82773abe09f8adb1771e796690f1610c64b337e21bdabffe76fed434 WHIRLPOOL 95196f4c65fec778727a9b8d0209dcb08e64280b4b5d6e88b5343acb3a360b62c13a0dcf510d3c2080fad4ef1562c5e9fa11f84979d0acee03dab3fac8b3eaac | ||
DIST kmod-15.tar.xz 1453996 SHA256 e8ef0ea7e1929b46aa681fe6ce58c5e62d0026289026ebfc63abae3b8fd5ca9e SHA512 67a03cabe9d81c14eb0bef20f3c8ff4614418cb2b2c3e1428d8a57399372ecdce6e403399a578d2f62a1ae4b61c83713edd1ad1e31533ea35503c5b11b92c223 WHIRLPOOL 53249d4b29c3added90c7a9e9c2349c3964809f5a8f274b15f06008151d90f4da8c77c02a0062bf6f2ed19d176d7f16b99c82d149a906c7983aeb9f27d391744 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
inherit autotools eutils libtool multilib toolchain-funcs versionator | ||
|
||
if [[ ${PV} == 9999 ]]; then | ||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git" | ||
inherit git-2 | ||
else | ||
SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz" | ||
KEYWORDS="~*" | ||
fi | ||
|
||
DESCRIPTION="library and tools for managing linux kernel modules" | ||
HOMEPAGE="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git" | ||
|
||
LICENSE="LGPL-2" | ||
SLOT="0" | ||
IUSE="debug doc lzma static-libs +tools zlib" | ||
|
||
# Upstream does not support running the test suite with custom configure flags. | ||
# I was also told that the test suite is intended for kmod developers. | ||
# So we have to restrict it. | ||
# See bug #408915. | ||
RESTRICT="test" | ||
|
||
RDEPEND="!sys-apps/module-init-tools | ||
!sys-apps/modutils | ||
lzma? ( >=app-arch/xz-utils-5.0.4-r1 ) | ||
zlib? ( >=sys-libs/zlib-1.2.6 )" #427130 | ||
DEPEND="${RDEPEND} | ||
dev-libs/libxslt | ||
doc? ( dev-util/gtk-doc ) | ||
lzma? ( virtual/pkgconfig ) | ||
zlib? ( virtual/pkgconfig )" | ||
|
||
pkg_setup() { | ||
version_is_at_least 4.6 $(gcc-version) || \ | ||
die "At least sys-devel/gcc >= 4.6 is required to build ${CATEGORY}/${PN}." #481020 | ||
} | ||
|
||
src_prepare() { | ||
if [ ! -e configure ]; then | ||
if use doc; then | ||
gtkdocize --copy --docdir libkmod/docs || die | ||
else | ||
touch libkmod/docs/gtk-doc.make | ||
fi | ||
eautoreconf | ||
else | ||
elibtoolize | ||
fi | ||
|
||
# Restore possibility of running --enable-static wrt #472608 | ||
sed -i \ | ||
-e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \ | ||
configure || die | ||
} | ||
|
||
src_configure() { | ||
econf \ | ||
--bindir=/sbin \ | ||
--with-rootlibdir=/$(get_libdir) \ | ||
--enable-shared \ | ||
$(use_enable static-libs static) \ | ||
$(use_enable tools) \ | ||
$(use_enable debug) \ | ||
$(use_enable doc gtk-doc) \ | ||
$(use_with lzma xz) \ | ||
$(use_with zlib) | ||
} | ||
|
||
src_install() { | ||
default | ||
prune_libtool_files | ||
|
||
if use tools; then | ||
local sbincmd | ||
for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do | ||
dosym /sbin/kmod /sbin/${sbincmd} | ||
done | ||
fi | ||
|
||
cat <<-EOF > "${T}"/usb-load-ehci-first.conf | ||
softdep uhci_hcd pre: ehci_hcd | ||
softdep ohci_hcd pre: ehci_hcd | ||
EOF | ||
|
||
insinto /lib/modprobe.d | ||
doins "${T}"/usb-load-ehci-first.conf #260139 | ||
|
||
} |