summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-dialup/rp-l2tp/ChangeLog10
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch54
-rw-r--r--net-dialup/rp-l2tp/rp-l2tp-0.4-r2.ebuild31
3 files changed, 93 insertions, 2 deletions
diff --git a/net-dialup/rp-l2tp/ChangeLog b/net-dialup/rp-l2tp/ChangeLog
index 8bc989da6ec2..eb63b80fd6ae 100644
--- a/net-dialup/rp-l2tp/ChangeLog
+++ b/net-dialup/rp-l2tp/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-dialup/rp-l2tp
-# Copyright 2003-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/rp-l2tp/ChangeLog,v 1.16 2007/04/15 10:42:17 mrness Exp $
+# Copyright 2003-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/rp-l2tp/ChangeLog,v 1.17 2008/10/18 08:50:27 mrness Exp $
+
+*rp-l2tp-0.4-r2 (18 Oct 2008)
+
+ 18 Oct 2008; Alin Năstac <mrness@gentoo.org>
+ +files/rp-l2tp-0.4-flags.patch, +rp-l2tp-0.4-r2.ebuild:
+ Build with user specified CFLAGS/LDFLAGS (#240880).
*rp-l2tp-0.4-r1 (15 Apr 2007)
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch
new file mode 100644
index 000000000000..bf5d0cf82b3f
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch
@@ -0,0 +1,54 @@
+diff -ru rp-l2tp-0.4.orig/handlers/Makefile.in rp-l2tp-0.4/handlers/Makefile.in
+--- rp-l2tp-0.4.orig/handlers/Makefile.in 2008-10-18 08:35:39.000000000 +0000
++++ rp-l2tp-0.4/handlers/Makefile.in 2008-10-18 08:47:02.000000000 +0000
+@@ -15,24 +15,24 @@
+
+ OBJS=pty.o sync-pppd.o dstring.o
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -O2 -I.. -I../libevent -I../../libevent -Wall
++CFLAGS=@CFLAGS@ -I.. -I../libevent -I../../libevent -Wall
+
+ all: $(HANDLERS) l2tp-control
+
+ l2tp-control: cmd-control.o
+- gcc -o l2tp-control cmd-control.o
++ gcc $(LDFLAGS) -o l2tp-control cmd-control.o
+
+ cmd-control.o: cmd-control.c
+- gcc -c -o $@ $^
++ gcc $(CFLAGS) -c -o $@ $^
+
+ %.o: %.c
+ gcc $(CFLAGS) -fPIC -c -o $@ $<
+
+ sync-pppd.so: pty.o sync-pppd.o
+- gcc -shared -o $@ $^
++ gcc $(LDFLAGS) -shared -o $@ $^
+
+ cmd.so: cmd.o dstring.o
+- gcc -shared -o $@ $^
++ gcc $(LDFLAGS) -shared -o $@ $^
+
+ clean:
+ rm -f *.so *.o *~
+diff -ru rp-l2tp-0.4.orig/Makefile.in rp-l2tp-0.4/Makefile.in
+--- rp-l2tp-0.4.orig/Makefile.in 2008-10-18 08:35:39.000000000 +0000
++++ rp-l2tp-0.4/Makefile.in 2008-10-18 08:40:38.000000000 +0000
+@@ -31,7 +31,7 @@
+ EXTRA_LIBS=@LIBEVENT@/*.o -ldl
+
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
++CFLAGS=@CFLAGS@ -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
+
+ TARGETS=l2tpd libl2tp.a handlers
+
+@@ -44,7 +44,7 @@
+
+ l2tpd: libl2tp.a libevent/libevent.a
+ $(MAKE) -C handlers
+- @CC@ -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
++ @CC@ $(LDFLAGS) -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
+
+ libevent/libevent.a:
+ test -d libevent || ln -s ../libevent .
diff --git a/net-dialup/rp-l2tp/rp-l2tp-0.4-r2.ebuild b/net-dialup/rp-l2tp/rp-l2tp-0.4-r2.ebuild
new file mode 100644
index 000000000000..baa14da23d6c
--- /dev/null
+++ b/net-dialup/rp-l2tp/rp-l2tp-0.4-r2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/rp-l2tp/rp-l2tp-0.4-r2.ebuild,v 1.1 2008/10/18 08:50:27 mrness Exp $
+
+inherit eutils
+
+DESCRIPTION="RP-L2TP is a user-space implementation of L2TP for Linux and other UNIX systems"
+HOMEPAGE="http://sourceforge.net/projects/rp-l2tp/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-flags.patch"
+}
+
+src_install() {
+ make RPM_INSTALL_ROOT="${D}" install || die "make install failed"
+
+ dodoc README
+ newdoc l2tp.conf rp-l2tpd.conf
+ cp -pPR libevent/Doc "${D}/usr/share/doc/${PF}/libevent"
+
+ newinitd "${FILESDIR}/rp-l2tpd-init" rp-l2tpd
+}