libs/zaptel-1.4: Fix compilation on 64-bit hosts and clean up makefile
authoragb <agb@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 29 Sep 2008 03:38:01 +0000 (03:38 +0000)
committerJiri Slachta <slachta@cesnet.cz>
Sat, 8 Mar 2014 11:08:04 +0000 (12:08 +0100)
libs/zaptel-1.4.x/Makefile
libs/zaptel-1.4.x/patches/001-Makefile-arch.patch [new file with mode: 0644]

index 9688d59d963e5f21aad904146479d934f9e2c555..3a99bfa4cea2423f9b083bbc59c5716da5b80a32 100644 (file)
@@ -62,30 +62,34 @@ define Package/zaptel14-libtonezone/description
        This package contains the libraries for accessing zaptel/dummy drivers.
 endef
 
-define Build/Compile/zaptel14
+define Build/Compile/zaptel14-template
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                ARCH="$(LINUX_KARCH)" \
-               CC=$(KERNEL_CC) \
-               LD=$(TARGET_CROSS)ld \
-               HOSTCC=$(HOSTCC) \
-               KVERS=$(LINUX_VERSION) \
-               KSRC=$(LINUX_DIR) \
+               LD="$(TARGET_CROSS)ld" \
+               AR="$(TARGET_CROSS)ar" \
+               HOSTCC="$(HOSTCC)" \
+               DEB_HOST_GNU_TYPE="$(ARCH)" \
+               KVERS="$(LINUX_VERSION)" \
+               KSRC="$(LINUX_DIR)" \
+               $(1)
+endef
+
+define Build/Compile/zaptel14
+       $(call Build/Compile/zaptel14-template, \
+               CC="$(KERNEL_CC)" \
                KFLAGS_PPC="-G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 $(TARGET_CFLAGS) -mlong-calls -fno-common -nostdinc -iwithprefix include" \
                TOPDIR_MODULES="zaptel ztdummy" \
                SUBDIR_MODULES="" \
-               modules zttest
+               modules zttest \
+       )
 endef
 
 define Build/Compile/zaptel14-libtonezone
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               CC=$(TARGET_CC) \
-               LD=$(TARGET_CROSS)ld \
-               AR=$(TARGET_CROSS)ar \
-               KSRC=$(LINUX_DIR) \
-               HOSTCC=$(HOSTCC) \
-               install-libs install-include
+       $(call Build/Compile/zaptel14-template, \
+               CC="$(TARGET_CC)" \
+               install-libs install-include \
+       )
 endef
 
 define Build/Compile
diff --git a/libs/zaptel-1.4.x/patches/001-Makefile-arch.patch b/libs/zaptel-1.4.x/patches/001-Makefile-arch.patch
new file mode 100644 (file)
index 0000000..9e754d4
--- /dev/null
@@ -0,0 +1,14 @@
+Index: zaptel-1.4.9.2/Makefile
+===================================================================
+--- zaptel-1.4.9.2.orig/Makefile       2008-08-15 01:42:26.000000000 -0700
++++ zaptel-1.4.9.2/Makefile    2008-08-15 01:42:43.000000000 -0700
+@@ -18,7 +18,9 @@
+ PWD:=$(shell pwd)
+ endif
++ifndef ARCH
+ ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
++endif
+ ifeq ($(DEB_HOST_GNU_TYPE),)
+ UNAME_M:=$(shell uname -m)