summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/freebsd-cddl')
-rw-r--r--sys-freebsd/freebsd-cddl/Manifest1
-rw-r--r--sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-add-libs.patch87
-rw-r--r--sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-workaround.patch12
-rw-r--r--sys-freebsd/freebsd-cddl/freebsd-cddl-11.0.ebuild79
4 files changed, 179 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-cddl/Manifest b/sys-freebsd/freebsd-cddl/Manifest
index 1a47a31272c..fe99dff7304 100644
--- a/sys-freebsd/freebsd-cddl/Manifest
+++ b/sys-freebsd/freebsd-cddl/Manifest
@@ -9,6 +9,7 @@ DIST freebsd-lib-9.1.tar.bz2 3206685 SHA256 f31fa8107b4de711c548f6d0c1bb1f81d09f
DIST freebsd-sbin-8.2.tar.bz2 1211665 SHA256 8b7e21a66b4696e8763d29b8b02b2d35f29fc51820a194d1e469e7cace84c527 SHA512 c6643c29ab62344c98d8991708798730ee1c17e6478071718beeaa79788300a1f4ed2e6aeb8e39e3c216877d4ed2ac85b2a9531d534f1ac5125a508927898959 WHIRLPOOL 2a21cd0f15f95d66718031680ac87f1fe73f1e1b03cb012e1db1dd1bd2fe2bb7897457a8ba2f5a28c8806775611dca542cbadec16566c47ab9efa673e2cb53f3
DIST freebsd-sbin-9.1.tar.bz2 1273913 SHA256 45008b0733b232ef03707ef5fa3e5c889e3b3728393d736bd9a869ea83be6447 SHA512 9f186602b7de96f268c352ca386986652fddf5570e7eca1afa8c0d2bdc83b57df1198efe47f36dd5c7a6abf4f9c935f1c8207a4a12a6b2153bd6c3c6292719dc WHIRLPOOL 20920dfa9607a0ce854319cef29bbd77fb1b31f6f6cfd5ac60cbd678169e43929e215743fe636d0c224443f3e6149a8f07c292d647f7f901592795ac292699f9
DIST freebsd-src-10.3.tar.xz 126900216 SHA256 f50763dcac88e9b7ec616b77d537bf338f470350e2c85e0cc7decfcc8372b54d SHA512 a0c95fc4bbc5ad7599d0a83651a497e85cd85a5c433e5e175c57480b466c9eb5aa0390804d6336da8301c75ad499484399d39b8f7efbcfda8cafb09b1aa12d8f WHIRLPOOL bf5320bc506fb73a63d0fb324b60667a196ca2fef5d0215637a657c613f2052d76d002deb205e258f6d4e2aaea15490b26679e59a102606a34b58ab1f6b755ad
+DIST freebsd-src-11.0.tar.xz 140252356 SHA256 0725a7f1d3e8985f4b2e31a2ad714334463a5016b203073a8fc196649f3d5a27 SHA512 ee1271bb38ee46fbab3d49b33f5b5afd76f9402b2e792581d63f02272df8e2a4011fac97ad550434f0c2fc5fe241940276629bde55e75f8638896a81339870cd WHIRLPOOL e1cda77189990c1d2187ab2d9e842ff3c619d8235f1ade56819fadc52f680a871de17cf05f8119614557c615ad19d41d1b6080c4b3768e7252889546b865d827
DIST freebsd-sys-8.2.tar.bz2 25835329 SHA256 0c6c7b61aae94db2931f985d5899f3bca78fc8ffab6b598fbaa158142d676f16 SHA512 6ea4516a5c52e25c4f993f7acb875463a5caea93dbdf250c5d48eee95fff226956e9f030cab7e341b5e6a132325bc3dbf93dcb4b1185acb011918e50b1a22be3 WHIRLPOOL 870deeff877c6b9fc812a4260e4fdbb6715a5dc2065cab3bfbf2a42d876f6654703ccb124275a4e2c410cef48f3db02b63cc76059eccf9cf90244826f35b7a15
DIST freebsd-sys-9.1.tar.bz2 32588103 SHA256 b93a7ac8334ac16cc9f60665048e5ef812c0a6c62f10d0b0a674aec3f56516a8 SHA512 7dc9d9e00dde8f592bb171f4386d02b655b73cb4f153fe5ec063d010a148ef0639eae0dcdb3eeb09ecd1e3653c69e49a2d261329fa6d0381d2ddabe258ddde6d WHIRLPOOL c8348344dfb14bad64bd3a78ee615ddd29203175b292233254f8ba175e7a3fb7218af6f95f7b4dbf394c0354bafe9d8bb0c21cdf0ceaeb697214964b280469b3
DIST freebsd-ubin-8.2.tar.bz2 1808012 SHA256 6b99554f3ad6ee052069b347eb6e6219b71598d7b222acb90a24cbfc805c7b68 SHA512 48d0103323e820c431aa4f62d3be40cb3b200fb62e3de01f36c88760395bf2ba3367c51f3fa72da4dbccc2812176a051a12ca5cb7e84125c3e0fc78d4cab2c29 WHIRLPOOL ea8f3a29a37b42c2b5bcc0f2c343fa1538522157ef075363c94606a4620a590e9a03f856ce2494e3e727935b62431991d0aa9fde71de699e78b4fe225bdf1c2c
diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-add-libs.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-add-libs.patch
new file mode 100644
index 00000000000..46f25217bda
--- /dev/null
+++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-add-libs.patch
@@ -0,0 +1,87 @@
+diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
+index 1e386e5..a4c08ee 100644
+--- a/cddl/sbin/zfs/Makefile
++++ b/cddl/sbin/zfs/Makefile
+@@ -22,6 +22,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+
+-LIBADD= jail nvpair uutil zfs_core zfs
++LIBADD= jail nvpair uutil zfs_core zfs umem avl
+
+ .include <bsd.prog.mk>
+diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
+index ebf0f90..c70a3c4 100644
+--- a/cddl/sbin/zpool/Makefile
++++ b/cddl/sbin/zpool/Makefile
+@@ -27,6 +27,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common
+
+-LIBADD= geom nvpair uutil zfs
++LIBADD= geom nvpair uutil zfs umem avl zfs_core
+
+ .include <bsd.prog.mk>
+diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile
+index fc68904..9af6ff2 100644
+--- a/cddl/usr.sbin/lockstat/Makefile
++++ b/cddl/usr.sbin/lockstat/Makefile
+@@ -21,6 +21,6 @@ CFLAGS+= -DNEED_ERRLOC -g
+
+ #YFLAGS+= -d
+
+-LIBADD= elf dtrace rt
++LIBADD= elf dtrace rt ctf
+
+ .include <bsd.prog.mk>
+diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile
+index 77b6139..7737efd 100644
+--- a/cddl/usr.sbin/plockstat/Makefile
++++ b/cddl/usr.sbin/plockstat/Makefile
+@@ -18,6 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
+ -I${.CURDIR}/../../../cddl/lib/libdtrace \
+ -I${.CURDIR}/../../../sys
+
+-LIBADD= dtrace proc
++LIBADD= dtrace proc ctf
+
+ .include <bsd.prog.mk>
+diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
+index 3609502..71526f7 100644
+--- a/cddl/usr.sbin/zdb/Makefile
++++ b/cddl/usr.sbin/zdb/Makefile
+@@ -24,7 +24,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
+ CFLAGS+= -I${.CURDIR}/../../lib/libumem
+
+-LIBADD= nvpair umem uutil zfs zpool
++LIBADD= nvpair umem uutil zfs zpool avl zfs_core
+
+ # Since there are many asserts in this program, it makes no sense to compile
+ # it without debugging.
+diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common
+index a545609..034d418 100644
+--- a/cddl/usr.sbin/zfsd/Makefile.common
++++ b/cddl/usr.sbin/zfsd/Makefile.common
+@@ -35,7 +35,7 @@ CXXFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
+
+ DPADD= ${LIBDEVDCTL} ${LIBZFS} ${LIBZFS_CORE} ${LIBUTIL} ${LIBGEOM} \
+ ${LIBBSDXML} ${LIBSBUF} ${LIBNVPAIR} ${LIBUUTIL}
+-LIBADD= devdctl zfs zfs_core util geom bsdxml sbuf nvpair uutil
++LIBADD= devdctl zfs zfs_core util geom bsdxml sbuf nvpair uutil umem avl
+
+ cscope:
+ find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \
+diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile
+index 02c51ac..d9b79a9 100644
+--- a/cddl/usr.sbin/zhack/Makefile
++++ b/cddl/usr.sbin/zhack/Makefile
+@@ -23,7 +23,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
+ CFLAGS+= -I${.CURDIR}/../../lib/libumem
+
+-LIBADD= nvpair zfs zpool
++LIBADD= nvpair zfs zpool umem uutil avl zfs_core
+
+ CFLAGS+= -DDEBUG=1
+ #DEBUG_FLAGS+= -g
diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-workaround.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-workaround.patch
new file mode 100644
index 00000000000..839b6b5a792
--- /dev/null
+++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-11.0-workaround.patch
@@ -0,0 +1,12 @@
+diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common
+index 6c71bdf..6b71908 100644
+--- a/cddl/usr.sbin/zfsd/Makefile.common
++++ b/cddl/usr.sbin/zfsd/Makefile.common
+@@ -31,6 +31,7 @@ INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+ INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/sys
+
+ CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
++CXXFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
+
+ DPADD= ${LIBDEVDCTL} ${LIBZFS} ${LIBZFS_CORE} ${LIBUTIL} ${LIBGEOM} \
+ ${LIBBSDXML} ${LIBSBUF} ${LIBNVPAIR} ${LIBUUTIL}
diff --git a/sys-freebsd/freebsd-cddl/freebsd-cddl-11.0.ebuild b/sys-freebsd/freebsd-cddl/freebsd-cddl-11.0.ebuild
new file mode 100644
index 00000000000..2efbb35d9d5
--- /dev/null
+++ b/sys-freebsd/freebsd-cddl/freebsd-cddl-11.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bsdmk freebsd toolchain-funcs multilib
+
+DESCRIPTION="FreeBSD CDDL (opensolaris/zfs) extra software"
+SLOT="0"
+
+IUSE="build"
+LICENSE="CDDL GPL-2"
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~x86-fbsd"
+fi
+
+# sys is required.
+EXTRACTONLY="
+ cddl/
+ contrib/
+ usr.bin/
+ lib/
+ sbin/
+ sys/
+"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ =sys-freebsd/freebsd-libexec-${RV}*
+ build? ( sys-apps/baselayout )"
+
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )"
+
+S="${WORKDIR}/cddl"
+
+PATCHES=( "${FILESDIR}/${PN}-11.0-workaround.patch"
+ "${FILESDIR}/${PN}-11.0-add-libs.patch" )
+
+pkg_setup() {
+ # Add the required source files.
+ use build && EXTRACTONLY+="include/ "
+ [[ $(tc-getCXX) != *clang++* ]] && REMOVE_SUBDIRS="usr.sbin/zfsd"
+}
+
+src_prepare() {
+ if [[ ! -e "${WORKDIR}/include" ]]; then
+ # Link in include headers.
+ ln -s "/usr/include" "${WORKDIR}/include" || die "Symlinking /usr/include.."
+ fi
+ for d in libavl libctf libdtrace libnvpair libumem libuutil libzfs libzfs_core libzpool; do
+ LDFLAGS="${LDFLAGS} -L${S}/lib/${d}"
+ done
+}
+
+src_compile() {
+ cd "${S}"/lib || die
+ freebsd_src_compile
+ cd "${S}" || die
+ freebsd_src_compile
+}
+
+src_install() {
+ # Install libraries proper place
+ local mylibdir=$(get_libdir)
+ freebsd_src_install SHLIBDIR="/usr/${mylibdir}" LIBDIR="/usr/${mylibdir}"
+
+ gen_usr_ldscript -a avl nvpair umem uutil zfs zpool zfs_core
+
+ # Install zfs volinit script.
+ newinitd "${FILESDIR}"/zvol.initd-9.0 zvol
+
+ # Install zfs script
+ newinitd "${FILESDIR}"/zfs.initd zfs
+
+ keepdir /etc/zfs
+}