mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 20:43:38 +02:00
spl: fork from gentoo so it builds
This commit is contained in:
parent
dd67fd9298
commit
a53813e863
2 changed files with 128 additions and 0 deletions
3
sys-kernel/spl/Manifest
Normal file
3
sys-kernel/spl/Manifest
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
DIST spl-0.6.3-patches-r1.tar.xz 15996 SHA256 7f1cf74c9be5c14eeff529ce0a45d7dcca33cc08e5b9e7d17fc79dd5a58719d7 SHA512 6eeee3a18466bbe8ca903910d807a3242bff0c12848d4fc6e226fe40592cd6cd9109bc5ee301867f0512b5cf2ad28eab2988e261c69fd200c5dd6eb6d8027b2c WHIRLPOOL 93578cfa435dc343edc8087a0d49aa90ddc457bf75292b0c10ce30836e00f27ea0c4768a62270a6ec559238b778ccfcde71c15740a8242f9f93c7d84934c5f72
|
||||
DIST spl-0.6.3.tar.gz 221430 SHA256 5d60dfbe86a50e65dbce17f538d8d0874a0cc293374f59eed46cd2dd1809a944 SHA512 c4b82f1e279c7581d0082c044157e8a933edf53233c8c7c8202117454cfda0473ab85fbb56ac0b6da09a4d6798e33020a9c55bf23e25d630efa3265545c3defc WHIRLPOOL eaf001a96a80264e16ce416da38b988eabbfd2fce17690151a496a3141c32e92e5d00791e2d9c009ae0cf6910f80434c10f02a700752fc664f6bf6723bb03dba
|
||||
EBUILD spl-0.6.3-r1.ebuild 3135 SHA256 8b5b1f8a613da9de841ea1fa4faa4542eca45254344973a311d50fb48fa04333 SHA512 47aa0c8b7d611fd6926fa081c415b201217687e42ac2e5e086791166d4ae7267e87b06d23d588e76c4f6304459bb6bf473d11af8dcf591ee545b6c8552ce8e90 WHIRLPOOL 7e975533965e049aeb0391d53c8036084f7c0ad6faf33c1551ad0592cca8366737415dfe34f0275b942806f33990727b0006dcd5272687a9da56742288129bc5
|
||||
125
sys-kernel/spl/spl-0.6.3-r1.ebuild
Normal file
125
sys-kernel/spl/spl-0.6.3-r1.ebuild
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.3-r1.ebuild,v 1.3 2014/12/12 07:51:56 ryao Exp $
|
||||
|
||||
EAPI="4"
|
||||
AUTOTOOLS_AUTORECONF="1"
|
||||
|
||||
inherit flag-o-matic linux-info linux-mod autotools-utils
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-2
|
||||
EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
|
||||
else
|
||||
inherit eutils versionator
|
||||
SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz
|
||||
http://dev.gentoo.org/~ryao/dist/${P}-patches-${PR}.tar.xz"
|
||||
S="${WORKDIR}/${PN}-${P}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
|
||||
HOMEPAGE="http://zfsonlinux.org/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="custom-cflags debug debug-log"
|
||||
RESTRICT="debug? ( strip ) test"
|
||||
|
||||
COMMON_DEPEND="dev-lang/perl
|
||||
virtual/awk"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!sys-devel/spl"
|
||||
|
||||
AT_M4DIR="config"
|
||||
AUTOTOOLS_IN_SOURCE_BUILD="1"
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
CONFIG_CHECK="
|
||||
!DEBUG_LOCK_ALLOC
|
||||
!GRKERNSEC_HIDESYM
|
||||
MODULES
|
||||
KALLSYMS
|
||||
!PAX_KERNEXEC_PLUGIN_METHOD_OR
|
||||
~!PAX_SIZE_OVERFLOW
|
||||
!PAX_RANDKSTACK
|
||||
ZLIB_DEFLATE
|
||||
ZLIB_INFLATE
|
||||
"
|
||||
|
||||
use debug && CONFIG_CHECK="${CONFIG_CHECK}
|
||||
FRAME_POINTER
|
||||
DEBUG_INFO
|
||||
!DEBUG_INFO_REDUCED
|
||||
"
|
||||
|
||||
kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
|
||||
|
||||
[ ${PV} != "9999" ] && \
|
||||
{ kernel_is le 3 17 || die "Linux 3.17 is the latest supported version."; }
|
||||
|
||||
check_extra_config
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Workaround for hard coded path
|
||||
sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
|
||||
die "Cannot patch check.sh"
|
||||
|
||||
if [ ${PV} != "9999" ]
|
||||
then
|
||||
# Apply patch set
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
epatch "${WORKDIR}/${P}-patches"
|
||||
fi
|
||||
|
||||
# splat is unnecessary unless we are debugging
|
||||
use debug || sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in"
|
||||
|
||||
# Set module revision number
|
||||
[ ${PV} != "9999" ] && \
|
||||
{ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
|
||||
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use custom-cflags || strip-flags
|
||||
filter-ldflags -Wl,*
|
||||
|
||||
set_arch_to_kernel
|
||||
local myeconfargs=(
|
||||
--bindir="${EPREFIX}/bin"
|
||||
--sbindir="${EPREFIX}/sbin"
|
||||
--with-config=all
|
||||
--with-linux="${KV_DIR}"
|
||||
--with-linux-obj="${KV_OUT_DIR}"
|
||||
$(use_enable debug)
|
||||
$(use_enable debug-log)
|
||||
)
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
|
||||
dodoc AUTHORS DISCLAIMER README.markdown
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
|
||||
# Remove old modules
|
||||
if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
|
||||
then
|
||||
ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
|
||||
ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
|
||||
ewarn "Automatically removing old modules to avoid problems."
|
||||
rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
|
||||
rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
|
||||
fi
|
||||
}
|
||||
Loading…
Reference in a new issue