pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators Don't rebuild unicorn locally for the Python...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4dd70dabacdb
branches:  trunk
changeset: 377949:4dd70dabacdb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Mar 24 17:09:33 2018 +0000

description:
Don't rebuild unicorn locally for the Python binding.

Fix doesn't fix unicorn itself as it still depends on RWX mappings to
work.

diffstat:

 emulators/py-unicorn/Makefile                                      |   4 +-
 emulators/py-unicorn/PLIST                                         |  21 ++-----
 emulators/unicorn/Makefile.common                                  |   3 +-
 emulators/unicorn/distinfo                                         |   4 +-
 emulators/unicorn/patches/patch-bindings_python_setup.py           |  20 +++++++
 emulators/unicorn/patches/patch-bindings_python_unicorn_unicorn.py |  26 ++++++++++
 6 files changed, 59 insertions(+), 19 deletions(-)

diffs (132 lines):

diff -r a8ae3f656ecc -r 4dd70dabacdb emulators/py-unicorn/Makefile
--- a/emulators/py-unicorn/Makefile     Sat Mar 24 17:08:31 2018 +0000
+++ b/emulators/py-unicorn/Makefile     Sat Mar 24 17:09:33 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/02/26 02:25:28 khorben Exp $
+# $NetBSD: Makefile,v 1.2 2018/03/24 17:09:33 joerg Exp $
 
 .include "../../emulators/unicorn/Makefile.common"
 
@@ -12,5 +12,5 @@
 PYSETUPSUBDIR= bindings/python
 
 .include "../../emulators/unicorn/buildlink3.mk"
-.include "../../lang/python/distutils.mk"
+.include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r a8ae3f656ecc -r 4dd70dabacdb emulators/py-unicorn/PLIST
--- a/emulators/py-unicorn/PLIST        Sat Mar 24 17:08:31 2018 +0000
+++ b/emulators/py-unicorn/PLIST        Sat Mar 24 17:09:33 2018 +0000
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1 2018/02/26 02:25:28 khorben Exp $
-${PYSITELIB}/${EGG_FILE}/PKG-INFO
-${PYSITELIB}/${EGG_FILE}/SOURCES.txt
-${PYSITELIB}/${EGG_FILE}/dependency_links.txt
-${PYSITELIB}/${EGG_FILE}/top_level.txt
-${PYSITELIB}/${EGG_FILE}/zip-safe
+@comment $NetBSD: PLIST,v 1.2 2018/03/24 17:09:33 joerg Exp $
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/${EGG_INFODIR}/zip-safe
 ${PYSITELIB}/unicorn/__init__.py
 ${PYSITELIB}/unicorn/__init__.pyc
 ${PYSITELIB}/unicorn/__init__.pyo
@@ -13,15 +13,6 @@
 ${PYSITELIB}/unicorn/arm_const.py
 ${PYSITELIB}/unicorn/arm_const.pyc
 ${PYSITELIB}/unicorn/arm_const.pyo
-${PYSITELIB}/unicorn/include/unicorn/arm.h
-${PYSITELIB}/unicorn/include/unicorn/arm64.h
-${PYSITELIB}/unicorn/include/unicorn/m68k.h
-${PYSITELIB}/unicorn/include/unicorn/mips.h
-${PYSITELIB}/unicorn/include/unicorn/sparc.h
-${PYSITELIB}/unicorn/include/unicorn/unicorn.h
-${PYSITELIB}/unicorn/include/unicorn/x86.h
-${PYSITELIB}/unicorn/lib/libunicorn.a
-${PYSITELIB}/unicorn/lib/libunicorn.so
 ${PYSITELIB}/unicorn/m68k_const.py
 ${PYSITELIB}/unicorn/m68k_const.pyc
 ${PYSITELIB}/unicorn/m68k_const.pyo
diff -r a8ae3f656ecc -r 4dd70dabacdb emulators/unicorn/Makefile.common
--- a/emulators/unicorn/Makefile.common Sat Mar 24 17:08:31 2018 +0000
+++ b/emulators/unicorn/Makefile.common Sat Mar 24 17:09:33 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2018/02/26 02:25:28 khorben Exp $
+# $NetBSD: Makefile.common,v 1.2 2018/03/24 17:09:34 joerg Exp $
 #
 # used by emulators/py-unicorn/Makefile
 
