Fix lua plugin compilation
authorFlorian Fainelli <florian@openwrt.org>
Sun, 20 Jan 2008 15:31:11 +0000 (15:31 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 20 Jan 2008 15:31:11 +0000 (15:31 +0000)
SVN-Revision: 10225

net/weechat/Makefile
net/weechat/patches/003-lua_flags.patch [new file with mode: 0644]

index 77b876da47efd977caff04f4648cade74e4da512..52b75bb67a96da1f41d1aa5e088e0f33d9d5f7fb 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=weechat
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=weechat
-PKG_VERSION:=0.2.5
-PKG_RELEASE:=2
+PKG_VERSION:=0.2.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://weechat.flashtux.org/download/
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://weechat.flashtux.org/download/
-PKG_MD5SUM:=42f96620c3b2fd3dca9768d9ce16dd06
+PKG_MD5SUM:=ccdecf663b0050a23049acb4b9a76193
 
 PKG_FIXUP = libtool
 
 
 PKG_FIXUP = libtool
 
@@ -78,15 +78,18 @@ CONFIGURE_ARGS+= \
        --disable-perl \
        --disable-python \
        --disable-ruby \
        --disable-perl \
        --disable-python \
        --disable-ruby \
+       LUACONFIG="" \
 
 CONFIGURE_VARS+= \
        LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
 
 
 CONFIGURE_VARS+= \
        LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
 
-ifndef ($(SDK)$(CONFIG_PACKAGE_weechat-mod-lua),)
+ifneq ($(SDK)$(CONFIG_PACKAGE_weechat-mod-lua),)
   CONFIGURE_ARGS+= \
        --enable-lua \
        --with-lua-inc="$(STAGING_DIR)/usr/include" \
   CONFIGURE_ARGS+= \
        --enable-lua \
        --with-lua-inc="$(STAGING_DIR)/usr/include" \
-       --with-lua-lib="$(STAGING_DIR)/usr/lib"
+       --with-lua-lib="$(STAGING_DIR)/usr/lib" \
+       LUA_CFLAGS="-I$(STAGING_DIR)/usr/include/"
+       LUA_LFLAGS="-L$(STAGING_DIR)/usr/lib -llualib50 -llua50"
   CONFIGURE_VARS+= \
        LIBS="-ldl -lm"
 else
   CONFIGURE_VARS+= \
        LIBS="-ldl -lm"
 else
@@ -95,7 +98,11 @@ else
 endif
 
 define Build/Compile
 endif
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(LUA_FLAGS) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               LUACONFIG="" \
+               all install
 endef
 
 define Package/weechat/install 
 endef
 
 define Package/weechat/install 
diff --git a/net/weechat/patches/003-lua_flags.patch b/net/weechat/patches/003-lua_flags.patch
new file mode 100644 (file)
index 0000000..8152cbf
--- /dev/null
@@ -0,0 +1,18 @@
+diff -urN weechat-0.2.6/configure weechat-0.2.6.new/configure
+--- weechat-0.2.6/configure    2007-09-05 16:16:21.000000000 +0200
++++ weechat-0.2.6.new/configure        2008-01-20 16:29:38.000000000 +0100
+@@ -30180,14 +30180,6 @@
+   test -n "$LUACONFIG" && break
+ done
+-        if test "x$LUACONFIG" != "x" ; then
+-            { echo "$as_me:$LINENO: checking for Lua headers and librairies with lua-config" >&5
+-echo $ECHO_N "checking for Lua headers and librairies with lua-config... $ECHO_C" >&6; }
+-          echo
+-            LUA_CFLAGS=`$LUACONFIG --include`
+-            LUA_LFLAGS=`$LUACONFIG --libs`
+-          LUA_VERSION="5.0.x"
+-        fi
+     fi
+     if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then