summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-nntp/sn')
-rw-r--r--net-nntp/sn/Manifest1
-rw-r--r--net-nntp/sn/files/sn-0.3.8-parallel-make.patch56
-rw-r--r--net-nntp/sn/files/sn-0.3.8-qa.patch21
-rw-r--r--net-nntp/sn/metadata.xml5
-rw-r--r--net-nntp/sn/sn-0.3.8.ebuild48
5 files changed, 131 insertions, 0 deletions
diff --git a/net-nntp/sn/Manifest b/net-nntp/sn/Manifest
new file mode 100644
index 00000000000..bae80171130
--- /dev/null
+++ b/net-nntp/sn/Manifest
@@ -0,0 +1 @@
+DIST sn-0.3.8.tar.bz2 97751 RMD160 63c6d492104447dfaeb7f15569c50080ef0276f4 SHA1 854a7422e0d37e0e9f1891e663efadc196e08661 SHA256 8ce7c77d587814993ca27d5bbf2bb8b2ad13111995b6113dc917484596dbddf0
diff --git a/net-nntp/sn/files/sn-0.3.8-parallel-make.patch b/net-nntp/sn/files/sn-0.3.8-parallel-make.patch
new file mode 100644
index 00000000000..d94e2189778
--- /dev/null
+++ b/net-nntp/sn/files/sn-0.3.8-parallel-make.patch
@@ -0,0 +1,56 @@
+--- sn-0.3.8/Makefile.orig
++++ sn-0.3.8/Makefile
+@@ -94,39 +94,39 @@
+ ar rc $@ $^
+ ranlib $@
+
+-snsplit: snsplit.o sn.a
++snsplit: snsplit.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snscan: snscan.o sn.a
++snscan: snscan.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS) $(ZLIB)
+ sncat: snscan
+ ln -s snscan sncat
+ sncancel: snscan
+ ln -s snscan sncancel
+-snprimedb: snprimedb.o sn.a
++snprimedb: snprimedb.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-sndumpdb: sndumpdb.o sn.a
++sndumpdb: sndumpdb.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snntpd: snntpd.o post.o commands.o list.o sn.a
++snntpd: snntpd.o post.o commands.o list.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS) $(ZLIB)
+-snsend: snsend.o sn.a
++snsend: snsend.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS) $(ZLIB)
+ snstore: snsend
+ ln -s snsend snstore
+-snfetch: snfetch.o sn.a
++snfetch: snfetch.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snexpire: snexpire.o sn.a
++snexpire: snexpire.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snmail: snmail.o sn.a
++snmail: snmail.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snget: snget.o get.o sn.a
++snget: snget.o get.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-sngetd: sngetd.o get.o sn.a
++sngetd: sngetd.o get.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snnewgroup: snnewgroup.o sn.a
++snnewgroup: snnewgroup.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-sndelgroup: sndelgroup.o sn.a
++sndelgroup: sndelgroup.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+-snlockf: snlockf.o
++snlockf: snlockf.o sn.a lib/libstuff.a
+ $(LD) `cat cc-flags` $^ -o $@ $(LIBS)
+
+ %: %.in sed-cmd
diff --git a/net-nntp/sn/files/sn-0.3.8-qa.patch b/net-nntp/sn/files/sn-0.3.8-qa.patch
new file mode 100644
index 00000000000..52a25ebcd83
--- /dev/null
+++ b/net-nntp/sn/files/sn-0.3.8-qa.patch
@@ -0,0 +1,21 @@
+--- lib/readln.c
++++ lib/readln.c
+@@ -9,6 +9,7 @@
+ * Get a single line from an fd.
+ */
+
++#include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+
+--- lib/cmdopen.c
++++ lib/cmdopen.c
+@@ -6,6 +6,7 @@
+ */
+
+ #include <unistd.h>
++#include <stdlib.h>
+ #include <fcntl.h>
+ #include <sys/wait.h>
+
diff --git a/net-nntp/sn/metadata.xml b/net-nntp/sn/metadata.xml
new file mode 100644
index 00000000000..4d0ebe73a55
--- /dev/null
+++ b/net-nntp/sn/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-news</herd>
+</pkgmetadata>
diff --git a/net-nntp/sn/sn-0.3.8.ebuild b/net-nntp/sn/sn-0.3.8.ebuild
new file mode 100644
index 00000000000..44224c6424d
--- /dev/null
+++ b/net-nntp/sn/sn-0.3.8.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Hassle-free Usenet news system for small sites"
+SRC_URI="http://infa.abo.fi/~patrik/sn/files/${P}.tar.bz2"
+HOMEPAGE="http://infa.abo.fi/~patrik/sn/"
+
+KEYWORDS="~amd64 x86 ~ppc"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-qa.patch
+ epatch "${FILESDIR}"/${P}-parallel-make.patch
+
+ sed -i -e 's/-g -Wall -pedantic -O/-Wall -pedantic/' Makefile || die
+}
+
+src_compile() {
+ emake cc-flags
+ echo ${CFLAGS} >>cc-flags
+
+ emake CC="$(tc-getCC)" LD="$(tc-getCC) ${LDFLAGS}" \
+ SNROOT=/var/spool/news \
+ BINDIR=/usr/sbin \
+ MANDIR=/usr/share/man
+}
+
+src_install() {
+ dodir /var/spool/news /usr/sbin /usr/share/man/man8
+ mknod -m 600 "${D}"/var/spool/news/.fifo p
+ emake install \
+ SNROOT="${D}"/var/spool/news \
+ BINDIR="${D}"/usr/sbin \
+ MANDIR="${D}"/usr/share/man
+ dodoc CHANGES FAQ INSTALL* INTERNALS README* THANKS TODO
+ fowners news:news /var/spool/news{,/.fifo}
+}