Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/spl/
Date: Wed, 14 Feb 2018 21:01:30
Message-Id: 1518642076.c9f16ab318890a57e193bf05fa79f62e49d7db85.prometheanfire@gentoo
1 commit: c9f16ab318890a57e193bf05fa79f62e49d7db85
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 14 20:51:21 2018 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 14 21:01:16 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9f16ab3
7
8 sys-kernel/spl: add stable branch for 0.7
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 sys-kernel/spl/spl-0.7.9999.ebuild | 113 +++++++++++++++++++++++++++++++++++++
13 1 file changed, 113 insertions(+)
14
15 diff --git a/sys-kernel/spl/spl-0.7.9999.ebuild b/sys-kernel/spl/spl-0.7.9999.ebuild
16 new file mode 100644
17 index 00000000000..a8d89680db2
18 --- /dev/null
19 +++ b/sys-kernel/spl/spl-0.7.9999.ebuild
20 @@ -0,0 +1,113 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI="5"
25 +
26 +if [[ ${PV} == *"9999" ]] ; then
27 + AUTOTOOLS_AUTORECONF="1"
28 + EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
29 + EGIT_BRANCH="spl-0.7-release"
30 + inherit git-r3
31 +else
32 + SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
33 + KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
34 +fi
35 +
36 +inherit flag-o-matic linux-info linux-mod autotools-utils
37 +
38 +DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
39 +HOMEPAGE="http://zfsonlinux.org/"
40 +
41 +LICENSE="GPL-2"
42 +SLOT="0"
43 +IUSE="custom-cflags debug"
44 +RESTRICT="debug? ( strip ) test"
45 +
46 +COMMON_DEPEND="
47 + dev-lang/perl
48 + virtual/awk"
49 +
50 +DEPEND="${COMMON_DEPEND}"
51 +
52 +RDEPEND="${COMMON_DEPEND}
53 + !sys-devel/spl"
54 +
55 +AT_M4DIR="config"
56 +AUTOTOOLS_IN_SOURCE_BUILD="1"
57 +DOCS=( AUTHORS DISCLAIMER README.markdown )
58 +
59 +pkg_setup() {
60 + linux-info_pkg_setup
61 + CONFIG_CHECK="
62 + !DEBUG_LOCK_ALLOC
63 + !CONFIG_REISER4_FS
64 + !GRKERNSEC_RANDSTRUCT
65 + KALLSYMS
66 + MODULES
67 + !PAX_KERNEXEC_PLUGIN_METHOD_OR
68 + ZLIB_DEFLATE
69 + ZLIB_INFLATE
70 + "
71 +
72 + use debug && CONFIG_CHECK="${CONFIG_CHECK}
73 + FRAME_POINTER
74 + DEBUG_INFO
75 + !DEBUG_INFO_REDUCED
76 + "
77 +
78 + kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
79 +
80 + [ ${PV} != *"9999" ] && \
81 + { kernel_is le 4 15 || die "Linux 4.15 is the latest supported version."; }
82 +
83 + check_extra_config
84 +}
85 +
86 +src_prepare() {
87 + # Workaround for hard coded path
88 + sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
89 + die "Cannot patch check.sh"
90 +
91 + # splat is unnecessary unless we are debugging
92 + use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
93 +
94 + # Set module revision number
95 + [ ${PV} != *"9999" ] && \
96 + { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
97 +
98 + autotools-utils_src_prepare
99 +}
100 +
101 +src_configure() {
102 + use custom-cflags || strip-flags
103 + filter-ldflags -Wl,*
104 +
105 + set_arch_to_kernel
106 + local myeconfargs=(
107 + --bindir="${EPREFIX}/bin"
108 + --sbindir="${EPREFIX}/sbin"
109 + --with-config=all
110 + --with-linux="${KV_DIR}"
111 + --with-linux-obj="${KV_OUT_DIR}"
112 + $(use_enable debug)
113 + )
114 + autotools-utils_src_configure
115 +}
116 +
117 +src_install() {
118 + autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
119 +}
120 +
121 +pkg_postinst() {
122 + linux-mod_pkg_postinst
123 +
124 + # Remove old modules
125 + if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
126 + then
127 + ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
128 + ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
129 + ewarn "Automatically removing old modules to avoid problems."
130 + rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
131 + rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
132 + fi
133 +}