diff options
author | Yuta Satoh <nigoro@gentoo.gr.jp> | 2015-08-15 09:17:25 +0900 |
---|---|---|
committer | Yuta Satoh <nigoro@gentoo.gr.jp> | 2015-08-19 20:59:34 +0900 |
commit | 04ea81a5482d728d42d14e89ea3bae4275b13959 (patch) | |
tree | 5f26f99d07677da0d10264d532ec50e540a73bb5 /sys-freebsd/freebsd-sources | |
parent | app-admin/keepass: remove old (diff) | |
download | gentoo-04ea81a5482d728d42d14e89ea3bae4275b13959.tar.gz gentoo-04ea81a5482d728d42d14e89ea3bae4275b13959.tar.bz2 gentoo-04ea81a5482d728d42d14e89ea3bae4275b13959.zip |
sys-freebsd: Bump to 10.2.
Diffstat (limited to 'sys-freebsd/freebsd-sources')
-rw-r--r-- | sys-freebsd/freebsd-sources/Manifest | 1 | ||||
-rw-r--r-- | sys-freebsd/freebsd-sources/freebsd-sources-10.2.ebuild | 154 |
2 files changed, 155 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-sources/Manifest b/sys-freebsd/freebsd-sources/Manifest index 9a9ad1cc1128..594b7ae73bb0 100644 --- a/sys-freebsd/freebsd-sources/Manifest +++ b/sys-freebsd/freebsd-sources/Manifest @@ -10,5 +10,6 @@ DIST freebsd-sources-SA-1509-ipv6.patch 872 SHA256 318babf3961a2b99ea5453a5e2b65 DIST freebsd-sources-SA-1513-tcp.patch 1083 SHA256 7ce30ae71433508c056366bdd91b62e0e6ad03bd8a1f41e71355506226a8df20 SHA512 5b76aec9844f83e1570392acef5f7336bcf12dc3582ea7ef7327c749941c6cd84d5000c482b4cfcd1d5af0a258c5b91623e4c0dd6edc010e518ee81b5e0ee2dd WHIRLPOOL ccc00d6f196d907f234fe1add9b2bc487e950ec0fa94de531762ddc10364a2491e6055f0bd587ec9e669d8a83b2d640e4e1fe125bacf475002b8efc1285e5a3b DIST freebsd-sources-SA-1515-tcp-9.3-10.1.patch 6546 SHA256 8173a1a7f28140ba9876da3bc26ad2ccf48af388e88619fafefc3e07b28fe09c SHA512 391a365098ea18815619d9fecdc452a49e1ab0546a9c0fb3666f7240539b309dcb583db5a58dbc43b729dfcaaac259effe13a00601c2771f35f3757d251b62ae WHIRLPOOL d0385a5106330a4bc374e10bca73a2678eec4adb8ba01656449004e139c370a9535960dd3d7ee4c051035fe6fc77d4bd39b4a14fd961eaed8ebb64089deace84 DIST freebsd-src-10.1.tar.xz 115049476 SHA256 f919287a5ef51d4f133f27c99c54f2e8054f408d3dd53bc60f4e233cc75ec03d SHA512 4ded32b451e2807e24a06305502f88ea633b2899a7ccd9cab3dc98fc865ef91324c93c512a08cf6e295313a8d7e79aa9d7af07da40e7276d986b06419b984152 WHIRLPOOL 1eff9419d89b8a70f064171883d92e160b250cd637972eb9107a19d7b3c904b554c4f51eaa9ff9642ef2c4234bde05cf9aef16d0c39280b55084f831700dea80 +DIST freebsd-src-10.2.tar.xz 124551336 SHA256 6a59ea716bae96135983ad70cd7123e3b35ec91b191a82fe282ade88a61560b1 SHA512 fba4588fdaa94fa4582a8de566a84cf4f2badc87c7b2e0745d7a31c1e349b2d5f59dbdbb16a9d43421155c1ac4bdec8db24c5d32ac5a92be687d4ed70fe35835 WHIRLPOOL e325db3c07118762021d802c4f20c7a5fd4b816f08cab6f92b408399f1b3bf8ad89728d51c354ab21478265a4539463c94aae9ae49f0ac10cd3c3f8f640dc186 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.2.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-10.2.ebuild new file mode 100644 index 000000000000..27e930a942f8 --- /dev/null +++ b/sys-freebsd/freebsd-sources/freebsd-sources-10.2.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2015 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" + +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/ +" +use zfs && EXTRACTONLY+="cddl/" + +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() { + # 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 +} |