diff options
author | sobomax <sobomax@FreeBSD.org> | 2005-09-01 21:11:28 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2005-09-01 21:11:28 +0800 |
commit | 060a6a6882b9cfc28b282659d93486a0913da9e1 (patch) | |
tree | 2871ae9ea2ef1e299f551e56220744e30ec5ca0e /lang | |
parent | bb03f05179627d63e0c278594b2a9f33efa668a7 (diff) | |
download | freebsd-ports-gnome-060a6a6882b9cfc28b282659d93486a0913da9e1.tar.gz freebsd-ports-gnome-060a6a6882b9cfc28b282659d93486a0913da9e1.tar.zst freebsd-ports-gnome-060a6a6882b9cfc28b282659d93486a0913da9e1.zip |
Add pyperl 1.0.1, module to embed Perl code into a Python program.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/pyperl/Makefile | 37 | ||||
-rw-r--r-- | lang/pyperl/distinfo | 2 | ||||
-rw-r--r-- | lang/pyperl/files/patch-dlhack.c | 30 | ||||
-rw-r--r-- | lang/pyperl/files/patch-setup.py | 14 | ||||
-rw-r--r-- | lang/pyperl/files/patch-svrv_object.c | 15 | ||||
-rw-r--r-- | lang/pyperl/files/patch-try_perlapi.pl | 15 | ||||
-rw-r--r-- | lang/pyperl/pkg-descr | 7 | ||||
-rw-r--r-- | lang/pyperl/pkg-plist | 23 |
9 files changed, 144 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index 6e324f60b728..73178eb4e32e 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -209,6 +209,7 @@ SUBDIR += py-compiler SUBDIR += py-mx-base SUBDIR += py-prolog + SUBDIR += pyperl SUBDIR += python SUBDIR += python-devel SUBDIR += python-doc-html diff --git a/lang/pyperl/Makefile b/lang/pyperl/Makefile new file mode 100644 index 000000000000..00d4b405a56b --- /dev/null +++ b/lang/pyperl/Makefile @@ -0,0 +1,37 @@ +# New ports collection makefile for: pyperl +# Date created: 1 September 2005 +# Whom: Maxim Sobolev <sobomax@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= pyperl +PORTVERSION= 1.0.1 +CATEGORIES= lang python perl +MASTER_SITES= http://downloads.activestate.com/Zope-Perl/ + +MAINTAINER= ports@FreeBSD.org +COMMENT= Module to embed Perl code into a Python program + +USE_PYTHON= yes +USE_PYDISTUTILS= yes +PERL_CONFIGURE= yes +CONFIGURE_WRKSRC= ${WRKSRC}/Python-Object + +MAN3= Python.3 Python::Err.3 Python::Object.3 + +post-extract: + ${RM} ${WRKSRC}/MULTI_PERL + +post-configure: + @cd ${CONFIGURE_WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} \ + ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} + +post-build: + @(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + +post-install: + @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) + +.include <bsd.port.mk> diff --git a/lang/pyperl/distinfo b/lang/pyperl/distinfo new file mode 100644 index 000000000000..8215422feabb --- /dev/null +++ b/lang/pyperl/distinfo @@ -0,0 +1,2 @@ +MD5 (pyperl-1.0.1.tar.gz) = 8c5b9df951f91914dbdba69c56a335fa +SIZE (pyperl-1.0.1.tar.gz) = 61314 diff --git a/lang/pyperl/files/patch-dlhack.c b/lang/pyperl/files/patch-dlhack.c new file mode 100644 index 000000000000..84b7fcc33c7e --- /dev/null +++ b/lang/pyperl/files/patch-dlhack.c @@ -0,0 +1,30 @@ + +$FreeBSD$ + +--- dlhack.c ++++ dlhack.c +@@ -1,5 +1,6 @@ + #include <Python.h> + #include <dlfcn.h> ++#include <unistd.h> + + /* This is a fake perl module that will look for the real thing ('perl2.so') + * in sys.path and then load this one with the RTLD_GLOBAL set in order to +@@ -33,6 +34,8 @@ + if (strlen(buf) != len) + continue; /* v contains '\0' */ + strcpy(buf+len, "/perl2.so"); ++ if (access(buf, R_OK) == -1) ++ continue; + + handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); + if (handle) { +@@ -45,6 +48,7 @@ + } + return; + } ++ break; + } +- PyErr_SetString(PyExc_ImportError, "perl2.so not found"); ++ PyErr_SetString(PyExc_ImportError, dlerror()); + } diff --git a/lang/pyperl/files/patch-setup.py b/lang/pyperl/files/patch-setup.py new file mode 100644 index 000000000000..b6dc35ee7b51 --- /dev/null +++ b/lang/pyperl/files/patch-setup.py @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- setup.py ++++ setup.py +@@ -94,7 +94,7 @@ + cc_extra.append("-DDL_HACK") + extra_ext.append(Extension(name = "perl", + sources = ["dlhack.c"], +- libraries = ["dl"], ++ libraries = [], + )) + + diff --git a/lang/pyperl/files/patch-svrv_object.c b/lang/pyperl/files/patch-svrv_object.c new file mode 100644 index 000000000000..392927ca73d3 --- /dev/null +++ b/lang/pyperl/files/patch-svrv_object.c @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- svrv_object.c ++++ svrv_object.c +@@ -18,6 +18,9 @@ + #include "lang_map.h" + #include "try_perlapi.h" + ++#define PERL_CORE ++#include <embed.h> ++ + #ifdef MULTI_PERL + static int + owned_by(PySVRV *self, refcounted_perl *my_perl) diff --git a/lang/pyperl/files/patch-try_perlapi.pl b/lang/pyperl/files/patch-try_perlapi.pl new file mode 100644 index 000000000000..91521088a07c --- /dev/null +++ b/lang/pyperl/files/patch-try_perlapi.pl @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- try_perlapi.pl ++++ try_perlapi.pl +@@ -24,6 +24,9 @@ + #include "perlmodule.h" + #include "lang_lock.h" + #include "thrd_ctx.h" ++ ++#define PERL_CORE ++#include "embed.h" + EOT + + print C <<EOT if $ENABLE_JMPENV; diff --git a/lang/pyperl/pkg-descr b/lang/pyperl/pkg-descr new file mode 100644 index 000000000000..8b47f72a9dff --- /dev/null +++ b/lang/pyperl/pkg-descr @@ -0,0 +1,7 @@ +This is a Python extension module that makes it possible to embed Perl +interpreter(s) in any Python program. It can be used to invoke +arbitrary Perl code, load any Perl modules and make calls directly +into Perl functions. The Perl code invoked can call back into Python +as it see fit. + +WWW: http://www.zope.org/Wikis/zope-perl/ diff --git a/lang/pyperl/pkg-plist b/lang/pyperl/pkg-plist new file mode 100644 index 000000000000..c8ed674f9569 --- /dev/null +++ b/lang/pyperl/pkg-plist @@ -0,0 +1,23 @@ +%%SITE_PERL%%/%%PERL_ARCH%%/Python.pm +%%SITE_PERL%%/%%PERL_ARCH%%/Python/Err.pm +%%SITE_PERL%%/%%PERL_ARCH%%/Python/Object.pm +%%SITE_PERL%%/%%PERL_ARCH%%/auto/Python/Object/.packlist +%%SITE_PERL%%/%%PERL_ARCH%%/auto/Python/Object/Object.bs +%%SITE_PERL%%/%%PERL_ARCH%%/auto/Python/Object/Object.so +lib/%%PYTHON_VERSION%%/site-packages/dbi.py +lib/%%PYTHON_VERSION%%/site-packages/dbi.pyc +lib/%%PYTHON_VERSION%%/site-packages/dbi.pyo +lib/%%PYTHON_VERSION%%/site-packages/dbi2.py +lib/%%PYTHON_VERSION%%/site-packages/dbi2.pyc +lib/%%PYTHON_VERSION%%/site-packages/dbi2.pyo +lib/%%PYTHON_VERSION%%/site-packages/perl.so +lib/%%PYTHON_VERSION%%/site-packages/perl2.so +lib/%%PYTHON_VERSION%%/site-packages/perlmod.py +lib/%%PYTHON_VERSION%%/site-packages/perlmod.pyc +lib/%%PYTHON_VERSION%%/site-packages/perlmod.pyo +lib/%%PYTHON_VERSION%%/site-packages/perlpickle.py +lib/%%PYTHON_VERSION%%/site-packages/perlpickle.pyc +lib/%%PYTHON_VERSION%%/site-packages/perlpickle.pyo +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Python/Object +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Python +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Python |