| 1 |
# Copyright 1999-2005 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header$ |
| 4 |
|
| 5 |
inherit bsdmk freebsd flag-o-matic |
| 6 |
|
| 7 |
DESCRIPTION="FreeBSD's base system libraries" |
| 8 |
SLOT="0" |
| 9 |
KEYWORDS="~x86-fbsd ~amd64-fbsd" |
| 10 |
|
| 11 |
IUSE="atm bluetooth ssl usb ipv6 kerberos nis gpib" |
| 12 |
|
| 13 |
# Crypto is needed to have an internal OpenSSL header |
| 14 |
SRC_URI="mirror://gentoo/${LIB}.tar.bz2 |
| 15 |
mirror://gentoo/${CONTRIB}.tar.bz2 |
| 16 |
mirror://gentoo/${CRYPTO}.tar.bz2 |
| 17 |
mirror://gentoo/${LIBEXEC}.tar.bz2" |
| 18 |
|
| 19 |
RDEPEND="ssl? ( dev-libs/openssl ) |
| 20 |
kerberos? ( virtual/krb5 )" |
| 21 |
DEPEND="${RDEPEND} |
| 22 |
=sys-freebsd/freebsd-mk-defs-${RV}* |
| 23 |
=sys-freebsd/freebsd-sources-${RV}* |
| 24 |
=sys-freebsd/freebsd-headers-${RV}*" |
| 25 |
|
| 26 |
PROVIDE="virtual/libc" |
| 27 |
|
| 28 |
S="${WORKDIR}/lib" |
| 29 |
|
| 30 |
pkg_setup() { |
| 31 |
if ! use ssl && use kerberos; then |
| 32 |
eerror "If you want kerberos support you need to enable ssl support, too." |
| 33 |
fi |
| 34 |
|
| 35 |
use atm || mymakeopts="${mymakeopts} NO_ATM= " |
| 36 |
use bluetooth || mymakeopts="${mymakeopts} NO_BLUETOOTH= " |
| 37 |
use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NOCRYPT= " |
| 38 |
use usb || mymakeopts="${mymakeopts} NO_USB= " |
| 39 |
use ipv6 || mymakeopts="${mymakeopts} NOINET6= " |
| 40 |
use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= " |
| 41 |
use nis || mymakeopts="${mymakeopts} NO_NIS= " |
| 42 |
use gpib || mymakeopts="${mymakeopts} NO_GPIB= " |
| 43 |
|
| 44 |
mymakeopts="${mymakeopts} NO_OPENSSH= NO_BIND= NO_SENDMAIL= " |
| 45 |
|
| 46 |
replace-flags "-O?" -"O1" |
| 47 |
} |
| 48 |
|
| 49 |
PATCHES="${FILESDIR}/${PN}-fixmakefiles.patch |
| 50 |
${FILESDIR}/${PN}-runet.patch |
| 51 |
${FILESDIR}/${PN}-bsdxml.patch |
| 52 |
${FILESDIR}/${PN}-fixmp.patch |
| 53 |
${FILESDIR}/${PN}-msun-fenvc.patch" |
| 54 |
|
| 55 |
# Here we disable and remove source which we don't need or want |
| 56 |
# In order: |
| 57 |
# - ncurses stuff |
| 58 |
# - archiving libraries (have their own ebuild) |
| 59 |
# - sendmail libraries (they are installed by sendmail) |
| 60 |
# - SNMP library and dependency (have their own ebuilds) |
| 61 |
# |
| 62 |
# The rest are libraries we already have somewhere else because |
| 63 |
# they are contribution. |
| 64 |
# Note: libtelnet is an internal lib used by telnet and telnetd programs |
| 65 |
# as it's not used in freebsd-lib package itself, it's pointless building |
| 66 |
# it here. |
| 67 |
REMOVE_SUBDIRS="libncurses libform libmenu libpanel \ |
| 68 |
libz libbz2 libarchive \ |
| 69 |
libsm libsmdb libsmutil libmfilter \ |
| 70 |
libbegemot libbsnmp \ |
| 71 |
libsmb libpam libpcap bind libwrap libmagic \ |
| 72 |
libcom_err libtelnet" |
| 73 |
|
| 74 |
src_install() { |
| 75 |
mkinstall || die "Install failed" |
| 76 |
|
| 77 |
# make crt1.o schg so that gcc doesn't remove it |
| 78 |
chflags schg ${D}/usr/lib/crt1.o |
| 79 |
|
| 80 |
# install libstand files |
| 81 |
dodir /usr/include/libstand |
| 82 |
insinto /usr/include/libstand |
| 83 |
doins ${S}/libstand/*.h |
| 84 |
} |