summaryrefslogtreecommitdiff
path: root/openwrt/package/lzo
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt/package/lzo')
-rw-r--r--openwrt/package/lzo/Config.in7
-rw-r--r--openwrt/package/lzo/Makefile69
-rw-r--r--openwrt/package/lzo/lzo.control8
-rw-r--r--openwrt/package/lzo/patches/lzo-cross-compile.patch43
4 files changed, 127 insertions, 0 deletions
diff --git a/openwrt/package/lzo/Config.in b/openwrt/package/lzo/Config.in
new file mode 100644
index 0000000000..f8c043a339
--- /dev/null
+++ b/openwrt/package/lzo/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LZO
+ tristate "lzo"
+ default m
+ help
+ A library implementing transparent compression/decompression
+
+ http://www.oberhumer.com/opensource/lzo/
diff --git a/openwrt/package/lzo/Makefile b/openwrt/package/lzo/Makefile
new file mode 100644
index 0000000000..8d7398194e
--- /dev/null
+++ b/openwrt/package/lzo/Makefile
@@ -0,0 +1,69 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME := lzo
+PKG_VERSION := 1.08
+PKG_RELEASE := 1
+
+PKG_SOURCE_SITE := http://www.oberhumer.com/opensource/lzo/download/
+PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_CAT := zcat
+PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
+PKG_IPK := $(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+
+
+$(DL_DIR)/$(PKG_SOURCE_FILE):
+ mkdir -p $(DL_DIR)
+ $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
+
+$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
+ mkdir -p $(TOOL_BUILD_DIR)
+ $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(PATCH) $(PKG_BUILD_DIR) . ./patches
+ touch $(PKG_BUILD_DIR)/.patched
+
+$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
+ (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ --exec-prefix=/ \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --libexecdir=/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-shared \
+ );
+ touch $(PKG_BUILD_DIR)/.configured
+
+$(PKG_BUILD_DIR)/src/liblzo.la: $(PKG_BUILD_DIR)/.configured
+ $(MAKE) -C $(PKG_BUILD_DIR)
+
+$(STAGING_DIR)/lib/liblzo.a: $(PKG_BUILD_DIR)/src/liblzo.la
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC=$(TARGET_CC) \
+ DESTDIR="$(STAGING_DIR)" \
+ install
+
+$(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/liblzo.a
+ mkdir -p $(PACKAGE_DIR)
+ $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/lzo lzo.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
+ mkdir -p $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
+ cp -a $(STAGING_DIR)/lib/liblzo.so* $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
+ $(STRIP) $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib/*
+ $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/lzo $(PACKAGE_DIR)
+
+source: $(DL_DIR)/$(PKG_SOURCE_FILE)
+prepare: $(PKG_BUILD_DIR)/.patched
+compile: $(STAGING_DIR)/lib/liblzo.a $(PACKAGE_DIR)/$(PKG_IPK)
+install: $(PKG_ZLIB)
+ $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
+clean:
+ rm -rf $(PKG_BUILD_DIR)
+ rm -f $(STAGING_DIR)/lib/liblzo*
+ rm -f $(PACKAGE_DIR)/lzo\*.ipk
+
diff --git a/openwrt/package/lzo/lzo.control b/openwrt/package/lzo/lzo.control
new file mode 100644
index 0000000000..aa9992aa33
--- /dev/null
+++ b/openwrt/package/lzo/lzo.control
@@ -0,0 +1,8 @@
+Package: lzo
+Priority: optional
+Section: libs
+Version: 1.0.8-1
+Architecture: mipsel
+Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
+Source: buildroot internal
+Description: an implementation of the deflate compression method (library)
diff --git a/openwrt/package/lzo/patches/lzo-cross-compile.patch b/openwrt/package/lzo/patches/lzo-cross-compile.patch
new file mode 100644
index 0000000000..68a3d0449e
--- /dev/null
+++ b/openwrt/package/lzo/patches/lzo-cross-compile.patch
@@ -0,0 +1,43 @@
+For some reason the lzo autoconf script uses a local macro that does
+a test for cross-compiles, and assumes that if the build target name
+and the host target name are the same that --host was not specified to
+the configure script. In the uClibc buildroot, this is not the case.
+
+--- lzo-1.08/aclocal.m4 2002-07-12 18:31:52.000000000 -0700
++++ lzo-1.08/aclocal.m4.new 2004-03-10 15:32:42.000000000 -0700
+@@ -205,12 +205,6 @@
+ [
+ AC_REQUIRE([AC_PROG_CC])
+
+-if test "X$cross_compiling" = Xyes; then
+- if test "X$build" = "X$host"; then
+- AC_MSG_ERROR([you are cross compiling - please use the \`--host=' option])
+- fi
+-fi
+-
+ ])
+
+
+--- lzo-1.08/configure-dist 2004-03-11 02:18:28.000000000 -0600
++++ lzo-1.08/configure 2004-03-11 02:19:16.000000000 -0600
+@@ -2282,13 +2282,13 @@
+
+
+
+-if test "X$cross_compiling" = Xyes; then
+- if test "X$build" = "X$host"; then
+- { { echo "$as_me:$LINENO: error: you are cross compiling - please use the \`--host=' option" >&5
+-echo "$as_me: error: you are cross compiling - please use the \`--host=' option" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+-fi
++#if test "X$cross_compiling" = Xyes; then
++# if test "X$build" = "X$host"; then
++# { { echo "$as_me:$LINENO: error: you are cross compiling - please use the \`--host=' option" >&5
++#echo "$as_me: error: you are cross compiling - please use the \`--host=' option" >&2;}
++# { (exit 1); exit 1; }; }
++# fi
++#fi
+
+
+