lua-lzlib: fix build failure, honor cflags, cleanup
authorNicolas Thill <[email protected]>
Thu, 30 Apr 2015 02:10:29 +0000 (04:10 +0200)
committerNicolas Thill <[email protected]>
Thu, 30 Apr 2015 02:10:29 +0000 (04:10 +0200)
 * fix failure on buildbot where lua devel files are searched in home directory
 * add a patch to pass proper target optimization flags
 * remove unused PKG_INSTALL & Build/Install

Signed-off-by: Nicolas Thill <[email protected]>
lang/lua-lzlib/Makefile
lang/lua-lzlib/patches/001-allow_optim_flags.patch [new file with mode: 0644]

index 4b946878921af2d1f35d67f2f432c12992f3552d..096cec0d7e8e2b854c9b30cac5cc1340b2ac9c0f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua-lzlib
 PKG_VERSION:=0.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Dirk Chang <[email protected]>
 PKG_LICENSE:=MIT
 
@@ -19,8 +19,6 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=9fa3993bb4504fbbc10511cde141e1c6a48c072d
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 
-PKG_INSTALL:=1
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lua-lzlib
@@ -36,8 +34,9 @@ define Package/lua-lzlib/description
        A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package. 
 endef
 
-define Build/Install
-endef
+MAKE_FLAGS += \
+       LUA="$(STAGING_DIR)/usr" \
+       OFLAGS="$(TARGET_CFLAGS)" \
 
 define Package/lua-lzlib/install
        $(INSTALL_DIR) $(1)/usr/lib/lua
diff --git a/lang/lua-lzlib/patches/001-allow_optim_flags.patch b/lang/lua-lzlib/patches/001-allow_optim_flags.patch
new file mode 100644 (file)
index 0000000..78f981d
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin
+ ZLIB=../zlib-1.2.3
+ # no need to change anything below here
+-CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC
++CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC
++OFLAGS= -O0
+ WARN= -g -Werror -Wall -pedantic #-ansi
+ INCS= -I$(LUAINC) -I$(ZLIB)
+ LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51