aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2017-02-25 21:09:55 +0800
committerantoine <antoine@FreeBSD.org>2017-02-25 21:09:55 +0800
commit56da01eac52f0247c12650780b24a75d0ecdc30f (patch)
tree57597f07bec30a507d8687517b40906e138ffcbd /emulators
parent2efb369f1a458f3eeb12507ac5160356361de9cc (diff)
downloadfreebsd-ports-gnome-56da01eac52f0247c12650780b24a75d0ecdc30f.tar.gz
freebsd-ports-gnome-56da01eac52f0247c12650780b24a75d0ecdc30f.tar.zst
freebsd-ports-gnome-56da01eac52f0247c12650780b24a75d0ecdc30f.zip
Update to 1.0
Diffstat (limited to 'emulators')
-rw-r--r--emulators/unicorn/Makefile13
-rw-r--r--emulators/unicorn/distinfo6
-rw-r--r--emulators/unicorn/files/patch-Makefile67
-rw-r--r--emulators/unicorn/files/patch-qemu_configure4
-rw-r--r--emulators/unicorn/files/patch-tests_unit_Makefile26
-rw-r--r--emulators/unicorn/pkg-plist3
6 files changed, 40 insertions, 79 deletions
diff --git a/emulators/unicorn/Makefile b/emulators/unicorn/Makefile
index ea59c10ee56c..f1999a63e65a 100644
--- a/emulators/unicorn/Makefile
+++ b/emulators/unicorn/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= unicorn
-PORTVERSION= 0.9
+PORTVERSION= 1.0
CATEGORIES= emulators
MAINTAINER= antoine@FreeBSD.org
@@ -15,15 +15,18 @@ TEST_DEPENDS= cmocka>0:sysutils/cmocka
USE_GITHUB= yes
GH_ACCOUNT= unicorn-engine
-USES= gmake pkgconfig python:2.7,build
-USE_GNOME= glib20
+USES= gmake python:2.7,build
USE_LDCONFIG= yes
MAKE_ENV= INSTALL_LIB="${INSTALL_LIB}" \
UNICORN_QEMU_FLAGS=--python=${PYTHON_CMD} \
+ MAKE_JOBS_NUMBER=${MAKE_JOBS_NUMBER} \
V=1
TEST_TARGET= test
TEST_WRKSRC= ${WRKSRC}/tests/unit
-
-BROKEN_aarch64= fails to compile: error: use of undeclared identifier tcg_op_defs
+_MAKE_JOBS= # MAKE_JOBS_NUMBER is passed via MAKE_ENV
+# Optimization breaks runtime,
+# see https://github.com/unicorn-engine/unicorn/issues/356
+# and https://github.com/unicorn-engine/unicorn/issues/689
+CFLAGS:= ${CFLAGS:C/-O[1-9]/-O0/g}
.include <bsd.port.mk>
diff --git a/emulators/unicorn/distinfo b/emulators/unicorn/distinfo
index 77d344f5d9b6..a4cf23c274a7 100644
--- a/emulators/unicorn/distinfo
+++ b/emulators/unicorn/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1481841704
-SHA256 (unicorn-engine-unicorn-0.9_GH0.tar.gz) = 1ca03b1c8f6360335567b528210713461e839d47c4eb7c676ba3aa4f72b8cf10
-SIZE (unicorn-engine-unicorn-0.9_GH0.tar.gz) = 2576109
+TIMESTAMP = 1487917142
+SHA256 (unicorn-engine-unicorn-1.0_GH0.tar.gz) = 27efa24e465f3eca9a1fa8f7f456f6fecd91beeba0b4be21b34308040047def9
+SIZE (unicorn-engine-unicorn-1.0_GH0.tar.gz) = 3214697
diff --git a/emulators/unicorn/files/patch-Makefile b/emulators/unicorn/files/patch-Makefile
index 2ac7df696b77..eba9028a5d7e 100644
--- a/emulators/unicorn/files/patch-Makefile
+++ b/emulators/unicorn/files/patch-Makefile
@@ -1,61 +1,32 @@
---- Makefile.orig 2015-10-15 16:22:04 UTC
+--- Makefile.orig 2017-02-23 12:57:14 UTC
+++ Makefile
-@@ -59,9 +59,9 @@ UNICORN_CFLAGS += -fPIC
- V ?= 0
+@@ -62,9 +62,9 @@ V ?= 0
+ MACOS_UNIVERSAL ?= yes
ifeq ($(UNICORN_DEBUG),yes)
--CFLAGS += -O3
-+#CFLAGS += -O3
- else
-CFLAGS += -g
+#CFLAGS += -g
+ else
+-CFLAGS += -O3
++#CFLAGS += -O3
+ UNICORN_QEMU_FLAGS += --disable-debug-info
endif
- ifeq ($(CROSS),)
-@@ -158,7 +158,7 @@ LIBDIRARCH ?= lib
+@@ -171,7 +171,7 @@ LIBDIRARCH ?= lib
# Or better, pass 'LIBDIRARCH=lib64' to 'make install/uninstall' via 'make.sh'.
#LIBDIRARCH ?= lib64
--LIBDIR ?= $(DESTDIR)$(PREFIX)/$(LIBDIRARCH)
-+LIBDIR = $(DESTDIR)$(PREFIX)/$(LIBDIRARCH)
- INCDIR ?= $(DESTDIR)$(PREFIX)/include
-
- LIBDATADIR ?= $(LIBDIR)
-@@ -181,7 +181,7 @@ else
- PKGCFGDIR ?= $(LIBDATADIR)/pkgconfig
- endif
+-LIBDIR ?= $(PREFIX)/$(LIBDIRARCH)
++LIBDIR = $(PREFIX)/$(LIBDIRARCH)
+ INCDIR ?= $(PREFIX)/include
+ BINDIR ?= $(PREFIX)/bin
--all: compile_lib
-+all: compile_lib $(PKGCFGF)
- ifeq (,$(findstring yes,$(UNICORN_BUILD_CORE_ONLY)))
- ifeq ($(UNICORN_SHARED),yes)
- ifeq ($(V),0)
-@@ -213,9 +213,8 @@ else
- endif
-
- compile_lib: config qemu/config-host.h-timestamp
-- rm -rf lib$(LIBNAME)* $(LIBNAME)*.lib $(LIBNAME)*.dll && cd qemu && $(MAKE) -j 8
-+ cd qemu && $(MAKE)
- $(MAKE) unicorn
-- cd samples && $(MAKE) clean
+@@ -204,7 +204,7 @@ qemu/config-host.h-timestamp:
+ cd qemu && \
+ ./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
+ printf "$(UNICORN_ARCHS)" > config.log
+- $(MAKE) -C qemu -j 4
++ $(MAKE) -C qemu -j $(MAKE_JOBS_NUMBER)
+ $(eval UC_TARGET_OBJ += $$(wildcard qemu/util/*.o) $$(wildcard qemu/*.o) $$(wildcard qemu/qom/*.o) $$(wildcard qemu/hw/core/*.o) $$(wildcard qemu/qapi/*.o) $$(wildcard qemu/qobject/*.o))
unicorn: $(LIBRARY) $(ARCHIVE)
-
-@@ -225,7 +224,7 @@ ifeq ($(V),0)
- $(call log,GEN,$(LIBRARY))
- @$(CC) $(CFLAGS) -shared $^ -o $(LIBRARY) $(GLIB) -lm
- else
-- $(CC) $(CFLAGS) -shared $^ -o $(LIBRARY) $(GLIB) -lm
-+ $(CC) $(CFLAGS) -shared -Wl,-soname,libunicorn.so $^ -o $(LIBRARY) $(GLIB) -lm
- endif
- endif
-
-@@ -254,7 +253,7 @@ test: all
- $(MAKE) -C tests/unit test
-
-
--install: all $(PKGCFGF)
-+install: all
- mkdir -p $(LIBDIR)
- ifeq ($(UNICORN_SHARED),yes)
- $(INSTALL_LIB) $(LIBRARY) $(LIBDIR)
diff --git a/emulators/unicorn/files/patch-qemu_configure b/emulators/unicorn/files/patch-qemu_configure
index 91f0ee783c3a..9fa73d2d8825 100644
--- a/emulators/unicorn/files/patch-qemu_configure
+++ b/emulators/unicorn/files/patch-qemu_configure
@@ -1,6 +1,6 @@
---- qemu/configure.orig 2015-10-15 16:22:04 UTC
+--- qemu/configure.orig 2017-02-23 12:57:14 UTC
+++ qemu/configure
-@@ -285,11 +285,11 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredun
+@@ -229,11 +229,11 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredun
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include"
if test "$debug_info" = "yes"; then
diff --git a/emulators/unicorn/files/patch-tests_unit_Makefile b/emulators/unicorn/files/patch-tests_unit_Makefile
index 7eea075b0f63..ae82f6e9dbdf 100644
--- a/emulators/unicorn/files/patch-tests_unit_Makefile
+++ b/emulators/unicorn/files/patch-tests_unit_Makefile
@@ -1,22 +1,10 @@
---- tests/unit/Makefile.orig 2015-10-15 16:22:04 UTC
+--- tests/unit/Makefile.orig 2017-02-23 12:57:14 UTC
+++ tests/unit/Makefile
-@@ -1,8 +1,8 @@
-
+@@ -1,6 +1,6 @@
CFLAGS += -Wall -Werror -Wno-unused-function -g
--CFLAGS += -L ../../
-+CFLAGS += -L ../../ -L $(PREFIX)/lib
- CFLAGS += -lcmocka -lunicorn
--CFLAGS += -I ../../include
-+CFLAGS += -I ../../include -I $(PREFIX)/include
-
- ALL_TESTS = test_sanity test_x86 test_mem_map
-
-@@ -25,7 +25,7 @@ test_x86: test_x86.c
- test_mem_map: test_mem_map.c
-
- ${ALL_TESTS}:
-- gcc ${CFLAGS} -o $@ $^
-+ $(CC) ${CFLAGS} -o $@ $^
-
-
+ CFLAGS += -L ../../ -I ../../include
+-CFLAGS += -L ../../cmocka/src -I ../../cmocka/include
++CFLAGS += -L $(PREFIX)/lib -I $(PREFIX)/include
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S), Linux)
diff --git a/emulators/unicorn/pkg-plist b/emulators/unicorn/pkg-plist
index b399f79d7556..be64f557fde3 100644
--- a/emulators/unicorn/pkg-plist
+++ b/emulators/unicorn/pkg-plist
@@ -2,11 +2,10 @@ include/unicorn/arm.h
include/unicorn/arm64.h
include/unicorn/m68k.h
include/unicorn/mips.h
-include/unicorn/platform.h
include/unicorn/sparc.h
include/unicorn/unicorn.h
include/unicorn/x86.h
lib/libunicorn.a
lib/libunicorn.so
-lib/libunicorn.so.0
+lib/libunicorn.so.1
libdata/pkgconfig/unicorn.pc