aboutsummaryrefslogtreecommitdiffstats
path: root/cad
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 /cad
parentb4ddc365e88ebdb48627086b02365b74119cf189 (diff)
downloadfreebsd-ports-gnome-32512cab3e8dd90b7cd0525bb5dc98007db431e2.tar.gz
freebsd-ports-gnome-32512cab3e8dd90b7cd0525bb5dc98007db431e2.tar.zst
freebsd-ports-gnome-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 'cad')
-rw-r--r--cad/brickutils/Makefile2
-rw-r--r--cad/linuxcnc-devel/Makefile2
-rw-r--r--cad/py-gdspy/Makefile2
-rw-r--r--cad/py-lcapy/Makefile8
-rw-r--r--cad/py-pycam/Makefile6
-rw-r--r--cad/python-gdsii/Makefile2
-rw-r--r--cad/pythoncad/Makefile4
7 files changed, 13 insertions, 13 deletions
diff --git a/cad/brickutils/Makefile b/cad/brickutils/Makefile
index c69992c09ae0..e566b6d2a5af 100644
--- a/cad/brickutils/Makefile
+++ b/cad/brickutils/Makefile
@@ -20,7 +20,7 @@ COMMENT= Utility for building models with LEGO
LICENSE= GPLv3
RUN_DEPENDS= ${LOCALBASE}/share/ldraw/models/car.dat:cad/ldraw \
- ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3
+ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
WRKSRC= ${WRKDIR}/BrickUtils-${PORTVERSION}
diff --git a/cad/linuxcnc-devel/Makefile b/cad/linuxcnc-devel/Makefile
index e44557571e34..f98af356fe1f 100644
--- a/cad/linuxcnc-devel/Makefile
+++ b/cad/linuxcnc-devel/Makefile
@@ -46,7 +46,7 @@ CONFIGURE_ARGS= --with-realtime=uspace --enable-non-distributable=yes \
CXXFLAGS="-I${LOCALBASE}/include" CXX="${CXX}" CC="${CC}" \
--with-locale-dir="${PREFIX}/share/locale" --with-python=${PYTHON_CMD}
MAKE_ENV= BUILD_VERBOSE=1
-USES= autoreconf gettext gmake ncurses pkgconfig python readline shebangfix tk
+USES= autoreconf gettext gmake ncurses pkgconfig python:2.7 readline shebangfix tk
USE_GL= gl glu
USE_GNOME= cairo gdkpixbuf2 libgnomeprintui pygtksourceview
USE_XORG= ice sm x11 xext xft xinerama xmu xrender xscrnsaver xt
diff --git a/cad/py-gdspy/Makefile b/cad/py-gdspy/Makefile
index ec63cc56ab0c..bffbe640d48a 100644
--- a/cad/py-gdspy/Makefile
+++ b/cad/py-gdspy/Makefile
@@ -11,7 +11,7 @@ COMMENT= Python module for creating GDSII stream files
LICENSE= GPLv3
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy@${FLAVOR}
USES= python
USE_PYTHON= distutils autoplist
diff --git a/cad/py-lcapy/Makefile b/cad/py-lcapy/Makefile
index 2dfd87a685a6..9ec124fd9523 100644
--- a/cad/py-lcapy/Makefile
+++ b/cad/py-lcapy/Makefile
@@ -10,11 +10,11 @@ COMMENT= Symbolic MDA Analysis Package for Linear Circuits
LICENSE= LGPL21
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sympy>0:math/py-sympy \
- ${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy \
- ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sympy>0:math/py-sympy@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${FLAVOR}
-USES= python
+USES= python:2.7
USE_PYTHON= distutils autoplist
USE_GITHUB= yes
GH_ACCOUNT= mph-
diff --git a/cad/py-pycam/Makefile b/cad/py-pycam/Makefile
index ab91f41475d5..30d89bdb2774 100644
--- a/cad/py-pycam/Makefile
+++ b/cad/py-pycam/Makefile
@@ -13,9 +13,9 @@ COMMENT= Toolpath generator for 3-axis CNC machining
LICENSE= GPLv3
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:x11-toolkits/py-gtk2 \
- ${PYTHON_SITELIBDIR}/OpenGL/__init__.py:graphics/py-PyOpenGL \
- ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/gdkgl/__init__.py:x11-toolkits/py-gtkglext
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:x11-toolkits/py-gtk2@${FLAVOR} \
+ ${PYTHON_SITELIBDIR}/OpenGL/__init__.py:graphics/py-PyOpenGL@${FLAVOR} \
+ ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/gdkgl/__init__.py:x11-toolkits/py-gtkglext@${FLAVOR}
USES= python:-2.7
USE_PYTHON= distutils autoplist
diff --git a/cad/python-gdsii/Makefile b/cad/python-gdsii/Makefile
index 0637824d4fc2..92bc2c8a17bd 100644
--- a/cad/python-gdsii/Makefile
+++ b/cad/python-gdsii/Makefile
@@ -11,7 +11,7 @@ COMMENT= GDSII manipulation library
LICENSE= LGPL3
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${FLAVOR}
USES= python
USE_PYTHON= distutils autoplist
diff --git a/cad/pythoncad/Makefile b/cad/pythoncad/Makefile
index ecb7e41268b0..6a6594577005 100644
--- a/cad/pythoncad/Makefile
+++ b/cad/pythoncad/Makefile
@@ -14,9 +14,9 @@ COMMENT= Open-source CAD package built designed around Python
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:x11-toolkits/py-gtk2
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:x11-toolkits/py-gtk2@${FLAVOR}
-USES= python shebangfix
+USES= python:2.7 shebangfix
USE_PYTHON= distutils
PYDISTUTILS_PKGNAME= PythonCAD
PYDISTUTILS_PKGVERSION= DS1-R${PORTVERSION}