aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-20 12:47:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-20 12:47:36 +0000
commit0f297032cdf827b77fdbafd3f831018c2aff8f8d (patch)
treec7b0abe2628307ccd4e849d23bf9509fadf894de
parent378a5e642e7d3cdca4b8bd6ca110c9161dd4fff2 (diff)
downloadaports-0f297032cdf827b77fdbafd3f831018c2aff8f8d.tar.bz2
aports-0f297032cdf827b77fdbafd3f831018c2aff8f8d.tar.xz
main/apk-tools: fix lua module
-rw-r--r--main/apk-tools/0001-lua-adapt-to-new-API.patch32
-rw-r--r--main/apk-tools/APKBUILD6
2 files changed, 36 insertions, 2 deletions
diff --git a/main/apk-tools/0001-lua-adapt-to-new-API.patch b/main/apk-tools/0001-lua-adapt-to-new-API.patch
new file mode 100644
index 0000000000..9e60ef1b7e
--- /dev/null
+++ b/main/apk-tools/0001-lua-adapt-to-new-API.patch
@@ -0,0 +1,32 @@
+From bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 20 Oct 2011 12:43:12 +0000
+Subject: [PATCH] lua: adapt to new API
+
+Use new apk_blob_pull_dep instead of the old apk_dep_from_blob
+---
+ src/lua-apk.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/lua-apk.c b/src/lua-apk.c
+index 845d67a..e41e785 100644
+--- a/src/lua-apk.c
++++ b/src/lua-apk.c
+@@ -204,10 +204,11 @@ static int Papk_exists(lua_State *L)
+ struct apk_dependency dep;
+ struct apk_name *name;
+ struct apk_package *pkg;
+- int i, r;
++ int i;
++ apk_blob_t blob = APK_BLOB_STR(depstr);
++ apk_blob_pull_dep(&blob, db, &dep);
+
+- r = apk_dep_from_blob(&dep, db, APK_BLOB_STR(depstr));
+- if (r != 0)
++ if (APK_BLOB_IS_NULL(blob))
+ goto ret_nil;
+
+ name = dep.name;
+--
+1.7.7
+
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index bdb79fd40e..7f0d723b77 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,12 +1,13 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
pkgver=2.2.0_pre1
-pkgrel=0
+pkgrel=1
pkgdesc="Alpine Package Keeper - package manager for alpine"
subpackages="$pkgname-static lua-apk:luaapk"
depends=
makedepends="zlib-dev openssl-dev lua-dev"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
+ 0001-lua-adapt-to-new-API.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -54,4 +55,5 @@ luaapk() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/
}
-md5sums="cda5172b66e7778b855dfda44e5f174f apk-tools-2.2.0_pre1.tar.bz2"
+md5sums="cda5172b66e7778b855dfda44e5f174f apk-tools-2.2.0_pre1.tar.bz2
+8ba03addeab7c2aa534f311e921191ae 0001-lua-adapt-to-new-API.patch"