From fce155f9a02e13ea0a1d73d96550f8f2d94125d4 Mon Sep 17 00:00:00 2001 From: Andy Boyett Date: Mon, 29 Sep 2008 03:38:01 +0000 Subject: [PATCH] [packages] libs/zaptel-1.4: Fix compilation on 64-bit hosts and clean up makefile SVN-Revision: 12796 --- libs/zaptel-1.4.x/Makefile | 34 +++++++++++-------- .../patches/001-Makefile-arch.patch | 14 ++++++++ 2 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 libs/zaptel-1.4.x/patches/001-Makefile-arch.patch diff --git a/libs/zaptel-1.4.x/Makefile b/libs/zaptel-1.4.x/Makefile index 9688d59d96..3a99bfa4ce 100644 --- a/libs/zaptel-1.4.x/Makefile +++ b/libs/zaptel-1.4.x/Makefile @@ -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 index 0000000000..9e754d4537 --- /dev/null +++ b/libs/zaptel-1.4.x/patches/001-Makefile-arch.patch @@ -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) -- 2.30.2