net-irc/ptlink-opm: Fix building with CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Thu, 28 May 2020 07:24:51 +0000 (09:24 +0200)
committerJeroen Roovers <jer@gentoo.org>
Thu, 28 May 2020 07:25:30 +0000 (09:25 +0200)
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Closes: https://bugs.gentoo.org/show_bug.cgi?id=724922
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-irc/ptlink-opm/files/ptlink-opm-1.3.1-fno-common.patch [new file with mode: 0644]
net-irc/ptlink-opm/ptlink-opm-1.3.1-r2.ebuild [new file with mode: 0644]

diff --git a/net-irc/ptlink-opm/files/ptlink-opm-1.3.1-fno-common.patch b/net-irc/ptlink-opm/files/ptlink-opm-1.3.1-fno-common.patch
new file mode 100644 (file)
index 0000000..6d4aaac
--- /dev/null
@@ -0,0 +1,17 @@
+Three of these are not like the others
+
+--- a/include/dconf_vars.h
++++ b/include/dconf_vars.h
+@@ -42,9 +42,9 @@
+ E char*     DNSBLZoneMsg;
+ /* PT */
+-char *PT_Nick;
+-char *PT_Mask;
+-char *PT_Info;
++E char *PT_Nick;
++E char *PT_Mask;
++E char *PT_Info;
+ #undef E
+ #endif /* conf_vars_h_ */
diff --git a/net-irc/ptlink-opm/ptlink-opm-1.3.1-r2.ebuild b/net-irc/ptlink-opm/ptlink-opm-1.3.1-r2.ebuild
new file mode 100644 (file)
index 0000000..b23d0aa
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit user
+
+MY_P="PTlink.OPM${PV}"
+
+DESCRIPTION="PTlink Open Proxy Monitor"
+HOMEPAGE="http://www.ptlink.net/"
+SRC_URI="ftp://ftp.sunsite.dk/projects/ptlink/ptopm/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+
+DEPEND=">=sys-apps/sed-4"
+
+S=${WORKDIR}/${MY_P}
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.3.1-fno-common.patch
+)
+
+src_configure() {
+       econf \
+               --sysconfdir=/etc/ptlink-opm \
+               --localstatedir=/var/lib/ptlink-opm
+}
+
+src_install() {
+       newbin src/ptopm ptlink-opm
+
+       insinto /etc/ptlink-opm
+       newins samples/ptopm.dconf.sample ptopm.dconf
+       doins samples/scan_rules.dconf
+
+       keepdir /var/{lib,log}/ptlink-opm
+       dosym ../../log/ptlink-opm /var/lib/ptlink-opm/log
+
+       dodoc CHANGES README
+
+       newinitd "${FILESDIR}"/ptlink-opm.init.d ptlink-opm
+       newconfd "${FILESDIR}"/ptlink-opm.conf.d ptlink-opm
+}
+
+pkg_postinst() {
+       enewuser ptlink-opm
+       chown ptlink-opm "${ROOT}"/var/{log,lib}/ptlink-opm
+}