Index: head/devel/py-pyinstaller/Makefile =================================================================== --- head/devel/py-pyinstaller/Makefile (revision 490066) +++ head/devel/py-pyinstaller/Makefile (revision 490067) @@ -1,46 +1,61 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ PORTNAME= pyinstaller -PORTVERSION= 2.1 -PORTREVISION= 3 +PORTVERSION= 3.4 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= PyInstaller-${PORTVERSION} MAINTAINER= python@FreeBSD.org COMMENT= Program to create standalone executables from Python scripts LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING.txt -BROKEN_mips64= Does not compile: cc1: error: unrecognized command line option "-m64 +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dis3>0:devel/py-dis3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}altgraph>0:math/py-altgraph@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}macholib>=1.8:devel/py-macholib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pefile>=2017.8.1:devel/py-pefile@${PY_FLAVOR} -OPTIONS_DEFINE= DOCS - -EXTRACT_AFTER_ARGS= --exclude doc/source --no-same-owner --no-same-permissions USES= python:2.7 USE_PYTHON= autoplist distutils +EXTRACT_AFTER_ARGS= --exclude doc/source --no-same-owner --no-same-permissions DOCSDIR= ${PREFIX}/share/doc/${PYTHON_PKGNAMEPREFIX}${PORTNAME} -PORTDOCS= * +PORTDOCS= *.txt +OPTIONS_DEFINE= DOCS MANPAGES +OPTIONS_DEFAULT= MANPAGES +OPTIONS_SUB= yes + +DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dis3>0:devel/py-dis3@${PY_FLAVOR} +DOCS_USES= gmake +MANPAGES_BUILD_DEPENDS= ${DOCS_BUILD_DEPENDS} +MANPAGES_USES= gmake + post-patch: @${REINPLACE_CMD} -e '/install_requires/s,distribute,setuptools,' \ ${WRKSRC}/${PYSETUP} @${REINPLACE_CMD} -e '/\/sbin\/ldconfig/s,-p,-r,' \ - ${WRKSRC}/PyInstaller/bindepend.py \ ${WRKSRC}/PyInstaller/depend/utils.py - @${REINPLACE_CMD} -e '/libpython/s,\.so\.1\.0,.so.1,' \ - ${WRKSRC}/PyInstaller/bindepend.py - @${REINPLACE_CMD} -e '/defined(__x86_64__)/s,$$, || defined(__aarch64__) || defined(__powerpc64__) || defined(__sparc64__),' \ - ${WRKSRC}/bootloader/common/stb.h + ${INSTALL_DATA} ${WRKSRC}/PyInstaller/utils/cliutils/makespec.py ${WRKSRC}/makespec.py pre-build: - cd ${WRKSRC}/bootloader && ${PYTHON_CMD} waf configure build install + cd ${WRKSRC}/bootloader && \ + ${PYTHON_CMD} waf all -post-install-DOCS-on: +do-install-MANPAGES-on: + @${MKDIR} ${STAGEDIR}${MANDIRS}/man1 + ( cd ${WRKSRC}/doc; ${GMAKE} man ) + ( cd ${WRKSRC}/doc/_build/man ; ${INSTALL_MAN} pyi-makespec.1 pyinstaller.1 \ + ${STAGEDIR}${MANDIRS}/man1 ) + +do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC}/doc ; ${GMAKE} text ) + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/_build/text/|} ${STAGEDIR}${DOCSDIR} .include Index: head/devel/py-pyinstaller/distinfo =================================================================== --- head/devel/py-pyinstaller/distinfo (revision 490066) +++ head/devel/py-pyinstaller/distinfo (revision 490067) @@ -1,2 +1,3 @@ -SHA256 (PyInstaller-2.1.tar.gz) = feff03a3212d984882432ff81c6afcdcf04d8f636fd4beb131b7a027653b3b05 -SIZE (PyInstaller-2.1.tar.gz) = 4811236 +TIMESTAMP = 1537587166 +SHA256 (PyInstaller-3.4.tar.gz) = a5a6e04a66abfcf8761e89a2ebad937919c6be33a7b8963e1a961b55cb35986b +SIZE (PyInstaller-3.4.tar.gz) = 3487849 Index: head/devel/py-pyinstaller/files/patch-PyInstaller_build.py =================================================================== --- head/devel/py-pyinstaller/files/patch-PyInstaller_build.py (revision 490066) +++ head/devel/py-pyinstaller/files/patch-PyInstaller_build.py (nonexistent) @@ -1,22 +0,0 @@ ---- PyInstaller/build.py.orig 2013-09-15 20:27:11 UTC -+++ PyInstaller/build.py -@@ -1411,8 +1411,17 @@ class COLLECT(Target): - upx=(self.upx_binaries and (is_win or is_cygwin)), - dist_nm=inm) - if typ != 'DEPENDENCY': -- shutil.copy2(fnm, tofnm) -- if typ in ('EXTENSION', 'BINARY'): -+ def copy_noschg(src, dst): -+ """ copy access/modification times and user flags only to -+ allow operation under regular user e.g. on FreeBSD, -+ where /lib/libc.so.* by default has stat.SF_IMMUTABLE -+ flag set (which is super-user only)""" -+ shutil.copyfile(src, dst) -+ sb = os.stat(src) -+ os.utime(dst, (sb.st_atime, sb.st_mtime)) -+ os.chflags(dst, sb.st_flags & 0x0000ffff) # UF_SETTABLE -+ copy_noschg(fnm, tofnm) -+ if typ in ('EXTENSION', 'BINARY', 'EXECUTABLE'): - os.chmod(tofnm, 0755) - _save_data(self.out, - (self.name, self.strip_binaries, self.upx_binaries, self.toc)) Property changes on: head/devel/py-pyinstaller/files/patch-PyInstaller_build.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/py-pyinstaller/files/patch-PyInstaller_compat.py =================================================================== --- head/devel/py-pyinstaller/files/patch-PyInstaller_compat.py (revision 490066) +++ head/devel/py-pyinstaller/files/patch-PyInstaller_compat.py (nonexistent) @@ -1,19 +0,0 @@ ---- PyInstaller/compat.py.orig 2013-09-15 20:27:11 UTC -+++ PyInstaller/compat.py -@@ -31,6 +31,7 @@ is_darwin = sys.platform == 'darwin' # - - # Unix platforms - is_linux = sys.platform.startswith('linux') -+is_freebsd = sys.platform.startswith('freebsd') - is_solar = sys.platform.startswith('sun') # Solaris - is_aix = sys.platform.startswith('aix') - -@@ -38,7 +39,7 @@ is_aix = sys.platform.startswith('aix') - # (e.g. Linux, Solaris, AIX) - # Mac OS X is not considered as unix since there are many - # platform specific details for Mac in PyInstaller. --is_unix = is_linux or is_solar or is_aix -+is_unix = is_linux or is_freebsd or is_solar or is_aix - - - # Correct extension ending: 'c' or 'o' Property changes on: head/devel/py-pyinstaller/files/patch-PyInstaller_compat.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/py-pyinstaller/files/patch-bootloader_src_main.c =================================================================== --- head/devel/py-pyinstaller/files/patch-bootloader_src_main.c (nonexistent) +++ head/devel/py-pyinstaller/files/patch-bootloader_src_main.c (revision 490067) @@ -0,0 +1,43 @@ +--- bootloader/src/main.c.orig 2018-09-22 05:16:07 UTC ++++ bootloader/src/main.c +@@ -16,6 +16,10 @@ + * main: For OS X and Linux + */ + ++#ifdef __FreeBSD__ ++ #include ++ #include ++#endif + #ifdef _WIN32 + #include + #include +@@ -33,9 +37,6 @@ + #include "pyi_global.h" + #include "pyi_win32_utils.h" + +-#ifdef __FreeBSD__ +- #include +-#endif + + #if defined(_WIN32) + #define MS_WINDOWS +@@ -87,19 +88,12 @@ main(int argc, char **argv) + { + int res; + +- #ifdef __FreeBSD__ +- fp_except_t m; +- #endif + + /* 754 requires that FP exceptions run in "no stop" mode by default, + * and until C vendors implement C99's ways to control FP exceptions, + * Python requires non-stop mode. Alas, some platforms enable FP + * exceptions by default. Here we disable them. + */ +- #ifdef __FreeBSD__ +- m = fpgetmask(); +- fpsetmask(m & ~FP_X_OFL); +- #endif + + res = pyi_main(argc, argv); + return res; Property changes on: head/devel/py-pyinstaller/files/patch-bootloader_src_main.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/py-pyinstaller/files/patch-bootloader_wscript =================================================================== --- head/devel/py-pyinstaller/files/patch-bootloader_wscript (revision 490066) +++ head/devel/py-pyinstaller/files/patch-bootloader_wscript (revision 490067) @@ -1,19 +1,20 @@ ---- bootloader/wscript.orig 2013-09-15 20:27:11 UTC +--- bootloader/wscript.orig 2018-09-22 05:02:42 UTC +++ bootloader/wscript -@@ -229,7 +229,6 @@ def configure(conf): - conf.check_cc(lib='ws2_32', mandatory=True) - - else: -- conf.check_cc(lib='dl', mandatory=True) - conf.check_cc(lib='z', mandatory=True) - if conf.check_cc(function_name='readlink', header_name='unistd.h'): - conf.env.append_value('CCFLAGS', '-DHAVE_READLINK') -@@ -468,7 +467,7 @@ def build(bld): - - else: # linux, darwin (MacOSX) - -- libs = ['dl', 'z', 'm'] # 'z' - zlib, 'm' - math, -+ libs = ['z', 'm'] # 'z' - zlib, 'm' - math, - if opt.boehmgc: - libs.append('gc') - +@@ -361,7 +361,7 @@ def set_arch_flags(ctx): + # or vice versa or with manually choosen --target-arch. + # Option -m32/-m64 has to be passed to cflags and linkflages. + elif ctx.env.PYI_ARCH == '32bit': +- if machine() in ('arm', 'aarch') and ctx.env.DEST_OS == 'linux': ++ if ctx.env.CC_NAME == "gcc": + # It was reported that flag '-m32' does not work with gcc + # on 32-bit arm Linux. So skip the -m32 flag. + pass +@@ -377,7 +377,7 @@ def set_arch_flags(ctx): + if ctx.env.DEST_OS == 'win32': + ctx.env.append_value('LINKFLAGS', '-Wl,--large-address-aware') + elif ctx.env.PYI_ARCH == '64bit': +- if machine() in ('arm', 'aarch') and ctx.env.DEST_OS == 'linux': ++ if ctx.env.CC_NAME == 'gcc': + # flag '-m64' does not work with gcc on 64-bit arm/aarch Linux. + pass + else: Index: head/devel/py-pyinstaller/pkg-plist =================================================================== --- head/devel/py-pyinstaller/pkg-plist (nonexistent) +++ head/devel/py-pyinstaller/pkg-plist (revision 490067) @@ -0,0 +1,2 @@ +%%MANPAGES%%man/man1/pyi-makespec.1.gz +%%MANPAGES%%man/man1/pyinstaller.1.gz Property changes on: head/devel/py-pyinstaller/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property