summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-nds/portmap/portmap-5b-r9.ebuild')
-rw-r--r--net-nds/portmap/portmap-5b-r9.ebuild108
1 files changed, 48 insertions, 60 deletions
diff --git a/net-nds/portmap/portmap-5b-r9.ebuild b/net-nds/portmap/portmap-5b-r9.ebuild
index 531a7e626d04..ae8baabec46e 100644
--- a/net-nds/portmap/portmap-5b-r9.ebuild
+++ b/net-nds/portmap/portmap-5b-r9.ebuild
@@ -1,90 +1,78 @@
-# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r9.ebuild,v 1.1 2004/04/24 18:45:55 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r9.ebuild,v 1.1.1.1 2005/11/30 09:36:46 chriswhite Exp $
-inherit eutils
+inherit eutils flag-o-matic toolchain-funcs
MY_P="${PN}_${PV}eta"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Netkit - portmapper"
-SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz"
HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html"
+SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz"
-SLOT="0"
LICENSE="as-is"
-KEYWORDS="-*"
-#KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~hppa ~amd64 ~ia64 ~ppc64"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86"
+IUSE="selinux tcpd"
-DEPEND="virtual/glibc
- tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 )"
+DEPEND="virtual/libc
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 )
+ >=sys-apps/portage-2.0.51"
RDEPEND="selinux? ( sec-policy/selinux-portmap )"
-IUSE="tcpd selinux"
+
+pkg_setup() {
+ enewgroup rpc 111
+ enewuser rpc 111 -1 /dev/null rpc
+}
src_unpack() {
unpack ${A}
-
- cd ${S}
- epatch ${FILESDIR}/${PN}_5beta.dif
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}_5beta.dif
# Redhat patches
- epatch ${FILESDIR}/${PN}-4.0-malloc.patch
- epatch ${FILESDIR}/${PN}-4.0-cleanup.patch
- epatch ${FILESDIR}/${PN}-4.0-rpc_user.patch
- epatch ${FILESDIR}/${PN}-4.0-sigpipe.patch
+ epatch "${FILESDIR}"/${PN}-4.0-malloc.patch
+ epatch "${FILESDIR}"/${PN}-4.0-cleanup.patch
+ epatch "${FILESDIR}"/${PN}-4.0-rpc_user.patch
+ epatch "${FILESDIR}"/${PN}-4.0-sigpipe.patch
# Should include errno.h, and not define as external. Fix
# relocation error and build problem with glibc-2.3.2 cvs ...
# <azarah@gentoo.org> (31 Dec 2002).
- epatch ${FILESDIR}/${P}-include-errno_h.patch
+ epatch "${FILESDIR}"/${P}-include-errno_h.patch
+
+ # Patch to listen on loopback only #65199
+ epatch "${FILESDIR}"/${P}-loopback-only.patch
- # Get portmap to use our CFLAGS ...
- sed -e "s:-O2:${CFLAGS}:" -i Makefile || die
+ # Make tcp wrapper checks easier
+ epatch "${FILESDIR}"/${P}-optional-tcpd.patch
+
+ # Remove useless make variable #83000
+ epatch "${FILESDIR}"/${P}-no-SYS.patch
}
src_compile() {
- local LIBS
- local WRAP_DIR
- local HOSTS_ACCESS
- # libutil static as per -r8
- #LIBS="-Wl,-Bstatic -lutil -Wl,-Bdynamic -lnsl"
- # libutil dynamic
- LIBS="-Wl,-Bdynamic -lutil -Wl,-Bdynamic -lnsl"
- WRAP_DIR=""
- HOSTS_ACCESS=""
- if use tcpd; then
- WRAP_DIR="${ROOT}/usr/lib"
- [ -f "${ROOT}/lib/libwrap.a" ] && WRAP_DIR="${ROOT}/lib"
- # static libwrap as per -r8
- #LIBS="-Wl,-Bstatic -lwrap ${LIBS}"
- # libwrap dynamic
- LIBS="-Wl,-Bdynamic -lwrap ${LIBS}"
- HOSTS_ACCESS="-DHOSTS_ACCESS"
- else
- sed -i -e "s:^WRAP_LIB:\#WRAP_LIB:" \
- -e "s:^HOSTS_ACCESS:\#HOSTS_ACCESS:" \
- -e 's:$(WRAP_DIR)/libwrap.a::g' \
- Makefile
- fi
-
- make FACILITY=LOG_AUTH \
- ZOMBIES='-DIGNORE_SIGCHLD' \
- HOSTS_ACCESS="${HOSTS_ACCESS}" \
- WRAP_DIR="${WRAP_DIR}" \
- LIBS="${LIBS}" \
- AUX= || die
+ local tcpd=""
+ use tcpd \
+ && tcpd="-lwrap" \
+ && append-flags -DHOSTS_ACCESS
+
+ emake \
+ CC="$(tc-getCC)" \
+ O="${CFLAGS}" \
+ WRAP_LIB="${tcpd}" \
+ || die
}
src_install() {
- into / ; dosbin portmap
- into /usr ; dosbin pmap_dump pmap_set
- doman portmap.8 pmap_dump.8 pmap_set.8
-
- exeinto /etc/init.d
- newexe ${FILESDIR}/portmap.rc6 portmap
-
- # Is this really the sort of thing we wanna be doing? :)
- # ln -s ../../init.d/portmap ${D}/etc/runlevels/default/portmap
+ into /
+ dosbin portmap || die "portmap"
+ into /usr
+ dosbin pmap_dump pmap_set || die "pmap"
+ doman portmap.8 pmap_dump.8 pmap_set.8
dodoc BLURB CHANGES README
-}
+ newinitd ${FILESDIR}/portmap.rc6 portmap
+ newconfd ${FILESDIR}/portmap.confd portmap
+}