aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartymac <martymac@FreeBSD.org>2013-11-21 20:06:37 +0800
committermartymac <martymac@FreeBSD.org>2013-11-21 20:06:37 +0800
commitd86e2d794dfd18edbcf07a468224b7d65ed0157a (patch)
tree434b8575c2895717928ba756269d8155d29f9d2e
parent6cbf47ce5f986b35bc33e7686265dfcaec884920 (diff)
downloadfreebsd-ports-gnome-d86e2d794dfd18edbcf07a468224b7d65ed0157a.tar.gz
freebsd-ports-gnome-d86e2d794dfd18edbcf07a468224b7d65ed0157a.tar.zst
freebsd-ports-gnome-d86e2d794dfd18edbcf07a468224b7d65ed0157a.zip
- Enable staging
- Use new OPTIONS framework - Use new LIB_DEPENDS format - Remove useless -E switch for REINPLACE_CMD - Remove useless python 3.2+ hack
-rw-r--r--sysutils/dvdvideo/Makefile31
-rw-r--r--sysutils/dvdvideo/pkg-plist62
2 files changed, 37 insertions, 56 deletions
diff --git a/sysutils/dvdvideo/Makefile b/sysutils/dvdvideo/Makefile
index 7fceb64b9e65..6df16f8eaceb 100644
--- a/sysutils/dvdvideo/Makefile
+++ b/sysutils/dvdvideo/Makefile
@@ -18,40 +18,19 @@ USE_PYTHON= 3.1+
USE_PYDISTUTILS= yes
PYDISTUTILS_EGGINFO= python_dvdvideo-0.${PORTVERSION}-py${PYTHON_VER}.egg-info
+PLIST_SUB+= PYTHON_SUFFIX=${PYTHON_SUFFIX}
+
OPTIONS_DEFINE= DVDCSS
.if !defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT= DVDCSS
.endif
+DVDCSS_LIB_DEPENDS= libdvdcss.so:${PORTSDIR}/multimedia/libdvdcss
# DVDCSS version hardcoded in dvdvideo/libdvdcss.py
DVDCSS_LIBVERSION= 3
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MDVDCSS}
-LIB_DEPENDS+= dvdcss:${PORTSDIR}/multimedia/libdvdcss
-.endif
-
post-patch:
- @${REINPLACE_CMD} -E -e 's|(libdvdcss.so)\.2|\1.${DVDCSS_LIBVERSION}|' \
+ @${REINPLACE_CMD} -E 's|(libdvdcss.so)\.2|\1.${DVDCSS_LIBVERSION}|' \
${WRKSRC}/dvdvideo/libdvdcss.py
-# When Python version is 3.2+ we rewrite all the filenames
-# of TMPPLIST that end with .py[co], so that they conform
-# to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/)
-.if ${PYTHON_REL} >= 320
-PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())'
-add-plist-post:
- @${AWK} '\
- /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \
- /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \
- {print} \
- END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \
- ' \
- pc="__pycache__" mt="$$(${PYMAGICTAG})" sp="${PYTHON_SITELIBDIR:S,${PYTHONBASE}/,,g}" \
- ${TMPPLIST} > ${TMPPLIST}.pyc_tmp
- @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST}
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/dvdvideo/pkg-plist b/sysutils/dvdvideo/pkg-plist
index 97902cb93dde..95e3f3def162 100644
--- a/sysutils/dvdvideo/pkg-plist
+++ b/sysutils/dvdvideo/pkg-plist
@@ -1,41 +1,43 @@
bin/dvdvideo-backup-image
+%%PYTHON_SITELIBDIR%%/dvdvideo/__init__.py
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/ifo.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/ifo.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/libdvdcss.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/libdvdcss.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/media.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/media.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/utils.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/utils.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/vob.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/vob.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/volume.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__/volume.cpython-%%PYTHON_SUFFIX%%.pyo
%%PYTHON_SITELIBDIR%%/dvdvideo/ifo.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/libdvdcss.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/vob.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/volume.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/volume.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/volume.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/vob.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/utils.pyc
%%PYTHON_SITELIBDIR%%/dvdvideo/libdvdcss.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/media.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/__init__.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/ifo.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/general.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__init__.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/media.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/volume.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/filesystem.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/media.py
%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__init__.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/general.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/filesystem.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/filesystem.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/general.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/general.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/media.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/media.cpython-%%PYTHON_SUFFIX%%.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/volume.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__/volume.cpython-%%PYTHON_SUFFIX%%.pyo
%%PYTHON_SITELIBDIR%%/dvdvideo/udf/filesystem.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/__init__.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/media.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/general.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/volume.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/filesystem.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/udf/volume.py
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/general.py
%%PYTHON_SITELIBDIR%%/dvdvideo/udf/media.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/libdvdcss.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/vob.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/__init__.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/media.py
+%%PYTHON_SITELIBDIR%%/dvdvideo/udf/volume.py
%%PYTHON_SITELIBDIR%%/dvdvideo/utils.py
-%%PYTHON_SITELIBDIR%%/dvdvideo/utils.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/__init__.pyc
-%%PYTHON_SITELIBDIR%%/dvdvideo/media.pyo
-%%PYTHON_SITELIBDIR%%/dvdvideo/ifo.pyo
+%%PYTHON_SITELIBDIR%%/dvdvideo/vob.py
+%%PYTHON_SITELIBDIR%%/dvdvideo/volume.py
+@dirrm %%PYTHON_SITELIBDIR%%/dvdvideo/udf/__pycache__
@dirrm %%PYTHON_SITELIBDIR%%/dvdvideo/udf
+@dirrm %%PYTHON_SITELIBDIR%%/dvdvideo/__pycache__
@dirrm %%PYTHON_SITELIBDIR%%/dvdvideo
@dirrmtry %%PYTHON_SITELIBDIR%%
@dirrmtry %%PYTHON_LIBDIR%%