summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/authbind')
-rw-r--r--app-admin/authbind/Manifest1
-rw-r--r--app-admin/authbind/authbind-2.1.2.ebuild53
-rw-r--r--app-admin/authbind/files/authbind-2.1.2-respect-flags.patch26
-rw-r--r--app-admin/authbind/metadata.xml5
4 files changed, 85 insertions, 0 deletions
diff --git a/app-admin/authbind/Manifest b/app-admin/authbind/Manifest
new file mode 100644
index 000000000000..58d3060a2f18
--- /dev/null
+++ b/app-admin/authbind/Manifest
@@ -0,0 +1 @@
+DIST authbind_2.1.2.tar.gz 15279 BLAKE2B 5f9a31c9f51c307e9ad85bf14b436e1780d0c7dc5655ad3882e9596927862be0684d0a4a43c7d2e98a0d6a0d4c2552aaaf954ce32d3e9202bf5593ce501b5962 SHA512 85020af9703f8f39194a7719c50a51d75344db9ea99ecbc83c3c6bff0852ab1ea1cbd0b9bff6a2345e08a7bef9732e36890f33af08929e36dae8215dd070cc4d
diff --git a/app-admin/authbind/authbind-2.1.2.ebuild b/app-admin/authbind/authbind-2.1.2.ebuild
new file mode 100644
index 000000000000..d9479c70b7b0
--- /dev/null
+++ b/app-admin/authbind/authbind-2.1.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Bind sockets to privileged ports without root"
+HOMEPAGE="https://www.chiark.greenend.org.uk/ucgi/~ian/git/authbind.git/"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.tar.gz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="virtual/awk"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.1.2-respect-flags.patch"
+)
+
+src_configure() {
+ tc-export CC LD
+
+ sed -i \
+ -e "s|^prefix=.*|prefix=/usr|" \
+ -e "s|^lib_dir=.*|lib_dir=\$(prefix)/$(get_libdir)|" \
+ -e "s|^libexec_dir=.*|libexec_dir=\$(prefix)/libexec/authbind|" \
+ -e "s|^SHARED_LDFLAGS=.*|SHARED_LDFLAGS=$(raw-ldflags)|" \
+ Makefile || die "sed failed"
+
+ sed -i \
+ -e 's|/usr/lib|/usr/libexec|' \
+ authbind-helper.8 || die "sed failed"
+}
+
+src_install() {
+ dobin authbind
+ doman authbind.1 authbind-helper.8
+
+ local major=$(awk -F= '/MAJOR=/ { print $2 }' Makefile || die)
+ ln -s libauthbind.so.* libauthbind.so.${major} || die
+ dolib.so libauthbind.so*
+
+ exeinto /usr/libexec/authbind
+ exeopts -m4755
+ doexe helper
+
+ keepdir /etc/authbind/by{addr,port,uid}
+
+ dodoc debian/changelog
+}
diff --git a/app-admin/authbind/files/authbind-2.1.2-respect-flags.patch b/app-admin/authbind/files/authbind-2.1.2-respect-flags.patch
new file mode 100644
index 000000000000..877c50bd1e9f
--- /dev/null
+++ b/app-admin/authbind/files/authbind-2.1.2-respect-flags.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile b/Makefile
+index 37a8673..89f83f4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,10 +34,9 @@ INSTALL_PROGRAM ?= install -o root -g root -m 755 -s
+ INSTALL_DIR ?= install -o root -g root -m 755 -d
+ STRIP ?= strip
+
+-OPTIMISE= -O2
+-LDFLAGS= -g
+ LIBS= -ldl -lc
+-CFLAGS= -g $(OPTIMISE) \
++SHARED_LDFLAGS=
++CFLAGSS+= \
+ -Wall -Wwrite-strings -Wpointer-arith -Wimplicit \
+ -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes
+ CPPFLAGS= -DMAJOR_VER='"$(MAJOR)"' -DMINOR_VER='"$(MINOR)"' \
+@@ -82,7 +81,7 @@ helper: helper.o
+ helper.o authbind.o: authbind.h
+
+ $(LIBTARGET): libauthbind.o
+- $(LD) -shared -soname $(LIBCANON) -o $@ $< $(LIBS)
++ $(LD) $(SHARED_LDFLAGS) -shared -soname $(LIBCANON) -o $@ $< $(LIBS)
+
+ clean distclean:
+ rm -f $(TARGETS) *.o *~ ./#*# *.bak *.new core
diff --git a/app-admin/authbind/metadata.xml b/app-admin/authbind/metadata.xml
new file mode 100644
index 000000000000..115e9d64a669
--- /dev/null
+++ b/app-admin/authbind/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+</pkgmetadata>