summaryrefslogtreecommitdiff
path: root/lang/py-cxfreeze
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2010-08-15 10:45:57 +0000
committerdrochner <drochner@pkgsrc.org>2010-08-15 10:45:57 +0000
commitecf0ccfe4e14648d33597e412e5cb272bb08f197 (patch)
treeb2e8c0a8e49ca16bc033bdacc262762080c23506 /lang/py-cxfreeze
parent0b76f8ba6f96b36fa91b737eb909f8603f32208e (diff)
downloadpkgsrc-ecf0ccfe4e14648d33597e412e5cb272bb08f197.tar.gz
add py-cxfreeze-4.2, a (sort of) compiler which makes a standalone
executable of a Python script, from Helge Muehlmeier per pkgsrc-wip This pkg abuses Python distutils in a non-portable way, so I've added a hack which relinks the startup code behind setuptools' back. This is easier than patching the setup.py script into doing trt.
Diffstat (limited to 'lang/py-cxfreeze')
-rw-r--r--lang/py-cxfreeze/DESCR4
-rw-r--r--lang/py-cxfreeze/Makefile44
-rw-r--r--lang/py-cxfreeze/PLIST59
-rw-r--r--lang/py-cxfreeze/buildlink3.mk14
-rw-r--r--lang/py-cxfreeze/distinfo6
-rw-r--r--lang/py-cxfreeze/patches/patch-aa13
6 files changed, 140 insertions, 0 deletions
diff --git a/lang/py-cxfreeze/DESCR b/lang/py-cxfreeze/DESCR
new file mode 100644
index 00000000000..b1d00b7bf8b
--- /dev/null
+++ b/lang/py-cxfreeze/DESCR
@@ -0,0 +1,4 @@
+cx_Freeze is a set of scripts and modules for freezing Python scripts into
+executables in much the same way that py2exe and py2app do. Unlike these
+two tools, cx_Freeze is cross platform and should work on any platform that
+Python itself works on.
diff --git a/lang/py-cxfreeze/Makefile b/lang/py-cxfreeze/Makefile
new file mode 100644
index 00000000000..b81f2373854
--- /dev/null
+++ b/lang/py-cxfreeze/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/08/15 10:45:57 drochner Exp $
+#
+
+VERS= 4.2
+DISTNAME= cx_Freeze-${VERS}
+PKGNAME= ${PYPKGPREFIX}-cxfreeze-4.2
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=cx-freeze/}
+
+MAINTAINER= helgoman@users.sourceforge.net
+HOMEPAGE= http://cx-freeze.sourceforge.net/
+COMMENT= Freezing python scripts into executables
+LICENSE= python-software-foundation
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_LANGUAGES= c c++
+
+PYDISTUTILSPKG= yes
+PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
+
+post-extract:
+ ${MV} ${WRKSRC}/cxfreeze ${WRKSRC}/cxfreeze${PYVERSSUFFIX}
+
+# XXX this pkg abuses the distutils extension build mechanism to
+# build executables. The result isn't executable on NetBSD.
+# Relink to get valid executables.
+post-build:
+ cd ${WRKSRC} && ${CC} build/temp.*/source/bases/Console.o \
+ -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lpython${PYVERSSUFFIX} \
+ -o ${WRKDIR}/Console && \
+ ${CC} build/temp.*/source/bases/ConsoleKeepPath.o \
+ -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lpython${PYVERSSUFFIX} \
+ -o ${WRKDIR}/ConsoleKeepPath
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/Console \
+ ${DESTDIR}${PREFIX}/${PYSITELIB}/cx_Freeze/bases
+ ${INSTALL_PROGRAM} ${WRKDIR}/ConsoleKeepPath \
+ ${DESTDIR}${PREFIX}/${PYSITELIB}/cx_Freeze/bases
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/extension.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/py-cxfreeze/PLIST b/lang/py-cxfreeze/PLIST
new file mode 100644
index 00000000000..372c52df26f
--- /dev/null
+++ b/lang/py-cxfreeze/PLIST
@@ -0,0 +1,59 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/08/15 10:45:57 drochner Exp $
+bin/cxfreeze${PYVERSSUFFIX}
+${PYSITELIB}/cx_Freeze/__init__.py
+${PYSITELIB}/cx_Freeze/__init__.pyc
+${PYSITELIB}/cx_Freeze/__init__.pyo
+${PYSITELIB}/cx_Freeze/bases/Console
+${PYSITELIB}/cx_Freeze/bases/ConsoleKeepPath
+${PYSITELIB}/cx_Freeze/dist.py
+${PYSITELIB}/cx_Freeze/dist.pyc
+${PYSITELIB}/cx_Freeze/dist.pyo
+${PYSITELIB}/cx_Freeze/finder.py
+${PYSITELIB}/cx_Freeze/finder.pyc
+${PYSITELIB}/cx_Freeze/finder.pyo
+${PYSITELIB}/cx_Freeze/freezer.py
+${PYSITELIB}/cx_Freeze/freezer.pyc
+${PYSITELIB}/cx_Freeze/freezer.pyo
+${PYSITELIB}/cx_Freeze/hooks.py
+${PYSITELIB}/cx_Freeze/hooks.pyc
+${PYSITELIB}/cx_Freeze/hooks.pyo
+${PYSITELIB}/cx_Freeze/initscripts/Console.py
+${PYSITELIB}/cx_Freeze/initscripts/Console3.py
+${PYSITELIB}/cx_Freeze/initscripts/ConsoleKeepPath.py
+${PYSITELIB}/cx_Freeze/initscripts/ConsoleKeepPath3.py
+${PYSITELIB}/cx_Freeze/initscripts/ConsoleSetLibPath.py
+${PYSITELIB}/cx_Freeze/initscripts/SharedLib.py
+${PYSITELIB}/cx_Freeze/initscripts/SharedLibSource.py
+${PYSITELIB}/cx_Freeze/main.py
+${PYSITELIB}/cx_Freeze/main.pyc
+${PYSITELIB}/cx_Freeze/main.pyo
+${PYSITELIB}/cx_Freeze/samples/PyQt4/PyQt4app.py
+${PYSITELIB}/cx_Freeze/samples/PyQt4/setup.py
+${PYSITELIB}/cx_Freeze/samples/advanced/advanced_1.py
+${PYSITELIB}/cx_Freeze/samples/advanced/advanced_2.py
+${PYSITELIB}/cx_Freeze/samples/advanced/modules/testfreeze_1.py
+${PYSITELIB}/cx_Freeze/samples/advanced/modules/testfreeze_2.py
+${PYSITELIB}/cx_Freeze/samples/advanced/setup.py
+${PYSITELIB}/cx_Freeze/samples/matplotlib/setup.py
+${PYSITELIB}/cx_Freeze/samples/matplotlib/test_matplotlib.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/__init__.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/pkg2/__init__.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/pkg2/sub3.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/pkg2/sub5.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/sub1.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/sub2.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/sub4.py
+${PYSITELIB}/cx_Freeze/samples/relimport/pkg1/sub6.py
+${PYSITELIB}/cx_Freeze/samples/relimport/relimport.py
+${PYSITELIB}/cx_Freeze/samples/relimport/setup.py
+${PYSITELIB}/cx_Freeze/samples/service/Config.py
+${PYSITELIB}/cx_Freeze/samples/service/ServiceHandler.py
+${PYSITELIB}/cx_Freeze/samples/service/setup.py
+${PYSITELIB}/cx_Freeze/samples/simple/hello.py
+${PYSITELIB}/cx_Freeze/samples/simple/setup.py
+${PYSITELIB}/cx_Freeze/samples/wx/setup.py
+${PYSITELIB}/cx_Freeze/samples/wx/wxapp.py
+${PYSITELIB}/cx_Freeze/util.so
+${PYSITELIB}/cx_Freeze/windist.py
+${PYSITELIB}/cx_Freeze/windist.pyc
+${PYSITELIB}/cx_Freeze/windist.pyo
diff --git a/lang/py-cxfreeze/buildlink3.mk b/lang/py-cxfreeze/buildlink3.mk
new file mode 100644
index 00000000000..5f1599f07a2
--- /dev/null
+++ b/lang/py-cxfreeze/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/08/15 10:45:57 drochner Exp $
+
+BUILDLINK_TREE+= cx_Freeze
+
+.if !defined(CX_FREEZE_BUILDLINK3_MK)
+CX_FREEZE_BUILDLINK3_MK:=
+
+.include "../../lang/python/pyversion.mk"
+
+BUILDLINK_API_DEPENDS.cx_Freeze+= ${PYPKGPREFIX}-cxfreeze>=4.1.2nb1
+BUILDLINK_PKGSRCDIR.cx_Freeze?= ../../lang/py-cxfreeze
+.endif # CX_FREEZE_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -cx_Freeze
diff --git a/lang/py-cxfreeze/distinfo b/lang/py-cxfreeze/distinfo
new file mode 100644
index 00000000000..31fea04643f
--- /dev/null
+++ b/lang/py-cxfreeze/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/08/15 10:45:57 drochner Exp $
+
+SHA1 (cx_Freeze-4.2.tar.gz) = 704f7ee078edb18cc758db41d63ddd0f0a6002c8
+RMD160 (cx_Freeze-4.2.tar.gz) = 222bd41a4e48b541086f8ab9f2a6d811b12be339
+Size (cx_Freeze-4.2.tar.gz) = 59050 bytes
+SHA1 (patch-aa) = 8ae98e1ac3a0962bf6ed28c8c4c7d2a2de012172
diff --git a/lang/py-cxfreeze/patches/patch-aa b/lang/py-cxfreeze/patches/patch-aa
new file mode 100644
index 00000000000..f9f4aec9f68
--- /dev/null
+++ b/lang/py-cxfreeze/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/08/15 10:45:57 drochner Exp $
+
+--- setup.py.orig 2010-07-19 19:00:21.000000000 +0000
++++ setup.py
+@@ -238,7 +238,7 @@ setup(name = "cx_Freeze",
+ maintainer="Anthony Tuininga",
+ maintainer_email="anthony.tuininga@gmail.com",
+ url = "http://cx-freeze.sourceforge.net",
+- scripts = ["cxfreeze"],
++ scripts = ["cxfreeze" + sys.version[:3]],
+ classifiers = classifiers,
+ keywords = "freeze",
+ license = "Python Software Foundation License")