diff options
author | mat <mat@FreeBSD.org> | 2017-11-30 23:50:30 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2017-11-30 23:50:30 +0800 |
commit | 32512cab3e8dd90b7cd0525bb5dc98007db431e2 (patch) | |
tree | d296c82a71504382f4faefa0bf8d7be384ea1105 /archivers | |
parent | b4ddc365e88ebdb48627086b02365b74119cf189 (diff) | |
download | freebsd-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 'archivers')
-rw-r--r-- | archivers/Makefile | 1 | ||||
-rw-r--r-- | archivers/py-attic/Makefile | 13 | ||||
-rw-r--r-- | archivers/py-borgbackup/Makefile | 13 | ||||
-rw-r--r-- | archivers/py-czipfile/Makefile | 2 | ||||
-rw-r--r-- | archivers/py-libarchive-c/Makefile | 4 | ||||
-rw-r--r-- | archivers/py-librtfcomp/Makefile | 3 | ||||
-rw-r--r-- | archivers/py-lz4/Makefile | 2 | ||||
-rw-r--r-- | archivers/py-python-lzo/Makefile | 2 | ||||
-rw-r--r-- | archivers/py3-libarchive-c/Makefile | 8 |
9 files changed, 13 insertions, 35 deletions
diff --git a/archivers/Makefile b/archivers/Makefile index 5dd07aec5b8d..ec2f0c32216d 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -189,7 +189,6 @@ SUBDIR += py-rjsmin SUBDIR += py-warctools SUBDIR += py-xopen - SUBDIR += py3-libarchive-c SUBDIR += qpress SUBDIR += quazip SUBDIR += quazip-qt5 diff --git a/archivers/py-attic/Makefile b/archivers/py-attic/Makefile index eb1476e5ea10..8409d809c149 100644 --- a/archivers/py-attic/Makefile +++ b/archivers/py-attic/Makefile @@ -14,8 +14,8 @@ COMMENT= Deduplicating backup program LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.1.10:devel/py-msgpack-python -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.1.10:devel/py-msgpack-python +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.1.10:devel/py-msgpack-python@${FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.1.10:devel/py-msgpack-python@${FLAVOR} USES= python:3.3+ ssl USE_PYTHON= autoplist distutils @@ -23,13 +23,6 @@ USE_PYTHON= autoplist distutils STRIP_FILES= hashindex.so platform_freebsd.so chunker.so crypto.so PYDISTUTILS_BUILDPATH=${BUILD_WRKSRC}/build/lib.${OPSYS:tl}-${UNAMER}-${ARCH}-${PYTHON_VER} -.include <bsd.port.pre.mk> - -.if defined(PACKAGE_BUILDING) && !defined(PACKAGE_BUILDING_FLAVORS) && \ - ${PYTHON_VER} != ${PYTHON_DEFAULT} -IGNORE= you have python ${PYTHON_DEFAULT} set as the default, and this needs ${PYTHON_VER} -.endif - regression-test: build ${SETENV} PYTHONPATH="${PYDISTUTILS_BUILDPATH}:${PYTHONPATH}" \ ${PYTHON_CMD} -m attic.testsuite.run @@ -37,4 +30,4 @@ regression-test: build post-install: ${STRIP_CMD} ${STRIP_FILES:S,^,${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/attic/,} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/archivers/py-borgbackup/Makefile b/archivers/py-borgbackup/Makefile index bba9b34b8760..8db5e395d4ef 100644 --- a/archivers/py-borgbackup/Makefile +++ b/archivers/py-borgbackup/Makefile @@ -13,9 +13,9 @@ COMMENT= Deduplicating backup program LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.7:devel/py-setuptools_scm +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.7:devel/py-setuptools_scm@${FLAVOR} LIB_DEPENDS= liblz4.so:archivers/liblz4 -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.4.6:devel/py-msgpack-python +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.4.6:devel/py-msgpack-python@${FLAVOR} OPTIONS_DEFINE= FUSE FUSE_DESC= Support to mount locally borg backup files @@ -26,15 +26,8 @@ FUSE_RUN_DEPENDS= ${PYTHONPREFIX_SITELIBDIR}/llfuse.so:devel/py-llfuse USES= python:3.4+ ssl USE_PYTHON= autoplist distutils -.include <bsd.port.pre.mk> - -.if defined(PACKAGE_BUILDING) && !defined(PACKAGE_BUILDING_FLAVORS) && \ - ${PYTHON_VER} != ${PYTHON_DEFAULT} -IGNORE= you have python ${PYTHON_DEFAULT} set as the default, and this needs ${PYTHON_VER} -.endif - post-install: @${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/borg/ -name "*.so" \ -exec ${STRIP_CMD} {} \; -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/archivers/py-czipfile/Makefile b/archivers/py-czipfile/Makefile index fc7020673f06..26d7e6f8fd1d 100644 --- a/archivers/py-czipfile/Makefile +++ b/archivers/py-czipfile/Makefile @@ -12,7 +12,7 @@ COMMENT= Fast C-based zipfile decryption for Python LICENSE= PSFL -USES= python +USES= python:2.7 USE_PYTHON= autoplist distutils .include <bsd.port.mk> diff --git a/archivers/py-libarchive-c/Makefile b/archivers/py-libarchive-c/Makefile index c4138a0ecd09..9e35747eb572 100644 --- a/archivers/py-libarchive-c/Makefile +++ b/archivers/py-libarchive-c/Makefile @@ -11,9 +11,9 @@ COMMENT= Python interface to libarchive LICENSE= LGPL20+ -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${FLAVOR} -USES?= python +USES= python USE_GITHUB= yes USE_PYTHON= autoplist distutils diff --git a/archivers/py-librtfcomp/Makefile b/archivers/py-librtfcomp/Makefile index a92c95a4e03f..bc654193ad2a 100644 --- a/archivers/py-librtfcomp/Makefile +++ b/archivers/py-librtfcomp/Makefile @@ -14,13 +14,14 @@ COMMENT= Python bindings for library for handling compressed RTF documents LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/LICENCE -BUILD_DEPENDS= pyrexc:devel/pyrex +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyrex>0:devel/pyrex@${FLAVOR} LIB_DEPENDS= librtfcomp.so:archivers/librtfcomp CONFIGURE_ARGS= --enable-python-bindings GNU_CONFIGURE= yes USE_LDCONFIG= yes USES= libtool python:2 +USE_PYTHON= flavors BUILD_WRKSRC= ${WRKSRC}/python INSTALL_WRKSRC= ${WRKSRC}/python diff --git a/archivers/py-lz4/Makefile b/archivers/py-lz4/Makefile index 3f8c93b8db1f..fe63a0786cf2 100644 --- a/archivers/py-lz4/Makefile +++ b/archivers/py-lz4/Makefile @@ -12,7 +12,7 @@ COMMENT= Python binding for the LZ4 compression library LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${FLAVOR} LIB_DEPENDS= liblz4.so:archivers/liblz4 USE_PYTHON= distutils py3kplist diff --git a/archivers/py-python-lzo/Makefile b/archivers/py-python-lzo/Makefile index 04ca7aba8ffb..2620a4251201 100644 --- a/archivers/py-python-lzo/Makefile +++ b/archivers/py-python-lzo/Makefile @@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= liblzo2.so:archivers/lzo2 -USES= python:2 +USES= python USE_PYTHON= autoplist distutils CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/lzo diff --git a/archivers/py3-libarchive-c/Makefile b/archivers/py3-libarchive-c/Makefile deleted file mode 100644 index 12df1c925687..000000000000 --- a/archivers/py3-libarchive-c/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# Created by: Kubilay Kocak <koobs@FreeBSD.org> -# $FreeBSD$ - -MASTERDIR= ${.CURDIR}/../py-libarchive-c - -USES= python:3.3+ - -.include "${MASTERDIR}/Makefile" |