diff options
author | 2016-09-28 21:23:34 +0900 | |
---|---|---|
committer | 2016-09-28 21:23:34 +0900 | |
commit | 6eafa0eea6cf020bdb7a44c4b7295eade87cf2c4 (patch) | |
tree | 7fc73ed00d9af82ee5a8604f64647557997c40aa | |
parent | eclass/freebsd.eclass: add Gentoo/FreeBSD 11.0 support. (diff) | |
download | gentoo-bsd-6eafa0eea6cf020bdb7a44c4b7295eade87cf2c4.tar.gz gentoo-bsd-6eafa0eea6cf020bdb7a44c4b7295eade87cf2c4.tar.bz2 gentoo-bsd-6eafa0eea6cf020bdb7a44c4b7295eade87cf2c4.zip |
sys-freebsd: initial version of 11.0
31 files changed, 955 insertions, 88 deletions
diff --git a/sys-freebsd/boot0/boot0-11.0.ebuild b/sys-freebsd/boot0/boot0-11.0.ebuild index 49521d0..01d8eb7 100644 --- a/sys-freebsd/boot0/boot0-11.0.ebuild +++ b/sys-freebsd/boot0/boot0-11.0.ebuild @@ -23,15 +23,12 @@ EXTRACTONLY=" RDEPEND="" DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* - =sys-freebsd/freebsd-lib-${RV}*" + =sys-freebsd/freebsd-lib-${RV}* + !sparc-fbsd? ( sys-devel/clang )" S="${WORKDIR}/sys/boot" -PATCHES=( "${FILESDIR}/${PN}-10.1-gcc46.patch" - "${FILESDIR}/${PN}-10.3-clang.patch" - "${FILESDIR}/${PN}-10.3-drop-unsupport-cflags.patch" - "${FILESDIR}/${PN}-10.3-uefi-support.patch" - "${FILESDIR}/${PN}-add-nossp-cflags.patch" ) +PATCHES=( "${FILESDIR}/${PN}-add-nossp-cflags.patch" ) boot0_use_enable() { use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\"" @@ -46,12 +43,15 @@ pkg_setup() { } src_prepare() { + use sparc-fbsd || export CC=clang + sed -e '/-mno-align-long-strings/d' \ -i "${S}"/i386/boot2/Makefile \ -i "${S}"/i386/gptboot/Makefile \ -i "${S}"/i386/gptzfsboot/Makefile \ -i "${S}"/i386/zfsboot/Makefile || die + mymakeopts="${mymakeopts} LOADER_NO_GELI_SUPPORT=yes" export MAKEOBJDIRPREFIX="${WORKDIR}/build" } @@ -63,7 +63,7 @@ src_compile() { freebsd_src_compile CFLAGS="${CFLAGS} -I${WORKDIR}/lib/libstand" - LDFLAGS="${LDFLAGS} -L${WORKDIR}/lib/libstand" + LDFLAGS="${LDFLAGS} -L${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libstand" export LIBSTAND="${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libstand/libstand.a" cd "${S}" || die diff --git a/sys-freebsd/freebsd-bin/freebsd-bin-11.0.ebuild b/sys-freebsd/freebsd-bin/freebsd-bin-11.0.ebuild index d4bf7e3..de7d832 100644 --- a/sys-freebsd/freebsd-bin/freebsd-bin-11.0.ebuild +++ b/sys-freebsd/freebsd-bin/freebsd-bin-11.0.ebuild @@ -40,3 +40,8 @@ REMOVE_SUBDIRS="csh rmail ed freebsd-version" pkg_setup() { mymakeopts="${mymakeopts} WITHOUT_TCSH= WITHOUT_SENDMAIL= WITHOUT_RCMDS= " } + +src_install() { + dodir /usr/bin + freebsd_src_install +} 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 0000000..46f2521 --- /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 0000000..839b6b5 --- /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 index afc5c8d..b6d18cf 100644 --- a/sys-freebsd/freebsd-cddl/freebsd-cddl-11.0.ebuild +++ b/sys-freebsd/freebsd-cddl/freebsd-cddl-11.0.ebuild @@ -36,14 +36,13 @@ DEPEND="${RDEPEND} S="${WORKDIR}/cddl" -PATCHES=( - "${FILESDIR}/${PN}-10.2-libpaths.patch" - "${FILESDIR}/${PN}-10.3-underlink.patch" - ) +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() { @@ -51,11 +50,16 @@ src_prepare() { # 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() { - # Disable parallel make. - freebsd_src_compile -j1 + cd ${S}/lib || die + freebsd_src_compile + cd ${S} || die + freebsd_src_compile } src_install() { diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-bsdxml2expat.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-bsdxml2expat.patch new file mode 100644 index 0000000..41a394b --- /dev/null +++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-bsdxml2expat.patch @@ -0,0 +1,39 @@ +diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c +index 9dedb8e..d96420c 100644 +--- a/lib/libgeom/geom_xml2tree.c ++++ b/lib/libgeom/geom_xml2tree.c +@@ -43,7 +43,7 @@ + #include <sys/sbuf.h> + #include <sys/sysctl.h> + #include <err.h> +-#include <bsdxml.h> ++#include <expat.h> + #include <libgeom.h> + + struct mystate { +diff --git a/lib/libmt/mtlib.c b/lib/libmt/mtlib.c +index d1fc0b1..89ac55e 100644 +--- a/lib/libmt/mtlib.c ++++ b/lib/libmt/mtlib.c +@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD: stable/10/lib/libmt/mtlib.c 280438 2015-03-24 14:36:10Z ken + #include <unistd.h> + #include <stdint.h> + #include <errno.h> +-#include <bsdxml.h> ++#include <expat.h> + #include <mtlib.h> + + /* +diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c +index c500d3f..fe1d37e 100644 +--- a/lib/lib80211/lib80211_regdomain.c ++++ b/lib/lib80211/lib80211_regdomain.c +@@ -40,7 +40,7 @@ static const char rcsid[] = "$FreeBSD: stable/11/lib/lib80211/lib80211_regdomain + #include <err.h> + #include <unistd.h> + +-#include <bsdxml.h> ++#include <expat.h> + + #include "lib80211_regdomain.h" + diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-liblink.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-liblink.patch new file mode 100644 index 0000000..da495e4 --- /dev/null +++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-liblink.patch @@ -0,0 +1,62 @@ +diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile +index 2dedf11..275f4c3 100644 +--- a/lib/libproc/Makefile ++++ b/lib/libproc/Makefile +@@ -15,6 +15,7 @@ SRCS= proc_bkpt.c \ + INCS= libproc.h + + CFLAGS+= -I${.CURDIR} ++CFLAGS+= -I${.CURDIR}/../libelf + + .if ${MK_CXX} == "no" + CFLAGS+= -DNO_CXA_DEMANGLE +@@ -28,6 +29,9 @@ LIBADD+= elf rtld_db util + + .if ${MK_CDDL} != "no" + LIBADD+= ctf ++LDADD+= -lelf ++LDFLAGS+= -L${.OBJDIR}/../libelf ++ + IGNORE_PRAGMA= YES + CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \ + -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \ +diff --git a/lib/libprocstat/Makefile b/lib/libprocstat/Makefile +index 1829883..d0065a3 100644 +--- a/lib/libprocstat/Makefile ++++ b/lib/libprocstat/Makefile +@@ -17,6 +17,8 @@ VERSION_DEF= ${.CURDIR}/Versions.def + SYMBOL_MAPS= ${.CURDIR}/Symbol.map + + INCS= libprocstat.h ++CFLAGS+= -I${.CURDIR}/../libelf ++LDFLAGS+= -L${.OBJDIR}/../libelf + CFLAGS+= -I. -I${.CURDIR} -D_KVM_VNODE + SHLIB_MAJOR= 1 + +diff --git a/lib/librtld_db/Makefile b/lib/librtld_db/Makefile +index 0a8ed95..11baf5b 100644 +--- a/lib/librtld_db/Makefile ++++ b/lib/librtld_db/Makefile +@@ -11,6 +11,9 @@ SRCS= rtld_db.c + INCS= rtld_db.h + + CFLAGS+= -I${.CURDIR} ++CFLAGS+= -I${.CURDIR}/../libelf ++LDADD+= -lutil -lproc ++LDFLAGS+= -L${.OBJDIR}/../libutil -L${.OBJDIR}/../libproc + # Avoid circular dependency, we only need the libproc.h header here. + CFLAGS+= -I${.CURDIR:H}/libproc + +diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile +index f84aee3..c36ade9 100644 +--- a/lib/libtelnet/Makefile ++++ b/lib/libtelnet/Makefile +@@ -14,6 +14,8 @@ INTERNALLIB= + SRCS= genget.c getent.c misc.c + CFLAGS+= -I${TELNETDIR} + ++CFLAGS+= -I${.CURDIR}/../libmp ++ + WARNS?= 2 + + .if ${MK_OPENSSL} != "no" diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-libproc-libcxx.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-libproc-libcxx.patch new file mode 100644 index 0000000..013ad20 --- /dev/null +++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-libproc-libcxx.patch @@ -0,0 +1,13 @@ +diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile +index e3b2578..acd76e8 100644 +--- a/lib/libproc/Makefile ++++ b/lib/libproc/Makefile +@@ -18,7 +18,7 @@ CFLAGS+= -I${.CURDIR} + + .if ${MK_CXX} == "no" + CFLAGS+= -DNO_CXA_DEMANGLE +-.elif ${MK_LIBCPLUSPLUS} != "no" ++.elif ${COMPILER_TYPE} == "clang" + LIBADD+= cxxrt + .else + LIBADD+= supcplusplus diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-libsysdecode.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-libsysdecode.patch new file mode 100644 index 0000000..d90aa31 --- /dev/null +++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-libsysdecode.patch @@ -0,0 +1,22 @@ +diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile +index e3bfe00..51fc5f0 100644 +--- a/lib/libsysdecode/Makefile ++++ b/lib/libsysdecode/Makefile +@@ -8,7 +8,7 @@ LIB= sysdecode + SRCS= errno.c ioctl.c syscallnames.c utrace.c + INCS= sysdecode.h + +-CFLAGS+= -I${.CURDIR}/../../sys ++CFLAGS+= -I${.CURDIR}/../../sys -I${.CURDIR} + + MAN+= sysdecode.3 \ + sysdecode_abi_to_freebsd_errno.3 \ +@@ -37,7 +37,7 @@ CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} + + ioctl.c: mkioctls + env MACHINE=${MACHINE} CPP="${CPP}" \ +- /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET} ++ /bin/sh ${.CURDIR}/mkioctls ${.CURDIR}/../../include > ${.TARGET} + + beforedepend: ioctl.c + diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-workaround.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-workaround.patch new file mode 100644 index 0000000..05f817e --- /dev/null +++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-11.0-workaround.patch @@ -0,0 +1,12 @@ +diff --git a/lib/libdevdctl/event.cc b/lib/libdevdctl/event.cc +index a8cb447..d56df2e 100644 +--- a/lib/libdevdctl/event.cc ++++ b/lib/libdevdctl/event.cc +@@ -50,6 +50,7 @@ + #include <syslog.h> + #include <unistd.h> + ++#include <cstdio> + #include <cstdarg> + #include <cstring> + #include <iostream> diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-11.0.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-11.0.ebuild index ed4d9a8..9ca30a1 100644 --- a/sys-freebsd/freebsd-lib/freebsd-lib-11.0.ebuild +++ b/sys-freebsd/freebsd-lib/freebsd-lib-11.0.ebuild @@ -11,7 +11,7 @@ SLOT="0" LICENSE="BSD zfs? ( CDDL )" # Security Advisory and Errata patches. -UPSTREAM_PATCHES=( "EN-16:06/libc.patch" ) +# UPSTREAM_PATCHES=() # Crypto is needed to have an internal OpenSSL header # sys is needed for libalias, probably we can just extract that instead of @@ -50,7 +50,7 @@ if [ "${CATEGORY#*cross-}" = "${CATEGORY}" ]; then !sys-freebsd/freebsd-headers" DEPEND="${RDEPEND} >=sys-devel/flex-2.5.31-r2 - >=sys-freebsd/freebsd-sources-10.3-r5" + =sys-freebsd/freebsd-sources-${RV}*" RDEPEND="${RDEPEND} =sys-freebsd/freebsd-share-${RV}* >=virtual/libiconv-0-r2" @@ -107,15 +107,12 @@ pkg_setup() { PATCHES=( "${FILESDIR}/${PN}-6.0-pmc.patch" - "${FILESDIR}/${PN}-6.1-csu.patch" - "${FILESDIR}/${PN}-10.0-liblink.patch" - "${FILESDIR}/${PN}-10.2-liblink.patch" "${FILESDIR}/${PN}-10.0-atfcxx.patch" - "${FILESDIR}/${PN}-10.3-libusb.patch" - "${FILESDIR}/${PN}-10.0-libproc-libcxx.patch" - "${FILESDIR}/${PN}-10.2-bsdxml2expat.patch" "${FILESDIR}/${PN}-9.0-bluetooth.patch" - "${FILESDIR}/${PN}-9.1-.eh_frame_hdr-fix.patch" + "${FILESDIR}/${PN}-11.0-workaround.patch" + "${FILESDIR}/${PN}-11.0-bsdxml2expat.patch" + "${FILESDIR}/${PN}-11.0-libsysdecode.patch" + "${FILESDIR}/${PN}-11.0-libproc-libcxx.patch" "${FILESDIR}/${PN}-add-nossp-cflags.patch" ) # Here we disable and remove source which we don't need or want @@ -170,8 +167,6 @@ src_prepare() { # patches "${WORKDIR}/include" cd "${WORKDIR}" epatch "${FILESDIR}/${PN}-includes.patch" - epatch "${FILESDIR}/${PN}-8.0-gcc45.patch" - epatch "${FILESDIR}/${PN}-9.0-opieincludes.patch" # Don't install the hesiod man page or header rm "${WORKDIR}"/include/hesiod.h || die @@ -187,8 +182,7 @@ src_prepare() { done # Call LD with LDFLAGS, rename them to RAW_LDFLAGS sed -e 's/LDFLAGS/RAW_LDFLAGS/g' \ - -i "${S}/csu/i386-elf/Makefile" \ - -i "${S}/csu/ia64/Makefile" || die + -i "${S}/csu/i386/Makefile" || die if install --version 2> /dev/null | grep -q GNU; then sed -i.bak -e 's:${INSTALL} -C:${INSTALL}:' "${WORKDIR}/include/Makefile" @@ -258,7 +252,6 @@ bootstrap_csu() { # Compile libssp_nonshared.a and add it's path to LDFLAGS. bootstrap_libssp_nonshared() { bootstrap_lib "gnu/lib/libssp/libssp_nonshared" - export LDADD="-lssp_nonshared" } bootstrap_libgcc() { @@ -329,6 +322,7 @@ do_bootstrap() { mkdir "${WORKDIR}/include_proper_${ABI}" || die CTARGET="${CHOST}" install_includes "/include_proper_${ABI}" CFLAGS="${CFLAGS} -isystem ${WORKDIR}/include_proper_${ABI}" + [[ $(tc-getCXX) = *clang++* ]] && CXXFLAGS="${CXXFLAGS} -isystem /usr/include/c++/v1" CXXFLAGS="${CXXFLAGS} -isystem ${WORKDIR}/include_proper_${ABI}" mymakeopts="${mymakeopts} RPCDIR=${WORKDIR}/include_proper_${ABI}/rpcsvc" fi @@ -347,6 +341,7 @@ do_compile() { do_bootstrap else CFLAGS="${CFLAGS} -isystem /usr/include" + [[ $(tc-getCXX) = *clang++* ]] && CXXFLAGS="${CXXFLAGS} -isystem /usr/include/c++/v1" CXXFLAGS="${CXXFLAGS} -isystem /usr/include" fi @@ -371,7 +366,7 @@ src_compile() { use usb && export NON_NATIVE_SUBDIRS="${NON_NATIVE_SUBDIRS} lib/libusb lib/libusbhid" cd "${WORKDIR}/include" - $(freebsd_get_bmake) CC="$(tc-getCC)" || die "make include failed" + $(freebsd_get_bmake) CC="$(tc-getCC)" SRCTOP="${WORKDIR}" || die "make include failed" use crosscompile_opts_headers-only && return 0 @@ -632,16 +627,18 @@ install_includes() DESTDIR="${DESTDIR}" \ INCLUDEDIR="${INCLUDEDIR}" BINOWN="${BINOWN}" \ BINGRP="${BINGRP}" \ - WITHOUT_GSSAPI= || die "install_includes() failed" + WITHOUT_GSSAPI= \ + SRCTOP="${WORKDIR}"|| die "install_includes() failed" einfo "includes installed ok." - EXTRA_INCLUDES="lib/librtld_db lib/libutil lib/msun gnu/lib/libregex" + EXTRA_INCLUDES="lib/librtld_db lib/libutil lib/msun gnu/lib/libregex lib/libcasper" for i in $EXTRA_INCLUDES; do einfo "Installing $i includes into ${INCLUDEDIR} as ${BINOWN}:${BINGRP}..." cd "${WORKDIR}/$i" || die $(freebsd_get_bmake) installincludes DESTDIR="${DESTDIR}" \ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE} \ INCLUDEDIR="${INCLUDEDIR}" BINOWN="${BINOWN}" \ - BINGRP="${BINGRP}" || die "problem installing $i includes." + BINGRP="${BINGRP}" \ + SRCTOP="${WORKDIR}" || die "problem installing $i includes." einfo "$i includes installed ok." done } diff --git a/sys-freebsd/freebsd-libexec/freebsd-libexec-11.0.ebuild b/sys-freebsd/freebsd-libexec/freebsd-libexec-11.0.ebuild index 26851c8..88bfc2b 100644 --- a/sys-freebsd/freebsd-libexec/freebsd-libexec-11.0.ebuild +++ b/sys-freebsd/freebsd-libexec/freebsd-libexec-11.0.ebuild @@ -17,7 +17,10 @@ EXTRACTONLY=" libexec/ usr.bin/ bin/ + contrib/blacklist/ + contrib/dma/ contrib/hyperv/ + contrib/telnet/ lib/ etc/ usr.sbin/ @@ -39,8 +42,7 @@ REMOVE_SUBDIRS="smrsh mail.local tcpd telnetd rshd rlogind ftpd" IUSE="pam ssl kerberos ipv6 nis xinetd" -PATCHES=( "${FILESDIR}/${PN}-9.2-no_ld32.patch" - "${FILESDIR}/${PN}-10.2-atf-check.patch" ) +PATCHES=( "${FILESDIR}/${PN}-10.2-atf-check.patch" ) pkg_setup() { use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= " @@ -50,6 +52,18 @@ pkg_setup() { use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= " mymakeopts="${mymakeopts} WITHOUT_SENDMAIL= WITHOUT_PF= WITHOUT_RCMDS= " + + if has_version "<sys-freebsd/freebsd-libexec-11.0"; then + REMOVE_SUBDIRS="${REMOVE_SUBDIRS} rpc.rstatd ulog-helper" + fi + + if has_version "<sys-freebsd/freebsd-ubin-11.0"; then + mymakeopts="${mymakeopts} WITHOUT_MAN_UTILS= " + fi + + if has_version "<sys-freebsd/freebsd-share-${RV}"; then + die ">=sys-freebsd/freebsd-share-${RV} is required." + fi } src_prepare() { @@ -67,8 +81,11 @@ src_prepare() { echo "#define R_386_IRELATIVE 42" >> "${S}"/rtld-elf/rtld.h echo "#define PT_GNU_RELRO 0x6474e552" >> "${S}"/rtld-elf/rtld.h echo "#define DF_1_NODEFLIB 0x00000800" >> "${S}"/rtld-elf/rtld.h + echo "#define NT_FREEBSD_ABI_TAG 1" >> "${S}"/rtld-elf/rtld.h + echo "#define NT_FREEBSD_NOINIT_TAG 2" >> "${S}"/rtld-elf/rtld.h # taken from sys/sys/fcntl.h echo "#define F_DUPFD_CLOEXEC 17" >> "${S}"/rtld-elf/rtld.h + echo "#define O_VERIFY 0x00200000" >> "${S}"/rtld-elf/rtld.h # taken from sys/sys/cdefs.h echo '#define __compiler_membar() __asm __volatile(" " : : : "memory")' >> "${S}"/rtld-elf/rtld.h # taken from sys/sys/mman.h @@ -76,6 +93,8 @@ src_prepare() { echo '#define MAP_ALIGNMENT_SHIFT 24' >> "${S}"/rtld-elf/rtld.h echo '#define MAP_ALIGNMENT_MASK MAP_ALIGNED(0xff)' >> "${S}"/rtld-elf/rtld.h echo '#define MAP_ALIGNED_SUPER MAP_ALIGNED(1)' >> "${S}"/rtld-elf/rtld.h + + export mymakeopts="${mymakeopts} MK_SYMVER=no MK_BLACKLIST_SUPPORT=no " fi } @@ -96,6 +115,7 @@ src_compile() { src_install() { local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + dodir /usr/libexec multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_install insinto /etc diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-gentoo.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-gentoo.patch new file mode 100644 index 0000000..3724f13 --- /dev/null +++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-gentoo.patch @@ -0,0 +1,327 @@ +diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk +index 9fc6d8f..8ec6e9e 100644 +--- a/share/mk/bsd.doc.mk ++++ b/share/mk/bsd.doc.mk +@@ -144,10 +144,12 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \ + realinstall: + .if ${PRINTERDEVICE:Mhtml} + cd ${SRCDIR}; \ ++ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \ + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}/ + .endif + .for _dev in ${PRINTERDEVICE:Nhtml} ++ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \ + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}/ + .endfor +diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk +index 04a0621..45c059e 100644 +--- a/share/mk/bsd.files.mk ++++ b/share/mk/bsd.files.mk +@@ -63,6 +63,7 @@ stage_as.${file:T}: ${file} + + installfiles-${group}: _${group}INS_${file:T} + _${group}INS_${file:T}: ${file} ++ ${INSTALL} -d ${DESTDIR}${${group}DIR_${.ALLSRC:T}} + ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ + -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ + ${.ALLSRC} \ +@@ -77,10 +78,12 @@ stage_files.${group}: ${_${group}FILES} + installfiles-${group}: _${group}INS + _${group}INS: ${_${group}FILES} + .if defined(${group}NAME) ++ ${INSTALL} -d ${DESTDIR}${${group}DIR}/${${group}NAME} + ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \ + -m ${${group}MODE} ${.ALLSRC} \ + ${DESTDIR}${${group}DIR}/${${group}NAME} + .else ++ ${INSTALL} -d ${DESTDIR}${${group}DIR} + ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \ + -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/ + .endif +diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk +index 897618a..a5548bc 100644 +--- a/share/mk/bsd.incs.mk ++++ b/share/mk/bsd.incs.mk +@@ -62,6 +62,9 @@ stage_includes: stage_as.${header:T} + + installincludes: _${group}INS_${header:T} + _${group}INS_${header:T}: ${header} ++ ${INSTALL} -d -o ${${group}OWN_${.ALLSRC:T}} \ ++ -g ${${group}GRP_${.ALLSRC:T}} \ ++ ${DESTDIR}${${group}DIR_${.ALLSRC:T}} + ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ + -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ + ${.ALLSRC} \ +@@ -77,9 +80,13 @@ stage_includes: stage_files.${group} + installincludes: _${group}INS + _${group}INS: ${_${group}INCS} + .if defined(${group}NAME) ++ ${INSTALL} -d -o ${${group}OWN} -g ${${group}GRP} \ ++ ${DESTDIR}${${group}DIR} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ + ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} + .else ++ ${INSTALL} -d -o ${${group}OWN} -g ${${group}GRP} \ ++ ${DESTDIR}${${group}DIR} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ + ${.ALLSRC} ${DESTDIR}${${group}DIR}/ + .endif +diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk +index 3081488..11d4547 100644 +--- a/share/mk/bsd.info.mk ++++ b/share/mk/bsd.info.mk +@@ -83,6 +83,7 @@ INFO2HTML?= info2html + TEX?= tex + DVIPS?= dvips + DVIPS2ASCII?= dvips2ascii ++INSTALL?= install + + .SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html + +@@ -141,15 +142,17 @@ ${x:S/$/${ICOMPRESS_EXT}/}: ${x} + INSTALLINFODIRS+= ${x:S/$/-install/} + ${x:S/$/-install/}: + .if !empty(.MAKEFLAGS:M-j) ++ ${INSTALL} -d ${DESTDIR}${INFODIR} + lockf -k ${DESTDIR}${INFODIR}/${INFODIRFILE} \ + ${INSTALLINFO} ${INSTALLINFOFLAGS} \ +- --defsection=${INFOSECTION} \ +- --defentry=${INFOENTRY_${x}} \ ++ --section=${INFOSECTION} \ ++ --entry=${INFOENTRY_${x}} \ + ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} + .else ++ ${INSTALL} -d ${DESTDIR}${INFODIR} + ${INSTALLINFO} ${INSTALLINFOFLAGS} \ +- --defsection=${INFOSECTION} \ +- --defentry=${INFOENTRY_${x}} \ ++ --section=${INFOSECTION} \ ++ --entry=${INFOENTRY_${x}} \ + ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} + .endif + .endfor +diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk +index 3145dbd..5932e17 100644 +--- a/share/mk/bsd.lib.mk ++++ b/share/mk/bsd.lib.mk +@@ -52,8 +52,6 @@ CFLAGS+= ${DEBUG_FLAGS} + .if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" + CTFFLAGS+= -g + .endif +-.else +-STRIP?= -s + .endif + + .if ${SHLIBDIR:M*lib32*} +@@ -335,14 +333,17 @@ realinstall: _libinstall + .ORDER: beforeinstall _libinstall + _libinstall: + .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" ++ ${INSTALL} -d ${DESTDIR}${_LIBDIR} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/ + .endif + .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) ++ ${INSTALL} -d ${DESTDIR}${_LIBDIR} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},profile} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/ + .endif + .if defined(SHLIB_NAME) ++ ${INSTALL} -d ${DESTDIR}${_SHLIBDIR} + ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ + ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/ +@@ -387,10 +388,12 @@ _libinstall: + .endif # SHLIB_LINK + .endif # SHIB_NAME + .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ++ ${INSTALL} -d ${DESTDIR}${_LIBDIR} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ + .endif + .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) ++ ${INSTALL} -d ${DESTDIR}${LINTLIBDIR} + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ + .endif +diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk +index 101cddf..2285b63 100644 +--- a/share/mk/bsd.libnames.mk ++++ b/share/mk/bsd.libnames.mk +@@ -63,7 +63,7 @@ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a + LIBEXECINFO?= ${DESTDIR}${LIBDIR}/libexecinfo.a + LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a + LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a +-LIBFL?= "don't use LIBFL, use LIBL" ++LIBFL?= ${DESTDIR}${LIBDIR}/libfl.a + LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a + LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a + LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a +@@ -92,7 +92,7 @@ LIBKEYCAP?= ${DESTDIR}${LIBDIR}/libkeycap.a + LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a + LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a + LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a +-LIBL?= ${DESTDIR}${LIBDIR}/libl.a ++LIBL?= ${DESTDIR}${LIBDIR}/libfl.a + LIBLN?= "don't use LIBLN, use LIBL" + LIBLZMA?= ${DESTDIR}${LIBDIR}/liblzma.a + LIBM?= ${DESTDIR}${LIBDIR}/libm.a +diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk +index 1eec745..31089fd 100644 +--- a/share/mk/bsd.man.mk ++++ b/share/mk/bsd.man.mk +@@ -188,9 +188,11 @@ maninstall: ${MAN} + .if ${MK_MANCOMPRESS} == "no" + .if defined(MANFILTER) + .for __page in ${MAN} ++ ${INSTALL} -d ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/${__page} + ${MINSTALL} ${__page:T:S/$/${FILTEXTENSION}/g} \ + ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/${__page} + .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) ++ ${INSTALL} -d ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page} + ${MINSTALL} ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \ + ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page} + .endif +@@ -204,11 +206,14 @@ maninstall: ${MAN} + esac; \ + page=$$1; shift; sect=$$1; shift; \ + d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \ ++ ${ECHO} ${INSTALL} -d $${d}; \ ++ ${INSTALL} -d $${d}; \ + ${ECHO} ${MINSTALL} $${page} $${d}; \ + ${MINSTALL} $${page} $${d}; \ + done + .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) + .for __page in ${MAN} ++ ${INSTALL} -d ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T} + ${MINSTALL} ${__page:T:S/$/${CATEXT}/} \ + ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T} + .endfor +@@ -216,9 +221,11 @@ maninstall: ${MAN} + .endif # defined(MANFILTER) + .else # ${MK_MANCOMPRESS} == "yes" + .for __page in ${MAN} ++ ${INSTALL} -d ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR} + ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ + ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/ + .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) ++ ${INSTALL} -d ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT} + ${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \ + ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/} + .endif +diff --git a/share/mk/bsd.nls.mk b/share/mk/bsd.nls.mk +index b1a8094..91ab4f3 100644 +--- a/share/mk/bsd.nls.mk ++++ b/share/mk/bsd.nls.mk +@@ -71,7 +71,8 @@ STAGE_SYMLINKS_DIR.NLS= ${STAGE_OBJTOP} + SYMLINKS+= ${NLSSYMLINKS} + .endif + .for file in ${NLS} +-NLSNAME_${file:T}= ${file:T:R}/${NLSNAME}.cat ++NLSDIR_${file:T}= ${SHAREDIR}/nls/${file:T:R}/ ++NLSNAME_${file:T}= ${NLSNAME}.cat + .if defined(NLSLINKS_${file:R}) && !empty(NLSLINKS_${file:R}) + .if !empty(NLSLINKS_${file:R}:M${file:R}) + .error NLSLINKS_${file:R} contains itself: ${file:R} +diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk +index 49f6929..2cadaea 100644 +--- a/share/mk/bsd.own.mk ++++ b/share/mk/bsd.own.mk +@@ -233,9 +233,6 @@ INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} + INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK} + + # Common variables +-.if !defined(DEBUG_FLAGS) +-STRIP?= -s +-.endif + + COMPRESS_CMD?= gzip -cn + COMPRESS_EXT?= .gz +diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk +index bf1bd80..75d2f06 100644 +--- a/share/mk/bsd.prog.mk ++++ b/share/mk/bsd.prog.mk +@@ -44,10 +44,6 @@ CTFFLAGS+= -g + .endif + .endif + +-.if !defined(DEBUG_FLAGS) +-STRIP?= -s +-.endif +- + .if defined(NO_ROOT) + .if !defined(TAGS) || ! ${TAGS:Mpackage=*} + TAGS+= package=${PACKAGE:Uruntime} +@@ -217,6 +213,7 @@ realinstall: _proginstall + .ORDER: beforeinstall _proginstall + _proginstall: + .if defined(PROG) ++ ${INSTALL} -d ${DESTDIR}${BINDIR} + ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME} + .if ${MK_DEBUG_FILES} != "no" +@@ -255,6 +252,7 @@ SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE} + STAGE_AS_${script:T}= ${SCRIPTSDIR_${script:T}}/${SCRIPTSNAME_${script:T}} + _scriptsinstall: _SCRIPTSINS_${script:T} + _SCRIPTSINS_${script:T}: ${script} ++ ${INSTALL} -d ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}} + ${INSTALL} ${TAG_ARGS} -o ${SCRIPTSOWN_${.ALLSRC:T}} \ + -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \ + ${.ALLSRC} \ +diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk +index 7885056..6263ba8 100644 +--- a/share/mk/bsd.sys.mk ++++ b/share/mk/bsd.sys.mk +@@ -29,9 +29,6 @@ CFLAGS+= -std=${CSTD} + .if defined(WARNS) + .if ${WARNS} >= 1 + CWARNFLAGS+= -Wsystem-headers +-.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE}) +-CWARNFLAGS+= -Werror +-.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE} + .endif # WARNS >= 1 + .if ${WARNS} >= 2 + CWARNFLAGS+= -Wall -Wno-format-y2k +@@ -100,9 +97,6 @@ CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args + .if ${WARNS} <= 3 + CWARNFLAGS.clang+= -Wno-format-nonliteral + .endif # WARNS <= 3 +-.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE}) +-CWARNFLAGS+= -Werror +-.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE} + .endif # WFORMAT > 0 + .endif # WFORMAT + .if defined(NO_WFORMAT) || defined(NO_WFORMAT.${COMPILER_TYPE}) +@@ -151,6 +145,13 @@ CFLAGS.clang+= -fno-dwarf2-cfi-asm + # but not yet. + CXXFLAGS.clang+= -Wno-c++11-extensions + ++.if ${MK_SSP} == "no" ++# gcc-4.9, -fstack-protector-strong is enabled by default. ++# Add -fno-stack-protector to disable it. Gentoo Bug #511698. ++SSP_CFLAGS?= -fno-stack-protector ++CFLAGS+= ${SSP_CFLAGS} ++.endif ++ + .if ${MK_SSP} != "no" && \ + ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" + .if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ +diff --git a/share/mk/sys.mk b/share/mk/sys.mk +index 27b259b..58091a5 100644 +--- a/share/mk/sys.mk ++++ b/share/mk/sys.mk +@@ -418,12 +418,6 @@ YFLAGS ?= -d + rm -f ${.PREFIX}.tmp.c + ${CTFCONVERT_CMD} + +-# Pull in global settings. +-__MAKE_CONF?=/etc/make.conf +-.if exists(${__MAKE_CONF}) +-.include "${__MAKE_CONF}" +-.endif +- + # late include for customization + .sinclude <local.sys.mk> + diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-libproc-libcxx.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-libproc-libcxx.patch new file mode 100644 index 0000000..5da025d --- /dev/null +++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-libproc-libcxx.patch @@ -0,0 +1,13 @@ +diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk +index 14489a8..c993f7c 100644 +--- a/share/mk/src.libnames.mk ++++ b/share/mk/src.libnames.mk +@@ -245,7 +245,7 @@ _DP_radius= crypto + .endif + _DP_procstat= kvm util elf + .if ${MK_CXX} == "yes" +-.if ${MK_LIBCPLUSPLUS} != "no" ++.if ${COMPILER_TYPE} == "clang" + _DP_proc= cxxrt + .else + _DP_proc= supcplusplus diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-rename-libs.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-rename-libs.patch new file mode 100644 index 0000000..fd72f1f --- /dev/null +++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-11.0-rename-libs.patch @@ -0,0 +1,16 @@ +diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk +index 249ac52..14489a8 100644 +--- a/share/mk/src.libnames.mk ++++ b/share/mk/src.libnames.mk +@@ -343,6 +343,11 @@ LIBATF_CXX= ${DESTDIR}${LIBDIR}/libprivateatf-c++.a + LDADD_atf_c= -lprivateatf-c + LDADD_atf_cxx= -lprivateatf-c++ + ++LDADD_bsdxml= -lexpat ++LDADD_l= -lfl ++LDADD_termcap= -lncurses ++LDADD_termcapw= -lncursesw ++ + .for _l in ${_PRIVATELIBS} + LIB${_l:tu}?= ${DESTDIR}${LIBDIR}/libprivate${_l}.a + .endfor diff --git a/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-11.0.ebuild b/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-11.0.ebuild index 571e0f8..f3a3481 100644 --- a/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-11.0.ebuild +++ b/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-11.0.ebuild @@ -25,8 +25,9 @@ RESTRICT="strip" S="${WORKDIR}/share/mk" src_prepare() { - epatch "${FILESDIR}/${PN}-10.3-gentoo.patch" - epatch "${FILESDIR}/${PN}-add-nossp-cflags.patch" + epatch "${FILESDIR}/${PN}-11.0-gentoo.patch" + epatch "${FILESDIR}/${PN}-11.0-rename-libs.patch" + epatch "${FILESDIR}/${PN}-11.0-libproc-libcxx.patch" use userland_GNU && epatch "${FILESDIR}/${PN}-10.2-gnu.patch" } diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild index 62a7b3e..ab93176 100644 --- a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild +++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-11.0.ebuild @@ -26,8 +26,6 @@ DEPEND="${RDEPEND} S=${WORKDIR}/lib/libpam/modules -PATCHES=( "${FILESDIR}"/${PN}-9.0-gentoo.patch ) - pkg_setup() { # Avoid installing pam_ssh as that has its own ebuild. mymakeopts="${mymakeopts} WITHOUT_OPENSSH= " diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-11.0-libevent.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-11.0-libevent.patch new file mode 100644 index 0000000..0f3ecb1 --- /dev/null +++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-11.0-libevent.patch @@ -0,0 +1,13 @@ +diff --git a/usr.sbin/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/Makefile +index 941505f..df5ccb2 100644 +--- a/usr.sbin/ftp-proxy/Makefile ++++ b/usr.sbin/ftp-proxy/Makefile +@@ -7,8 +7,6 @@ MAN= ftp-proxy.8 + + SRCS= ftp-proxy.c filter.c + +-CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent +- + LIBADD= event + + WARNS?= 3 diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-11.0-pflogd.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-11.0-pflogd.patch new file mode 100644 index 0000000..6435280 --- /dev/null +++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-11.0-pflogd.patch @@ -0,0 +1,13 @@ +diff --git a/sbin/pflogd/Makefile b/sbin/pflogd/Makefile +index b3822dd..5912ad2 100644 +--- a/sbin/pflogd/Makefile ++++ b/sbin/pflogd/Makefile +@@ -7,8 +7,6 @@ PROG= pflogd + SRCS= pflogd.c pidfile.c privsep.c privsep_fdpass.c + MAN= pflogd.8 + +-CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h +- + LIBADD= pcap + + WARNS?= 2 diff --git a/sys-freebsd/freebsd-pf/freebsd-pf-11.0.ebuild b/sys-freebsd/freebsd-pf/freebsd-pf-11.0.ebuild index 14efdcb..feaa888 100644 --- a/sys-freebsd/freebsd-pf/freebsd-pf-11.0.ebuild +++ b/sys-freebsd/freebsd-pf/freebsd-pf-11.0.ebuild @@ -31,7 +31,7 @@ DEPEND="${RDEPEND} S="${WORKDIR}" -SUBDIRS="usr.sbin/authpf sbin/pfctl sbin/pflogd usr.sbin/ftp-proxy/ftp-proxy" +SUBDIRS="usr.sbin/authpf sbin/pfctl sbin/pflogd usr.sbin/ftp-proxy" pkg_setup() { enewgroup authpf 63 @@ -42,10 +42,9 @@ src_prepare() { # pcap-int.h redefines snprintf as pcap_snprintf epatch "${FILESDIR}/${PN}-9.0-pcap_pollution.patch" # Use system's libevent - epatch "${FILESDIR}/${PN}-10.0-libevent.patch" - epatch "${FILESDIR}/${PN}-10.0-pflogd.patch" + epatch "${FILESDIR}/${PN}-11.0-libevent.patch" + epatch "${FILESDIR}/${PN}-11.0-pflogd.patch" epatch "${FILESDIR}/${PN}-9.0-bpf.patch" - epatch "${FILESDIR}/${PN}-9.0-getline.patch" # Link in kernel sources [[ ! -e "${WORKDIR}/sys" ]] && ln -s "/usr/src/sys" "${WORKDIR}/sys" } @@ -54,7 +53,7 @@ src_compile() { for dir in ${SUBDIRS}; do einfo "Starting make in ${dir}" cd "${S}/${dir}" || die - mkmake || die "Make ${dir} failed" + freebsd_src_compile || die "Make ${dir} failed" done } @@ -62,7 +61,7 @@ src_install() { for dir in ${SUBDIRS}; do einfo "Starting install in ${dir}" cd "${S}/${dir}" || die - mkinstall || die "Install ${dir} failed" + freebsd_src_install || die "Install ${dir} failed" done cd "${WORKDIR}"/etc diff --git a/sys-freebsd/freebsd-rescue/files/freebsd-rescue-11.0-rename-libs.patch b/sys-freebsd/freebsd-rescue/files/freebsd-rescue-11.0-rename-libs.patch new file mode 100644 index 0000000..3103574 --- /dev/null +++ b/sys-freebsd/freebsd-rescue/files/freebsd-rescue-11.0-rename-libs.patch @@ -0,0 +1,22 @@ +diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile +index e747c02..a061436 100644 +--- a/rescue/rescue/Makefile ++++ b/rescue/rescue/Makefile +@@ -54,7 +54,7 @@ CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ + ed expr getfacl hostname kenv kill ln ls mkdir mv \ + pkill ps pwd realpath rm rmdir setfacl sh sleep stty \ + sync test +-CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -lelf -ll -ltermcapw -lutil -lxo ++CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -lelf -lfl -lncursesw -lutil -lxo + CRUNCH_BUILDTOOLS+= bin/sh + + # Additional options for specific programs +@@ -128,7 +128,7 @@ CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem + # liblzma needs pthread + CRUNCH_LIBS+= -lpthread + .endif +-CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv ++CRUNCH_LIBS+= -lgeom -lexpat -lkiconv + .if ${MK_OPENSSL} == "no" + CRUNCH_LIBS+= -lmd + .endif diff --git a/sys-freebsd/freebsd-rescue/freebsd-rescue-11.0.ebuild b/sys-freebsd/freebsd-rescue/freebsd-rescue-11.0.ebuild index a0eb03f..f473264 100644 --- a/sys-freebsd/freebsd-rescue/freebsd-rescue-11.0.ebuild +++ b/sys-freebsd/freebsd-rescue/freebsd-rescue-11.0.ebuild @@ -61,12 +61,15 @@ pkg_setup() { src_prepare() { # As they are patches from ${WORKDIR} apply them by hand cd "${WORKDIR}" || die - epatch "${FILESDIR}/${PN}"-10.0-zlib.patch - epatch "${FILESDIR}/freebsd-sbin-bsdxml2expat.patch" + epatch "${FILESDIR}/${PN}-10.0-zlib.patch" + epatch "${FILESDIR}/${PN}-11.0-rename-libs.patch" epatch "${FILESDIR}/freebsd-ubin-10.2-bsdxml.patch" } src_compile() { + export ESED=/usr/bin/sed + unalias sed + tc-export CC # crunchgen is now checks env MAKE. # Use to force BSD's make diff --git a/sys-freebsd/freebsd-sbin/freebsd-sbin-11.0.ebuild b/sys-freebsd/freebsd-sbin/freebsd-sbin-11.0.ebuild index 738e7a1..b9ccdc5 100644 --- a/sys-freebsd/freebsd-sbin/freebsd-sbin-11.0.ebuild +++ b/sys-freebsd/freebsd-sbin/freebsd-sbin-11.0.ebuild @@ -59,8 +59,7 @@ REMOVE_SUBDIRS="dhclient pfctl pflogd rcorder resolvconf" PATCHES=( "${FILESDIR}/${PN}-setXid.patch" "${FILESDIR}/${PN}-10.0-zlib.patch" "${FILESDIR}/${PN}-6.2-ldconfig.patch" - "${FILESDIR}/${PN}-6.1-pr102701.patch" - "${FILESDIR}/${PN}-bsdxml2expat.patch" ) + "${FILESDIR}/${PN}-6.1-pr102701.patch" ) src_prepare() { if [[ ! -e "${WORKDIR}/sys" ]]; then diff --git a/sys-freebsd/freebsd-share/freebsd-share-11.0.ebuild b/sys-freebsd/freebsd-share/freebsd-share-11.0.ebuild index 8ab449e..20efc13 100644 --- a/sys-freebsd/freebsd-share/freebsd-share-11.0.ebuild +++ b/sys-freebsd/freebsd-share/freebsd-share-11.0.ebuild @@ -26,6 +26,7 @@ EXTRACTONLY=" bin/ lib/ etc/ + tools/tools/locale/ " DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* @@ -44,7 +45,7 @@ pkg_setup() { use usb || mymakeopts="${mymakeopts} WITHOUT_USB= " use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= " [[ ! -e /usr/bin/vtfontcvt ]] && mymakeopts="${mymakeopts} WITHOUT_VT= " - + [[ ! -e /usr/bin/localedef ]] && mymakeopts="${mymakeopts} WITHOUT_LOCALES= " mymakeopts="${mymakeopts} NO_SENDMAIL= NO_MANCOMPRESS= NO_INFOCOMPRESS= WITHOUT_CLANG= " } @@ -79,7 +80,7 @@ src_prepare() { # Make proper symlinks by defining the full target. local sdir - for sdir in colldef mklocale monetdef msgdef numericdef timedef + for sdir in colldef monetdef msgdef numericdef timedef do sed -e 's:\${enc2}$:\${enc2}/\${FILESNAME}:g' -i \ "${S}/${sdir}/Makefile" || \ @@ -109,5 +110,10 @@ src_compile() { } src_install() { + if [[ -e /usr/bin/localedef ]] ; then + for d in $(grep 'SAME+' "${WORKDIR}"/share/colldef/Makefile | awk '{print $3}') ; do + dodir "/usr/share/locale/${d}" + done + fi mkmake -j1 DESTDIR="${D}" DOCDIR=/usr/share/doc/${PF} install || die "Install failed" } diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-11.0-gentoo-gcc.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-11.0-gentoo-gcc.patch new file mode 100644 index 0000000..1d3c8d6 --- /dev/null +++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-11.0-gentoo-gcc.patch @@ -0,0 +1,13 @@ +diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh +index e4b2ad4..411bedf 100644 +--- a/sys/conf/newvers.sh ++++ b/sys/conf/newvers.sh +@@ -110,7 +110,7 @@ else + t=`date` + fi + i=`${MAKE:-make} -V KERN_IDENT` +-compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep -w 'version') ++compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep 'version' | tail -n 1) + + for dir in /usr/bin /usr/local/bin; do + if [ ! -z "${svnversion}" ] ; then diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-11.0-gentoo.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-11.0-gentoo.patch new file mode 100644 index 0000000..c0bfb47 --- /dev/null +++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-11.0-gentoo.patch @@ -0,0 +1,13 @@ +diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk +index 85be39e..b6aab23 100644 +--- a/sys/conf/kern.mk ++++ b/sys/conf/kern.mk +@@ -5,7 +5,7 @@ + # + CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ + -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ +- -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \ ++ -Wundef -Wno-pointer-sign \ + -Wmissing-include-dirs -fdiagnostics-show-option \ + -Wno-unknown-pragmas \ + ${CWARNEXTRA} diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-11.0.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-11.0.ebuild index e01278e..92cc495 100644 --- a/sys-freebsd/freebsd-sources/freebsd-sources-11.0.ebuild +++ b/sys-freebsd/freebsd-sources/freebsd-sources-11.0.ebuild @@ -13,18 +13,7 @@ LICENSE="BSD zfs? ( CDDL )" IUSE="+build-kernel debug dtrace zfs" # Security Advisory and Errata patches. -UPSTREAM_PATCHES=( "SA-16:18/atkbd.patch" - "SA-16:19/sendmsg.patch" - "SA-16:20/linux.patch" - "SA-16:21/stat.patch" - "EN-16:07/ipi.patch" - "EN-16:08/zfs.patch" - "EN-16:11/vmbus.patch" - "EN-16:12/hv_storvsc.patch" - "EN-16:13/vmbus.patch" - "EN-16:14/hv_storvsc.patch" - "EN-16:15/vmbus.patch" - "EN-16:16/hv_storvsc.patch" ) +# UPSTREAM_PATCHES=() if [[ ${PV} != *9999* ]]; then KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" @@ -56,12 +45,13 @@ S="${WORKDIR}/sys" KERN_BUILD=GENTOO PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch" - "${FILESDIR}/${PN}-10.0-gentoo.patch" + "${FILESDIR}/${PN}-11.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}-11.0-gentoo-gcc.patch" "${FILESDIR}/${PN}-10.1-gcc48.patch" ) pkg_setup() { @@ -87,9 +77,9 @@ src_prepare() { "${S}/conf/newvers.sh" # __FreeBSD_cc_version comes from FreeBSD's gcc. - # on 10.0-RELEASE it's 1000001. + # on 11.0-RELEASE it's 1100001. # 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" \ + sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=1100001:g" \ -i "${S}/conf/kern.pre.mk" \ -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version" diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch new file mode 100644 index 0000000..946cc5b --- /dev/null +++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch @@ -0,0 +1,147 @@ +diff --git a/usr.bin/at/Makefile b/usr.bin/at/Makefile +index d199a85..dc5cafd 100644 +--- a/usr.bin/at/Makefile ++++ b/usr.bin/at/Makefile +@@ -17,6 +17,8 @@ BINOWN= root + BINMODE= 4555 + CLEANFILES+= at.1 + ++LDFLAGS+=-Wl,-z,now ++ + at.1: at.man + @${ECHO} Making ${.TARGET:T} from ${.ALLSRC:T}; \ + sed -e \ +diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile +index 4427417..4f774a1 100644 +--- a/usr.bin/chpass/Makefile ++++ b/usr.bin/chpass/Makefile +@@ -17,6 +17,8 @@ CFLAGS+= -DYP + #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE + CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I. + ++LDFLAGS+=-Wl,-z,now ++ + LIBADD= crypt util + .if ${MK_NIS} != "no" + LIBADD+= ypclnt +diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile +index cd03a51..9a0fe6e 100644 +--- a/usr.bin/fstat/Makefile ++++ b/usr.bin/fstat/Makefile +@@ -9,3 +9,5 @@ LIBADD= procstat + MAN1= fuser.1 fstat.1 + + .include <bsd.prog.mk> ++LDFLAGS+=-Wl,-z,now ++ +diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile +index 07321f7..ed2c786 100644 +--- a/usr.bin/lock/Makefile ++++ b/usr.bin/lock/Makefile +@@ -7,4 +7,6 @@ BINMODE=4555 + + LIBADD= crypt + ++LDFLAGS+=-Wl,-z,now ++ + .include <bsd.prog.mk> +diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile +index 3499575..62a7356 100644 +--- a/usr.bin/login/Makefile ++++ b/usr.bin/login/Makefile +@@ -16,6 +16,8 @@ CFLAGS+= -DUSE_BSM_AUDIT + LIBADD+= bsm + .endif + ++LDFLAGS+=-Wl,-z,now ++ + .if ${MK_SETUID_LOGIN} != "no" + BINOWN= root + BINMODE=4555 +diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile +index 52cc3c7..11ebb2f 100644 +--- a/usr.bin/netstat/Makefile ++++ b/usr.bin/netstat/Makefile +@@ -57,6 +57,8 @@ BINGRP= kmem + BINMODE=2555 + LIBADD= kvm memstat xo util + ++LDFLAGS+=-Wl,-z,now ++ + .if ${MK_NETGRAPH_SUPPORT} != "no" + SRCS+= netgraph.c + LIBADD+= netgraph +diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile +index 3114a92..5c41213 100644 +--- a/usr.bin/opieinfo/Makefile ++++ b/usr.bin/opieinfo/Makefile +@@ -12,6 +12,8 @@ WARNS?= 0 + + LIBADD= opie + ++LDFLAGS+=-Wl,-z,now ++ + BINOWN= root + BINMODE=4555 + PRECIOUSPROG= +diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile +index ae35b20..32ba59b 100644 +--- a/usr.bin/opiepasswd/Makefile ++++ b/usr.bin/opiepasswd/Makefile +@@ -12,6 +12,8 @@ WARNS?= 0 + + LIBADD= opie + ++LDFLAGS+=-Wl,-z,now ++ + BINOWN= root + BINMODE=4555 + PRECIOUSPROG= +diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile +index 758be2d..ebde1a6 100644 +--- a/usr.bin/passwd/Makefile ++++ b/usr.bin/passwd/Makefile +@@ -13,6 +13,8 @@ SYMLINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd + MLINKS = passwd.1 yppasswd.1 + .endif + ++LDFLAGS+=-Wl,-z,now ++ + beforeinstall: + .for i in passwd yppasswd + [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ +diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile +index b3dd829..26eaa63 100644 +--- a/usr.bin/su/Makefile ++++ b/usr.bin/su/Makefile +@@ -10,6 +10,8 @@ WARNS?= 5 + LIBADD= util pam + + .if ${MK_AUDIT} != "no" ++LDFLAGS+=-Wl,-z,now ++ + CFLAGS+= -DUSE_BSM_AUDIT + LIBADD+= bsm + .endif +diff --git a/usr.bin/wall/Makefile b/usr.bin/wall/Makefile +index 0579add..571be8d 100644 +--- a/usr.bin/wall/Makefile ++++ b/usr.bin/wall/Makefile +@@ -6,4 +6,6 @@ SRCS= ttymsg.c wall.c + BINGRP= tty + BINMODE=2555 + ++LDFLAGS+=-Wl,-z,now ++ + .include <bsd.prog.mk> +diff --git a/usr.bin/write/Makefile b/usr.bin/write/Makefile +index ba06110..ba6ce04 100644 +--- a/usr.bin/write/Makefile ++++ b/usr.bin/write/Makefile +@@ -5,4 +5,6 @@ PROG= write + BINMODE=2555 + BINGRP= tty + ++LDFLAGS+=-Wl,-z,now ++ + .include <bsd.prog.mk> diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild index 3cdde79..f9bcdb2 100644 --- a/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild +++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild @@ -11,9 +11,6 @@ SLOT="0" IUSE="ar atm audit bluetooth ipv6 kerberos netware nis ssl usb build zfs" LICENSE="BSD zfs? ( CDDL )" -# Security Advisory and Errata patches. -UPSTREAM_PATCHES=( "SA-16:25/bspatch.patch" ) - if [[ ${PV} != *9999* ]]; then KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" SRC_URI="${SRC_URI} @@ -55,18 +52,13 @@ S="${WORKDIR}/usr.bin" PATCHES=( "${FILESDIR}/${PN}-6.0-bsdcmp.patch" "${FILESDIR}/${PN}-9.0-fixmakefiles.patch" - "${FILESDIR}/${PN}-setXid.patch" + "${FILESDIR}/${PN}-11.0-setXid.patch" "${FILESDIR}/${PN}-lint-stdarg.patch" - "${FILESDIR}/${PN}-8.0-xinstall.patch" "${FILESDIR}/${PN}-9.1-bsdar.patch" "${FILESDIR}/${PN}-9.1-minigzip.patch" - "${FILESDIR}/${PN}-10.0-atf.patch" "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch" - "${FILESDIR}/${PN}-10.0-kdump-ioctl.patch" - "${FILESDIR}/${PN}-10.0-mandoc.patch" - "${FILESDIR}/${PN}-10.2-bsdxml.patch" "${FILESDIR}/${PN}-10.2-talk-workaround.patch" - "${FILESDIR}/${PN}-10.3-bmake-workaround.patch" ) + "${FILESDIR}/${PN}-10.2-bsdxml.patch" ) # Here we remove some sources we don't need because they are already # provided by portage's packages or similar. In order: @@ -89,7 +81,8 @@ REMOVE_SUBDIRS="bzip2 bzip2recover tar cpio compile_et lex vi smbutil file vacation nc ftp telnet c99 c89 bc dc - whois tftp man" + whois tftp man + addr2line bsdcat cxxfilt cxxfilt elfcopy nm readelf sdiff size soelim strings" pkg_setup() { # Add the required source files. @@ -106,7 +99,7 @@ pkg_setup() { use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= " use usb || mymakeopts="${mymakeopts} WITHOUT_USB= " use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= " - mymakeopts="${mymakeopts} WITHOUT_CLANG= WITHOUT_LZMA_SUPPORT= WITHOUT_SVN= WITHOUT_SVNLITE= WITHOUT_OPENSSH= WITHOUT_LDNS_UTILS= " + mymakeopts="${mymakeopts} WITHOUT_CLANG= WITHOUT_LZMA_SUPPORT= WITHOUT_SVN= WITHOUT_SVNLITE= WITHOUT_OPENSSH= WITHOUT_LDNS_UTILS= WITHOUT_MANDOCDB= " } pkg_preinst() { @@ -131,7 +124,7 @@ src_prepare() { sed -i -e 's:"manpath -q":"manpath":' "${S}/whereis/pathnames.h" # Build a dynamic make - sed -i -e '/^NO_SHARED/ s/^/#/' "${S}"/make/Makefile || die + sed -i -e '/^NO_SHARED/ s/^/#/' "${S}"/bmake/Makefile.inc || die # Disable it here otherwise our patch wont apply use ar || dummy_mk ar @@ -151,16 +144,29 @@ setup_multilib_vars() { } src_compile() { - # Preparing to build mandoc - cd "${WORKDIR}/lib/libmandoc" || die - freebsd_src_compile -j1 - - cd "${S}" || die - local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + # Preparing to build addr2line, elfcopy, m4 + local MULTIBUILD_VARIANTS="${DEFAULT_ABI}" + for dir in libelftc libpe libopenbsd ; do + cd "${WORKDIR}/lib/${dir}" || die + multibuild_foreach_variant freebsd_multilib_multibuild_wrapper freebsd_src_compile -j1 + done + MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1 } src_install() { + cd "${S}"/calendar/calendars || die + for dir in $(find . -type d ! -name "." ) ; do + dodir /usr/share/calendar/"$(basename ${dir})" + done + for l in en_US.ISO8859-1 en_US.ISO8859-15 fr_BE.ISO8859-1 \ + fr_BE.ISO8859-15 fr_CA.ISO8859-1 fr_CA.ISO8859-15 \ + fr_CH.ISO8859-1 fr_CH.ISO8859-15 fr_FR.ISO8859-15 \ + de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ + de_CH.ISO8859-15 de_DE.ISO8859-15 pt_PT.ISO8859-1 ; do + dodir "/usr/share/nls/${l}" + done + local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_install diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-11.0-workaround.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-11.0-workaround.patch new file mode 100644 index 0000000..04ba75a --- /dev/null +++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-11.0-workaround.patch @@ -0,0 +1,13 @@ +diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile +index 033002c..d198f10 100644 +--- a/usr.sbin/nmtree/Makefile ++++ b/usr.sbin/nmtree/Makefile +@@ -5,7 +5,7 @@ + .PATH: ${.CURDIR}/../../contrib/mtree + + PROG= mtree +-MAN= mtree.5 mtree.8 ++MAN= mtree.8 + SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ + only.c spec.c specspec.c verify.c + diff --git a/sys-freebsd/freebsd-usbin/freebsd-usbin-11.0.ebuild b/sys-freebsd/freebsd-usbin/freebsd-usbin-11.0.ebuild index 28374e5..b7f4a4e 100644 --- a/sys-freebsd/freebsd-usbin/freebsd-usbin-11.0.ebuild +++ b/sys-freebsd/freebsd-usbin/freebsd-usbin-11.0.ebuild @@ -82,6 +82,7 @@ PATCHES=( "${FILESDIR}/${PN}-9.0-newsyslog.patch" "${FILESDIR}/${PN}-10.0-bsdxml2expat.patch" "${FILESDIR}/${PN}-10.3-bsdxml2expat.patch" + "${FILESDIR}/${PN}-11.0-workaround.patch" ) REMOVE_SUBDIRS=" @@ -91,7 +92,7 @@ REMOVE_SUBDIRS=" tcpdump ndp inetd wpa/wpa_supplicant wpa/hostapd wpa/hostapd_cli wpa/wpa_cli wpa/wpa_passphrase zic amd - pkg pkg_install freebsd-update service sysrc bsdinstall" + pkg freebsd-update service sysrc bsdinstall" src_prepare() { if ! use build; then @@ -150,15 +151,16 @@ EOS cd "${WORKDIR}/etc" || die doins apmd.conf syslog.conf newsyslog.conf nscd.conf || die - insinto /etc/ppp - doins ppp/ppp.conf || die - if use bluetooth; then insinto /etc/bluetooth doins bluetooth/* || die rm -f "${D}"/etc/bluetooth/Makefile fi + cd "${S}"/ppp + insinto /etc/ppp + doins ppp.conf || die + # Install the periodic stuff (needs probably to be ported in a more # gentooish way) cd "${WORKDIR}/etc/periodic" || die |