---- src/Makefile 2005-10-27 12:58:53.000000000 +0200
-+++ src/Makefile 2013-03-08 22:20:52.360922189 +0100
+* 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$
+ # $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
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) $^
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="5"
+EAPI=6
-inherit eutils readme.gentoo
+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"
DEPEND="dev-util/yacc"
RDEPEND=""
-src_prepare() {
- epatch "${FILESDIR}"/${P}-glibc.patch #248100
- epatch "${FILESDIR}"/${P}-makefile.patch
+PATCHES=(
+ "${FILESDIR}"/${P}-glibc.patch #248100
+ "${FILESDIR}"/${P}-makefile.patch
+)
- epatch_user
+src_configure() {
+ # Fix multiple symbol definitions due to
+ # C99/C11 inline semantics, bug 571458
+ append-cflags -std=gnu89
}
src_compile() {
src_install() {
dosbin src/htund
+
insinto /etc
doins doc/htund.conf
- dodoc doc/* README
+
+ local DOCS=( doc/. README )
+ einstalldocs
readme.gentoo_create_doc
}