From 20d23b5a755557a67bc8f90f992c43f3f371b0d3 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Mon, 30 Oct 2006 09:47:22 +0000 Subject: [PATCH] add a patch to use target optimization flags, use PKG_UNPACK instead of overriding Build/Prepare, cleanup SVN-Revision: 5339 --- utils/microcom/Makefile | 32 ++++++++----------- utils/microcom/patches/01-cross_compile.patch | 29 +++++++++++++++++ 2 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 utils/microcom/patches/01-cross_compile.patch diff --git a/utils/microcom/Makefile b/utils/microcom/Makefile index 874afdac70..3a304412ca 100644 --- a/utils/microcom/Makefile +++ b/utils/microcom/Makefile @@ -10,41 +10,37 @@ include $(TOPDIR)/rules.mk PKG_NAME:=microcom PKG_VERSION:=1.02 -PKG_XVERSION:=102 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=m$(PKG_XVERSION).tar.gz +PKG_SOURCE:=m102.tar.gz PKG_SOURCE_URL:=http://microcom.port5.com/ PKG_MD5SUM:=c7817035dc41cb02e7cfb565cf9b7401 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_UNPACK:=zcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) + include $(INCLUDE_DIR)/package.mk define Package/microcom SECTION:=utils CATEGORY:=Utilities - TITLE:=A serial terminal emulation program - DESCRIPTION:=A serial terminal emulation program.\\\ - microcom is a minicom-like serial terminal emulator with scripting \\\ - support. + TITLE:=A serial terminal emulation program + DESCRIPTION:=\ + microcom is a minicom-like serial terminal emulator with scripting \\\ + support. URL:=http://microcomlinux.homestead.com/ endef -define Build/Prepare - rm -rf $(PKG_BUILD_DIR) - mkdir -p $(PKG_BUILD_DIR) - # the .tar.gz is different - no subdirectory, so do this manually - zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) -endef - -define Build/Configure - $(CP) $(PKG_BUILD_DIR)/Makefile $(PKG_BUILD_DIR)/Makefile.tmp - sed 's~gcc~$$(CC)~' $(PKG_BUILD_DIR)/Makefile.tmp > $(PKG_BUILD_DIR)/Makefile +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + microcom endef define Package/microcom/install install -d -m0755 $(1)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/microcom $(1)/usr/bin + install -m0755 $(PKG_BUILD_DIR)/microcom $(1)/usr/bin/ endef $(eval $(call BuildPackage,microcom)) diff --git a/utils/microcom/patches/01-cross_compile.patch b/utils/microcom/patches/01-cross_compile.patch new file mode 100644 index 0000000000..f6e44a8ccb --- /dev/null +++ b/utils/microcom/patches/01-cross_compile.patch @@ -0,0 +1,29 @@ +diff -ruN microcom-1.02-old/Makefile microcom-1.02-new/Makefile +--- microcom-1.02-old/Makefile 2006-10-29 21:55:45.000000000 +0100 ++++ microcom-1.02-new/Makefile 2006-10-29 22:00:09.000000000 +0100 +@@ -19,19 +19,19 @@ + #** Rev. 0.91 - Jan. 2000 - minor fixes, compiled under Mandrake 6.0 + #****************************************************************************/ + microcom: microcom.o mux.o script.o help.o autodet.o +- gcc -o microcom microcom.o mux.o script.o help.o autodet.o ++ $(CC) -o microcom microcom.o mux.o script.o help.o autodet.o + + autodet.o: autodet.c microcom.h +- gcc -O -c autodet.c ++ $(CC) $(CFLAGS) -c autodet.c + + script.o: script.c script.h microcom.h +- gcc -O -c script.c ++ $(CC) $(CFLAGS) -c script.c + + mux.o: mux.c microcom.h +- gcc -O -c mux.c ++ $(CC) $(CFLAGS) -c mux.c + + microcom.o: microcom.c microcom.h +- gcc -O -c microcom.c ++ $(CC) $(CFLAGS) -c microcom.c + + help.o: help.c microcom.h +- gcc -O -c help.c ++ $(CC) $(CFLAGS) -c help.c -- 2.30.2