summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoranthraxx2015-10-19 02:19:32 +0200
committeranthraxx2015-10-19 02:19:32 +0200
commitcd60ee6514e550ceaec2277d648ba5403018def5 (patch)
tree1f9a6735adfb38229e240428743a5310e9f98097
parent3d0e236245aede323fbd956badd6300a824a2ad0 (diff)
downloadaur-cd60ee6514e550ceaec2277d648ba5403018def5.tar.gz
upgpkg: unicorn-git 0.9.565.22ae47a-1
upstream release
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD24
-rw-r--r--fix-soname-ld-library-path.patch53
3 files changed, 73 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7121004d2f4f..08a7c5939a9c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = unicorn-git
pkgdesc = Lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU
- pkgver = 0.9.542.d5158f4
+ pkgver = 0.9.565.22ae47a
pkgrel = 1
url = http://www.unicorn-engine.org
arch = i686
@@ -12,7 +12,9 @@ pkgbase = unicorn-git
makedepends = python2
depends = glib2
source = unicorn-git::git+https://github.com/unicorn-engine/unicorn
+ source = fix-soname-ld-library-path.patch
sha512sums = SKIP
+ sha512sums = 55e8c4fd1b4e4ccac2d8aefca967ea320c5834f517d0503abc2bd3899cb48531973bd99c07c7a387ab596708a5990f4836cb99ae8ba210c54e499bc8d080fba2
pkgname = unicorn-git
provides = unicorn
diff --git a/PKGBUILD b/PKGBUILD
index 134768c587a4..72fed2800d4f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgbase=unicorn-git
pkgname=('unicorn-git')
-pkgver=0.9.542.d5158f4
+pkgver=0.9.565.22ae47a
pkgrel=1
pkgdesc='Lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU'
url='http://www.unicorn-engine.org'
@@ -11,8 +11,10 @@ license=('GPL2')
depends=('glib2')
makedepends=('git' 'pkg-config' 'python2')
checkdepends=('cmocka')
-source=(${pkgbase}::git+https://github.com/unicorn-engine/unicorn)
-sha512sums=('SKIP')
+source=(${pkgbase}::git+https://github.com/unicorn-engine/unicorn
+ fix-soname-ld-library-path.patch)
+sha512sums=('SKIP'
+ '55e8c4fd1b4e4ccac2d8aefca967ea320c5834f517d0503abc2bd3899cb48531973bd99c07c7a387ab596708a5990f4836cb99ae8ba210c54e499bc8d080fba2')
pkgver() {
cd ${pkgname}
@@ -20,6 +22,17 @@ pkgver() {
"$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd ${pkgbase}
+ sed 's|libdir=$(LIBDIR)|libdir=$(PREFIX)/$(LIBDIRARCH)|g' -i Makefile
+ sed 's|includedir=$(INCDIR)|includedir=$(PREFIX)/include|g' -i Makefile
+ sed 's|ifeq ($(UNICORN_DEBUG),yes)|ifneq ($(UNICORN_DEBUG),yes)|g' -i Makefile
+ sed 's|-O3|-O2|g' -i Makefile qemu/configure
+ sed 's|-g ||g' -i qemu/configure
+ sed 's|UNICORN_DEBUG ?= yes|UNICORN_DEBUG ?= no|g' -i config.mk
+ patch -Np1 < "${srcdir}/fix-soname-ld-library-path.patch"
+}
+
build() {
cd ${pkgbase}
make UNICORN_QEMU_FLAGS="--python=/usr/bin/python2"
@@ -27,8 +40,7 @@ build() {
check() {
cd ${pkgbase}
- # x64 tests failing currently
- # make test
+ make test
}
package_unicorn-git() {
@@ -37,8 +49,6 @@ package_unicorn-git() {
cd ${pkgbase}
make DESTDIR="${pkgdir}" install
- # temporary fixup
- sed 's|/build/unicorn-git/pkg/unicorn-git||g' -i "${pkgdir}/usr/lib/pkgconfig/unicorn.pc"
}
# vim: ts=2 sw=2 et:
diff --git a/fix-soname-ld-library-path.patch b/fix-soname-ld-library-path.patch
new file mode 100644
index 000000000000..e4d0ac310ee8
--- /dev/null
+++ b/fix-soname-ld-library-path.patch
@@ -0,0 +1,53 @@
+From a5d2b7cf73540f723f4ec30fd18803fbb258a5ff Mon Sep 17 00:00:00 2001
+From: Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
+Date: Sat, 17 Oct 2015 08:53:49 -0400
+Subject: [PATCH] tests: create libunicorn.so.0 symlink
+
+This hack allows the unit tests to link against libunicorn, after
+the SONAME was added in 4860fdb3.
+
+Becuase libunicorn.so has an SONAME of libunicorn.so.0, the linker uses
+the SONAME for the DT_NEEDED entry of the tests. But because a library
+with that name does not exist, they would fail to run. This symlink
+works around that issue, without touching the toplevel Makefile.
+---
+ tests/unit/.gitignore | 2 ++
+ tests/unit/Makefile | 5 ++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tests/unit/.gitignore b/tests/unit/.gitignore
+index 39d66b1..7a2c8b3 100644
+--- a/tests/unit/.gitignore
++++ b/tests/unit/.gitignore
+@@ -1,3 +1,5 @@
+ test_x86
+ test_mem_map
+ test_sanity
++*.so
++*.so.*
+diff --git a/tests/unit/Makefile b/tests/unit/Makefile
+index ae66d08..fe0e58f 100644
+--- a/tests/unit/Makefile
++++ b/tests/unit/Makefile
+@@ -14,7 +14,7 @@ clean:
+ rm -rf ${ALL_TESTS}
+
+ .PHONY: test
+-test: export LD_LIBRARY_PATH=../../
++test: export LD_LIBRARY_PATH=.
+ test: ${ALL_TESTS}
+ ./test_sanity
+ ./test_x86
+@@ -23,9 +23,12 @@ test: ${ALL_TESTS}
+ test_sanity: test_sanity.c
+ test_x86: test_x86.c
+ test_mem_map: test_mem_map.c
++${ALL_TESTS}: libunicorn.so.0
+
+ ${ALL_TESTS}:
+ gcc ${CFLAGS} -o $@ $^
+
++libunicorn.so.0:
++ ln -s ../../libunicorn.so $@
+
+