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 /graphics | |
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 'graphics')
-rw-r--r-- | graphics/eog-plugins/Makefile | 46 | ||||
-rw-r--r-- | graphics/eog-plugins/pkg-plist | 28 | ||||
-rw-r--r-- | graphics/py3-cairo/Makefile | 13 | ||||
-rw-r--r-- | graphics/py3-cairo/pkg-plist | 4 |
4 files changed, 26 insertions, 65 deletions
diff --git a/graphics/eog-plugins/Makefile b/graphics/eog-plugins/Makefile index 44c8aedee2e8..6899629de1de 100644 --- a/graphics/eog-plugins/Makefile +++ b/graphics/eog-plugins/Makefile @@ -29,48 +29,20 @@ GLIB_SCHEMAS= org.gnome.eog.plugins.exif-display.gschema.xml OPTIONS_DEFINE= CHAMPLAIN PYTHON OPTIONS_DEFAULT=CHAMPLAIN PYTHON +OPTIONS_SUB= yes CHAMPLAIN_DESC= Champlain map plugin -.include <bsd.port.options.mk> +CHAMPLAIN_LIB_DEPENDS= libchamplain-0.12.so:graphics/libchamplain +CHAMPLAIN_USE= GL=gl +PYTHON_CONFIGURE_ENABLE=python +PYTHON_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py3-libpeas +PYTHON_USES= python:3 +PYTHON_VARS= GLIB_SCHEMAS+="org.gnome.eog.plugins.export-to-folder.gschema.xml org.gnome.eog.plugins.fullscreenbg.gschema.xml org.gnome.eog.plugins.pythonconsole.gschema.xml" -.if ${PORT_OPTIONS:MCHAMPLAIN} -USE_GL= gl -LIB_DEPENDS+= libchamplain-0.12.so:graphics/libchamplain -PLIST_SUB+= CHAMPLAIN="" -.else -PLIST_SUB+= CHAMPLAIN="@comment " -.endif - -PLIST_SUB+= PYVER=${PYTHON_VER:S|.||} -.if ${PORT_OPTIONS:MPYTHON} -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py3-libpeas -CONFIGURE_ARGS+=--enable-python -USES+= python:3 -PLIST_SUB+= PYTHON="" -GLIB_SCHEMAS+= org.gnome.eog.plugins.export-to-folder.gschema.xml \ - org.gnome.eog.plugins.fullscreenbg.gschema.xml \ - org.gnome.eog.plugins.pythonconsole.gschema.xml -.else -CONFIGURE_ARGS+=--disable-python -PLIST_SUB+= PYTHON="@comment " -.endif - -.if ! ${PORT_OPTIONS:MCHAMPLAIN} -post-patch: +post-patch-CHAMPLAIN-off: @${REINPLACE_CMD} -e 's|champlain-gtk|disabled-champlain-gtk|g' \ ${WRKSRC}/configure @${REINPLACE_CMD} '/^DEFAULT_PLUGINS=/,/^$$/ s/map//' \ ${WRKSRC}/configure -.endif - -.include <bsd.port.pre.mk> - -.if ${PYTHON_REL} < 3500 -PYOEXTENSION= pyo -.else -PYOEXTENSION= opt-1.pyc -.endif - -PLIST_SUB+= PYOEXTENSION=${PYOEXTENSION} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/graphics/eog-plugins/pkg-plist b/graphics/eog-plugins/pkg-plist index 3a7668908ba2..bf05a3ab3cdd 100644 --- a/graphics/eog-plugins/pkg-plist +++ b/graphics/eog-plugins/pkg-plist @@ -1,15 +1,15 @@ lib/eog/plugins/exif-display.plugin %%PYTHON%%lib/eog/plugins/export-to-folder.plugin %%PYTHON%%lib/eog/plugins/export-to-folder.py -%%PYTHON%%lib/eog/plugins/__pycache__/export-to-folder.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/__pycache__/export-to-folder.cpython-%%PYVER%%.%%PYOEXTENSION%% -%%PYTHON%%lib/eog/plugins/__pycache__/maximize-windows.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/__pycache__/maximize-windows.cpython-%%PYVER%%.%%PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/__pycache__/export-to-folder.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/__pycache__/export-to-folder.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/__pycache__/maximize-windows.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/__pycache__/maximize-windows.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% lib/eog/plugins/fit-to-width.plugin %%PYTHON%%lib/eog/plugins/fullscreenbg.plugin %%PYTHON%%lib/eog/plugins/fullscreenbg.py -%%PYTHON%%lib/eog/plugins/__pycache__/fullscreenbg.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/__pycache__/fullscreenbg.cpython-%%PYVER%%.%%PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/__pycache__/fullscreenbg.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/__pycache__/fullscreenbg.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% lib/eog/plugins/hide-titlebar.plugin lib/eog/plugins/libexif-display.so lib/eog/plugins/libfit-to-width.so @@ -25,19 +25,19 @@ lib/eog/plugins/light-theme.plugin lib/eog/plugins/postasa.plugin %%PYTHON%%lib/eog/plugins/pythonconsole.plugin %%PYTHON%%lib/eog/plugins/pythonconsole/__init__.py -%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/__init__.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/__init__.cpython-%%PYVER%%.%%PYOEXTENSION%% -%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/config.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/config.cpython-%%PYVER%%.%%PYOEXTENSION%% -%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/console.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/console.cpython-%%PYVER%%.%%PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/config.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/config.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/console.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/pythonconsole/__pycache__/console.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% %%PYTHON%%lib/eog/plugins/pythonconsole/config.py %%PYTHON%%lib/eog/plugins/pythonconsole/console.py lib/eog/plugins/send-by-mail.plugin %%PYTHON%%lib/eog/plugins/slideshowshuffle.plugin %%PYTHON%%lib/eog/plugins/slideshowshuffle.py -%%PYTHON%%lib/eog/plugins/__pycache__/slideshowshuffle.cpython-%%PYVER%%.pyc -%%PYTHON%%lib/eog/plugins/__pycache__/slideshowshuffle.cpython-%%PYVER%%.%%PYOEXTENSION%% +%%PYTHON%%lib/eog/plugins/__pycache__/slideshowshuffle.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON%%lib/eog/plugins/__pycache__/slideshowshuffle.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% share/appdata/eog-exif-display.metainfo.xml %%PYTHON%%share/appdata/eog-export-to-folder.metainfo.xml share/appdata/eog-fit-to-width.metainfo.xml diff --git a/graphics/py3-cairo/Makefile b/graphics/py3-cairo/Makefile index 9fa022fdf211..2a38080603f1 100644 --- a/graphics/py3-cairo/Makefile +++ b/graphics/py3-cairo/Makefile @@ -20,17 +20,6 @@ LDFLAGS+= -L${LOCALBASE}/lib SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py -.include <bsd.port.pre.mk> - -.if ${PYTHON_REL} < 3500 -PYOEXTENSION= pyo -.else -PYOEXTENSION= opt-1.pyc -.endif - -PLIST_SUB+= PYTVER=${PYTHON_VER:S/.//} \ - PYOEXTENSION=${PYOEXTENSION} - post-patch: @${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \ ${WRKSRC}/test/examples_test.py @@ -50,4 +39,4 @@ post-install: -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/_cairo.so -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/graphics/py3-cairo/pkg-plist b/graphics/py3-cairo/pkg-plist index b720e36e0691..bb026ea4c0d8 100644 --- a/graphics/py3-cairo/pkg-plist +++ b/graphics/py3-cairo/pkg-plist @@ -1,6 +1,6 @@ include/pycairo/py3cairo.h -%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTVER%%.pyc -%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTVER%%.%%PYOEXTENSION%% %%PYTHON_SITELIBDIR%%/cairo/__init__.py +%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%% +%%PYTHON_SITELIBDIR%%/cairo/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc %%PYTHON_SITELIBDIR%%/cairo/_cairo.so libdata/pkgconfig/py3cairo.pc |