diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2021-07-30 19:39:04 +0200 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2021-07-30 20:14:36 +0200 |
commit | 5c8adda9492587fe0c7d9c8160dbdf6f9b2e09a3 (patch) | |
tree | 66fc99bf71951a99b308de43eb573838d8458fb1 /Mk | |
parent | devel/llvm12: Add patches to enable kernel sanitizers on FreeBSD (diff) |
multimedia/{py-,}mlt{-qt5,}: rename to multimedia/{py-,}mlt6{-qt5,}:
- To make it possible to easily import mlt-7 move the current port to
a versioned directory.
- Add Mk/Uses/mlt.mk to make it easily possible to depend on a given mlt
version:
USES=mlt:6
will get you a dependency on multimedia/mlt6, while
USES=mlt:7
will get you a dependency on the soon to be added multimedia/mlt7
- Switch the port to use cmake as a build system
- While here, provide some more options to make it possible to have
a leaner package if required
- Bump consumers after rename of the dependency
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/mlt.mk | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Mk/Uses/mlt.mk b/Mk/Uses/mlt.mk new file mode 100644 index 000000000000..bb9bc5f1328c --- /dev/null +++ b/Mk/Uses/mlt.mk @@ -0,0 +1,66 @@ +# Handle dependency on mlt +# +# Feature: mlt +# Usage: USES=mlt:ARGS +# Valid ARGS: <version>,nodepend +# +# version The chooseable versions are 6 and 7. +# USES=mlt:6 # Use mlt 6.x +# USES=mlt:7 # Use mlt 7.x +# nodepend If nodepend is set, no LIB_DEPENDS line +# will be generated (useful for the mlt-ports) +# +# MAINTAINER: kde@FreeBSD.org +# + +.if ! defined(_INCLUDE_USES_MLT_MK) +_INCLUDE_USES_MLT_MK= YES + +_MLT_SUPPORTED= 6 7 + +_mlt_version= # +. for _ver in ${_MLT_SUPPORTED:O:u} +. if ${mlt_ARGS:M${_ver}} +. if empty(_mlt_version) +_mlt_version= ${_ver} +. else +IGNORE= Incorrect USES=mlt:${mlt_ARGS} - multiple versions defined +. endif +. endif +. endfor + +. if empty(_mlt_version) +IGNORE= Incorrect USES=mlt:${mlt_ARGS} - no version defined (valid: ${_MLT_SUPPORTED}) +. endif + +. if ! empty(mlt_ARGS:Mnodepend) +_MLT_NODEPEND= yes +. endif + +# Library dependencies +_MLT6_VERSION= 6.26.1 +_MLT7_VERSION= 7.0.1 +_MLT6_PORTNAME= mlt6 +_MLT7_PORTNAME= mlt7 +_MLT6_LIB= libmlt.so +_MLT6_MELT= ${LOCALBASE}/bin/melt +_MLT7_LIB= libmlt-7.so +_MLT7_MELT= ${LOCALBASE}/bin/melt-7 + +# Export the version of the chosen mlt port +_MLT_VERSION= ${_MLT${_mlt_version}_VERSION} +_MLT_PORTNAME= ${_MLT${_mlt_version}_PORTNAME} +_MLT_PORT= multimedia/${_MLT_PORTNAME} +_MLT_LIB= ${_MLT${_mlt_version}_LIB} +_MLT_DEP= ${_MLT_LIB}:${_MLT_PORT} +_MLT_MELT= ${_MLT${_mlt_version}_MELT} + +# Append the correct LIB_DEPENDS +. if !defined(_MLT_NODEPEND) +LIB_DEPENDS+= ${_MLT_DEP} +. endif + +# Append version to PLIST_SUB +PLIST_SUB+= MLT_VERSION=${_MLT_VERSION} + +.endif |