diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2017-01-08 05:42:28 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2017-01-08 05:42:28 +0800 |
commit | 23c52b64599893910f073e97b6fe47c1dabdf1bb (patch) | |
tree | 34ed59c815a96dcd021876d917ebc81830b5dedf /math | |
parent | 7c9c3826d1bf6da7d2feb77406cd6d9ad2380ad3 (diff) | |
download | freebsd-ports-gnome-23c52b64599893910f073e97b6fe47c1dabdf1bb.tar.gz freebsd-ports-gnome-23c52b64599893910f073e97b6fe47c1dabdf1bb.tar.zst freebsd-ports-gnome-23c52b64599893910f073e97b6fe47c1dabdf1bb.zip |
Add more PLIST_SUB to Mk/Uses/python.mk
- Add PYTHON_PYOEXTENSION and PYTHON_SUFFIX
- Add PYTHON2 and PYTHON3
- Respect PYTHON_VERSION
- Rename PYOEXTENSION to PYTHON_PYOEXTENSION
This change would help:
- Build databases/postgresql*-plpython with Python 3
(It has PLIST issue since bsd.python.mk to Uses/python.mk transition)
- Simplify Makefile
PR: 205807
Differential Revision: https://reviews.FreeBSD.org/D4758
Exp-run by: antoine
Diffstat (limited to 'math')
-rw-r--r-- | math/convertall/Makefile | 9 | ||||
-rw-r--r-- | math/convertall/pkg-plist | 36 | ||||
-rw-r--r-- | math/rpcalc/Makefile | 9 | ||||
-rw-r--r-- | math/rpcalc/pkg-plist | 28 |
4 files changed, 32 insertions, 50 deletions
diff --git a/math/convertall/Makefile b/math/convertall/Makefile index 4042d742a7ca..8453cbb651ee 100644 --- a/math/convertall/Makefile +++ b/math/convertall/Makefile @@ -41,15 +41,6 @@ do-install: .include <bsd.port.pre.mk> -.if ${PYTHON_REL} < 3500 -PYOEXTENSION= pyo -.else -PYOEXTENSION= opt-1.pyc -.endif - -PLIST_SUB+= PYTHON_SUFFIX="${PYTHON_SUFFIX}" \ - PYOEXTENSION="${PYOEXTENSION}" - .if defined(PACKAGE_BUILDING) && ${PYTHON_VER} != ${PYTHON_DEFAULT} IGNORE= you have python ${PYTHON_DEFAULT} set as the default, and this needs ${PYTHON_VER} .endif diff --git a/math/convertall/pkg-plist b/math/convertall/pkg-plist index b327b8b66b39..a24361d4540d 100644 --- a/math/convertall/pkg-plist +++ b/math/convertall/pkg-plist @@ -1,40 +1,40 @@ bin/convertall %%DATADIR%%/__pycache__/cmdline.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/cmdline.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/cmdline.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/convertall.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/convertall.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/convertall.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/convertdlg.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/convertdlg.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/convertdlg.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/finddlg.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/finddlg.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/finddlg.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/helpview.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/helpview.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/helpview.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/icondict.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/icondict.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/icondict.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/modbutton.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/modbutton.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/modbutton.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/numedit.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/numedit.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/numedit.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/option.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/option.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/option.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/optiondefaults.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/optiondefaults.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/optiondefaults.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/optiondlg.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/optiondlg.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/optiondlg.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/recentunits.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/recentunits.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/recentunits.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/setup.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/setup.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/setup.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/unitatom.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/unitatom.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/unitatom.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/unitdata.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/unitdata.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/unitdata.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/unitedit.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/unitedit.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/unitedit.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/unitgroup.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/unitgroup.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/unitgroup.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/unitlistview.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/unitlistview.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/unitlistview.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/cmdline.py %%DATADIR%%/convertall.pro %%DATADIR%%/convertall.py diff --git a/math/rpcalc/Makefile b/math/rpcalc/Makefile index f4c4ba47c3ad..ab158bdb1199 100644 --- a/math/rpcalc/Makefile +++ b/math/rpcalc/Makefile @@ -36,15 +36,6 @@ do-install: .include <bsd.port.pre.mk> -.if ${PYTHON_REL} < 3500 -PYOEXTENSION= pyo -.else -PYOEXTENSION= opt-1.pyc -.endif - -PLIST_SUB+= PYTHON_SUFFIX="${PYTHON_SUFFIX}" \ - PYOEXTENSION="${PYOEXTENSION}" - .if defined(PACKAGE_BUILDING) && ${PYTHON_VER} != ${PYTHON_DEFAULT} IGNORE= you have python ${PYTHON_DEFAULT} set as the default, and this needs ${PYTHON_VER} .endif diff --git a/math/rpcalc/pkg-plist b/math/rpcalc/pkg-plist index de0494b8b9f1..cc38c95d6f2a 100644 --- a/math/rpcalc/pkg-plist +++ b/math/rpcalc/pkg-plist @@ -1,32 +1,32 @@ bin/rpcalc %%DATADIR%%/__pycache__/altbasedialog.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/altbasedialog.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/altbasedialog.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/calcbutton.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/calcbutton.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/calcbutton.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/calccore.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/calccore.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/calccore.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/calcdlg.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/calcdlg.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/calcdlg.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/calclcd.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/calclcd.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/calclcd.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/calcstack.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/calcstack.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/calcstack.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/extradisplay.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/extradisplay.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/extradisplay.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/helpview.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/helpview.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/helpview.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/icondict.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/icondict.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/icondict.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/option.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/option.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/option.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/optiondefaults.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/optiondefaults.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/optiondefaults.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/optiondlg.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/optiondlg.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/optiondlg.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/rpcalc.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/rpcalc.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/rpcalc.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/__pycache__/setup.cpython-%%PYTHON_SUFFIX%%.pyc -%%DATADIR%%/__pycache__/setup.cpython-%%PYTHON_SUFFIX%%.%%PYOEXTENSION%% +%%DATADIR%%/__pycache__/setup.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%DATADIR%%/altbasedialog.py %%DATADIR%%/calcbutton.py %%DATADIR%%/calccore.py |