@@ -9,3 +9,4 @@
 HOMEPAGE=      http://www.unicorn-engine.org/
 
 DISTINFO_FILE= ${.CURDIR}/../../emulators/unicorn/distinfo
+PATCHDIR=      ${.CURDIR}/../../emulators/unicorn/patches
diff -r a8ae3f656ecc -r 4dd70dabacdb emulators/unicorn/distinfo
--- a/emulators/unicorn/distinfo        Sat Mar 24 17:08:31 2018 +0000
+++ b/emulators/unicorn/distinfo        Sat Mar 24 17:09:33 2018 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.4 2018/02/26 02:25:28 khorben Exp $
+$NetBSD: distinfo,v 1.5 2018/03/24 17:09:34 joerg Exp $
 
 SHA1 (unicorn-1.0.1.tar.gz) = 85c9d7aad2a87b110b729560ed9333b66018ca6a
 RMD160 (unicorn-1.0.1.tar.gz) = 599b7ce96fe4040a48561bd9474666583265960b
 SHA512 (unicorn-1.0.1.tar.gz) = edfe1f7bfbc1d20f5b62232057e194a937bc09db686ef2efadb33a54605029a53426432cdb2a29511385aacdb9343b3b3091af50a1909098d7cf6db3429eb966
 Size (unicorn-1.0.1.tar.gz) = 3241225 bytes
+SHA1 (patch-bindings_python_setup.py) = 35b6a68a75e18bf6a0e8f7c745fee2e148f26c1c
+SHA1 (patch-bindings_python_unicorn_unicorn.py) = 0835b53b508400f0ca8464f09262c4c64a9a8a54
diff -r a8ae3f656ecc -r 4dd70dabacdb emulators/unicorn/patches/patch-bindings_python_setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/unicorn/patches/patch-bindings_python_setup.py  Sat Mar 24 17:09:33 2018 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-bindings_python_setup.py,v 1.1 2018/03/24 17:09:34 joerg Exp $
+
+--- bindings/python/setup.py.orig      2018-03-24 14:17:22.780317467 +0000
++++ bindings/python/setup.py
+@@ -195,7 +195,6 @@ class custom_sdist(sdist):
+ class custom_build(build):
+     def run(self):
+         log.info("Building C extensions")
+-        build_libraries()
+         return build.run(self)
+ 
+ class custom_bdist_egg(bdist_egg):
+@@ -235,7 +234,6 @@ try:
+     class custom_develop(develop):
+         def run(self):
+             log.info("Building C extensions")
+-            build_libraries()
+             return develop.run(self)
+ 
+     cmdclass['develop'] = custom_develop
diff -r a8ae3f656ecc -r 4dd70dabacdb emulators/unicorn/patches/patch-bindings_python_unicorn_unicorn.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/unicorn/patches/patch-bindings_python_unicorn_unicorn.py        Sat Mar 24 17:09:33 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-bindings_python_unicorn_unicorn.py,v 1.1 2018/03/24 17:09:34 joerg Exp $
+
+--- bindings/python/unicorn/unicorn.py.orig    2018-03-24 14:18:11.440281233 +0000
++++ bindings/python/unicorn/unicorn.py
+@@ -71,18 +71,9 @@ def _load_lib(path):
+ _uc = None
+ 
+ # Loading attempts, in order
+-# - pkg_resources can get us the path to the local libraries
+-# - we can get the path to the local libraries by parsing our filename
+-# - global load
+-# - python's lib directory
+-# - last-gasp attempt at some hardcoded paths on darwin and linux
+-
+-_path_list = [pkg_resources.resource_filename(__name__, 'lib'),
+-              os.path.join(os.path.split(__file__)[0], 'lib'),
+-              '',
+-              distutils.sysconfig.get_python_lib(),
+-              "/usr/local/lib/" if sys.platform == 'darwin' else '/usr/lib64',
+-              os.getenv('PATH', '')]
++# - Python installation prefix / lib
++
++_path_list = [os.path.join(sys.prefix, 'lib')]
+ 
+ #print(_path_list)
+ #print("-" * 80)



Home | Main Index | Thread Index | Old Index