rename the patch to better match its purpose,
authorNicolas Thill <nico@openwrt.org>
Thu, 15 Dec 2005 12:55:38 +0000 (12:55 +0000)
committerNicolas Thill <nico@openwrt.org>
Thu, 15 Dec 2005 12:55:38 +0000 (12:55 +0000)
add target optimization cflags,
prevent host system detection to set compile-time options.

SVN-Revision: 2688

openwrt/package/vpnc/Makefile
openwrt/package/vpnc/patches/01-cross.patch [new file with mode: 0644]
openwrt/package/vpnc/patches/01-no_man.patch [deleted file]

index 7513290eba21a0d1be3b2ace82f406e1058991f9..55082905de74812ff2ccf320fe199dacf6e18632 100644 (file)
@@ -25,6 +25,8 @@ $(PKG_BUILD_DIR)/.configured:
 $(PKG_BUILD_DIR)/.built:
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CC=$(TARGET_CC) \
+               OFLAGS="$(TARGET_CFLAGS)" \
+               OS="Linux" \
                STAGING_DIR=$(STAGING_DIR) \
                DESTDIR=$(PKG_INSTALL_DIR) \
                PREFIX=/usr \
diff --git a/openwrt/package/vpnc/patches/01-cross.patch b/openwrt/package/vpnc/patches/01-cross.patch
new file mode 100644 (file)
index 0000000..4f27fbd
--- /dev/null
@@ -0,0 +1,37 @@
+diff -ruN vpnc-0.3.3-old/Makefile vpnc-0.3.3-new/Makefile
+--- vpnc-0.3.3-old/Makefile    2005-05-01 22:30:35.000000000 +0200
++++ vpnc-0.3.3-new/Makefile    2005-12-13 17:23:26.000000000 +0100
+@@ -23,25 +23,26 @@
+ MANDIR=$(PREFIX)/share/man
+ CC=gcc
+-CFLAGS=-W -Wall -O -g '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
+-LDFLAGS=-g $(shell libgcrypt-config --libs)
++CFLAGS=-W -Wall -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
++LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib $(shell libgcrypt-config --libs)
+-ifeq ($(shell uname -s), Linux)
++OS=$(shell uname -s)
++ifeq ($(OS), Linux)
+ SYSDEP=sysdep-linux.o
+ endif
+-ifeq ($(shell uname -s), FreeBSD)
++ifeq ($(OS), FreeBSD)
+ CFLAGS += -DSOCKADDR_IN_SIN_LEN -DHAVE_SA_LEN
+ SYSDEP=sysdep-bsd.o
+ endif
+-ifeq ($(shell uname -s), NetBSD)
++ifeq ($(OS), NetBSD)
+ CFLAGS += -DSOCKADDR_IN_SIN_LEN -DHAVE_SA_LEN
+ SYSDEP=sysdep-bsd.o
+ endif
+-ifeq ($(shell uname -s), OpenBSD)
++ifeq ($(OS), OpenBSD)
+ CFLAGS += -DSOCKADDR_IN_SIN_LEN -DHAVE_SA_LEN -DNEED_IPLEN_FIX -DNEW_TUN
+ SYSDEP=sysdep-bsd.o
+ endif
+-ifeq ($(shell uname -s), SunOS)
++ifeq ($(OS), SunOS)
+ CFLAGS += -DNEED_IPLEN_FIX
+ LDFLAGS += -lnsl -lresolv -lsocket
+ SYSDEP=sysdep-svr4.o
diff --git a/openwrt/package/vpnc/patches/01-no_man.patch b/openwrt/package/vpnc/patches/01-no_man.patch
deleted file mode 100644 (file)
index a5cc395..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urN orig/vpnc-0.3.3/Makefile vpnc-0.3.3/Makefile
---- orig/vpnc-0.3.3/Makefile   2005-05-01 22:30:35.000000000 +0200
-+++ vpnc-0.3.3/Makefile        2005-12-13 10:30:56.000000000 +0100
-@@ -22,9 +22,8 @@
- SBINDIR=$(PREFIX)/sbin
- MANDIR=$(PREFIX)/share/man
--CC=gcc
--CFLAGS=-W -Wall -O -g '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
--LDFLAGS=-g $(shell libgcrypt-config --libs)
-+CFLAGS=-W -Wall -O -I$(STAGING_DIR)/usr/include '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
-+LDFLAGS=-L$(STAGING_DIR)/usr/lib $(shell libgcrypt-config --libs)
- ifeq ($(shell uname -s), Linux)
- SYSDEP=sysdep-linux.o
-@@ -83,10 +82,9 @@
- all : vpnc
- install :
--      install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(MANDIR)/man8
-+      install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(SBINDIR)
-       install vpnc.conf vpnc-script $(DESTDIR)$(ETCDIR)
-       install vpnc vpnc-disconnect $(DESTDIR)$(SBINDIR)
--      install vpnc.8 $(DESTDIR)$(MANDIR)/man8
- install-strip :
-       install -d $(DESTDIR)$(ETCDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(MANDIR)/man8