1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bsdmk freebsd user
8 DESCRIPTION="FreeBSD's base system libraries"
13 # Crypto is needed to have an internal OpenSSL header
14 if [[ ${PV} != *9999* ]]; then
15 KEYWORDS="~amd64-fbsd ~x86-fbsd"
25 RDEPEND="net-libs/libpcap"
28 =sys-freebsd/freebsd-mk-defs-${RV}*
29 =sys-freebsd/freebsd-sources-${RV}*"
33 SUBDIRS="usr.sbin/authpf sbin/pfctl sbin/pflogd usr.sbin/ftp-proxy"
40 # pcap-int.h redefines snprintf as pcap_snprintf
41 epatch "${FILESDIR}/${PN}-9.0-pcap_pollution.patch"
42 # Use system's libevent
43 epatch "${FILESDIR}/${PN}-11.1-libevent.patch"
44 epatch "${FILESDIR}/${PN}-11.1-pflogd.patch"
45 epatch "${FILESDIR}/${PN}-9.0-bpf.patch"
46 # Link in kernel sources
47 [[ ! -e "${WORKDIR}/sys" ]] && ln -s "/usr/src/sys" "${WORKDIR}/sys"
51 for dir in ${SUBDIRS}; do
52 einfo "Starting make in ${dir}"
53 cd "${S}/${dir}" || die
54 freebsd_src_compile || die "Make ${dir} failed"
59 for dir in ${SUBDIRS}; do
60 einfo "Starting install in ${dir}"
61 cd "${S}/${dir}" || die
62 freebsd_src_install || die "Install ${dir} failed"
68 # pf.initd provided by openrc, but no pf.confd
69 newconfd "${FILESDIR}/pf.confd" pf