summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-freebsd/boot0/ChangeLog7
-rw-r--r--sys-freebsd/boot0/boot0-9.1_rc1.ebuild53
-rw-r--r--sys-freebsd/freebsd-bin/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-bin/freebsd-bin-9.1_rc1.ebuild35
-rw-r--r--sys-freebsd/freebsd-cddl/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-cddl/freebsd-cddl-9.1_rc1.ebuild62
-rw-r--r--sys-freebsd/freebsd-contrib/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-contrib/freebsd-contrib-9.1_rc1.ebuild56
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-9.1_rc1.ebuild535
-rw-r--r--sys-freebsd/freebsd-libexec/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-libexec/freebsd-libexec-9.1_rc1.ebuild64
-rw-r--r--sys-freebsd/freebsd-mk-defs/ChangeLog9
-rw-r--r--sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gentoo.patch326
-rw-r--r--sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gnu.patch77
-rw-r--r--sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-9.1_rc1.ebuild38
-rw-r--r--sys-freebsd/freebsd-pam-modules/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1_rc1.ebuild48
-rw-r--r--sys-freebsd/freebsd-sbin/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-sbin/freebsd-sbin-9.1_rc1.ebuild92
-rw-r--r--sys-freebsd/freebsd-share/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-share/freebsd-share-9.1_rc1.ebuild88
-rw-r--r--sys-freebsd/freebsd-ubin/ChangeLog11
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-bsdar.patch25
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-grep.patch17
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-kdump-ioctl.patch24
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-minigzip.patch10
-rw-r--r--sys-freebsd/freebsd-ubin/freebsd-ubin-9.1_rc1.ebuild158
-rw-r--r--sys-freebsd/freebsd-usbin/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch12
-rw-r--r--sys-freebsd/freebsd-usbin/freebsd-usbin-9.1_rc1.ebuild175
31 files changed, 1982 insertions, 12 deletions
diff --git a/sys-freebsd/boot0/ChangeLog b/sys-freebsd/boot0/ChangeLog
index 8d1defdf516a..96e6a09f30d1 100644
--- a/sys-freebsd/boot0/ChangeLog
+++ b/sys-freebsd/boot0/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-freebsd/boot0
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/ChangeLog,v 1.35 2012/05/17 14:36:08 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/ChangeLog,v 1.36 2012/09/11 16:58:18 aballier Exp $
+
+*boot0-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org> +boot0-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
17 May 2012; Alexis Ballier <aballier@gentoo.org> boot0-9.0.ebuild:
drop now useless appends flags: we unpack the lib tarball.
diff --git a/sys-freebsd/boot0/boot0-9.1_rc1.ebuild b/sys-freebsd/boot0/boot0-9.1_rc1.ebuild
new file mode 100644
index 000000000000..1cbd717df580
--- /dev/null
+++ b/sys-freebsd/boot0/boot0-9.1_rc1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/boot0-9.1_rc1.ebuild,v 1.1 2012/09/11 16:58:18 aballier Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd flag-o-matic
+
+DESCRIPTION="FreeBSD's bootloader"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+IUSE="bzip2 ieee1394 tftp zfs"
+
+SRC_URI="mirror://gentoo/${SYS}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2"
+
+RDEPEND=""
+DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-lib-${RV}*"
+
+S="${WORKDIR}/sys/boot"
+
+boot0_use_enable() {
+ use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\""
+}
+
+pkg_setup() {
+ boot0_use_enable ieee1394 FIREWIRE
+ boot0_use_enable zfs ZFS
+ boot0_use_enable tftp TFTP
+ boot0_use_enable bzip2 BZIP2
+}
+
+src_prepare() {
+ sed -e '/-fomit-frame-pointer/d' -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
+}
+
+src_compile() {
+ strip-flags
+ append-flags "-fno-strict-aliasing"
+ NOFLAGSTRIP="yes" freebsd_src_compile
+}
+
+src_install() {
+ dodir /boot/defaults
+ mkinstall FILESDIR=/boot || die "mkinstall failed"
+}
diff --git a/sys-freebsd/freebsd-bin/ChangeLog b/sys-freebsd/freebsd-bin/ChangeLog
index b02f54dbd291..16899cc16718 100644
--- a/sys-freebsd/freebsd-bin/ChangeLog
+++ b/sys-freebsd/freebsd-bin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-bin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-bin/ChangeLog,v 1.44 2012/04/26 13:18:24 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-bin/ChangeLog,v 1.45 2012/09/11 16:48:36 aballier Exp $
+
+*freebsd-bin-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-bin-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
26 Apr 2012; Alexis Ballier <aballier@gentoo.org> freebsd-bin-9.0.ebuild:
keyword ~amd64-fbsd
diff --git a/sys-freebsd/freebsd-bin/freebsd-bin-9.1_rc1.ebuild b/sys-freebsd/freebsd-bin/freebsd-bin-9.1_rc1.ebuild
new file mode 100644
index 000000000000..eb97d627636b
--- /dev/null
+++ b/sys-freebsd/freebsd-bin/freebsd-bin-9.1_rc1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-bin/freebsd-bin-9.1_rc1.ebuild,v 1.1 2012/09/11 16:48:36 aballier Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD /bin tools"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+IUSE=""
+
+SRC_URI="mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ >=dev-libs/libedit-20120311.3.0-r1
+ sys-libs/ncurses
+ sys-apps/ed
+ !app-misc/realpath
+ !<sys-freebsd/freebsd-ubin-8"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ >=sys-devel/flex-2.5.31-r2"
+
+S=${WORKDIR}/bin
+
+# csh and tcsh are provided by tcsh package, rmail is sendmail stuff.
+REMOVE_SUBDIRS="csh rmail ed"
+
+pkg_setup() {
+ mymakeopts="${mymakeopts} WITHOUT_TCSH= WITHOUT_SENDMAIL= WITHOUT_RCMDS= "
+}
diff --git a/sys-freebsd/freebsd-cddl/ChangeLog b/sys-freebsd/freebsd-cddl/ChangeLog
index 6bd0f9053b13..26aebbfee1ec 100644
--- a/sys-freebsd/freebsd-cddl/ChangeLog
+++ b/sys-freebsd/freebsd-cddl/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-cddl
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-cddl/ChangeLog,v 1.25 2012/08/20 06:18:40 naota Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-cddl/ChangeLog,v 1.26 2012/09/11 17:01:18 aballier Exp $
+
+*freebsd-cddl-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-cddl-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
20 Aug 2012; Naohiro Aota <naota@gentoo.org> freebsd-cddl-7.2.ebuild,
freebsd-cddl-8.0.ebuild, freebsd-cddl-8.2.ebuild, freebsd-cddl-9.0.ebuild:
diff --git a/sys-freebsd/freebsd-cddl/freebsd-cddl-9.1_rc1.ebuild b/sys-freebsd/freebsd-cddl/freebsd-cddl-9.1_rc1.ebuild
new file mode 100644
index 000000000000..c82ff59d8ae7
--- /dev/null
+++ b/sys-freebsd/freebsd-cddl/freebsd-cddl-9.1_rc1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-cddl/freebsd-cddl-9.1_rc1.ebuild,v 1.1 2012/09/11 17:01:18 aballier Exp $
+
+EAPI=4
+
+inherit bsdmk freebsd toolchain-funcs multilib
+
+DESCRIPTION="FreeBSD CDDL (opensolaris/zfs) extra software"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~x86-fbsd"
+
+IUSE="build"
+LICENSE="CDDL GPL-2"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${SYS}.tar.bz2
+ build? ( mirror://gentoo/${SYS}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2 )"
+
+# sys is required.
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ =sys-freebsd/freebsd-libexec-${RV}*
+ build? ( sys-apps/baselayout )
+ dev-libs/libelf"
+
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )"
+
+S="${WORKDIR}/cddl"
+
+PATCHES=( "${FILESDIR}/${PN}-9.0-bsdxml.patch"
+ "${FILESDIR}/${PN}-9.0-underlink.patch"
+ "${FILESDIR}/${PN}-9.0-libpaths.patch" )
+
+src_unpack() {
+ freebsd_src_unpack
+ # Link in include headers.
+ ln -s "/usr/include" "${WORKDIR}/include" || die "Symlinking /usr/include.."
+}
+
+src_install() {
+ # Install libraries proper place
+ local mylibdir=$(get_libdir)
+ mkinstall SHLIBDIR="/usr/${mylibdir}" LIBDIR="/usr/${mylibdir}" || die
+
+ gen_usr_ldscript -a avl nvpair umem uutil zfs zpool
+
+ # Install zfs volinit script.
+ newinitd "${FILESDIR}"/zvol.initd-9.0 zvol
+
+ # Install zfs script
+ newinitd "${FILESDIR}"/zfs.initd zfs
+
+ keepdir /etc/zfs
+}
diff --git a/sys-freebsd/freebsd-contrib/ChangeLog b/sys-freebsd/freebsd-contrib/ChangeLog
index 2b4007b376c5..93a7f738180a 100644
--- a/sys-freebsd/freebsd-contrib/ChangeLog
+++ b/sys-freebsd/freebsd-contrib/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-contrib
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-contrib/ChangeLog,v 1.36 2012/05/04 11:36:46 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-contrib/ChangeLog,v 1.37 2012/09/11 17:02:43 aballier Exp $
+
+*freebsd-contrib-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-contrib-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
04 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-contrib-9.0.ebuild:
install libodialog in lib64 for amd64
diff --git a/sys-freebsd/freebsd-contrib/freebsd-contrib-9.1_rc1.ebuild b/sys-freebsd/freebsd-contrib/freebsd-contrib-9.1_rc1.ebuild
new file mode 100644
index 000000000000..5f23c3875812
--- /dev/null
+++ b/sys-freebsd/freebsd-contrib/freebsd-contrib-9.1_rc1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-contrib/freebsd-contrib-9.1_rc1.ebuild,v 1.1 2012/09/11 17:02:43 aballier Exp $
+
+inherit bsdmk freebsd flag-o-matic multilib
+
+DESCRIPTION="Contributed sources for FreeBSD."
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+LICENSE="BSD GPL-2 as-is"
+
+IUSE=""
+
+SRC_URI="mirror://gentoo/${GNU}.tar.bz2
+ mirror://gentoo/${P}.tar.bz2"
+
+RDEPEND=""
+DEPEND="=sys-freebsd/freebsd-sources-${RV}*
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+S="${WORKDIR}/gnu"
+
+src_unpack() {
+ echo ">>> Unpacking needed parts of ${GNU}.tar.bz2 to ${WORKDIR}"
+ tar -jxpf "${DISTDIR}/${GNU}.tar.bz2" gnu/lib/libodialog gnu/usr.bin/sort gnu/usr.bin/patch
+ echo ">>> Unpacking needed parts of ${CONTRIB}.tar.bz2 to ${WORKDIR}"
+ tar -jxpf "${DISTDIR}/${CONTRIB}.tar.bz2" contrib/gnu-sort
+
+ freebsd_do_patches
+ freebsd_rename_libraries
+}
+
+src_compile() {
+ cd "${S}/lib/libodialog"
+ freebsd_src_compile
+
+ cd "${S}/usr.bin/sort"
+ freebsd_src_compile
+
+ cd "${S}/usr.bin/patch"
+ freebsd_src_compile
+}
+
+src_install() {
+ use profile || mymakeopts="${mymakeopts} NO_PROFILE= "
+ mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
+
+ cd "${S}/lib/libodialog"
+ mkinstall LIBDIR="/usr/$(get_libdir)" || die "libodialog install failed"
+
+ cd "${S}/usr.bin/sort"
+ mkinstall BINDIR="/bin/" || die "sort install failed"
+
+ cd "${S}/usr.bin/patch"
+ mkinstall BINDIR="/usr/bin/" || die "patch install failed"
+}
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index 5f4f4419e909..db4abe7e1308 100644
--- a/sys-freebsd/freebsd-lib/ChangeLog
+++ b/sys-freebsd/freebsd-lib/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-lib
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.157 2012/08/02 15:25:21 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.158 2012/09/11 16:44:35 aballier Exp $
+
+*freebsd-lib-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-lib-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
02 Aug 2012; Richard Yao <ryao@gentoo.org> freebsd-lib-7.2-r1.ebuild,
freebsd-lib-8.0.ebuild, freebsd-lib-8.2-r1.ebuild, freebsd-lib-9.0-r3.ebuild:
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-9.1_rc1.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-9.1_rc1.ebuild
new file mode 100644
index 000000000000..ebd873ed3cda
--- /dev/null
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-9.1_rc1.ebuild
@@ -0,0 +1,535 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.1_rc1.ebuild,v 1.1 2012/09/11 16:44:35 aballier Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd flag-o-matic multilib toolchain-funcs eutils
+
+DESCRIPTION="FreeBSD's base system libraries"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+# Crypto is needed to have an internal OpenSSL header
+# sys is needed for libalias, probably we can just extract that instead of
+# extracting the whole tarball
+SRC_URI="mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${CRYPTO}.tar.bz2
+ mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${GNU}.tar.bz2
+ build? (
+ mirror://gentoo/${SYS}.tar.bz2 )
+ zfs? (
+ mirror://gentoo/${CDDL}.tar.bz2 )"
+
+if [ "${CATEGORY#*cross-}" = "${CATEGORY}" ]; then
+ RDEPEND="ssl? ( dev-libs/openssl )
+ hesiod? ( net-dns/hesiod )
+ kerberos? ( virtual/krb5 )
+ usb? ( !dev-libs/libusb !dev-libs/libusbx )
+ userland_GNU? ( sys-apps/mtree )
+ zfs? ( =sys-freebsd/freebsd-cddl-${RV}* )
+ >=dev-libs/expat-2.0.1
+ !sys-libs/libutempter
+ !sys-freebsd/freebsd-headers"
+ DEPEND="${RDEPEND}
+ >=sys-devel/flex-2.5.31-r2
+ =sys-freebsd/freebsd-sources-${RV}*
+ !bootstrap? ( app-arch/bzip2 )"
+else
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/${SYS}.tar.bz2"
+fi
+
+DEPEND="${DEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+S="${WORKDIR}/lib"
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [ "${CTARGET}" = "${CHOST}" -a "${CATEGORY#*cross-}" != "${CATEGORY}" ]; then
+ export CTARGET=${CATEGORY/cross-}
+fi
+
+IUSE="atm bluetooth ssl hesiod ipv6 kerberos usb netware
+ build bootstrap crosscompile_opts_headers-only zfs
+ userland_GNU userland_BSD multilib"
+
+pkg_setup() {
+ [ -c /dev/zero ] || \
+ die "You forgot to mount /dev; the compiled libc would break."
+
+ if ! use ssl && use kerberos; then
+ eerror "If you want kerberos support you need to enable ssl support, too."
+ fi
+
+ use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= "
+ use bluetooth || mymakeopts="${mymakeopts} WITHOUT_BLUETOOTH= "
+ use hesiod || mymakeopts="${mymakeopts} WITHOUT_HESIOD= "
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6_SUPPORT= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS_SUPPORT= "
+ use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+ use usb || mymakeopts="${mymakeopts} WITHOUT_USB= "
+ use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= "
+
+ mymakeopts="${mymakeopts} WITHOUT_BIND= WITHOUT_BIND_LIBS= WITHOUT_SENDMAIL= WITHOUT_CLANG= "
+
+ if [ "${CTARGET}" != "${CHOST}" ]; then
+ mymakeopts="${mymakeopts} MACHINE=$(tc-arch-kernel ${CTARGET})"
+ mymakeopts="${mymakeopts} MACHINE_ARCH=$(tc-arch-kernel ${CTARGET})"
+ fi
+}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-6.0-pmc.patch"
+ "${FILESDIR}/${PN}-6.0-gccfloat.patch"
+ "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
+ "${FILESDIR}/${PN}-6.1-csu.patch"
+ "${FILESDIR}/${PN}-8.0-rpcsec_gss.patch"
+ "${FILESDIR}/${PN}-9.0-liblink.patch"
+ "${FILESDIR}/${PN}-bsdxml2expat.patch" )
+
+# Here we disable and remove source which we don't need or want
+# In order:
+# - ncurses stuff
+# - libexpat creates a bsdxml library which is the same as expat
+# - archiving libraries (have their own ebuild)
+# - sendmail libraries (they are installed by sendmail)
+# - SNMP library and dependency (have their own ebuilds)
+# - Clang (compiler_rt and blocksruntime)
+#
+# The rest are libraries we already have somewhere else because
+# they are contribution.
+# Note: libtelnet is an internal lib used by telnet and telnetd programs
+# as it's not used in freebsd-lib package itself, it's pointless building
+# it here.
+REMOVE_SUBDIRS="ncurses \
+ libexpat \
+ libz libbz2 libarchive liblzma \
+ libsm libsmdb libsmutil \
+ libbegemot libbsnmp \
+ libcompiler_rt libblocksruntime \
+ libpam libpcap bind libwrap libmagic \
+ libcom_err libtelnet
+ libelf libedit"
+
+# Are we building a cross-compiler?
+is_crosscompile() {
+ [ "${CATEGORY#*cross-}" != "${CATEGORY}" ]
+}
+
+src_prepare() {
+ sed -i.bak -e 's:-o/dev/stdout:-t:' "${S}/libc/net/Makefile.inc"
+
+ # Upstream Display Managers default to using VT7
+ # We should make FreeBSD allow this by default
+ local x=
+ for x in "${WORKDIR}"/etc/etc.*/ttys ; do
+ sed -i.bak \
+ -e '/ttyv5[[:space:]]/ a\
+# Display Managers default to VT7.\
+# If you use the xdm init script, keep ttyv6 commented out\
+# unless you force a different VT for the DM being used.' \
+ -e '/^ttyv[678][[:space:]]/ s/^/# /' "${x}" \
+ || die "Failed to sed ${x}"
+ rm "${x}".bak
+ done
+
+ # This one is here because it also
+ # 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
+ sed -i.bak -e 's:hesiod.h::' "${WORKDIR}"/include/Makefile || die
+ sed -i.bak -e 's:hesiod.c::' -e 's:hesiod.3::' \
+ "${WORKDIR}"/lib/libc/net/Makefile.inc || die
+
+ # Fix the Makefiles of these few libraries that will overwrite our LDADD.
+ cd "${S}"
+ for dir in libradius libtacplus libcam libdevstat libfetch libgeom libmemstat libopie \
+ libsmb; do sed -i.bak -e 's:LDADD=:LDADD+=:g' "${dir}/Makefile" || \
+ die "Problem fixing \"${dir}/Makefile"
+ 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
+ if use build; then
+ cd "${WORKDIR}"
+ # This patch has to be applied on ${WORKDIR}/sys, so we do it here since it
+ # shouldn't be a symlink to /usr/src/sys (which should be already patched)
+ epatch "${FILESDIR}"/${PN}-7.1-types.h-fix.patch
+ epatch "${FILESDIR}"/freebsd-sources-9.0-sysctluint.patch
+ return 0
+ fi
+
+ if ! is_crosscompile ; then
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys" || die "Couldn't make sys symlink!"
+ else
+ sed -i.bak -e "s:/usr/include:/usr/${CTARGET}/usr/include:g" \
+ "${S}/libc/rpc/Makefile.inc" \
+ "${S}/libc/yp/Makefile.inc"
+ fi
+
+ if install --version 2> /dev/null | grep -q GNU; then
+ sed -i.bak -e 's:${INSTALL} -C:${INSTALL}:' "${WORKDIR}/include/Makefile"
+ fi
+
+ # Let arch-specific includes to be found
+ local machine
+ machine=$(tc-arch-kernel ${CTARGET})
+ ln -s "${WORKDIR}/sys/${machine}/include" "${WORKDIR}/include/machine" || \
+ die "Couldn't make ${machine}/include symlink."
+
+ cd "${S}"
+ use bootstrap && dummy_mk libstand
+ # Try to fix sed calls for GNU sed. Do it only with GNU userland and force
+ # BSD's sed on BSD.
+ if use userland_GNU; then
+ find . -name Makefile -exec sed -ibak 's/sed -i /sed -i/' {} \;
+ fi
+}
+
+get_csudir() {
+ if [ -d "${WORKDIR}/lib/csu/$1-elf" ]; then
+ echo "lib/csu/$1-elf"
+ else
+ echo "lib/csu/$1"
+ fi
+}
+
+bootstrap_csu() {
+ local csudir="$(get_csudir $(tc-arch-kernel ${CTARGET}))"
+ export RAW_LDFLAGS=$(raw-ldflags)
+ cd "${WORKDIR}/${csudir}" || die "Missing ${csudir}."
+ freebsd_src_compile
+
+ CFLAGS="${CFLAGS} -B ${MAKEOBJDIRPREFIX}/${WORKDIR}/${csudir}"
+ append-ldflags "-B ${MAKEOBJDIRPREFIX}/${WORKDIR}/${csudir}"
+}
+
+# Compile libssp_nonshared.a and add it's path to LDFLAGS.
+bootstrap_libssp_nonshared() {
+ cd "${WORKDIR}/gnu/lib/libssp/libssp_nonshared/" || die "missing libssp."
+ freebsd_src_compile
+ append-ldflags "-L${MAKEOBJDIRPREFIX}/${WORKDIR}/gnu/lib/libssp/libssp_nonshared/"
+ export LDADD="-lssp_nonshared"
+}
+
+# What to build for a non-native build: cross-compiler, non-native abi in
+# multilib. We also need the csu but this has to be handled separately.
+NON_NATIVE_SUBDIRS="lib/libc lib/msun gnu/lib/libssp/libssp_nonshared lib/libthr lib/libutil"
+
+# Subdirs for a native build:
+NATIVE_SUBDIRS="lib gnu/lib/libssp/libssp_nonshared gnu/lib/libregex"
+
+# Is my $ABI native ?
+is_native_abi() {
+ is_crosscompile && return 1
+ use multilib || return 0
+ [ "${ABI}" = "${DEFAULT_ABI}" ]
+}
+
+# Do we need to bootstrap the csu and libssp_nonshared?
+need_bootstrap() {
+ is_crosscompile || use build || ! is_native_abi || has_version "<${CATEGORY}/${P}"
+}
+
+# Get the subdirs we are building.
+get_subdirs() {
+ local ret=""
+ if is_native_abi ; then
+ # If we are building for the native ABI, build everything
+ ret="${NATIVE_SUBDIRS}"
+ elif is_crosscompile ; then
+ # With a cross-compiler we only build the very core parts.
+ ret="${NON_NATIVE_SUBDIRS}"
+ if [ "${EBUILD_PHASE}" = "install" ]; then
+ # Add the csu dir first when installing. We treat it separately for
+ # compiling.
+ ret="$(get_csudir $(tc-arch-kernel ${CTARGET})) ${ret}"
+ fi
+ elif use build ; then
+ # For the non-native ABIs we only build the csu parts and very core
+ # libraries for now.
+ ret="gnu/lib/libssp/libssp_nonshared"
+ if [ "${EBUILD_PHASE}" = "install" ]; then
+ ret="$(get_csudir $(tc-arch-kernel ${CHOST})) ${ret}"
+ fi
+ else
+ # Only build the csu parts and core libraries for now.
+ ret="gnu/lib/libssp/libssp_nonshared"
+ if [ "${EBUILD_PHASE}" = "install" ]; then
+ ret="$(get_csudir $(tc-arch-kernel ${CHOST})) ${ret}"
+ fi
+ # Finally, with a non-native ABI without USE=build, we build everything
+ # too.
+ #ret="${NATIVE_SUBDIRS}"
+ fi
+ echo "${ret}"
+}
+
+# Bootstrap the core libraries and setup the flags so that the other parts can
+# build against it.
+do_bootstrap() {
+ einfo "Bootstrapping on ${CHOST} for ${CTARGET}"
+ if ! is_crosscompile ; then
+ # Pre-install headers, but not when building a cross-compiler since we
+ # assume they have been installed in the previous pass.
+ einfo "Pre-installing includes in include_proper_${ABI}"
+ mkdir "${WORKDIR}/include_proper_${ABI}" || die
+ CTARGET="${CHOST}" install_includes "/include_proper_${ABI}"
+ CFLAGS="${CFLAGS} -isystem ${WORKDIR}/include_proper_${ABI}"
+ fi
+ bootstrap_csu
+ bootstrap_libssp_nonshared
+}
+
+# Compile it. Assume we have the toolchain setup correctly.
+do_compile() {
+ export MAKEOBJDIRPREFIX="${WORKDIR}/${CHOST}"
+ mkdir "${MAKEOBJDIRPREFIX}" || die "Could not create ${MAKEOBJDIRPREFIX}."
+ need_bootstrap && do_bootstrap
+
+ export RAW_LDFLAGS=$(raw-ldflags)
+
+ #fixes bug 419477, multilib support
+ cd "${S}"
+ sed -i -e "s:^LDFLAGS+=.*:LDFLAGS+=-L ${MAKEOBJDIRPREFIX}/${S}/libgssapi:" \
+ librpcsec_gss/Makefile || die "Problem fixing \"librpcsec_gss/Makefile"
+ sed -i -e "s:^LDFLAGS+=.*:LDFLAGS+=-L ${MAKEOBJDIRPREFIX}/${S}/libutil -L ${MAKEOBJDIRPREFIX}/${S}/libproc:" \
+ librtld_db/Makefile || die "Problem fixing \"librtld_db/Makefile"
+
+ # Everything is now setup, build it!
+ for i in $(get_subdirs) ; do
+ einfo "Building in ${i}... with CC=${CC} and CFLAGS=${CFLAGS}"
+ cd "${WORKDIR}/${i}/" || die "missing ${i}."
+ freebsd_src_compile || die "make ${i} failed"
+ done
+}
+
+src_compile() {
+ # Does not work with GNU sed
+ # Force BSD's sed on BSD.
+ if use userland_BSD ; then
+ export ESED=/usr/bin/sed
+ unalias sed
+ fi
+
+ cd "${WORKDIR}/include"
+ $(freebsd_get_bmake) CC="$(tc-getCC)" || die "make include failed"
+
+ use crosscompile_opts_headers-only && return 0
+
+ # Bug #270098
+ append-flags $(test-flags -fno-strict-aliasing)
+
+ # Bug #324445
+ append-flags $(test-flags -fno-strict-overflow)
+
+ # strip flags and do not do it later, we only add safe, and in fact
+ # needed flags after all
+ strip-flags
+ export NOFLAGSTRIP=yes
+ if is_crosscompile ; then
+ export YACC='yacc -by'
+ CHOST=${CTARGET} tc-export CC LD CXX RANLIB
+ mymakeopts="${mymakeopts} NLS="
+ append-flags "-I/usr/${CTARGET}/usr/include"
+ append-ldflags "-L${WORKDIR}/${CHOST}/${WORKDIR}/lib/libc"
+ fi
+
+ if is_crosscompile ; then
+ do_compile
+ else
+ for ABI in $(get_all_abis) ; do
+ # First, save the variables: CFLAGS, CXXFLAGS, LDFLAGS and mymakeopts.
+ for i in CFLAGS CXXFLAGS LDFLAGS mymakeopts ; do
+ export ${i}_SAVE="${!i}"
+ done
+
+ multilib_toolchain_setup ${ABI}
+
+ local target="$(tc-arch-kernel ${CHOST})"
+ mymakeopts="${mymakeopts} TARGET=${target} MACHINE=${target} MACHINE_ARCH=${target}"
+ CFLAGADD=""
+ if ! is_native_abi ; then
+ mymakeopts="${mymakeopts} COMPAT_32BIT="
+ else
+ use build || CFLAGS="${CFLAGS} -isystem /usr/include";
+ fi
+
+ einfo "Building for ABI ${ABI} and TARGET=$(tc-arch-kernel ${CHOST})"
+
+ CTARGET="${CHOST}" do_compile
+
+ # Restore the variables now.
+ for i in CFLAGS CXXFLAGS LDFLAGS mymakeopts ; do
+ ii="${i}_SAVE"
+ export ${i}="${!ii}"
+ done
+ done
+ fi
+}
+
+gen_libc_ldscript() {
+ # Parameters:
+ # $1 = target libdir
+ # $2 = source libc dir
+ # $3 = source libssp_nonshared dir
+
+ # Clear the symlink.
+ rm -f "${D}/$2/libc.so" || die
+
+ # Move the library if needed
+ if [ "$1" != "$2" ] ; then
+ mv "${D}/$2/libc.so.7" "${D}/$1/" || die
+ fi
+
+ # Generate libc.so ldscript for inclusion of libssp_nonshared.a when linking
+ # this is done to avoid having to touch gcc spec file as it is currently
+ # done on FreeBSD upstream, mostly because their binutils aren't able to
+ # cope with linker scripts yet.
+ # Taken from toolchain-funcs.eclass:
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat > "${D}/$2/libc.so" <<-END_LDSCRIPT
+/* GNU ld script
+ SSP (-fstack-protector) requires __stack_chk_fail_local to be local.
+ GCC invokes this symbol in a non-PIC way, which results in TEXTRELs if
+ this symbol was provided by a shared libc. So we link in
+ libssp_nonshared.a from here.
+ */
+${output_format}
+GROUP ( /$1/libc.so.7 /$3/libssp_nonshared.a )
+END_LDSCRIPT
+}
+
+do_install() {
+ export MAKEOBJDIRPREFIX="${WORKDIR}/${CHOST}"
+ for i in $(get_subdirs) ; do
+ einfo "Installing in ${i}..."
+ cd "${WORKDIR}/${i}/" || die "missing ${i}."
+ freebsd_src_install || die "Install ${i} failed"
+ done
+}
+
+src_install() {
+ [ "${CTARGET}" = "${CHOST}" ] \
+ && INCLUDEDIR="/usr/include" \
+ || INCLUDEDIR="/usr/${CTARGET}/usr/include"
+ dodir ${INCLUDEDIR}
+ einfo "Installing for ${CTARGET} in ${CHOST}.."
+ install_includes ${INCLUDEDIR}
+
+ use crosscompile_opts_headers-only && return 0
+ local mylibdir=$(get_libdir)
+
+ if is_crosscompile ; then
+ mymakeopts="${mymakeopts} NO_MAN= \
+ INCLUDEDIR=/usr/${CTARGET}/usr/include \
+ SHLIBDIR=/usr/${CTARGET}/usr/lib \
+ LIBDIR=/usr/${CTARGET}/usr/lib"
+
+ dosym "usr/include" "/usr/${CTARGET}/sys-include"
+ do_install
+ else
+ if ! use multilib ; then
+ # Set SHLIBDIR and LIBDIR for multilib
+ mymakeopts="${mymakeopts} SHLIBDIR=/usr/${mylibdir} LIBDIR=/usr/${mylibdir}"
+ do_install
+ else
+ for ABI in $(get_all_abis) ; do
+ mymakeopts_SAVE="${mymakeopts}"
+ multilib_toolchain_setup ${ABI}
+ mymakeopts="${mymakeopts} SHLIBDIR=/usr/$(get_libdir) LIBDIR=/usr/$(get_libdir)"
+ do_install
+ mymakeopts="${mymakeopts_SAVE}"
+ done
+ fi
+ fi
+
+ # Don't install the rest of the configuration files if crosscompiling
+ if is_crosscompile ; then
+ # This is to get it stripped with the correct tools, otherwise it gets
+ # stripped with the host strip.
+ # And also get the correct OUTPUT_FORMAT in the libc ldscript.
+ export CHOST=${CTARGET}
+ gen_libc_ldscript "usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib"
+ return 0
+ fi
+
+ cd "${WORKDIR}/etc/"
+ insinto /etc
+ doins auth.conf nls.alias mac.conf netconfig
+
+ # Install ttys file
+ local MACHINE="$(tc-arch-kernel)"
+ doins "etc.${MACHINE}"/*
+
+ # Generate ldscripts for core libraries that will go in /
+ gen_usr_ldscript -a alias cam geom ipsec jail kiconv \
+ kvm m md procstat sbuf thr ufs util
+
+ gen_libc_ldscript "${mylibdir}" "usr/${mylibdir}" "usr/${mylibdir}"
+
+ # Install a libusb.pc for better compat with Linux's libusb
+ if use usb ; then
+ dodir /usr/$(get_libdir)/pkgconfig
+ sed -e "s:@LIBDIR@:/usr/$(get_libdir):" "${FILESDIR}/libusb.pc.in" > "${D}/usr/$(get_libdir)/pkgconfig/libusb.pc" || die
+ fi
+}
+
+install_includes()
+{
+ local INCLUDEDIR="$1"
+
+ # The idea is to be called from either install or unpack.
+ # During unpack it's required to install them as portage's user.
+ if [[ "${EBUILD_PHASE}" == "install" ]]; then
+ local DESTDIR="${D}"
+ BINOWN="root"
+ BINGRP="wheel"
+ else
+ local DESTDIR="${WORKDIR}"
+ [[ -z "${USER}" ]] && USER="portage"
+ BINOWN="${USER}"
+ [[ -z "${GROUPS}" ]] && GROUPS="portage"
+ BINGRP="${GROUPS}"
+ fi
+
+ # Must exist before we use it.
+ [[ -d "${DESTDIR}${INCLUDEDIR}" ]] || die "dodir or mkdir ${INCLUDEDIR} before using install_includes."
+ cd "${WORKDIR}/include"
+
+ local MACHINE="$(tc-arch-kernel)"
+
+ einfo "Installing includes into ${INCLUDEDIR} as ${BINOWN}:${BINGRP}..."
+ $(freebsd_get_bmake) installincludes \
+ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE} \
+ DESTDIR="${DESTDIR}" \
+ INCLUDEDIR="${INCLUDEDIR}" BINOWN="${BINOWN}" \
+ BINGRP="${BINGRP}" || die "install_includes() failed"
+ einfo "includes installed ok."
+ EXTRA_INCLUDES="lib/librtld_db lib/libutil lib/msun gnu/lib/libregex"
+ 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."
+ einfo "$i includes installed ok."
+ done
+}
diff --git a/sys-freebsd/freebsd-libexec/ChangeLog b/sys-freebsd/freebsd-libexec/ChangeLog
index c74b3187b2ac..de99f5c17255 100644
--- a/sys-freebsd/freebsd-libexec/ChangeLog
+++ b/sys-freebsd/freebsd-libexec/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-libexec
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/ChangeLog,v 1.48 2012/04/26 14:20:07 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/ChangeLog,v 1.49 2012/09/11 16:52:28 aballier Exp $
+
+*freebsd-libexec-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-libexec-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
26 Apr 2012; Alexis Ballier <aballier@gentoo.org> freebsd-libexec-9.0.ebuild:
keyword ~amd64-fbsd
diff --git a/sys-freebsd/freebsd-libexec/freebsd-libexec-9.1_rc1.ebuild b/sys-freebsd/freebsd-libexec/freebsd-libexec-9.1_rc1.ebuild
new file mode 100644
index 000000000000..a553fa709ac2
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/freebsd-libexec-9.1_rc1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/freebsd-libexec-9.1_rc1.ebuild,v 1.1 2012/09/11 16:52:28 aballier Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd pam
+
+DESCRIPTION="FreeBSD libexec things"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+SRC_URI="mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+RDEPEND="${RDEPEND}
+ xinetd? ( sys-apps/xinetd )"
+
+S="${WORKDIR}/libexec"
+
+# Remove sendmail, tcp_wrapper and other useless stuff
+REMOVE_SUBDIRS="smrsh mail.local tcpd telnetd rshd rlogind lukemftpd ftpd"
+
+IUSE="pam ssl kerberos ipv6 nis xinetd"
+
+pkg_setup() {
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS_SUPPORT= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+ use pam || mymakeopts="${mymakeopts} WITHOUT_PAM_SUPPORT= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+
+ mymakeopts="${mymakeopts} WITHOUT_SENDMAIL= WITHOUT_PF= WITHOUT_RCMDS= "
+}
+
+src_prepare() {
+ ln -s /usr/include "${WORKDIR}/include"
+}
+
+src_install() {
+ freebsd_src_install
+
+ insinto /etc
+ doins "${WORKDIR}/etc/gettytab"
+ newinitd "${FILESDIR}/bootpd.initd" bootpd
+ newconfd "${FILESDIR}/bootpd.confd" bootpd
+
+ if use xinetd; then
+ for rpcd in rstatd rusersd walld rquotad sprayd; do
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${rpcd}.xinetd" ${rpcd}
+ done
+ fi
+}
diff --git a/sys-freebsd/freebsd-mk-defs/ChangeLog b/sys-freebsd/freebsd-mk-defs/ChangeLog
index 195f0b0c66fa..ea3c52ee21d0 100644
--- a/sys-freebsd/freebsd-mk-defs/ChangeLog
+++ b/sys-freebsd/freebsd-mk-defs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-freebsd/freebsd-mk-defs
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-mk-defs/ChangeLog,v 1.46 2012/05/22 18:52:20 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-mk-defs/ChangeLog,v 1.47 2012/09/11 16:39:42 aballier Exp $
+
+*freebsd-mk-defs-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-mk-defs-9.1_rc1.ebuild, +files/freebsd-mk-defs-9.1-gentoo.patch,
+ +files/freebsd-mk-defs-9.1-gnu.patch:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
*freebsd-mk-defs-9.0-r1 (22 May 2012)
diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gentoo.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gentoo.patch
new file mode 100644
index 000000000000..598d0b9145b4
--- /dev/null
+++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gentoo.patch
@@ -0,0 +1,326 @@
+diff -Nur share.orig/mk/bsd.doc.mk share/mk/bsd.doc.mk
+--- share.orig/mk/bsd.doc.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.doc.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -135,10 +135,12 @@
+ realinstall:
+ .for _dev in ${PRINTERDEVICE:Mhtml}
+ cd ${SRCDIR}; \
++ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
+ .endfor
+ .for _dev in ${PRINTERDEVICE:Nhtml}
++ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}; \
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}
+ .endfor
+diff -Nur share.orig/mk/bsd.files.mk share/mk/bsd.files.mk
+--- share.orig/mk/bsd.files.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.files.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -39,6 +39,7 @@
+ .endif
+ installfiles: _${group}INS_${file:T}
+ _${group}INS_${file:T}: ${file}
++ ${INSTALL} -d ${DESTDIR}${${group}DIR_${.ALLSRC:T}}
+ ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
+ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
+ ${.ALLSRC} \
+@@ -51,10 +52,12 @@
+ installfiles: _${group}INS
+ _${group}INS: ${_${group}FILES}
+ .if defined(${group}NAME)
++ ${INSTALL} -d ${DESTDIR}${${group}DIR}/${${group}NAME}
+ ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+ -m ${${group}MODE} ${.ALLSRC} \
+ ${DESTDIR}${${group}DIR}/${${group}NAME}
+ .else
++ ${INSTALL} -d ${DESTDIR}${${group}DIR}
+ ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ .endif
+diff -Nur share.orig/mk/bsd.incs.mk share/mk/bsd.incs.mk
+--- share.orig/mk/bsd.incs.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.incs.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -41,6 +41,9 @@
+ .endif
+ 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} \
+@@ -53,9 +56,13 @@
+ installincludes: _${group}INS
+ _${group}INS: ${_${group}INCS}
+ .if defined(${group}NAME)
++ ${INSTALL} -d -o ${${group}OWN} -g ${${group}GRP} \
++ ${DESTDIR}${${group}DIR}
+ ${INSTALL} -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} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ .endif
+diff -Nur share.orig/mk/bsd.info.mk share/mk/bsd.info.mk
+--- share.orig/mk/bsd.info.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.info.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -83,6 +83,7 @@
+ TEX?= tex
+ DVIPS?= dvips
+ DVIPS2ASCII?= dvips2ascii
++INSTALL?= install
+
+ .SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html
+
+@@ -144,15 +145,17 @@
+ 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 -Nur share.orig/mk/bsd.lib.mk share/mk/bsd.lib.mk
+--- share.orig/mk/bsd.lib.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.lib.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -46,10 +46,6 @@
+ .endif
+ .endif
+
+-.if !defined(DEBUG_FLAGS)
+-STRIP?= -s
+-.endif
+-
+ .include <bsd.libnames.mk>
+
+ # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
+@@ -284,14 +280,17 @@
+ .ORDER: beforeinstall _libinstall
+ _libinstall:
+ .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
++ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
+ .endif
+ .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
++ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
+ .endif
+ .if defined(SHLIB_NAME)
++ ${INSTALL} -d ${DESTDIR}${SHLIBDIR}
+ ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
+ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
+@@ -329,10 +328,12 @@
+ .endif # SHLIB_LINK
+ .endif # SHIB_NAME
+ .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
++ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+ ${INSTALL} -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} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}
+ .endif
+diff -Nur share.orig/mk/bsd.libnames.mk share/mk/bsd.libnames.mk
+--- share.orig/mk/bsd.libnames.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.libnames.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -48,7 +48,7 @@
+ LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a
+ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a
+ LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a
+-LIBFL?= "don't use LIBFL, use LIBL"
++LIBFL?= ${DESTDIR}${LIBDIR}/libfl.a
+ LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a
+ LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a
+ LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a
+@@ -79,7 +79,7 @@
+ 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"
+ .if ${MK_BIND} != "no"
+ LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a
+diff -Nur share.orig/mk/bsd.links.mk share/mk/bsd.links.mk
+--- share.orig/mk/bsd.links.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.links.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -15,6 +15,8 @@
+ t=${DESTDIR}$$1; \
+ shift; \
+ ${ECHO} $$t -\> $$l; \
++ d=`dirname $$t`; \
++ test -d $$d || mkdir $$d; \
+ ln -f $$l $$t; \
+ done; true
+ .endif
+@@ -26,6 +28,8 @@
+ t=${DESTDIR}$$1; \
+ shift; \
+ ${ECHO} $$t -\> $$l; \
++ d=`dirname $$t`; \
++ test -d $$d || mkdir $$d; \
+ ln -fs $$l $$t; \
+ done; true
+ .endif
+diff -Nur share.orig/mk/bsd.man.mk share/mk/bsd.man.mk
+--- share.orig/mk/bsd.man.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.man.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -165,9 +165,11 @@
+ .if defined(NO_MANCOMPRESS)
+ .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
+@@ -181,11 +183,14 @@
+ 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
+@@ -193,9 +198,11 @@
+ .endif
+ .else
+ .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 -Nur share.orig/mk/bsd.nls.mk share/mk/bsd.nls.mk
+--- share.orig/mk/bsd.nls.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.nls.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -62,7 +62,8 @@
+ # installation rules
+ #
+ .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})
+ NLSLINKS+= ${file:R}
+ .endif
+diff -Nur share.orig/mk/bsd.own.mk share/mk/bsd.own.mk
+--- share.orig/mk/bsd.own.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.own.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -182,9 +182,6 @@
+ INCLUDEDIR?= /usr/include
+
+ # Common variables
+-.if !defined(DEBUG_FLAGS)
+-STRIP?= -s
+-.endif
+
+ COMPRESS_CMD?= gzip -cn
+ COMPRESS_EXT?= .gz
+diff -Nur share.orig/mk/bsd.prog.mk share/mk/bsd.prog.mk
+--- share.orig/mk/bsd.prog.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.prog.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -33,10 +33,6 @@
+ CFLAGS+=${CRUNCH_CFLAGS}
+ .endif
+
+-.if !defined(DEBUG_FLAGS)
+-STRIP?= -s
+-.endif
+-
+ .if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")
+ LDFLAGS+= -static
+ .endif
+@@ -155,6 +151,7 @@
+ .ORDER: beforeinstall _proginstall
+ _proginstall:
+ .if defined(PROG)
++ ${INSTALL} -d ${DESTDIR}${BINDIR}
+ .if defined(PROGNAME)
+ ${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
+@@ -186,6 +183,7 @@
+ SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE}
+ _scriptsinstall: _SCRIPTSINS_${script:T}
+ _SCRIPTSINS_${script:T}: ${script}
++ ${INSTALL} -d ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}
+ ${INSTALL} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
+ -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
+ ${.ALLSRC} \
+diff -Nur share.orig/mk/bsd.sys.mk share/mk/bsd.sys.mk
+--- share.orig/mk/bsd.sys.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/bsd.sys.mk 2012-07-16 00:04:14.000000000 +0900
+@@ -28,10 +28,6 @@
+ .if defined(WARNS)
+ .if ${WARNS} >= 1
+ CWARNFLAGS+= -Wsystem-headers
+-.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \
+- ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang))
+-CWARNFLAGS+= -Werror
+-.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang)
+ .endif # WARNS >= 1
+ .if ${WARNS} >= 2
+ CWARNFLAGS+= -Wall -Wno-format-y2k
+@@ -95,10 +91,6 @@
+ CWARNFLAGS+= -Wno-format-nonliteral
+ .endif # WARNS <= 3
+ .endif # CLANG
+-.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \
+- ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang))
+-CWARNFLAGS+= -Werror
+-.endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang)
+ .endif # WFORMAT > 0
+ .endif # WFORMAT
+ .if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || \
+diff -Nur share.orig/mk/sys.mk share/mk/sys.mk
+--- share.orig/mk/sys.mk 2012-07-12 13:25:44.000000000 +0900
++++ share/mk/sys.mk 2012-07-16 00:01:55.000000000 +0900
+@@ -349,12 +349,6 @@
+ (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
+ ${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
+
+-# FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef.
+-__MAKE_CONF?=/etc/make.conf
+-.if exists(${__MAKE_CONF})
+-.include "${__MAKE_CONF}"
+-.endif
+-
+ .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
+ SHELL= ${__MAKE_SHELL}
+ .SHELL: path=${__MAKE_SHELL}
diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gnu.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gnu.patch
new file mode 100644
index 000000000000..f986ed9c3e11
--- /dev/null
+++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-9.1-gnu.patch
@@ -0,0 +1,77 @@
+diff -Nur share.orig/mk/bsd.lib.mk share/mk/bsd.lib.mk
+--- share.orig/mk/bsd.lib.mk 2012-07-16 02:40:07.000000000 +0900
++++ share/mk/bsd.lib.mk 2012-07-16 02:41:40.000000000 +0900
+@@ -155,11 +155,7 @@
+ lib${LIB}.a: ${OBJS} ${STATICOBJS}
+ @${ECHO} building static ${LIB} library
+ @rm -f ${.TARGET}
+-.if !defined(NM)
+- @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
+-.else
+- @${AR} cq ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
+-.endif
++ @${AR} cq ${.TARGET} ${OBJS} ${STATICOBJS} ${ARADD}
+ ${RANLIB} ${.TARGET}
+ .endif
+
+@@ -172,11 +168,7 @@
+ lib${LIB}_p.a: ${POBJS}
+ @${ECHO} building profiled ${LIB} library
+ @rm -f ${.TARGET}
+-.if !defined(NM)
+- @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
+-.else
+- @${AR} cq ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD}
+-.endif
++ @${AR} cq ${.TARGET} ${POBJS} ${ARADD}
+ ${RANLIB} ${.TARGET}
+ .endif
+
+@@ -203,15 +195,9 @@
+ .if defined(SHLIB_LINK)
+ @ln -fs ${.TARGET} ${SHLIB_LINK}
+ .endif
+-.if !defined(NM)
+ @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
+ -o ${.TARGET} -Wl,-soname,${SONAME} \
+- `lorder ${SOBJS} | tsort -q` ${LDADD}
+-.else
+- @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
+- -o ${.TARGET} -Wl,-soname,${SONAME} \
+- `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
+-.endif
++ `echo ${SOBJS} | xargs -n 1 echo | sort -u` ${LDADD}
+ @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \
+ (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \
+ ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS})
+@@ -259,13 +245,6 @@
+
+ .if !target(install)
+
+-.if defined(PRECIOUSLIB)
+-.if !defined(NO_FSCHG)
+-SHLINSTALLFLAGS+= -fschg
+-.endif
+-SHLINSTALLFLAGS+= -S
+-.endif
+-
+ _INSTALLFLAGS:= ${INSTALLFLAGS}
+ .for ie in ${INSTALLFLAGS_EDIT}
+ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
+diff -Nur share.orig/mk/bsd.prog.mk share/mk/bsd.prog.mk
+--- share.orig/mk/bsd.prog.mk 2012-07-16 02:40:07.000000000 +0900
++++ share/mk/bsd.prog.mk 2012-07-16 02:40:24.000000000 +0900
+@@ -134,13 +134,6 @@
+
+ .if !target(install)
+
+-.if defined(PRECIOUSPROG)
+-.if !defined(NO_FSCHG)
+-INSTALLFLAGS+= -fschg
+-.endif
+-INSTALLFLAGS+= -S
+-.endif
+-
+ _INSTALLFLAGS:= ${INSTALLFLAGS}
+ .for ie in ${INSTALLFLAGS_EDIT}
+ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
diff --git a/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-9.1_rc1.ebuild b/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-9.1_rc1.ebuild
new file mode 100644
index 000000000000..3c8e873bccc2
--- /dev/null
+++ b/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-9.1_rc1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-9.1_rc1.ebuild,v 1.1 2012/09/11 16:39:42 aballier Exp $
+
+EAPI=3
+
+inherit bsdmk freebsd
+
+DESCRIPTION="Makefiles definitions used for building and installing libraries and system files"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+IUSE="userland_GNU"
+
+SRC_URI="mirror://gentoo/${SHARE}.tar.bz2"
+
+RDEPEND=""
+DEPEND=""
+
+RESTRICT="strip"
+
+S="${WORKDIR}/share/mk"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-9.1-gentoo.patch"
+ use userland_GNU && epatch "${FILESDIR}/${PN}-9.1-gnu.patch"
+}
+
+src_compile() { :; }
+
+src_install() {
+ if [[ ${CHOST} != *-freebsd* ]]; then
+ insinto /usr/share/mk/freebsd
+ else
+ insinto /usr/share/mk
+ fi
+ doins *.mk *.awk
+}
diff --git a/sys-freebsd/freebsd-pam-modules/ChangeLog b/sys-freebsd/freebsd-pam-modules/ChangeLog
index f487b3109f9e..3d91a4a4a6a9 100644
--- a/sys-freebsd/freebsd-pam-modules/ChangeLog
+++ b/sys-freebsd/freebsd-pam-modules/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-pam-modules
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/ChangeLog,v 1.33 2012/04/26 13:46:44 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/ChangeLog,v 1.34 2012/09/11 16:55:30 aballier Exp $
+
+*freebsd-pam-modules-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-pam-modules-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
26 Apr 2012; Alexis Ballier <aballier@gentoo.org>
freebsd-pam-modules-9.0.ebuild:
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1_rc1.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1_rc1.ebuild
new file mode 100644
index 000000000000..86b644bf2228
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1_rc1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-9.1_rc1.ebuild,v 1.1 2012/09/11 16:55:30 aballier Exp $
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+IUSE="kerberos nis"
+
+SRC_URI="mirror://gentoo/${LIB}.tar.bz2"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} NO_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${WORKDIR}"/lib
+
+ for module in pam_deny pam_passwdqc pam_permit; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc
+ done
+
+ # Avoid using static versions; use gentoo /lib/security dir
+ epatch "${FILESDIR}"/${PN}-9.0-gentoo.patch
+}
+
+src_install() {
+ mkinstall "LIBDIR=/$(get_libdir)/security" || die "install failed"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-sbin/ChangeLog b/sys-freebsd/freebsd-sbin/ChangeLog
index e72ea6f4f5a7..788866fb4097 100644
--- a/sys-freebsd/freebsd-sbin/ChangeLog
+++ b/sys-freebsd/freebsd-sbin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-sbin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/ChangeLog,v 1.69 2012/05/12 14:28:56 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/ChangeLog,v 1.70 2012/09/11 17:05:47 aballier Exp $
+
+*freebsd-sbin-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-sbin-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
12 May 2012; Alexis Ballier <aballier@gentoo.org> -freebsd-sbin-8.2.ebuild,
-freebsd-sbin-9.0.ebuild:
diff --git a/sys-freebsd/freebsd-sbin/freebsd-sbin-9.1_rc1.ebuild b/sys-freebsd/freebsd-sbin/freebsd-sbin-9.1_rc1.ebuild
new file mode 100644
index 000000000000..59c59c495398
--- /dev/null
+++ b/sys-freebsd/freebsd-sbin/freebsd-sbin-9.1_rc1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/freebsd-sbin-9.1_rc1.ebuild,v 1.1 2012/09/11 17:05:47 aballier Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd multilib
+
+DESCRIPTION="FreeBSD sbin utils"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+
+SRC_URI="mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ build? ( mirror://gentoo/${SYS}.tar.bz2 )"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*[ipv6?,atm?,netware?]
+ =sys-freebsd/freebsd-libexec-${RV}*
+ >=dev-libs/expat-2.0.1
+ ssl? ( dev-libs/openssl )
+ >=dev-libs/libedit-20120311.3.0-r1
+ sys-libs/readline
+ sys-process/vixie-cron
+ atm? ( net-analyzer/bsnmp )"
+DEPEND="${RDEPEND}
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+S="${WORKDIR}/sbin"
+
+IUSE="atm ipfilter +pf ipv6 build ssl +cxx netware"
+
+pkg_setup() {
+ use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= "
+ use cxx || mymakeopts="${mymakeopts} WITHOUT_CXX="
+ use ipfilter || mymakeopts="${mymakeopts} WITHOUT_IPFILTER= "
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT="
+ use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= "
+ use pf || mymakeopts="${mymakeopts} WITHOUT_PF= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL="
+}
+
+REMOVE_SUBDIRS="dhclient pfctl pflogd rcorder resolvconf"
+
+PATCHES=( "${FILESDIR}/${PN}-setXid.patch"
+ "${FILESDIR}/${PN}-7.1-zlib.patch"
+ "${FILESDIR}/${PN}-6.2-ldconfig.patch"
+ "${FILESDIR}/${PN}-6.1-pr102701.patch"
+ "${FILESDIR}/${PN}-bsdxml2expat.patch" )
+
+src_prepare() {
+ use build || ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+}
+
+src_install() {
+ mymakeopts="${mymakeopts} GEOM_CLASS_DIR=/$(get_libdir)/geom "
+ freebsd_src_install
+ keepdir /var/log
+ # Needed by ldconfig:
+ keepdir /var/run
+
+ # Maybe ship our own sysctl.conf so things like radvd work out of the box.
+ # New wireless config method requires regdomain.xml in /etc
+ cd "${WORKDIR}/etc/"
+ insinto /etc
+ doins minfree sysctl.conf regdomain.xml || die
+
+ # initd script for idmapd
+ newinitd "${FILESDIR}/idmapd.initd" idmapd
+
+ # Install a crontab for adjkerntz
+ insinto /etc/cron.d
+ newins "${FILESDIR}/adjkerntz-crontab" adjkerntz
+
+ # Install the periodic stuff (needs probably to be ported in a more
+ # gentooish way)
+ cd "${WORKDIR}/etc/periodic"
+
+ doperiodic security \
+ security/*.ipfwlimit \
+ security/*.ipfwdenied || die
+
+ use ipfilter && { doperiodic security \
+ security/*.ipfdenied || die ; }
+
+ use pf && { doperiodic security \
+ security/*.pfdenied || die ; }
+}
diff --git a/sys-freebsd/freebsd-share/ChangeLog b/sys-freebsd/freebsd-share/ChangeLog
index d4f8dd2b4e37..de374889059a 100644
--- a/sys-freebsd/freebsd-share/ChangeLog
+++ b/sys-freebsd/freebsd-share/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-share
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-share/ChangeLog,v 1.45 2012/06/16 00:12:39 naota Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-share/ChangeLog,v 1.46 2012/09/11 16:54:09 aballier Exp $
+
+*freebsd-share-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-share-9.1_rc1.ebuild:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
16 Jun 2012; Naohiro Aota <naota@gentoo.org> freebsd-share-9.0.ebuild:
Drop rc.conf{,.local} man pages. #420797
diff --git a/sys-freebsd/freebsd-share/freebsd-share-9.1_rc1.ebuild b/sys-freebsd/freebsd-share/freebsd-share-9.1_rc1.ebuild
new file mode 100644
index 000000000000..4e6a7409b7ce
--- /dev/null
+++ b/sys-freebsd/freebsd-share/freebsd-share-9.1_rc1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-share/freebsd-share-9.1_rc1.ebuild,v 1.1 2012/09/11 16:54:09 aballier Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD shared tools/files"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+IUSE="doc isdn"
+
+SRC_URI="mirror://gentoo/${SHARE}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${GNU}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2"
+
+DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+RDEPEND="sys-apps/miscfiles"
+
+RESTRICT="strip"
+
+S="${WORKDIR}/share"
+
+pkg_setup() {
+ use isdn || mymakeopts="${mymakeopts} NO_I4B= "
+ use doc || mymakeopts="${mymakeopts} NO_SHAREDOCS= "
+
+ mymakeopts="${mymakeopts} NO_SENDMAIL= NO_MANCOMPRESS= NO_INFOCOMPRESS= "
+}
+
+REMOVE_SUBDIRS="mk termcap zoneinfo tabset"
+
+PATCHES=( "${FILESDIR}/${PN}-5.3-doc-locations.patch"
+ "${FILESDIR}/${PN}-5.4-gentoo-skel.patch"
+ "${FILESDIR}/${PN}-8.0-gnu-miscfiles.patch" )
+
+src_unpack() {
+ freebsd_src_unpack
+
+ # Remove make.conf manpage as it describes bsdmk's make.conf.
+ sed -i -e 's:make.conf.5::' "${S}/man/man5/Makefile"
+ # Remove rc.conf manpage as it describes bsd's rc.conf.
+ sed -i -e 's:\brc.conf.5::' "${S}/man/man5/Makefile"
+ sed -i -e 's:\brc.conf.local.5::' "${S}/man/man5/Makefile"
+ # Remove mailer.conf manpage
+ sed -i -e 's:mailer.conf.5::' "${S}/man/man5/Makefile"
+ # Remove pbm and moduli(ssh) manpages
+ sed -i -e 's:pbm.5::' -e 's:moduli.5::' "${S}/man/man5/Makefile"
+ # Remove builtins manpage
+ sed -i -e '/builtins\.1/d' "${S}/man/man1/Makefile"
+ # Remove rc manpages
+ sed -i -e '/rc.8/d' "${S}/man/man8/Makefile"
+
+ # Don't install the arch-specific directories in subdirectories
+ sed -i -e '/MANSUBDIR/d' "${S}"/man/man4/man4.{i386,sparc64}/Makefile
+
+ # Remove them so that they can't be included by error
+ rm -rf "${S}"/mk/*.mk
+
+ # Make proper symlinks by defining the full target.
+ local sdir
+ for sdir in colldef mklocale monetdef msgdef numericdef timedef
+ do
+ sed -e 's:\${enc2}$:\${enc2}/\${FILESNAME}:g' -i \
+ "${S}/${sdir}/Makefile" || \
+ die "Error fixing ${sdir}/Makefile"
+ done
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys" || die "failed to set sys symlink"
+}
+
+src_compile() {
+ export ESED="/usr/bin/sed"
+
+ # This is a groff problem and not a -shared problem.
+ export GROFF_TMAC_PATH="/usr/share/tmac/:/usr/share/groff/1.19.1/tmac/"
+ mkmake || die "emake failed"
+}
+
+src_install() {
+ mkmake -j1 DESTDIR="${D}" DOCDIR=/usr/share/doc/${PF} install || die "Install failed"
+}
diff --git a/sys-freebsd/freebsd-ubin/ChangeLog b/sys-freebsd/freebsd-ubin/ChangeLog
index 3d1e8e979639..6b7f2755ff03 100644
--- a/sys-freebsd/freebsd-ubin/ChangeLog
+++ b/sys-freebsd/freebsd-ubin/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-freebsd/freebsd-ubin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/ChangeLog,v 1.80 2012/04/26 13:55:01 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/ChangeLog,v 1.81 2012/09/11 17:07:42 aballier Exp $
+
+*freebsd-ubin-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-ubin-9.1_rc1.ebuild, +files/freebsd-ubin-9.1-bsdar.patch,
+ +files/freebsd-ubin-9.1-grep.patch,
+ +files/freebsd-ubin-9.1-kdump-ioctl.patch,
+ +files/freebsd-ubin-9.1-minigzip.patch:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
26 Apr 2012; Alexis Ballier <aballier@gentoo.org> freebsd-ubin-9.0-r1.ebuild:
keyword ~amd64-fbsd
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-bsdar.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-bsdar.patch
new file mode 100644
index 000000000000..a65185fb7576
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-bsdar.patch
@@ -0,0 +1,25 @@
+diff -Nur work.orig/usr.bin/ar/Makefile work/usr.bin/ar/Makefile
+--- work.orig/usr.bin/ar/Makefile 2012-07-16 03:59:48.000000000 +0900
++++ work/usr.bin/ar/Makefile 2012-07-16 04:02:38.000000000 +0900
+@@ -2,7 +2,7 @@
+
+ .include <bsd.own.mk>
+
+-PROG= ar
++PROG= freebsd-ar
+ SRCS= ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h
+
+ DPADD= ${LIBARCHIVE} ${LIBELF}
+@@ -10,10 +10,7 @@
+
+ CFLAGS+=-I. -I${.CURDIR}
+
+-.if ${MK_SHARED_TOOLCHAIN} == "no"
+-NO_SHARED?= yes
+-.endif
+-LINKS= ${BINDIR}/ar ${BINDIR}/ranlib
+-MLINKS= ar.1 ranlib.1
++LINKS= ${BINDIR}/freebsd-ar ${BINDIR}/freebsd-ranlib
++MLINKS= freebsd-ar.1 freebsd-ranlib.1
+
+ .include <bsd.prog.mk>
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-grep.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-grep.patch
new file mode 100644
index 000000000000..06cc5d28df80
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-grep.patch
@@ -0,0 +1,17 @@
+diff -Nur work.orig/usr.bin/grep/Makefile work/usr.bin/grep/Makefile
+--- work.orig/usr.bin/grep/Makefile 2012-07-16 04:59:01.000000000 +0900
++++ work/usr.bin/grep/Makefile 2012-07-16 05:00:15.000000000 +0900
+@@ -40,13 +40,6 @@
+ grep.1 lzfgrep.1
+ .endif
+
+-LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \
+- ${BINDIR}/${PROG} ${BINDIR}/xzegrep \
+- ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \
+- ${BINDIR}/${PROG} ${BINDIR}/lzgrep \
+- ${BINDIR}/${PROG} ${BINDIR}/lzegrep \
+- ${BINDIR}/${PROG} ${BINDIR}/lzfgrep
+-
+ LDADD= -lz -llzma
+ DPADD= ${LIBZ} ${LIBLZMA}
+
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-kdump-ioctl.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-kdump-ioctl.patch
new file mode 100644
index 000000000000..d98e599a280a
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-kdump-ioctl.patch
@@ -0,0 +1,24 @@
+diff -Nur work.orig/usr.bin/kdump/Makefile work/usr.bin/kdump/Makefile
+--- work.orig/usr.bin/kdump/Makefile 2012-07-12 13:24:01.000000000 +0900
++++ work/usr.bin/kdump/Makefile 2012-07-16 03:54:14.000000000 +0900
+@@ -21,7 +21,7 @@
+
+ ioctl.c: mkioctls
+ env CPP="${CPP}" \
+- sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
++ sh ${.CURDIR}/mkioctls ${.CURDIR}/../../include > ${.TARGET}
+
+ kdump_subr.c: mksubr
+ sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include > ${.TARGET}
+diff -Nur work.orig/usr.bin/truss/Makefile work/usr.bin/truss/Makefile
+--- work.orig/usr.bin/truss/Makefile 2012-07-12 13:24:03.000000000 +0900
++++ work/usr.bin/truss/Makefile 2012-07-16 03:54:40.000000000 +0900
+@@ -24,7 +24,7 @@
+
+ ioctl.c: ${.CURDIR}/../kdump/mkioctls
+ env CPP="${CPP}" \
+- sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
++ sh ${.CURDIR}/../kdump/mkioctls ${.CURDIR}/../../include > ${.TARGET}
+
+ .if ${MACHINE_CPUARCH} == "i386"
+ SRCS+= i386-linux.c linux_syscalls.h
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-minigzip.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-minigzip.patch
new file mode 100644
index 000000000000..a9c062229ac1
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-9.1-minigzip.patch
@@ -0,0 +1,10 @@
+diff -Nur work.orig/usr.bin/minigzip/Makefile work/usr.bin/minigzip/Makefile
+--- work.orig/usr.bin/minigzip/Makefile 2012-07-16 04:39:31.000000000 +0900
++++ work/usr.bin/minigzip/Makefile 2012-07-16 04:45:30.000000000 +0900
+@@ -10,4 +10,6 @@
+ DPADD= ${LIBZ}
+ LDADD= -lz
+
++CFLAGS+= -I${.CURDIR}/../../lib/libz
++
+ .include <bsd.prog.mk>
diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-9.1_rc1.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-9.1_rc1.ebuild
new file mode 100644
index 000000000000..38f2932be09c
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-9.1_rc1.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/freebsd-ubin-9.1_rc1.ebuild,v 1.1 2012/09/11 17:07:42 aballier Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd flag-o-matic pam
+
+DESCRIPTION="FreeBSD's base system source for /usr/bin"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="ar atm audit bluetooth ipv6 kerberos netware nis ssl usb build zfs"
+LICENSE="BSD zfs? ( CDDL )"
+
+SRC_URI="mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2
+ zfs? ( mirror://gentoo/${CDDL}.tar.bz2 )
+ build? ( mirror://gentoo/${SYS}.tar.bz2 )"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*[usb?,bluetooth?]
+ ssl? ( dev-libs/openssl )
+ kerberos? ( virtual/krb5 )
+ ar? ( app-arch/libarchive )
+ virtual/pam
+ sys-libs/zlib
+ >=sys-libs/ncurses-5.9
+ !sys-process/fuser-bsd
+ !dev-util/csup"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+RDEPEND="${RDEPEND}
+ >=sys-auth/pambase-20080219.1
+ sys-process/cronbase"
+
+S="${WORKDIR}/usr.bin"
+
+PATCHES=( "${FILESDIR}/${PN}-6.0-bsdcmp.patch"
+ "${FILESDIR}/${PN}-9.0-fixmakefiles.patch"
+ "${FILESDIR}/${PN}-setXid.patch"
+ "${FILESDIR}/${PN}-lint-stdarg.patch"
+ "${FILESDIR}/${PN}-9.1-kdump-ioctl.patch"
+ "${FILESDIR}/${PN}-8.0-xinstall.patch"
+ "${FILESDIR}/${PN}-9.1-bsdar.patch"
+ "${FILESDIR}/${PN}-9.1-minigzip.patch"
+ "${FILESDIR}/${PN}-9.1-grep.patch" )
+
+# Here we remove some sources we don't need because they are already
+# provided by portage's packages or similar. In order:
+# - Archiving tools, provided by their own ebuilds
+# - ncurses stuff
+# - less stuff
+# - bind utils
+# - rsh stuff
+# - binutils gprof
+# - dc stuff
+# and the rest are misc utils we already provide somewhere else.
+REMOVE_SUBDIRS="bzip2 bzip2recover tar cpio
+ gzip gprof
+ lzmainfo xz xzdec
+ unzip
+ tput tset tabs
+ less lessecho lesskey
+ dig hesinfo nslookup nsupdate host
+ rsh rlogin rusers rwho ruptime
+ compile_et lex vi smbutil file vacation nc ftp telnet
+ c99 c89
+ bc dc
+ whois tftp man"
+
+pkg_setup() {
+ use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= "
+ use audit || mymakeopts="${mymakeopts} WITHOUT_AUDIT= "
+ use bluetooth || mymakeopts="${mymakeopts} WITHOUT_BLUETOOTH= "
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS_SUPPORT= "
+ use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+ use usb || mymakeopts="${mymakeopts} WITHOUT_USB= "
+ use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= "
+ mymakeopts="${mymakeopts} WITHOUT_CLANG= "
+}
+
+pkg_preinst() {
+ # bison installs a /usr/bin/yacc symlink ...
+ # we need to remove it to avoid triggering
+ # collision-protect errors
+ if [[ -L ${ROOT}/usr/bin/yacc ]] ; then
+ rm -f "${ROOT}"/usr/bin/yacc
+ fi
+}
+
+src_prepare() {
+ use build || ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+
+ # Rename manpage for renamed cmp
+ mv "${S}"/cmp/cmp.1 "${S}"/cmp/bsdcmp.1 || die
+ # Rename manpage for renamed ar
+ mv "${S}"/ar/ar.1 "${S}"/ar/freebsd-ar.1 || die
+ # Fix whereis(1) manpath search.
+ 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
+
+ # Disable it here otherwise our patch wont apply
+ use ar || dummy_mk ar
+}
+
+src_install() {
+ freebsd_src_install
+
+ # baselayout requires these in /bin
+ dodir /bin
+ for bin in sed printf fuser; do
+ mv "${D}/usr/bin/${bin}" "${D}/bin/" || die "mv ${bin} failed"
+ dosym /bin/${bin} /usr/bin/${bin} || die "dosym ${bin} failed"
+ done
+
+ for pamdfile in login passwd su; do
+ newpamd "${FILESDIR}/${pamdfile}.1.pamd" ${pamdfile} || die
+ done
+
+ cd "${WORKDIR}/etc"
+ insinto /etc
+ doins remote phones opieaccess fbtab || die
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/locate-updatedb-cron" locate.updatedb || die
+
+ # tip requires /var/spool/lock/, bug #200700
+ keepdir /var/spool/lock
+}
+
+pkg_postinst() {
+ # We need to ensure that login.conf.db is up-to-date.
+ if [[ -e "${ROOT}"etc/login.conf ]] ; then
+ einfo "Updating ${ROOT}etc/login.conf.db"
+ "${ROOT}"usr/bin/cap_mkdb -f "${ROOT}"etc/login.conf "${ROOT}"etc/login.conf
+ elog "Remember to run cap_mkdb /etc/login.conf after making changes to it"
+ fi
+}
+
+pkg_postrm() {
+ # and if we uninstall yacc but keep bison,
+ # lets restore the /usr/bin/yacc symlink
+ if [[ ! -e ${ROOT}/usr/bin/yacc ]] && [[ -e ${ROOT}/usr/bin/yacc.bison ]] ; then
+ ln -s yacc.bison "${ROOT}"/usr/bin/yacc
+ fi
+}
diff --git a/sys-freebsd/freebsd-usbin/ChangeLog b/sys-freebsd/freebsd-usbin/ChangeLog
index f71dfa35a2c1..5c98e8752463 100644
--- a/sys-freebsd/freebsd-usbin/ChangeLog
+++ b/sys-freebsd/freebsd-usbin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-usbin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/ChangeLog,v 1.78 2012/08/09 15:02:29 naota Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/ChangeLog,v 1.79 2012/09/11 17:10:10 aballier Exp $
+
+*freebsd-usbin-9.1_rc1 (11 Sep 2012)
+
+ 11 Sep 2012; Alexis Ballier <aballier@gentoo.org>
+ +freebsd-usbin-9.1_rc1.ebuild, +files/freebsd-usbin-9.1-bsdxml2expat.patch:
+ bump to 9.1_rc1 from bsd overlay by Yuta SATOH, bug #426838
09 Aug 2012; Naohiro Aota <naota@gentoo.org> files/nfs.initd:
Fix nfs.initd typo. #428484
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch
new file mode 100644
index 000000000000..bddc0c77f210
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch
@@ -0,0 +1,12 @@
+diff -Nur work.orig/usr.sbin/ctladm/ctladm.c work/usr.sbin/ctladm/ctladm.c
+--- work.orig/usr.sbin/ctladm/ctladm.c 2012-07-12 13:25:58.000000000 +0900
++++ work/usr.sbin/ctladm/ctladm.c 2012-07-16 05:37:14.000000000 +0900
+@@ -60,7 +60,7 @@
+ #include <errno.h>
+ #include <err.h>
+ #include <ctype.h>
+-#include <bsdxml.h>
++#include <expat.h>
+ #include <cam/scsi/scsi_all.h>
+ #include <cam/scsi/scsi_message.h>
+ #include <cam/ctl/ctl.h>
diff --git a/sys-freebsd/freebsd-usbin/freebsd-usbin-9.1_rc1.ebuild b/sys-freebsd/freebsd-usbin/freebsd-usbin-9.1_rc1.ebuild
new file mode 100644
index 000000000000..b982522e7b27
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/freebsd-usbin-9.1_rc1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/freebsd-usbin-9.1_rc1.ebuild,v 1.1 2012/09/11 17:10:10 aballier Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd flag-o-matic eutils
+
+DESCRIPTION="FreeBSD /usr/sbin tools"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${GNU}.tar.bz2
+ nis? ( mirror://gentoo/${LIBEXEC}.tar.bz2 )
+ build? ( mirror://gentoo/${SYS}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2 )"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*[usb?,bluetooth?,netware?]
+ =sys-freebsd/freebsd-libexec-${RV}*
+ =sys-freebsd/freebsd-contrib-${RV}*
+ acpi? ( sys-power/iasl )
+ build? ( sys-apps/baselayout )
+ ssl? ( dev-libs/openssl )
+ >=app-arch/libarchive-3
+ sys-apps/tcp-wrappers
+ dev-util/dialog
+ dev-libs/libelf
+ >=dev-libs/libedit-20120311.3.0-r1
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-ubin-${RV}*
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ sys-apps/texinfo
+ sys-devel/flex"
+
+S="${WORKDIR}/usr.sbin"
+
+IUSE="acpi atm audit bluetooth floppy ipv6 isdn minimal netware nis pam ssl usb build"
+
+pkg_setup() {
+ # Release crunch is something like minimal. It seems to remove everything
+ # which is not needed to work.
+ use minimal && mymakeopts="${mymakeopts} RELEASE_CRUNCH= "
+
+ use acpi || mymakeopts="${mymakeopts} WITHOUT_ACPI= "
+ use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= "
+ use audit || mymakeopts="${mymakeopts} WITHOUT_AUDIT= "
+ use bluetooth || mymakeopts="${mymakeopts} WITHOUT_BLUETOOTH= "
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= "
+ use isdn || mymakeopts="${mymakeopts} WITHOUT_I4B= "
+ use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+ use pam || mymakeopts="${mymakeopts} WITHOUT_PAM_SUPPORT= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+ use usb || mymakeopts="${mymakeopts} WITHOUT_USB= "
+ use floppy || mymakeopts="${mymakeopts} WITHOUT_FLOPPY= "
+
+ mymakeopts="${mymakeopts} WITHOUT_BIND_NAMED= WITHOUT_BIND_DNSSEC= WITHOUT_PF= WITHOUT_LPR= WITHOUT_SENDMAIL= WITHOUT_AUTHPF= WITHOUT_MAILWRAPPER= "
+
+ append-flags $(test-flags -fno-strict-aliasing)
+}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-adduser.patch"
+ "${FILESDIR}/${PN}-9.0-newsyslog.patch"
+ "${FILESDIR}/${PN}-9.1-bsdxml2expat.patch"
+ )
+
+REMOVE_SUBDIRS="
+ named named-checkzone named-checkconf rndc rndc-confgen
+ dnssec-keygen dnssec-signzone
+ tcpdchk tcpdmatch
+ sendmail praliases editmap mailstats makemap
+ sysinstall cron mailwrapper ntp bsnmpd
+ tcpdump ndp inetd
+ wpa/wpa_supplicant wpa/hostapd wpa/hostapd_cli wpa/wpa_cli wpa/wpa_passphrase
+ zic amd
+ pkg_install freebsd-update"
+
+src_prepare() {
+ if ! use build; then
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+ ln -s "/usr/include" "${WORKDIR}/include"
+ else
+ dummy_mk mount_smbfs
+ fi
+ # Don't install mtree format manpage
+ # it's installed by libarchive.
+ sed -e "s: mtree.5::g" -i "${S}"/mtree/Makefile
+}
+
+src_install() {
+ # By creating these directories we avoid having to do a
+ # more complex hack
+ dodir /usr/share/doc
+ dodir /sbin
+ dodir /usr/libexec
+ dodir /usr/bin
+
+ # FILESDIR is used by some makefiles which will install files
+ # in the wrong place, just put it in the doc directory.
+ mkinstall DOCDIR=/usr/share/doc/${PF} || die "Install failed"
+
+ # Most of these now come from openrc.
+ for util in nfs rpc.statd rpc.lockd; do
+ newinitd "${FILESDIR}/"${util}.initd ${util} || die
+ if [[ -e "${FILESDIR}"/${util}.confd ]]; then \
+ newconfd "${FILESDIR}"/${util}.confd ${util} || die
+ fi
+ done
+
+ for class in daily monthly weekly; do
+ cat - > "${T}/periodic.${class}" <<EOS
+#!/bin/sh
+/usr/sbin/periodic ${class}
+EOS
+ exeinto /etc/cron.${class}
+ newexe "${T}/periodic.${class}" periodic
+ done
+
+ # Install the pw.conf file to let pw use Gentoo's skel location
+ insinto /etc
+ doins "${FILESDIR}/pw.conf" || die
+
+ cd "${WORKDIR}/etc"
+ doins apmd.conf syslog.conf newsyslog.conf nscd.conf || die
+
+ insinto /etc/ppp
+ doins ppp/ppp.conf || die
+
+ if use isdn; then
+ insinto /etc/isdn
+ doins isdn/* || die
+ rm -f "${D}"/etc/isdn/Makefile
+ fi
+
+ if use bluetooth; then
+ insinto /etc/bluetooth
+ doins bluetooth/* || die
+ rm -f "${D}"/etc/bluetooth/Makefile
+ fi
+
+ # Install the periodic stuff (needs probably to be ported in a more
+ # gentooish way)
+ cd "${WORKDIR}/etc/periodic"
+
+ doperiodic daily daily/*.accounting
+ doperiodic monthly monthly/*.accounting
+}
+
+pkg_postinst() {
+ # We need to run pwd_mkdb if key files are not present
+ # If they are, then there is no need to run pwd_mkdb
+ if [[ ! -e "${ROOT}etc/passwd" || ! -e "${ROOT}etc/pwd.db" || ! -e "${ROOT}etc/spwd.db" ]] ; then
+ if [[ -e "${ROOT}etc/master.passwd" ]] ; then
+ einfo "Generating passwd files from ${ROOT}etc/master.passwd"
+ "${ROOT}"usr/sbin/pwd_mkdb -p -d "${ROOT}etc" "${ROOT}etc/master.passwd"
+ else
+ eerror "${ROOT}etc/master.passwd does not exist!"
+ eerror "You will no be able to log into your system!"
+ fi
+ fi
+
+ for logfile in messages security auth.log maillog lpd-errs xferlog cron \
+ debug.log slip.log ppp.log; do
+ [[ -f "${ROOT}/var/log/${logfile}" ]] || touch "${ROOT}/var/log/${logfile}"
+ done
+}