summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-05-21 07:17:41 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-05-21 07:17:41 -0500
commita9f69cfa08723f8abf5608329437ca5a4205b067 (patch)
tree7440b87de8c24a3196c3a0788902a8f44e7079c5
parentccf43c8655091c9c3e10d3ffdf13a047aa5ef83e (diff)
downloadabslibre-a9f69cfa08723f8abf5608329437ca5a4205b067.tar.gz
abslibre-a9f69cfa08723f8abf5608329437ca5a4205b067.tar.bz2
abslibre-a9f69cfa08723f8abf5608329437ca5a4205b067.zip
libubox-lua-git-r340.791a361-1: updating version
-rw-r--r--pcr/libubox-lua-git/001-lua-version.patch11
-rw-r--r--pcr/libubox-lua-git/002-json-c-include.patch31
-rw-r--r--pcr/libubox-lua-git/PKGBUILD48
-rw-r--r--pcr/libubox/PKGBUILD32
4 files changed, 90 insertions, 32 deletions
diff --git a/pcr/libubox-lua-git/001-lua-version.patch b/pcr/libubox-lua-git/001-lua-version.patch
new file mode 100644
index 000000000..2cde4b36b
--- /dev/null
+++ b/pcr/libubox-lua-git/001-lua-version.patch
@@ -0,0 +1,11 @@
+--- a/lua/CMakeLists.txt
++++ b/lua/CMakeLists.txt
+@@ -24,7 +24,7 @@
+
+ IF(NOT LUAPATH)
+ EXECUTE_PROCESS(
+- COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end"
++ COMMAND lua5.1 -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end"
+ OUTPUT_VARIABLE LUAPATH
+ RESULT_VARIABLE LUA_CHECK_RES
+ OUTPUT_STRIP_TRAILING_WHITESPACE
diff --git a/pcr/libubox-lua-git/002-json-c-include.patch b/pcr/libubox-lua-git/002-json-c-include.patch
new file mode 100644
index 000000000..72b50816f
--- /dev/null
+++ b/pcr/libubox-lua-git/002-json-c-include.patch
@@ -0,0 +1,31 @@
+--- a/blobmsg_json.c
++++ b/blobmsg_json.c
+@@ -17,11 +17,7 @@
+ #include "blobmsg.h"
+ #include "blobmsg_json.h"
+
+-#ifdef JSONC
+- #include <json.h>
+-#else
+- #include <json/json.h>
+-#endif
++#include <json-c/json.h>
+
+ bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
+ {
+--- a/jshn.c
++++ b/jshn.c
+@@ -13,11 +13,8 @@
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+-#ifdef JSONC
+- #include <json.h>
+-#else
+- #include <json/json.h>
+-#endif
++
++#include <json-c/json.h>
+
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/pcr/libubox-lua-git/PKGBUILD b/pcr/libubox-lua-git/PKGBUILD
new file mode 100644
index 000000000..d99528b16
--- /dev/null
+++ b/pcr/libubox-lua-git/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Luka Perkov <luka.perkov@sartura.hr>
+
+pkgname=libubox-lua-git
+_gitname=libubox
+pkgver=r340.791a361
+# commit 791a361ad1b08fa56e554654109122b828657a2b
+pkgrel=1
+pkgdesc='A small utility library developed for OpenWrt containing a event loop, linked lists, blobmsg, stream buffer management, [...]'
+url='http://git.openwrt.org/?p=project/libubox.git'
+arch=('i686' 'x86_64')
+license=('ISC BSD-3c')
+depends=('json-c' 'lua51')
+makedepends=('git' 'cmake' 'gcc' 'make' 'patch' 'pkg-config')
+conflicts=('libubox' 'libubox-git')
+provides=('libubox')
+source=('git://git.openwrt.org/project/libubox.git' '001-lua-version.patch' '002-json-c-include.patch')
+md5sums=('SKIP' 'SKIP' 'SKIP')
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$_gitname"
+
+ patch -p1 -i "$srcdir/001-lua-version.patch"
+ patch -p1 -i "$srcdir/002-json-c-include.patch"
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+
+ cmake CMakeLists.txt \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_LUA=ON
+
+ make
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+
+ make DESTDIR="$pkgdir" install
+}
+
+# burp -c lib `ls libubox-lua-git*.src.tar.gz | sort | tail -n 1`
diff --git a/pcr/libubox/PKGBUILD b/pcr/libubox/PKGBUILD
deleted file mode 100644
index 577eecd24..000000000
--- a/pcr/libubox/PKGBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# Maintainer: Nicolás Reynolds <fauno@kiwwwi.com.ar>
-pkgname=libubox
-pkgver=0.8.0
-pkgrel=2
-pkgdesc="OpenWRT's Basic Utility Library"
-arch=('i686' 'mips64el')
-url="https://openwrt.org"
-license=('BSD')
-depends=('json-c')
-makedepends=('git' 'cmake' 'lua51')
-source=(git://nbd.name/luci2/libubox.git)
-md5sums=(SKIP)
-
-pkgver() {
- cd ${srcdir}/${pkgname}
- local ver="$(git describe --long --tags)"
- printf "%s" "${ver//-/.}"
-}
-
-build() {
- cd ${srcdir}/${pkgname}
-
- cmake -DCMAKE_INSTALL_PREFIX=/usr .
- make
-}
-
-package() {
- cd ${srcdir}/${pkgname}
- make DESTDIR=${pkgdir}/ install
-}
-
-# vim:set ts=2 sw=2 et: