summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/Makefile5
-rw-r--r--devel/pyinstaller/Makefile37
-rw-r--r--devel/pyinstaller/distinfo2
-rw-r--r--devel/pyinstaller/files/patch-PyInstaller_build.py22
-rw-r--r--devel/pyinstaller/files/patch-PyInstaller_compat.py19
-rw-r--r--devel/pyinstaller/files/patch-bootloader_wscript19
-rw-r--r--devel/pyinstaller/pkg-descr14
7 files changed, 116 insertions, 2 deletions
diff --git a/devel/Makefile b/devel/Makefile
index e265303ea3ff..49d7bea94d4e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -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
diff --git a/devel/pyinstaller/Makefile b/devel/pyinstaller/Makefile
new file mode 100644
index 000000000000..6d0dd973564a
--- /dev/null
+++ b/devel/pyinstaller/Makefile
@@ -0,0 +1,37 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= PyInstaller
+PORTVERSION= 2.1
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= python@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>
diff --git a/devel/pyinstaller/distinfo b/devel/pyinstaller/distinfo
new file mode 100644
index 000000000000..b52a1157f2fa
--- /dev/null
+++ b/devel/pyinstaller/distinfo
@@ -0,0 +1,2 @@
+SHA256 (PyInstaller-2.1.tar.gz) = feff03a3212d984882432ff81c6afcdcf04d8f636fd4beb131b7a027653b3b05
+SIZE (PyInstaller-2.1.tar.gz) = 4811236
diff --git a/devel/pyinstaller/files/patch-PyInstaller_build.py b/devel/pyinstaller/files/patch-PyInstaller_build.py
new file mode 100644
index 000000000000..afcd664062d6
--- /dev/null
+++ b/devel/pyinstaller/files/patch-PyInstaller_build.py
@@ -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))
diff --git a/devel/pyinstaller/files/patch-PyInstaller_compat.py b/devel/pyinstaller/files/patch-PyInstaller_compat.py
new file mode 100644
index 000000000000..4b88a74a335a
--- /dev/null
+++ b/devel/pyinstaller/files/patch-PyInstaller_compat.py
@@ -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'
diff --git a/devel/pyinstaller/files/patch-bootloader_wscript b/devel/pyinstaller/files/patch-bootloader_wscript
new file mode 100644
index 000000000000..08a3df3c3b7d
--- /dev/null
+++ b/devel/pyinstaller/files/patch-bootloader_wscript
@@ -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')
+
diff --git a/devel/pyinstaller/pkg-descr b/devel/pyinstaller/pkg-descr
new file mode 100644
index 000000000000..6e12eb02a2a7
--- /dev/null
+++ b/devel/pyinstaller/pkg-descr
@@ -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/