summaryrefslogtreecommitdiff
path: root/sys-apps/xinetd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/xinetd
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/xinetd')
-rw-r--r--sys-apps/xinetd/Manifest14
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch27
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.14-config.patch9
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch24
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.15-config.patch22
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.15-creds.patch17
-rw-r--r--sys-apps/xinetd/files/xinetd.confd3
-rw-r--r--sys-apps/xinetd/files/xinetd.rc632
-rw-r--r--sys-apps/xinetd/files/xinetd.service10
-rw-r--r--sys-apps/xinetd/metadata.xml14
-rw-r--r--sys-apps/xinetd/xinetd-2.3.15-r2.ebuild54
-rw-r--r--sys-apps/xinetd/xinetd-2.3.15-r3.ebuild54
12 files changed, 280 insertions, 0 deletions
diff --git a/sys-apps/xinetd/Manifest b/sys-apps/xinetd/Manifest
new file mode 100644
index 000000000000..5a973bde982e
--- /dev/null
+++ b/sys-apps/xinetd/Manifest
@@ -0,0 +1,14 @@
+AUX xinetd-2.3.14-DESTDIR.patch 1725 SHA256 928e078070c2b662cd53808c16c5217a9f7f46e31132254bbf19f5efc39b0bc4 SHA512 31976a84faf2f890a0fb33404c3e07d399be5eeaad49b00f52a459df38f12bb3ecd743577c5a7aa4f0fd90c025a262683307e736e97d51e35591756a7c69698b WHIRLPOOL 3eeda886bb7b6f5827583fd1197ae66a068364bccb6b61b9157ddaa74430c6e620d6daaadd49d46d74c94bdab9a168682ef6786524163ab2aec472e3ccc5e30c
+AUX xinetd-2.3.14-config.patch 154 SHA256 9aa8641d7462a2566770ad93efe13004c5b8c02374221f7b7bd1382c805ffc2e SHA512 ae8e7254e029da714e9f65cdeac3f3f9a8f09e962248aea38842e356a3c860f5bde5bb1ed81cd79cbad3e34989d8f37273791a725794b372ce0b5c5fedae1432 WHIRLPOOL 24077bbff1476c1bae633f890f3fb7f98dc87ec6b383f3830b2087e38224d9026cd997e859d7bec074e5c0b53ca49baad1f498e290d319fc4b260e86890ab667
+AUX xinetd-2.3.14-install-contrib.patch 728 SHA256 e76479ccf5f5763a1365f3ad59edf30f20e77147b8e012d2cee179fc72298d8a SHA512 15b8b1649b02e2d8834eb057bef7345497d230a4b10600e9b3e2a83511f9c7df115009ba1f38b1c4907417735454cafbbc41a96266fbb4370c584ecf1aa1638b WHIRLPOOL 0c60bd424911f5f5118e40692d53b758597ad0ebb16b3e4388e86da9098f3c3cd12026f442d2e652315952f78352224b2fcd73c930157d52258a03c69a1aaea9
+AUX xinetd-2.3.15-config.patch 437 SHA256 f30f607c9f73db8003d015ee0a5f80d353c2f0ab9bdae118df88315acccd8045 SHA512 58a9880ca154441c5cfc3ed978a0224601d406a4422435a430b885985a0fbe7ef0d750f54047cb0d7fc5c6ab7bc35433776bb5c6c2c61525e2a04b49d509ad66 WHIRLPOOL 819a4031165ad9ca7f4c11d13c87d9fd30d98f6500984ec59022083ca07632ce663b63cad6fc7ee6e326d9b0b5df5354a059f4db9ba3e820591ae2b143d97756
+AUX xinetd-2.3.15-creds.patch 367 SHA256 4b1d92406a64538cd64fda04a56e8bfc0f01eb7364a3ffc54394f735fb7fd828 SHA512 5d1d883620ed6c1ae0e391687a1a10769eb4c2436cf8bae60ddbbb7b8d1250272c2aa7068c308ee1f3540a41fcdf8ae890a7687ff0213553c59f6a91718f46c1 WHIRLPOOL 9341d8a8ca46de36d0da81d63fd3d45bd7c2cc31686d8c5a600b97f4678f8bb8098835ed3024ed2178d43f12ab88bd6dc59aee4ea0f8f64cddde7776899d9e21
+AUX xinetd.confd 90 SHA256 e401e2cf7c0180a170d3dc3e91d7e98002bae7b013df72813b7bcf89b864fb3a SHA512 03bf05e544c0e52bc2bdeadf494dabd49ace985687b656baae869be99ef65a5f7129492c37e062bf6f196f70561d6239f2d3c4e8171fddc04729d3e266bfe2b2 WHIRLPOOL e108afde9fa58ad0311a7df4d23d0ed82bcfd4faf1ce39932526666afa7492cb595add2cb2cd46fde5aa2147d4c35b8424d632e941538886e6295375db55a9c1
+AUX xinetd.rc6 721 SHA256 6934fee5e3997d7e152c26d0c1a8f8d2f7563287fcc1ae934e4552d523c39329 SHA512 bfe591f83a03e26ccbe06c489fa8c2e7af0f05203e0239b7cbde521dbe22700ba63d4bc50465e01a3fc101a7c7cfa40d0a6a02e881e950143bef7ac4046a6604 WHIRLPOOL a352a5cc685c30e02c386200530cecaf9d842af863dee024bcead97286afa0e55f70b778476e5bfe5c4a0ab7772883022a5c310b2ba260acc170affe6b1474b5
+AUX xinetd.service 192 SHA256 a14e390a742c2981fabbeae99bb2f22ea412d30c4857f34e3eed2ae72c26fe5c SHA512 c2b324c1116485996c414543f67c5dae89de3f82ac85634009da4dc04ea720a860626f6bb0ece0bb734616c6e4394e31ca00a71f697dc93e38b05fbad06dedc0 WHIRLPOOL d9f7d1e5c21b271e0b511ac7acac827ed954fc043ba5f6c7c125e387ff69635362cd739b8fa772f8b6e817d36c368cb7187ad78ea520c27f571b42f91e003a48
+DIST xinetd-2.3.15.tar.gz 309774 SHA256 bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3 SHA512 9d6fee1fbc90329629d84086ae7de5cd51c25af7b68e52aa704d6f74bee5f0e3d54ca1bcf780f90f74ddc8d336ae0abb5e5e368d43c426a26b8dd2c4676d26aa WHIRLPOOL 5bcf69b2cfac3b3713648da666e4c98d62caea4c506be9dc5cc84f1acdc643812460a158b092705274d7452d394d3f2c03b5635f135f5d900bb6a5406f0350c2
+EBUILD xinetd-2.3.15-r2.ebuild 1501 SHA256 f3019fb33c7eeba817e0936af04cc7efab9ca64fbb9db94a8cc8f94b4f6c3b25 SHA512 17ca405368e7cb718666a1bd1dfee814e0551c83dafbdc29d62b1d843459e8a322d119751363f38ae1dbc95cb4539964a5bba37d02ad71af79f808b96c4901e7 WHIRLPOOL 014cea85b5c8ee086377fa97c9446bb5d4addef3402a961980d95a3a5ef18694286b382aa476641c97c729621020f0a0315e3cb0c459914559561cf909978c81
+EBUILD xinetd-2.3.15-r3.ebuild 1541 SHA256 2fdbb6f2cbcee86aefd2819ec8acb3a0e7ee2acb1143ced35f66beca2a46f130 SHA512 099531720ff5c5e57eaaeab6e0216ae0dcf3eac4bd136f4a3522349f43bdec864938dc578ffc686006e09d9f46ceea0d8c41d4607a044d2e8610f53e4929f907 WHIRLPOOL 302b19c6378dff450102bc397c73ab0e399236b181d442d7c678255d272e629d493fa56eda8622c31ddd884d16bfd02970cc203545bc010fd318ab1a1273c1a0
+MISC ChangeLog 8067 SHA256 b3d1a2aa8b951efba53ddb049911b5015e9ed53d97c11224f4ed4d36e1c7aa32 SHA512 b2ec020e440a57a607cee1f2b699d2fdf376168a345759a3187a5055dbce858b78da9b5b624aa7983f23c37bf0db43ca097d3b3b0ab80189bacbc442b5ff8d35 WHIRLPOOL 4d91972e6a72c4e0fc9ef23345c03239237049b3daf9af57e25a78c21d54c1ebba4d5fcc10bf274375c6088d2475e24e9c72e4bf16bd5f3206ad93339f3d036f
+MISC ChangeLog-2015 10762 SHA256 9e0c488d21bea82bb45abc94a4d6c2ff4fd57c2ec13692a4e50ddce169433406 SHA512 4b2397a3c2884124016aed0b78747feecf98f12b08e23b4d52d106654046da10de650faf317bae70d243e6f8c0bda877bbd2f6e35833c2bc01b5452a0a175fd3 WHIRLPOOL d1fd6d0d9a6d62102350c80df3d2150cd4f142c0af5830ac207e195deddbd98841c4c324937256ec25dbb70ab9729dfed83f0a264e43859b9f636e6450ca5192
+MISC metadata.xml 401 SHA256 ea8c266cf998f413166f3779f3a99fad22920f8e70608603dad6ca3b7c295303 SHA512 35d6d241dfa7e9811b09f3df32805de026244d966a5e1c62654986c67541038f79acfe64a9b4b574f5cc14611fc68cba043d4d68dfa7cd8d198a738db5685cdb WHIRLPOOL 0ab4029e1c2f9f624ee4b26920a444247e6586bf7947e67e8f05042c1e1ceb87e638e09df30950078dcd017c5c4ea528e7e3e1a073aaa9024c4118ae1e69c1e0
diff --git a/sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch b/sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch
new file mode 100644
index 000000000000..2ebdf4c4f1b0
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.14-DESTDIR.patch
@@ -0,0 +1,27 @@
+--- Makefile.in.orig 2005-10-29 22:08:54.000000000 -0400
++++ Makefile.in 2005-10-29 22:09:32.000000000 -0400
+@@ -75,15 +75,15 @@
+
+ install: build
+ for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \
+- test -d $$i || mkdir -p $$i ; done
+- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR)
+- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR)
+- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR)
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8
+- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8
++ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done
++ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR)
++ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR)
++ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR)
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8
++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8
+ @echo "You must put your xinetd.conf in /etc/xinetd.conf"
+ @echo "There is a sample config file in xinetd/sample.conf and you can"
+ @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format"
diff --git a/sys-apps/xinetd/files/xinetd-2.3.14-config.patch b/sys-apps/xinetd/files/xinetd-2.3.14-config.patch
new file mode 100644
index 000000000000..c368dea56e1b
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.14-config.patch
@@ -0,0 +1,9 @@
+--- contrib/xinetd.conf
++++ contrib/xinetd.conf
+@@ -22,5 +22,5 @@
+ #
+ # no_access =
+-# only_from =
++ only_from = localhost
+ # max_load = 0
+ cps = 50 10
diff --git a/sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch b/sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch
new file mode 100644
index 000000000000..c1717e43902f
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.14-install-contrib.patch
@@ -0,0 +1,24 @@
+--- xinetd-2.3.14/Makefile.in
++++ xinetd-2.3.14/Makefile.in
+@@ -9,6 +9,7 @@
+ DESTDIR =
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
++ETCDIR = @sysconfdir@
+ DAEMONDIR = @sbindir@
+ MANDIR = @mandir@
+ topdir = @top_srcdir@
+@@ -97,7 +98,12 @@
+ rm -f $(MANDIR)/man8/xinetd.log.8
+ rm -f $(MANDIR)/man8/xinetd.8
+ rm -f $(MANDIR)/man8/itox.8
+-
++
++install-contrib:
++ test -d $(DESTDIR)$(ETCDIR)/xinetd.d || mkdir -p $(DESTDIR)$(ETCDIR)/xinetd.d
++ $(INSTALL_CMD) -m 644 contrib/xinetd.conf $(DESTDIR)$(ETCDIR)
++ $(INSTALL_CMD) -m 644 contrib/xinetd.d/* $(DESTDIR)$(ETCDIR)/xinetd.d
++
+ distclean: clean
+ rm -f config.cache config.log Makefile config.status xinetd/itox
+ rm -f config.h @srcdir@/libs/include/* @srcdir@/libs/man/*
diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-config.patch b/sys-apps/xinetd/files/xinetd-2.3.15-config.patch
new file mode 100644
index 000000000000..b362a97dbe82
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15-config.patch
@@ -0,0 +1,22 @@
+set up some secure defaults:
+ - services can only be accessed from localhost
+ - sanitize the runtime environment (so root's shell vars don't bleed through)
+
+--- contrib/xinetd.conf
++++ contrib/xinetd.conf
+@@ -22,5 +22,5 @@
+ #
+ # no_access =
+-# only_from =
++ only_from = localhost
+ # max_load = 0
+ cps = 50 10
+@@ -35,7 +35,7 @@ defaults
+
+ # setup environmental attributes
+ #
+-# passenv =
++ passenv =
+ groups = yes
+ umask = 002
+
diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
new file mode 100644
index 000000000000..39df3caf1156
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/488158
+
+taken from Fedora
+
+Patch by Thomas Swan <thomas.swan@gmail.com>
+
+--- a/xinetd/builtins.c
++++ b/xinetd/builtins.c
+@@ -695,7 +695,7 @@ static void tcpmux_handler( const struct server *serp )
+ if( SC_IS_INTERNAL( scp ) ) {
+ SC_INTERNAL(scp, nserp);
+ } else {
+- exec_server(nserp);
++ child_process(nserp);
+ }
+ }
+
diff --git a/sys-apps/xinetd/files/xinetd.confd b/sys-apps/xinetd/files/xinetd.confd
new file mode 100644
index 000000000000..ae211f3d8fcc
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.confd
@@ -0,0 +1,3 @@
+# /etc/conf.d/xinetd: config file for /etc/init.d/xinetd
+
+XINETD_OPTS="-stayalive -reuse"
diff --git a/sys-apps/xinetd/files/xinetd.rc6 b/sys-apps/xinetd/files/xinetd.rc6
new file mode 100644
index 000000000000..613f5dd4875c
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.rc6
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the BSD License
+
+extra_started_commands="reload dump check"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting xinetd"
+ start-stop-daemon --start --exec /usr/sbin/xinetd -- \
+ -pidfile /var/run/xinetd.pid ${XINETD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping xinetd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid
+ eend $?
+}
+
+do_sig() {
+ local sig=$1 ; shift
+ ebegin "$*"
+ start-stop-daemon --signal ${sig} --pidfile /var/run/xinetd.pid
+ eend $?
+}
+reload() { do_sig HUP "Reloading configuration" ; }
+dump() { do_sig USR1 "Dumping configuration" ; }
+check() { do_sig IOT "Performing Consistency Check" ; }
diff --git a/sys-apps/xinetd/files/xinetd.service b/sys-apps/xinetd/files/xinetd.service
new file mode 100644
index 000000000000..c6f6271fd97b
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=A secure replacement for inetd
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/xinetd -dontfork
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/xinetd/metadata.xml b/sys-apps/xinetd/metadata.xml
new file mode 100644
index 000000000000..e143258c6fa6
--- /dev/null
+++ b/sys-apps/xinetd/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="rpc">support RPC services</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">xinetd-org/xinetd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
new file mode 100644
index 000000000000..a80e21a8c194
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="http://www.xinetd.org/"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="perl rpc tcpd"
+
+DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+ rpc? ( net-libs/libtirpc:= )"
+RDEPEND="${DEPEND}
+ perl? ( dev-lang/perl )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
+ epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
+ epatch "${FILESDIR}"/${PN}-2.3.14-config.patch
+ epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
+ find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
+}
+
+src_configure() {
+ if ! use rpc ; then
+ append-cppflags -DNO_RPC
+ export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
+ fi
+ tc-export AR PKG_CONFIG
+ LIBS=$(${PKG_CONFIG} --libs libtirpc) \
+ econf \
+ $(use_with tcpd libwrap) \
+ --with-loadavg
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install install-contrib
+ use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+ newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+ newconfd "${FILESDIR}"/xinetd.confd xinetd
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+ dodoc AUDIT INSTALL README TODO CHANGELOG
+}
diff --git a/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild
new file mode 100644
index 000000000000..e0667ddfa98b
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="http://www.xinetd.org/ https://github.com/xinetd-org/xinetd"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="perl rpc tcpd"
+
+DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+ rpc? ( net-libs/libtirpc:= )"
+RDEPEND="${DEPEND}
+ perl? ( dev-lang/perl )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
+ epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
+ epatch "${FILESDIR}"/${PN}-2.3.15-config.patch
+ epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
+ find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
+}
+
+src_configure() {
+ if ! use rpc ; then
+ append-cppflags -DNO_RPC
+ export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
+ fi
+ tc-export AR PKG_CONFIG
+ LIBS=$(${PKG_CONFIG} --libs libtirpc) \
+ econf \
+ $(use_with tcpd libwrap) \
+ --with-loadavg
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install install-contrib
+ use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+ newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+ newconfd "${FILESDIR}"/xinetd.confd xinetd
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+ dodoc AUDIT INSTALL README TODO CHANGELOG
+}