libopenshot: use python 3.7

This commit is contained in:
Gerasim Troeglazov
2019-10-09 19:46:00 +10:00
parent bccd6fba11
commit 2306d4e35d

View File

@@ -6,7 +6,7 @@ OpenShot Video Editor (version 2.0+). C++, Python are fully supported."
HOMEPAGE="https://www.openshot.org/"
COPYRIGHT="2008-2019 OpenShot Studios, LLC"
LICENSE="GNU LGPL v3"
REVISION="4"
REVISION="5"
SOURCE_URI="https://github.com/OpenShot/libopenshot/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="8536b0a790b0d98ed4c3b10e11d1b34ae68ccbc710887e3703a5143d95598746"
SOURCE_FILENAME="libopenshot-$portVersion.tar.gz"
@@ -15,6 +15,7 @@ PATCHES="libopenshot-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PYTHON_VERSION="3.7"
libVersion="17"
PROVIDES="
@@ -47,30 +48,34 @@ REQUIRES_devel="
libopenshot$secondaryArchSuffix == $portVersion base
"
SUMMARY_python36="$SUMMARY (python36 bindings)"
PROVIDES_python36="
libopenshot${secondaryArchSuffix}_python36 = $portVersion
SUMMARY_python3="$SUMMARY (python3 bindings)"
PROVIDES_python3="
libopenshot${secondaryArchSuffix}_python3 = $portVersion
"
REQUIRES_python36="
REQUIRES_python3="
libopenshot$secondaryArchSuffix == $portVersion base
lib:libavutil$secondaryArchSuffix
lib:libopenshot_audio$secondaryArchSuffix
lib:libpython3.6m$secondaryArchSuffix
lib:libpython${PYTHON_VERSION}m$secondaryArchSuffix
"
if [ "$targetArchitecture" = "x86_gcc2" ]; then
PROVIDES_python36+="
libopenshot_python36 = $portVersion
PROVIDES_python3+="
libopenshot_python3 = $portVersion
"
fi
SUMMARY_python36_debuginfo="$SUMMARY (python36 bindings debug info)"
PROVIDES_python36_debuginfo="
libopenshot${secondaryArchSuffix}_python36_debuginfo = $portVersion
debuginfo:_openshot.so(libopenshot_python36) = $portVersion
REPLACES_python3="
libopenshot${secondaryArchSuffix}_python36
"
SUMMARY_python3_debuginfo="$SUMMARY (python3 bindings debug info)"
PROVIDES_python3_debuginfo="
libopenshot${secondaryArchSuffix}_python3_debuginfo = $portVersion
debuginfo:_openshot.so(libopenshot_python3) = $portVersion
"
REQUIRES_python36_debuginfo="
libopenshot${secondaryArchSuffix}_python36 == $portVersion base
REQUIRES_python3_debuginfo="
libopenshot${secondaryArchSuffix}_python3 == $portVersion base
"
BUILD_REQUIRES="
@@ -83,7 +88,7 @@ BUILD_REQUIRES="
devel:libexecinfo$secondaryArchSuffix
devel:libjsoncpp$secondaryArchSuffix
devel:libMagick++_6.Q16$secondaryArchSuffix
devel:libopenshot_audio$secondaryArchSuffix >= 6
devel:libopenshot_audio$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Multimedia$secondaryArchSuffix
@@ -98,7 +103,7 @@ BUILD_PREREQUIRES="
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3.6m
cmd:python${PYTHON_VERSION}
cmd:swig$secondaryArchSuffix
"
@@ -120,7 +125,7 @@ defineDebugInfoPackage libopenshot$secondaryArchSuffix \
BUILD()
{
python=$portPackageLinksDir/cmd~python3.6m/bin/python3.6m
python=$portPackageLinksDir/cmd~python${PYTHON_VERSION}/bin/python${PYTHON_VERSION}m
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
@@ -155,15 +160,15 @@ INSTALL()
$developDir
fi
python=$portPackageLinksDir/cmd~python3.6m/bin/python3.6m
python=$portPackageLinksDir/cmd~python${PYTHON_VERSION}/bin/python${PYTHON_VERSION}m
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
pythonLocation=$prefix/lib/python$pythonVersion
installLocation=$pythonLocation/vendor-packages
pythonDebugInfoDir=$(getPackagePrefix python36_debuginfo)/$relativeDebugInfoDir
pythonDebugInfoDir=$(getPackagePrefix python3_debuginfo)/$relativeDebugInfoDir
extractDebugInfo $installLocation/_openshot.so \
"$pythonDebugInfoDir/_openshot.so(libopenshot_python3-$portFullVersion).debuginfo"
# python package
packageEntries python36 \
packageEntries python3 \
$pythonLocation
}