From: florian Date: Sat, 8 Mar 2014 00:57:10 +0000 (+0000) Subject: mgen: fix build X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=d1fbde20fc0927b77f4b572bbc039425cb832b62;p=packages.git mgen: fix build mgen build was spectacularly broken, not even being cross-compiled for the target, fix that and make sure that we use the toolchain binaries were relevant. Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/packages@39813 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/mgen/Makefile b/net/mgen/Makefile index 3ad35aedb..13ec1b212 100644 --- a/net/mgen/Makefile +++ b/net/mgen/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mgen PKG_VERSION:=5.01b -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=src-$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://downloads.pf.itd.nrl.navy.mil/mgen/ @@ -38,9 +38,10 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/unix \ + $(TARGET_CONFIGURE_OPTS) \ CC="$(TARGET_CXX)" \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ + SYSTEM_INCLUDES="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + SYSTEM_LDFLAGS="$(TARGET_LDFLAGS)" \ SYSTEM_LIBS="-ldl -lpthread" \ -f Makefile.linux mgen endef diff --git a/net/mgen/patches/100-ipv6.patch b/net/mgen/patches/100-ipv6.patch index 4878a9697..2e193ecd4 100644 --- a/net/mgen/patches/100-ipv6.patch +++ b/net/mgen/patches/100-ipv6.patch @@ -1,7 +1,6 @@ -diff -urN mgen.old/protolib/unix/Makefile.linux mgen/protolib/unix/Makefile.linux ---- mgen.old/protolib/unix/Makefile.linux 2008-03-07 22:23:06.000000000 +0100 -+++ mgen/protolib/unix/Makefile.linux 2009-06-06 20:40:29.000000000 +0200 -@@ -39,7 +39,7 @@ +--- a/protolib/unix/Makefile.linux ++++ b/protolib/unix/Makefile.linux +@@ -39,7 +39,7 @@ SYSTEM_LIBS = -ldl -lrt # (We export these for other Makefiles as needed) # @@ -10,10 +9,9 @@ diff -urN mgen.old/protolib/unix/Makefile.linux mgen/protolib/unix/Makefile.linu -DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED # (TBD) Move ProtoRouteMgr to ProtokitEx ?? -diff -urN mgen.old/unix/Makefile.linux mgen/unix/Makefile.linux ---- mgen.old/unix/Makefile.linux 2007-06-22 21:16:20.000000000 +0200 -+++ mgen/unix/Makefile.linux 2009-06-06 20:40:10.000000000 +0200 -@@ -35,7 +35,7 @@ +--- a/unix/Makefile.linux ++++ b/unix/Makefile.linux +@@ -35,7 +35,7 @@ SYSTEM_LIBS = -ldl -lpthread # (We export these for other Makefiles as needed) # diff --git a/net/mgen/patches/200-cflags_override.patch b/net/mgen/patches/200-cflags_override.patch new file mode 100644 index 000000000..0e78d1f0c --- /dev/null +++ b/net/mgen/patches/200-cflags_override.patch @@ -0,0 +1,25 @@ +--- a/unix/Makefile.linux ++++ b/unix/Makefile.linux +@@ -5,8 +5,8 @@ + # 1) System specific additional libraries, include paths, etc + # (Where to find X11 libraries, etc) + # +-SYSTEM_INCLUDES = -I/usr/X11R6/include +-SYSTEM_LDFLAGS = -L/usr/X11R6/lib ++SYSTEM_INCLUDES ?= -I/usr/X11R6/include ++SYSTEM_LDFLAGS ?= -L/usr/X11R6/lib + SYSTEM_LIBS = -ldl -lpthread + + # 2) System specific capabilities +@@ -39,8 +39,8 @@ SYSTEM_HAVES = -DLINUX -DHAVE_PSELECT -D + -DHAVE_ASSERT $(NETSEC) + + SYSTEM = linux +-CC = g++ +-RANLIB = ranlib +-AR = ar ++CC ?= g++ ++RANLIB ?= ranlib ++AR ?= ar + + include Makefile.common