From owner-svn-ports-head@freebsd.org Tue Mar 3 00:21:35 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A98C25FBE8; Tue, 3 Mar 2020 00:21:35 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wd3f3WkCz4DXm; Tue, 3 Mar 2020 00:21:34 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62B8C249AB; Tue, 3 Mar 2020 00:21:34 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0230LY1h007238; Tue, 3 Mar 2020 00:21:34 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0230LXlQ007233; Tue, 3 Mar 2020 00:21:33 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003030021.0230LXlQ007233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 3 Mar 2020 00:21:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r527657 - in head/security/py-pyvex: . files X-SVN-Group: ports-head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head/security/py-pyvex: . files X-SVN-Commit-Revision: 527657 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:21:35 -0000 Author: 0mp Date: Tue Mar 3 00:21:33 2020 New Revision: 527657 URL: https://svnweb.freebsd.org/changeset/ports/527657 Log: New port: security/py-pyvex PyVEX provides an interface that translates binary code into the VEX intermediate represenation (IR). WWW: https://github.com/angr/pyvex PR: 244562 Added: head/security/py-pyvex/ head/security/py-pyvex/Makefile (contents, props changed) head/security/py-pyvex/distinfo (contents, props changed) head/security/py-pyvex/files/ head/security/py-pyvex/files/patch-pyvex__c_Makefile (contents, props changed) head/security/py-pyvex/files/patch-setup.py (contents, props changed) head/security/py-pyvex/files/patch-vex_Makefile-gcc (contents, props changed) head/security/py-pyvex/pkg-descr (contents, props changed) Added: head/security/py-pyvex/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-pyvex/Makefile Tue Mar 3 00:21:33 2020 (r527657) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +PORTNAME= pyvex +PORTVERSION= 8.20.1.7 +CATEGORIES= security devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Python interface to libVEX and VEX IR + +LICENSE= BSD2CLAUSE GPLv2+ GPLv3 +LICENSE_COMB= multi +LICENSE_FILE_BSD2CLAUSE= ${WRKSRC}/LICENSE +LICENSE_FILE_GPLv2+ = ${WRKSRC}/vex/LICENSE.GPL +LICENSE_FILE_GPLv3= ${WRKSRC}/pyvex_c/LICENSE + +BUILD_DEPENDS= ${_MY_DEPENDS} +RUN_DEPENDS= ${_MY_DEPENDS} \ + ${PYTHON_PKGNAMEPREFIX}archinfo>0:devel/py-archinfo@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycparser>0:devel/py-pycparser@${PY_FLAVOR} + +USES= gmake localbase python:3.5+ +USE_CSTD= c99 +USE_PYTHON= autoplist distutils + +MAKE_ENV= EXTRA_CFLAGS="${CFLAGS}" + +_MY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.3:devel/py-cffi@${PY_FLAVOR} + +post-patch: + @${REINPLACE_CMD} -e 's|%%CFLAGS%%|${CFLAGS}|g' \ + -e 's|%%LDFLAGS%%|${LDFLAGS}|g' \ + ${WRKSRC}/pyvex_c/Makefile + @${REINPLACE_CMD} -e 's|%%MAKE_JOBS_NUMBER%%|${MAKE_JOBS_NUMBER}|g' \ + ${WRKSRC}/setup.py + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/lib/lib${PORTNAME}.so + +.include Added: head/security/py-pyvex/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-pyvex/distinfo Tue Mar 3 00:21:33 2020 (r527657) @@ -0,0 +1,3 @@ +TIMESTAMP = 1583168013 +SHA256 (pyvex-8.20.1.7.tar.gz) = 16d84ffb61d70d735861599d9f8cb21c33a22cbc9852de4acaa6569991a2e1ce +SIZE (pyvex-8.20.1.7.tar.gz) = 1729320 Added: head/security/py-pyvex/files/patch-pyvex__c_Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-pyvex/files/patch-pyvex__c_Makefile Tue Mar 3 00:21:33 2020 (r527657) @@ -0,0 +1,28 @@ +--- pyvex_c/Makefile.orig 2019-04-16 21:08:49 UTC ++++ pyvex_c/Makefile +@@ -4,6 +4,11 @@ ifeq ($(UNAME), Darwin) + STATIC_LIBRARY_FILE=libpyvex.a + LDFLAGS=-Wl,-install_name,$(LIBRARY_FILE) + endif ++ifeq ($(UNAME), FreeBSD) ++ LIBRARY_FILE=libpyvex.so ++ STATIC_LIBRARY_FILE=libpyvex.a ++ LDFLAGS=-Wl,-soname,$(LIBRARY_FILE) %%LDFLAGS%% ++endif + ifeq ($(UNAME), Linux) + LIBRARY_FILE=libpyvex.so + STATIC_LIBRARY_FILE=libpyvex.a +@@ -27,10 +32,10 @@ sp += + qs = $(subst ?,$(sp),$1) + sq = $(subst $(sp),?,$1) + +-CC=gcc +-AR=ar ++CC?=gcc ++AR?=ar + INCFLAGS=-I "$(VEX_INCLUDE_PATH)" +-CFLAGS=-g -O2 -Wall -shared -fPIC -std=c99 $(INCFLAGS) ++CFLAGS=-g %%CFLAGS%% -Wall -shared -fPIC $(INCFLAGS) + + OBJECTS=pyvex.o logging.o analysis.o postprocess.o + HEADERS=pyvex.h Added: head/security/py-pyvex/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-pyvex/files/patch-setup.py Tue Mar 3 00:21:33 2020 (r527657) @@ -0,0 +1,28 @@ +--- setup.py.orig 2020-01-08 00:58:26 UTC ++++ setup.py +@@ -73,10 +73,8 @@ def _build_vex(): + e['MULTIARCH'] = '1' + e['DEBUG'] = '1' + +- cmd1 = ['nmake', '/f', 'Makefile-msvc', 'all'] +- cmd2 = ['make', '-f', 'Makefile-gcc', '-j', str(multiprocessing.cpu_count()), 'all'] +- cmd3 = ['gmake', '-f', 'Makefile-gcc', '-j', str(multiprocessing.cpu_count()), 'all'] +- for cmd in (cmd1, cmd2, cmd3): ++ cmd3 = ['gmake', '-f', 'Makefile-gcc', '-j', '%%MAKE_JOBS_NUMBER%%', 'all'] ++ for cmd in (cmd3,): + try: + if subprocess.call(cmd, cwd=VEX_PATH, env=e) == 0: + break +@@ -91,10 +89,8 @@ def _build_pyvex(): + e['VEX_INCLUDE_PATH'] = os.path.join(VEX_PATH, 'pub') + e['VEX_LIB_FILE'] = os.path.join(VEX_PATH, 'libvex.lib') + +- cmd1 = ['nmake', '/f', 'Makefile-msvc'] +- cmd2 = ['make', '-j', str(multiprocessing.cpu_count())] +- cmd3 = ['gmake', '-j', str(multiprocessing.cpu_count())] +- for cmd in (cmd1, cmd2, cmd3): ++ cmd3 = ['gmake', '-j', '%%MAKE_JOBS_NUMBER%%'] ++ for cmd in (cmd3,): + try: + if subprocess.call(cmd, cwd='pyvex_c', env=e) == 0: + break Added: head/security/py-pyvex/files/patch-vex_Makefile-gcc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-pyvex/files/patch-vex_Makefile-gcc Tue Mar 3 00:21:33 2020 (r527657) @@ -0,0 +1,11 @@ +--- vex/Makefile-gcc.orig 2020-03-02 17:34:06 UTC ++++ vex/Makefile-gcc +@@ -44,7 +44,7 @@ CFLAGS := -Ipub -Ipriv \ + ifeq ($(DEBUG),1) + CFLAGS += -g + else +-CFLAGS += -O2 ++#CFLAGS += -O2 + endif + + # These are a separate set of defines that compile for parallel environments Added: head/security/py-pyvex/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-pyvex/pkg-descr Tue Mar 3 00:21:33 2020 (r527657) @@ -0,0 +1,4 @@ +PyVEX provides an interface that translates binary code into the VEX +intermediate represenation (IR). + +WWW: https://github.com/angr/pyvex