svn commit: r382110 - in head/devel: . pyinstaller pyinstaller/files
Alexey Dokuchaev
danfe at FreeBSD.org
Tue Mar 24 15:31:10 UTC 2015
Author: danfe
Date: Tue Mar 24 15:31:06 2015
New Revision: 382110
URL: https://svnweb.freebsd.org/changeset/ports/382110
QAT: https://qat.redports.org/buildarchive/r382110/
Log:
Add port of PyInstaller, a program that converts (packages) Python programs
into standalone executables under Windows, Mac OS X, and Unix-like operating
systems.
Also, properly sort `devel/Makefile' while here.
Added:
head/devel/pyinstaller/
head/devel/pyinstaller/Makefile (contents, props changed)
head/devel/pyinstaller/distinfo (contents, props changed)
head/devel/pyinstaller/files/
head/devel/pyinstaller/files/patch-PyInstaller_build.py (contents, props changed)
head/devel/pyinstaller/files/patch-PyInstaller_compat.py (contents, props changed)
head/devel/pyinstaller/files/patch-bootloader_wscript (contents, props changed)
head/devel/pyinstaller/pkg-descr (contents, props changed)
Modified:
head/devel/Makefile
Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile Tue Mar 24 15:22:51 2015 (r382109)
+++ head/devel/Makefile Tue Mar 24 15:31:06 2015 (r382110)
@@ -632,12 +632,12 @@
SUBDIR += gtgt
SUBDIR += gtkparasite
SUBDIR += gtranslator
- SUBDIR += gumbo
SUBDIR += guichan
SUBDIR += guikachu
SUBDIR += guile-lib
SUBDIR += guiloader
SUBDIR += guiloader-c++
+ SUBDIR += gumbo
SUBDIR += gvfs
SUBDIR += gwenhywfar
SUBDIR += gwenhywfar-fox16
@@ -2601,7 +2601,6 @@
SUBDIR += p5-PAR-Dist
SUBDIR += p5-PAR-Packer
SUBDIR += p5-PCSC-Card
- SUBDIR += p5-PerlX-Maybe
SUBDIR += p5-PHP-Serialization
SUBDIR += p5-POE
SUBDIR += p5-POE-API-Hooks
@@ -2715,6 +2714,7 @@
SUBDIR += p5-PerlIO-via-MD5
SUBDIR += p5-PerlIO-via-dynamic
SUBDIR += p5-PerlIO-via-symlink
+ SUBDIR += p5-PerlX-Maybe
SUBDIR += p5-Pid-File-Flock
SUBDIR += p5-Pipeline
SUBDIR += p5-Pithub
@@ -4225,6 +4225,7 @@
SUBDIR += pycount
SUBDIR += pydbus-common
SUBDIR += pygobject3-common
+ SUBDIR += pyinstaller
SUBDIR += pylint
SUBDIR += pymacs
SUBDIR += pyobfuscate
Added: head/devel/pyinstaller/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pyinstaller/Makefile Tue Mar 24 15:31:06 2015 (r382110)
@@ -0,0 +1,37 @@
+# Created by: Alexey Dokuchaev <danfe at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= PyInstaller
+PORTVERSION= 2.1
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= python at FreeBSD.org
+COMMENT= Program to create standalone executables from Python scripts
+
+LICENSE= GPLv2
+
+USES= python
+USE_PYTHON= autoplist distutils
+
+DOCSDIR= ${PREFIX}/share/doc/${PYTHON_PKGNAMEPREFIX}${PORTNAME}
+PORTDOCS= *
+
+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
+
+pre-build:
+ cd ${WRKSRC}/bootloader && ${PYTHON_CMD} waf configure build install
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
Added: head/devel/pyinstaller/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pyinstaller/distinfo Tue Mar 24 15:31:06 2015 (r382110)
@@ -0,0 +1,2 @@
+SHA256 (PyInstaller-2.1.tar.gz) = feff03a3212d984882432ff81c6afcdcf04d8f636fd4beb131b7a027653b3b05
+SIZE (PyInstaller-2.1.tar.gz) = 4811236
Added: head/devel/pyinstaller/files/patch-PyInstaller_build.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pyinstaller/files/patch-PyInstaller_build.py Tue Mar 24 15:31:06 2015 (r382110)
@@ -0,0 +1,22 @@
+--- 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))
Added: head/devel/pyinstaller/files/patch-PyInstaller_compat.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pyinstaller/files/patch-PyInstaller_compat.py Tue Mar 24 15:31:06 2015 (r382110)
@@ -0,0 +1,19 @@
+--- 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'
Added: head/devel/pyinstaller/files/patch-bootloader_wscript
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pyinstaller/files/patch-bootloader_wscript Tue Mar 24 15:31:06 2015 (r382110)
@@ -0,0 +1,19 @@
+--- bootloader/wscript.orig 2013-09-15 20:27:11 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')
+
Added: head/devel/pyinstaller/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pyinstaller/pkg-descr Tue Mar 24 15:31:06 2015 (r382110)
@@ -0,0 +1,14 @@
+PyInstaller is a program that converts (packages) Python programs into stand-
+alone executables, under Windows, Mac OS X, and Unix-like operating systems.
+
+Its main advantages over similar tools are that PyInstaller works with any
+version of Python since 2.4, it builds smaller executables thanks to
+transparent compression, it is fully multi-platform, and uses the OS support
+to load the dynamic libraries, thus ensuring full compatibility.
+
+The main goal of PyInstaller is to be compatible with third-party packages
+out-of-the-box. This means that, with PyInstaller, all the required tricks
+to make external packages work are already integrated within PyInstaller
+itself so that there is no user intervention required.
+
+WWW: https://pypi.python.org/pypi/PyInstaller/
More information about the svn-ports-all
mailing list