summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta Satoh <nigoro.dev@gmail.com>2016-04-04 20:55:25 +0900
committerYuta Satoh <nigoro.dev@gmail.com>2016-04-04 20:55:25 +0900
commit0eed712cb3a85182d9f34475fe7fd2bddf175578 (patch)
treeceb71b0a5d7c342d093713d75ec89c81e387becc /sys-freebsd/freebsd-sources
parentnet-libs/libinfinity: purge old per security bug 550126 (diff)
downloadgentoo-0eed712cb3a85182d9f34475fe7fd2bddf175578.tar.gz
gentoo-0eed712cb3a85182d9f34475fe7fd2bddf175578.tar.bz2
gentoo-0eed712cb3a85182d9f34475fe7fd2bddf175578.zip
sys-freebsd: Bump to 10.3.
Diffstat (limited to 'sys-freebsd/freebsd-sources')
-rw-r--r--sys-freebsd/freebsd-sources/Manifest1
-rw-r--r--sys-freebsd/freebsd-sources/freebsd-sources-10.3.ebuild157
2 files changed, 158 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-sources/Manifest b/sys-freebsd/freebsd-sources/Manifest
index fcabede5e7bc..aaf28815b15c 100644
--- a/sys-freebsd/freebsd-sources/Manifest
+++ b/sys-freebsd/freebsd-sources/Manifest
@@ -12,5 +12,6 @@ DIST freebsd-sources-SA-1605-tcp.patch 972 SHA256 171e3029d5ae440da75b4ab5fdc986
DIST freebsd-sources-SA-1610-linux.patch 2505 SHA256 f631e54826aabe472598edc4faa5ad5ae6fcd2547b0863dc25c985937b40736b SHA512 02dfe342be51ff195ccdad10ec7c34bfb38adcb2c6be4a33bcf5e4806774ca82953145c2f5a12711fed61d96f04e45804608edf90df0ae79f9a717e27b755196 WHIRLPOOL 3510a824f4f2189fc777a0a57fd0af17a49c328950b52097d1a95baeed72cd66ff32fe200d5380b75f9648b535eb7df7ecd64617cf67b925389a455cf1c6a13f
DIST freebsd-sources-SA-1615-sysarch.patch 357 SHA256 7aa818a4c9e050330efd15303cec508c0e21b660ddad8257bcc4d721c8e12791 SHA512 0df22336f2f7004a3ec6ac4b5fb925f38e54bb8a133e5a821dacf7800d7962e03b859b9211d01b36f254d9ceaca8ca8ee3846eac30194ad17ca51f8b05c94f9c WHIRLPOOL c744555cedb347175c970059754c9ee6c7ac5dec2318a8b6d767d38b5b0f034296fe48b5619b439b8eab0c1aa9b5b0c6943c0d086e3b91e3fcc1717d547c6c49
DIST freebsd-src-10.2.tar.xz 124551336 SHA256 6a59ea716bae96135983ad70cd7123e3b35ec91b191a82fe282ade88a61560b1 SHA512 fba4588fdaa94fa4582a8de566a84cf4f2badc87c7b2e0745d7a31c1e349b2d5f59dbdbb16a9d43421155c1ac4bdec8db24c5d32ac5a92be687d4ed70fe35835 WHIRLPOOL e325db3c07118762021d802c4f20c7a5fd4b816f08cab6f92b408399f1b3bf8ad89728d51c354ab21478265a4539463c94aae9ae49f0ac10cd3c3f8f640dc186
+DIST freebsd-src-10.3.tar.xz 126900216 SHA256 f50763dcac88e9b7ec616b77d537bf338f470350e2c85e0cc7decfcc8372b54d SHA512 a0c95fc4bbc5ad7599d0a83651a497e85cd85a5c433e5e175c57480b466c9eb5aa0390804d6336da8301c75ad499484399d39b8f7efbcfda8cafb09b1aa12d8f WHIRLPOOL bf5320bc506fb73a63d0fb324b60667a196ca2fef5d0215637a657c613f2052d76d002deb205e258f6d4e2aaea15490b26679e59a102606a34b58ab1f6b755ad
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
diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-10.3.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-10.3.ebuild
new file mode 100644
index 000000000000..073893e014d2
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/freebsd-sources-10.3.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bsdmk freebsd flag-o-matic toolchain-funcs
+
+DESCRIPTION="FreeBSD kernel sources"
+SLOT="0"
+LICENSE="BSD zfs? ( CDDL )"
+
+IUSE="+build-kernel debug dtrace zfs"
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+ SRC_URI="${SRC_URI}
+ $(freebsd_upstream_patches)"
+fi
+
+EXTRACTONLY="
+ sys/
+ contrib/bmake/
+ usr.bin/bmake/
+"
+
+RDEPEND="dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 )
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ !sys-freebsd/virtio-kmod
+ !sys-fs/fuse4bsd
+ !<sys-freebsd/freebsd-sources-9.2_beta1"
+DEPEND="build-kernel? (
+ dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 )
+ >=sys-freebsd/freebsd-usbin-9.1
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ )"
+
+RESTRICT="strip binchecks"
+
+S="${WORKDIR}/sys"
+
+KERN_BUILD=GENTOO
+
+PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch"
+ "${FILESDIR}/${PN}-10.0-gentoo.patch"
+ "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
+ "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
+ "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch"
+ "${FILESDIR}/${PN}-7.1-includes.patch"
+ "${FILESDIR}/${PN}-9.0-sysctluint.patch"
+ "${FILESDIR}/${PN}-9.2-gentoo-gcc.patch"
+ "${FILESDIR}/${PN}-10.1-gcc48.patch" )
+
+pkg_setup() {
+ # Add the required source files.
+ use zfs && EXTRACTONLY+="cddl/ "
+
+ # WITHOUT_SSP= is required to boot kernel that compiled with newer gcc, bug #477914
+ [[ $(tc-getCC) == *gcc* ]] && mymakeopts="${mymakeopts} WITHOUT_SSP="
+ use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL="
+}
+
+src_prepare() {
+ local conf="${S}/$(tc-arch-kernel)/conf/${KERN_BUILD}"
+
+ # This replaces the gentoover patch, it doesn't need reapply every time.
+ sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
+ -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
+ -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
+ "${S}/conf/newvers.sh"
+
+ # __FreeBSD_cc_version comes from FreeBSD's gcc.
+ # on 10.0-RELEASE it's 1000001.
+ # FYI, can get it from gnu/usr.bin/cc/cc_tools/freebsd-native.h.
+ sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=1000001:g" \
+ -i "${S}/conf/kern.pre.mk" \
+ -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version"
+
+ # Remove -Werror
+ sed -e "s:-Werror:-Wno-error:g" \
+ -i "${S}/conf/kern.pre.mk" \
+ -i "${S}/conf/kmod.mk" || die
+
+ # Set the kernel configuration using USE flags.
+ cp -f "${FILESDIR}/config-GENTOO" "${conf}" || die
+ use debug || echo 'nomakeoptions DEBUG' >> "${conf}"
+ use dtrace || echo 'nomakeoptions WITH_CTF' >> "${conf}"
+
+ # Only used with USE=build-kernel, let the kernel build with its own flags, its safer.
+ unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL
+}
+
+src_configure() {
+ if use build-kernel ; then
+ tc-export CC
+ cd "${S}/$(tc-arch-kernel)/conf" || die
+ config ${KERN_BUILD} || die
+ fi
+}
+
+src_compile() {
+ if use build-kernel ; then
+ if has_version "<sys-freebsd/freebsd-ubin-10.0"; then
+ cd "${WORKDIR}"/usr.bin/bmake || die
+ CC=${CHOST}-gcc freebsd_src_compile
+ export BMAKE="${WORKDIR}/usr.bin/bmake/make"
+ fi
+ cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die
+ freebsd_src_compile depend
+ freebsd_src_compile
+ else
+ einfo "Nothing to compile.."
+ fi
+}
+
+src_install() {
+ if use build-kernel ; then
+ cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die
+ freebsd_src_install
+ rm -rf "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}"
+ cd "${S}"
+ fi
+
+ insinto "/usr/src/sys"
+ doins -r "${S}/".
+ if use zfs ; then
+ insinto "/usr/src/cddl"
+ doins -r "${WORKDIR}/cddl/".
+ fi
+}
+
+pkg_preinst() {
+ if [[ -L "${ROOT}/usr/src/sys" ]]; then
+ einfo "/usr/src/sys is a symlink, removing it..."
+ rm -f "${ROOT}/usr/src/sys"
+ fi
+
+ if use sparc-fbsd ; then
+ ewarn "WARNING: kldload currently causes kernel panics"
+ ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
+ ewarn "we need gcc-4.1 to compile the kernel correctly :/"
+ ewarn "Please compile all modules you need into the kernel"
+ fi
+
+ ewarn "If you want manual compile (not recommended), please don't forget the following step."
+ if ! use sparc-fbsd ; then
+ ewarn "export CC=clang"
+ ewarn "export CXX=clang++"
+ fi
+ if ! use zfs ; then
+ ewarn "export WITHOUT_CDDL="
+ ewarn "Note, Please set USE=zfs if you want to enable modules of CDDL license."
+ fi
+ if ! use dtrace && ! has_version '>=sys-freebsd/freebsd-cddl-9.2_beta1' ; then
+ ewarn "GENERIC config require sys-freebsd/freebsd-cddl. Please emerge it."
+ fi
+}