From 7e45283d005887be2e8f2fdc93d56b003c3ba3df Mon Sep 17 00:00:00 2001 From: rm Date: Tue, 15 Nov 2011 04:25:52 +0000 Subject: - fix build with lang/swi-pl 5.10 - remove bogus PORTREVSION - add missing tab - use PYTHON_SITELIBDIR in pkg-plist - bump PORTREVISION PR: ports/159926 Submitted by: rm (myself) Approved by: maintainer (timeout - 2+ months), miwi (co-mentor) Feature safe: yes --- lang/py-prolog/Makefile | 9 ++++---- lang/py-prolog/files/patch-aa | 26 ---------------------- lang/py-prolog/files/patch-setup.py | 43 +++++++++++++++++++++++++++++++++++++ lang/py-prolog/pkg-plist | 28 ++++++++++++------------ 4 files changed, 61 insertions(+), 45 deletions(-) delete mode 100644 lang/py-prolog/files/patch-aa create mode 100644 lang/py-prolog/files/patch-setup.py diff --git a/lang/py-prolog/Makefile b/lang/py-prolog/Makefile index 5b398674e1b..e5f45ed4fff 100644 --- a/lang/py-prolog/Makefile +++ b/lang/py-prolog/Makefile @@ -6,8 +6,7 @@ PORTNAME= prolog PORTVERSION= 0.1 -PORTREVISION= 2 -PORTREVSION= 1 +PORTREVISION= 3 CATEGORIES= lang python MASTER_SITES= SF/py${PORTNAME}/PyProlog/PyProlog-${PORTVERSION} PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,11 +15,11 @@ DISTNAME= PyProlog-${PORTVERSION} MAINTAINER= g.gonter@ieee.org COMMENT= A Python extension embedding SWI-Prolog -BUILD_DEPENDS= pl:${PORTSDIR}/lang/swi-pl -RUN_DEPENDS= pl:${PORTSDIR}/lang/swi-pl +BUILD_DEPENDS= swipl:${PORTSDIR}/lang/swi-pl +RUN_DEPENDS= swipl:${PORTSDIR}/lang/swi-pl USE_PYTHON= yes -USE_PYDISTUTILS=yes +USE_PYDISTUTILS= yes PYDISTUTILS_PKGNAME= PyProlog .include diff --git a/lang/py-prolog/files/patch-aa b/lang/py-prolog/files/patch-aa deleted file mode 100644 index 12bf4e5094b..00000000000 --- a/lang/py-prolog/files/patch-aa +++ /dev/null @@ -1,26 +0,0 @@ ---- setup.py.orig Sun Jun 10 05:16:04 2001 -+++ setup.py Tue Nov 16 12:46:44 2004 -@@ -13,11 +13,13 @@ - - # TDB: this code only need run during 'build'. - arch = get_atom('arch') --#swipl_version = get_atom('version') -+swipl_version = get_atom('version') - swipl_home = get_atom('home') - #print 'P>', arch, swipl_version, swipl_home - swipl_include_path = os.path.join(swipl_home, 'include') - swipl_library_path = os.path.join(swipl_home, 'runtime', arch) -+if swipl_version > '50400': -+ swipl_library_path = os.path.join(swipl_home, 'lib', arch) - #print 'I>', swipl_include_path, swipl_library_path - - setup(name="PyProlog", -@@ -25,7 +27,7 @@ - author="Glen Wilder", - author_email="gwilder@best.com", - url="http://pyprolog.sourceforge.net", -- licence='LGPL', -+ license='LGPL', - description='SWI-Prolog extension module', - packages=["pyprolog"], - package_dir={"pyprolog":"Lib"}, diff --git a/lang/py-prolog/files/patch-setup.py b/lang/py-prolog/files/patch-setup.py new file mode 100644 index 00000000000..e52d946659f --- /dev/null +++ b/lang/py-prolog/files/patch-setup.py @@ -0,0 +1,43 @@ +--- setup.py.orig 2001-06-10 07:16:04.000000000 +0400 ++++ setup.py 2011-10-09 11:20:52.000000000 +0400 +@@ -5,7 +5,7 @@ + import os + + def get_atom(atom): +- query = "pl -f none -g 'current_prolog_flag(%s, V), write(V), nl.' -t 'halt'" ++ query = "swipl -f none -g 'current_prolog_flag(%s, V), write(V), nl.' -t 'halt'" + f = os.popen(query % atom) + r = f.read()[:-1] + f.close() +@@ -13,11 +13,13 @@ + + # TDB: this code only need run during 'build'. + arch = get_atom('arch') +-#swipl_version = get_atom('version') ++swipl_version = get_atom('version') + swipl_home = get_atom('home') + #print 'P>', arch, swipl_version, swipl_home + swipl_include_path = os.path.join(swipl_home, 'include') + swipl_library_path = os.path.join(swipl_home, 'runtime', arch) ++if swipl_version > '50400': ++ swipl_library_path = os.path.join(swipl_home, 'lib', arch) + #print 'I>', swipl_include_path, swipl_library_path + + setup(name="PyProlog", +@@ -25,7 +27,7 @@ + author="Glen Wilder", + author_email="gwilder@best.com", + url="http://pyprolog.sourceforge.net", +- licence='LGPL', ++ license='LGPL', + description='SWI-Prolog extension module', + packages=["pyprolog"], + package_dir={"pyprolog":"Lib"}, +@@ -34,6 +36,6 @@ + ["Modules/swiplmodule.c"], + include_dirs=[swipl_include_path], + library_dirs=[swipl_library_path], +- libraries=['pl', 'termcap']) ++ libraries=['swipl', 'termcap']) + ] + ) diff --git a/lang/py-prolog/pkg-plist b/lang/py-prolog/pkg-plist index 9c6a4a568ad..c416cf0e39e 100644 --- a/lang/py-prolog/pkg-plist +++ b/lang/py-prolog/pkg-plist @@ -1,14 +1,14 @@ -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/Program.py -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/Program.pyc -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/Program.pyo -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/Term.py -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/Term.pyc -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/Term.pyo -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/__init__.py -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/__init__.pyc -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/__init__.pyo -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/string_source.py -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/string_source.pyc -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/string_source.pyo -lib/%%PYTHON_VERSION%%/site-packages/pyprolog/swiplmodule.so -@dirrm lib/%%PYTHON_VERSION%%/site-packages/pyprolog +%%PYTHON_SITELIBDIR%%/pyprolog/Program.py +%%PYTHON_SITELIBDIR%%/pyprolog/Program.pyc +%%PYTHON_SITELIBDIR%%/pyprolog/Program.pyo +%%PYTHON_SITELIBDIR%%/pyprolog/Term.py +%%PYTHON_SITELIBDIR%%/pyprolog/Term.pyc +%%PYTHON_SITELIBDIR%%/pyprolog/Term.pyo +%%PYTHON_SITELIBDIR%%/pyprolog/__init__.py +%%PYTHON_SITELIBDIR%%/pyprolog/__init__.pyc +%%PYTHON_SITELIBDIR%%/pyprolog/__init__.pyo +%%PYTHON_SITELIBDIR%%/pyprolog/string_source.py +%%PYTHON_SITELIBDIR%%/pyprolog/string_source.pyc +%%PYTHON_SITELIBDIR%%/pyprolog/string_source.pyo +%%PYTHON_SITELIBDIR%%/pyprolog/swiplmodule.so +@dirrm %%PYTHON_SITELIBDIR%%/pyprolog -- cgit