aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua5.2-cjson
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-26 06:39:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-26 06:39:34 +0000
commit604068b806f658e7e28f92c85d06ddbd50138b15 (patch)
tree2826aff1860cdb1053c58f94f6a1bdf8d4b94c4b /testing/lua5.2-cjson
parent1c4aa0696fd2b22eed8a6a5459fda5a271fc3ce8 (diff)
downloadaports-604068b806f658e7e28f92c85d06ddbd50138b15.tar.bz2
aports-604068b806f658e7e28f92c85d06ddbd50138b15.tar.xz
testing/lua5.2-cjson: build fix
actually use the pkg-config --cflags
Diffstat (limited to 'testing/lua5.2-cjson')
-rw-r--r--testing/lua5.2-cjson/0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch40
-rw-r--r--testing/lua5.2-cjson/APKBUILD18
2 files changed, 51 insertions, 7 deletions
diff --git a/testing/lua5.2-cjson/0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch b/testing/lua5.2-cjson/0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch
new file mode 100644
index 0000000000..a313447445
--- /dev/null
+++ b/testing/lua5.2-cjson/0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch
@@ -0,0 +1,40 @@
+From 659e292fc741163f6e4370ff682e3e42312cd51d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 26 Jun 2013 06:33:15 +0000
+Subject: [PATCH] Use pkg-config to detect cflags or fallback to
+ LUA_INCLUDE_DIR
+
+---
+ Makefile | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 6fdb1f2..ed0f925 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,10 +18,13 @@ PREFIX = /usr/local
+ CFLAGS = -O3 -Wall -pedantic -DNDEBUG
+ CJSON_CFLAGS = -fpic
+ CJSON_LDFLAGS = -shared
++LUA_PC = lua$(LUA_VERSION)
+ LUA_INCLUDE_DIR = $(PREFIX)/include
+ LUA_CMODULE_DIR = $(PREFIX)/lib/lua/$(LUA_VERSION)
+ LUA_MODULE_DIR = $(PREFIX)/share/lua/$(LUA_VERSION)
+ LUA_BIN_DIR = $(PREFIX)/bin
++LUA_CFLAGS = $(shell pkg-config $(LUA_PC) --cflags --silence-errors \
++ || echo "-I$(LUA_INCLUDE_DIR)")
+
+ ##### Platform overrides #####
+ ##
+@@ -79,7 +82,7 @@ EXECPERM = 755
+
+ ASCIIDOC = asciidoc
+
+-BUILD_CFLAGS = -I$(LUA_INCLUDE_DIR) $(CJSON_CFLAGS)
++BUILD_CFLAGS = $(LUA_CFLAGS) $(CJSON_CFLAGS)
+ OBJS = lua_cjson.o strbuf.o $(FPCONV_OBJS)
+
+ .PHONY: all clean install install-extra doc
+--
+1.8.3.1
+
diff --git a/testing/lua5.2-cjson/APKBUILD b/testing/lua5.2-cjson/APKBUILD
index 5e98e96eec..1510ff6ee9 100644
--- a/testing/lua5.2-cjson/APKBUILD
+++ b/testing/lua5.2-cjson/APKBUILD
@@ -2,7 +2,7 @@
_luaver=5.2
pkgname=lua${_luaver}-cjson
pkgver=2.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="fast JSON parsing and encoding support for Lua $_luaver"
url="http://www.kyne.com.au/~mark/software/lua-cjson.php"
arch="all"
@@ -11,7 +11,9 @@ depends=""
makedepends="lua${_luaver}-dev"
install=""
subpackages=""
-source="http://www.kyne.com.au/~mark/software/download/lua-cjson-$pkgver.tar.gz"
+source="http://www.kyne.com.au/~mark/software/download/lua-cjson-$pkgver.tar.gz
+ 0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch"
+
_builddir="$srcdir"/lua-cjson-$pkgver
prepare() {
@@ -27,8 +29,7 @@ prepare() {
build() {
cd "$_builddir"
- make CFLAGS_EXTRA="$( pkg-config lua$_luaver --cflags )" \
- PREFIX=/usr|| return 1
+ make PREFIX=/usr || return 1
}
package() {
@@ -37,6 +38,9 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la
}
-md5sums="24f270663e9f6ca8ba2a02cef19f7963 lua-cjson-2.1.0.tar.gz"
-sha256sums="51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 lua-cjson-2.1.0.tar.gz"
-sha512sums="4343513b942f2ed98dc1ea6d7e852303bc1263f8acc5c70c8d674aec7adfc8279c5af7d5173a417b6f9a74543b8f6c8f98742d002f4f75832bbf23bb5a30ad2f lua-cjson-2.1.0.tar.gz"
+md5sums="24f270663e9f6ca8ba2a02cef19f7963 lua-cjson-2.1.0.tar.gz
+84a94739f4ead0b4b2e80376dbed7b08 0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch"
+sha256sums="51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 lua-cjson-2.1.0.tar.gz
+cef22bd926c88053b1be147c6420e9b9918b09a32cb3cad9e81524619048020a 0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch"
+sha512sums="4343513b942f2ed98dc1ea6d7e852303bc1263f8acc5c70c8d674aec7adfc8279c5af7d5173a417b6f9a74543b8f6c8f98742d002f4f75832bbf23bb5a30ad2f lua-cjson-2.1.0.tar.gz
+5137cf25ca125b03ff2e95cedd8396d63b9a4919b1aba4ef333fd8945a4fd20f423c1e8d36b954a15969bd344cd43bb6c50df8b878cd74a706d6065455fbb003 0001-Use-pkg-config-to-detect-cflags-or-fallback-to-LUA_I.patch"