fix dhcp build on osx
authorFelix Fietkau <nbd@openwrt.org>
Sun, 1 Apr 2007 15:26:01 +0000 (15:26 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 1 Apr 2007 15:26:01 +0000 (15:26 +0000)
SVN-Revision: 6797

net/dhcp/Makefile
net/dhcp/patches/100-portability.patch [new file with mode: 0644]

index a687e8c59bb2949026449369ab015e8a198476b1..48d8de2ec10c81da55a7193091da34c91c94e9a2 100644 (file)
@@ -43,6 +43,9 @@ endef
 define Build/Configure
        # it's not GNU autoconf stuff
        (cd $(PKG_BUILD_DIR) ; \
+               UNAME_S=Linux \
+               UNAME_M=$(ARCH) \
+               UNAME_R=2.4.34 \
                ./configure \
                        --copts "$(TARGET_CFLAGS)" \
                        linux-2.2 \
@@ -50,6 +53,9 @@ define Build/Configure
 endef
 
 define Build/Compile
+       UNAME_S=Linux \
+       UNAME_M=$(ARCH) \
+       UNAME_R=2.4.34 \
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
diff --git a/net/dhcp/patches/100-portability.patch b/net/dhcp/patches/100-portability.patch
new file mode 100644 (file)
index 0000000..f768143
--- /dev/null
@@ -0,0 +1,22 @@
+--- dhcp.old/configure 2007-04-01 17:16:14.000000000 +0200
++++ dhcp.dev/configure 2007-04-01 17:16:54.000000000 +0200
+@@ -26,8 +26,8 @@
+   shift
+ done
+-uname=`uname -s`
+-machine=`uname -m`
++uname=${UNAME_S:-`uname -s`}
++machine=${UNAME_M:-`uname -m`}
+ if [ "$sysname" = "" ]; then
+   case $uname in
+@@ -92,7 +92,7 @@
+       fi
+       fi;;
+     Linux)
+-      release=`uname -r`
++      release=${UNAME_R:-`uname -r`}
+       minor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
+       major=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
+