aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2017-11-30 23:50:30 +0800
committermat <mat@FreeBSD.org>2017-11-30 23:50:30 +0800
commit32512cab3e8dd90b7cd0525bb5dc98007db431e2 (patch)
treed296c82a71504382f4faefa0bf8d7be384ea1105 /editors
parentb4ddc365e88ebdb48627086b02365b74119cf189 (diff)
downloadfreebsd-ports-graphics-32512cab3e8dd90b7cd0525bb5dc98007db431e2.tar.gz
freebsd-ports-graphics-32512cab3e8dd90b7cd0525bb5dc98007db431e2.tar.zst
freebsd-ports-graphics-32512cab3e8dd90b7cd0525bb5dc98007db431e2.zip
Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
Diffstat (limited to 'editors')
-rw-r--r--editors/fileobj/Makefile2
-rw-r--r--editors/gedit-plugins/Makefile8
-rw-r--r--editors/gedit/Makefile2
-rw-r--r--editors/gwrite/Makefile12
-rw-r--r--editors/leo/Makefile6
-rw-r--r--editors/py-room/Makefile4
-rw-r--r--editors/texworks/Makefile2
7 files changed, 18 insertions, 18 deletions
diff --git a/editors/fileobj/Makefile b/editors/fileobj/Makefile
index f194af72b3e..1bc89ede544 100644
--- a/editors/fileobj/Makefile
+++ b/editors/fileobj/Makefile
@@ -16,7 +16,7 @@ GH_ACCOUNT= kusumi
USE_GITHUB= yes
USES= python
-USE_PYTHON= autoplist distutils
+USE_PYTHON= autoplist distutils concurrent optsuffix
PLIST_FILES= man/man1/fileobj.1.gz
diff --git a/editors/gedit-plugins/Makefile b/editors/gedit-plugins/Makefile
index 15e3548e426..5a593b6f120 100644
--- a/editors/gedit-plugins/Makefile
+++ b/editors/gedit-plugins/Makefile
@@ -21,7 +21,7 @@ RUN_DEPENDS= gedit>=0:editors/gedit
PORTSCOUT= limitw:1,even
USES= gettext gmake gnome libtool pathfix pkgconfig \
- python:3 tar:xz
+ python:3.4+ tar:xz
USE_GNOME= gtk30 gtksourceview3 intlhack
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
@@ -33,10 +33,10 @@ GLIB_SCHEMAS= org.gnome.gedit.plugins.drawspaces.gschema.xml \
org.gnome.gedit.plugins.wordcompletion.gschema.xml
USES+= python
-BUILD_DEPENDS+= py3?-dbus>=0:devel/py3-dbus
+BUILD_DEPENDS+= py3?-dbus>=0:devel/py-dbus@${PY_FLAVOR}
LIB_DEPENDS+= libgucharmap_2_90.so:deskutils/gucharmap
-RUN_DEPENDS+= py3?-dbus>=0:devel/py3-dbus \
- ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py3-libpeas
+RUN_DEPENDS+= py3?-dbus>=0:devel/py-dbus@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py-libpeas@${PY_FLAVOR}
USE_GNOME+= vte3
CONFIGURE_ARGS+=--enable-python
GLIB_SCHEMAS+= org.gnome.gedit.plugins.terminal.gschema.xml
diff --git a/editors/gedit/Makefile b/editors/gedit/Makefile
index 0d7f251a294..ce181062bc3 100644
--- a/editors/gedit/Makefile
+++ b/editors/gedit/Makefile
@@ -23,7 +23,7 @@ LIB_DEPENDS= libenchant.so:textproc/enchant \
libsoup-2.4.so:devel/libsoup
RUN_DEPENDS= iso-codes>=0:misc/iso-codes \
gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas \
- ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py3-libpeas
+ ${PYTHON_PKGNAMEPREFIX}libpeas>=0:devel/py-libpeas@${PY_FLAVOR}
PORTSCOUT= limitw:1,even
diff --git a/editors/gwrite/Makefile b/editors/gwrite/Makefile
index 089507f6789..8de253deded 100644
--- a/editors/gwrite/Makefile
+++ b/editors/gwrite/Makefile
@@ -14,16 +14,16 @@ COMMENT= Simple HTML format editor
LICENSE= LGPL3+
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-distutils-extra>=2.15:devel/py-python-distutils-extra \
- ${PYTHON_PKGNAMEPREFIX}jswebkit>=0:www/py-jswebkit \
- ${PYTHON_PKGNAMEPREFIX}webkitgtk>=0:www/py-webkitgtk
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-distutils-extra>=2.15:devel/py-python-distutils-extra@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}jswebkit>=0:www/py-jswebkit@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}webkitgtk>=0:www/py-webkitgtk@${FLAVOR}
RUN_DEPENDS= gnome-icon-theme>=0:misc/gnome-icon-theme \
wvHtml:textproc/wv \
- ${PYTHON_PKGNAMEPREFIX}jswebkit>=0:www/py-jswebkit \
- ${PYTHON_PKGNAMEPREFIX}webkitgtk>=0:www/py-webkitgtk
+ ${PYTHON_PKGNAMEPREFIX}jswebkit>=0:www/py-jswebkit@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}webkitgtk>=0:www/py-webkitgtk@${FLAVOR}
NO_ARCH= yes
-USES= desktop-file-utils gettext-tools python
+USES= desktop-file-utils gettext-tools python:2.7
USE_GNOME= intltool pygtk2
USE_PYTHON= distutils
WRKSRC= ${WRKDIR}/gwrite-${PORTVERSION}
diff --git a/editors/leo/Makefile b/editors/leo/Makefile
index 807e9675660..8e80c435706 100644
--- a/editors/leo/Makefile
+++ b/editors/leo/Makefile
@@ -15,8 +15,8 @@ COMMENT= Advanced outline editor for programmers
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
- ${PYTHON_PKGNAMEPREFIX}docutils>0:textproc/py-docutils \
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}docutils>0:textproc/py-docutils@${FLAVOR} \
silvercity>0:textproc/silvercity
USES= pyqt:4 python:2 shebangfix zip
@@ -32,7 +32,7 @@ DESKTOP_ENTRIES="Leo" "Literate Editor with Outlines" \
OPTIONS_DEFINE= PYENCHANT
PYENCHANT_DESC= Spell checking support via PyEnchant
-PYENCHANT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}enchant>0:textproc/py-enchant
+PYENCHANT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}enchant>0:textproc/py-enchant@${FLAVOR}
post-patch:
@${LN} -sf leo/dist/leo-install.py ${WRKSRC}/leo-install.py
diff --git a/editors/py-room/Makefile b/editors/py-room/Makefile
index e867ad002a1..a3251d4feb0 100644
--- a/editors/py-room/Makefile
+++ b/editors/py-room/Makefile
@@ -12,9 +12,9 @@ DISTNAME= py${PORTNAME}-${PORTVERSION}
MAINTAINER= arundel@FreeBSD.org
COMMENT= PyRoom is a clone of WriteRoom and features "distraction-free writing"
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py-xdg
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py-xdg@${FLAVOR}
-USES= gettext python
+USES= gettext python:2.7
USE_PYTHON= distutils
USE_GNOME= pygtk2
PYDISTUTILS_PKGNAME= PyRoom
diff --git a/editors/texworks/Makefile b/editors/texworks/Makefile
index 9b8e263cef1..d510b2c31b3 100644
--- a/editors/texworks/Makefile
+++ b/editors/texworks/Makefile
@@ -47,7 +47,7 @@ PORTDOCS= *
OPTIONS_DEFINE= DOCS LUA PYTHON
LUA_USES= lua:51
LUA_PLIST_FILES=lib/texworks/libTWLuaPlugin.so
-PYTHON_USES= python:3
+PYTHON_USES= python:3.4+
PYTHON_PLIST_FILES=lib/texworks/libTWPythonPlugin.so
post-extract: