summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 15:37:57 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 15:38:28 +0100
commit9754f457cc6d0aeb90a1535a5228ef909e9584c9 (patch)
treeffbd77f41fb100837cc8f992f8dc863cd01c270d /net-vpn/htun
parentapp-forensics/openscap: remove old (diff)
downloadgentoo-9754f457cc6d0aeb90a1535a5228ef909e9584c9.tar.gz
gentoo-9754f457cc6d0aeb90a1535a5228ef909e9584c9.tar.bz2
gentoo-9754f457cc6d0aeb90a1535a5228ef909e9584c9.zip
Second half of net-vpn/ move
Diffstat (limited to 'net-vpn/htun')
-rw-r--r--net-vpn/htun/Manifest1
-rw-r--r--net-vpn/htun/files/README.gentoo3
-rw-r--r--net-vpn/htun/files/htun-0.9.6-glibc.patch14
-rw-r--r--net-vpn/htun/files/htun-0.9.6-makefile.patch34
-rw-r--r--net-vpn/htun/htun-0.9.6.ebuild45
-rw-r--r--net-vpn/htun/metadata.xml5
6 files changed, 102 insertions, 0 deletions
diff --git a/net-vpn/htun/Manifest b/net-vpn/htun/Manifest
new file mode 100644
index 000000000000..355750f42f01
--- /dev/null
+++ b/net-vpn/htun/Manifest
@@ -0,0 +1 @@
+DIST htun-0.9.6.tar.gz 63745 SHA256 acf330a37f1ac676dcb82160f43f12e0b266263f8bf918d9990f1e17e57ed83f SHA512 d709e9b6a809df5711b3c3c61c207a0ce72a054904fbe0a39bb9c60f174b19eb5fe183e3218100f45941035f72c5212fcbd716858631d1f117e6f88608f8ea0d WHIRLPOOL 3ce553377c2107814455f9d421d5bf2cbfdb40b68e371fc3f078b2a32bfe486861d4d8a683b427238952873651606184186f9e425f22f57d34a0295c0f105a36
diff --git a/net-vpn/htun/files/README.gentoo b/net-vpn/htun/files/README.gentoo
new file mode 100644
index 000000000000..1710c726723a
--- /dev/null
+++ b/net-vpn/htun/files/README.gentoo
@@ -0,0 +1,3 @@
+NOTE: HTun requires the Universal TUN/TAP module
+available in the Linux kernel. Make sure you have
+compiled the tun.o driver as a module!
diff --git a/net-vpn/htun/files/htun-0.9.6-glibc.patch b/net-vpn/htun/files/htun-0.9.6-glibc.patch
new file mode 100644
index 000000000000..3f281c526388
--- /dev/null
+++ b/net-vpn/htun/files/htun-0.9.6-glibc.patch
@@ -0,0 +1,14 @@
+get things building with glibc-2.8
+
+http://bugs.gentoo.org/248100
+
+--- a/include/common.h
++++ b/include/common.h
+@@ -23,6 +23,7 @@
+ #ifndef __COMMON_H
+ #define __COMMON_H
+
++#include <limits.h>
+ #include <netinet/in.h>
+ #include <time.h>
+ #include "queue.h"
diff --git a/net-vpn/htun/files/htun-0.9.6-makefile.patch b/net-vpn/htun/files/htun-0.9.6-makefile.patch
new file mode 100644
index 000000000000..c1f0b76bfa14
--- /dev/null
+++ b/net-vpn/htun/files/htun-0.9.6-makefile.patch
@@ -0,0 +1,34 @@
+* Fix build system to not hardcode CC
+* Fix build system to respect user flags
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -20,16 +20,14 @@
+
+ # $Id: Makefile,v 2.16 2002/08/11 15:57:07 jehsom Exp $
+
+-
+-CFLAGS = -I../include -I. -O -W -Wall -g -D_REENTRANT #-pg -a
+-LDFLAGS = -lfl -lpthread # -flex for linux, solaris ?
+-LEX_CFLAGS = -I../include -I. -g -D_REENTRANT #-pg -a
++CFLAGS := $(CFLAGS) -I../include -I. -O -W -Wall -D_REENTRANT
++LDFLAGS := $(LDFLAGS) -lfl -lpthread
++LEX_CFLAGS = -I../include -I. -D_REENTRANT
+
+ # in Linux, LFLAGS is empty. In Solaris, LFLAGS = -lnsl -lsocket
+ #LFLAGS = -lnsl -lsocket
+
+ VPATH = .:../include
+-CC := gcc
+ LEX = flex
+ YACC = yacc
+ INCLUDE := $(wildcard ../include/*.h)
+@@ -52,7 +50,7 @@
+ $(OBJS): $(INCLUDE)
+
+ $(CONFOBS): $(CONFSRC)
+- $(CC) $(LEX_CFLAGS) -c $(@:.o=.c)
++ $(CC) $(CFLAGS) $(LEX_CFLAGS) -c $(@:.o=.c)
+
+ lex.yy.c: parse.l
+ $(LEX) $^
diff --git a/net-vpn/htun/htun-0.9.6.ebuild b/net-vpn/htun/htun-0.9.6.ebuild
new file mode 100644
index 000000000000..a04679b6af39
--- /dev/null
+++ b/net-vpn/htun/htun-0.9.6.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic readme.gentoo-r1 toolchain-funcs
+
+DESCRIPTION="Project to tunnel IP traffic over HTTP"
+HOMEPAGE="http://linux.softpedia.com/get/System/Networking/HTun-14751.shtml"
+SRC_URI="http://www.sourcefiles.org/Networking/Tools/Proxy/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# should not be replaced by virtual/yacc
+# at least failed with dev-util/bison
+DEPEND="dev-util/yacc"
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-glibc.patch #248100
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_configure() {
+ # Fix multiple symbol definitions due to
+ # C99/C11 inline semantics, bug 571458
+ append-cflags -std=gnu89
+}
+
+src_compile() {
+ emake -C src CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin src/htund
+
+ insinto /etc
+ doins doc/htund.conf
+
+ local DOCS=( doc/. README )
+ einstalldocs
+ readme.gentoo_create_doc
+}
diff --git a/net-vpn/htun/metadata.xml b/net-vpn/htun/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-vpn/htun/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>