mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
174 lines
4.8 KiB
Bash
174 lines
4.8 KiB
Bash
SUMMARY="Video editing library used by OpenShot"
|
|
DESCRIPTION="libopenshot is an open-source, cross-platform C++ library \
|
|
dedicated to delivering high quality video editing, animation, and playback \
|
|
solutions to the world. This is the same library which powers \
|
|
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="2"
|
|
SOURCE_URI="https://github.com/OpenShot/libopenshot/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="8536b0a790b0d98ed4c3b10e11d1b34ae68ccbc710887e3703a5143d95598746"
|
|
SOURCE_FILENAME="libopenshot-$portVersion.tar.gz"
|
|
PATCHES="libopenshot-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="17"
|
|
|
|
PROVIDES="
|
|
libopenshot$secondaryArchSuffix = $portVersion
|
|
lib:libopenshot$secondaryArchSuffix = $libVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libavcodec$secondaryArchSuffix
|
|
lib:libavformat$secondaryArchSuffix
|
|
lib:libavutil$secondaryArchSuffix
|
|
lib:libgomp$secondaryArchSuffix
|
|
lib:libjsoncpp$secondaryArchSuffix
|
|
lib:libMagick++_6.Q16$secondaryArchSuffix
|
|
lib:libMagickCore_6.Q16$secondaryArchSuffix
|
|
lib:libopenshot_audio$secondaryArchSuffix
|
|
lib:libQt5Core$secondaryArchSuffix
|
|
lib:libQt5Gui$secondaryArchSuffix
|
|
lib:libQt5Widgets$secondaryArchSuffix
|
|
lib:libswresample$secondaryArchSuffix
|
|
lib:libswscale$secondaryArchSuffix
|
|
lib:libzmq$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libopenshot${secondaryArchSuffix}_devel = $portVersion compat >= 0
|
|
devel:libopenshot${secondaryArchSuffix} = $libVersion
|
|
"
|
|
REQUIRES_devel="
|
|
libopenshot$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
SUMMARY_python3="$SUMMARY (python3 bindings)"
|
|
PROVIDES_python3="
|
|
libopenshot${secondaryArchSuffix}_python3 = $portVersion
|
|
"
|
|
REQUIRES_python3="
|
|
libopenshot$secondaryArchSuffix == $portVersion base
|
|
lib:libavutil$secondaryArchSuffix
|
|
lib:libopenshot_audio$secondaryArchSuffix
|
|
lib:libpython3.6m$secondaryArchSuffix
|
|
"
|
|
|
|
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
|
PROVIDES_python3+="
|
|
libopenshot_python3 = $portVersion
|
|
"
|
|
fi
|
|
|
|
SUMMARY_python3_debuginfo="$SUMMARY (python3 bindings debug info)"
|
|
PROVIDES_python3_debuginfo="
|
|
libopenshot${secondaryArchSuffix}_python3_debuginfo = $portVersion
|
|
debuginfo:_openshot.so(libopenshot_python3) = $portVersion
|
|
"
|
|
REQUIRES_python3_debuginfo="
|
|
libopenshot${secondaryArchSuffix}_python3 == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
unittest++${secondaryArchSuffix}_devel
|
|
devel:libavcodec$secondaryArchSuffix
|
|
devel:libavdevice$secondaryArchSuffix
|
|
devel:libavformat$secondaryArchSuffix
|
|
devel:libavutil$secondaryArchSuffix
|
|
devel:libexecinfo$secondaryArchSuffix
|
|
devel:libjsoncpp$secondaryArchSuffix
|
|
devel:libMagick++_6.Q16$secondaryArchSuffix
|
|
devel:libopenshot_audio$secondaryArchSuffix >= 6
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
devel:libQt5Multimedia$secondaryArchSuffix
|
|
devel:libQt5MultimediaWidgets$secondaryArchSuffix
|
|
devel:libswresample$secondaryArchSuffix
|
|
devel:libswscale$secondaryArchSuffix
|
|
devel:libzmq$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python3
|
|
cmd:swig$secondaryArchSuffix
|
|
"
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
ARCHITECTURES_doc="any"
|
|
|
|
PROVIDES_doc="
|
|
libopenshot_audio_doc = $portVersion
|
|
"
|
|
|
|
BUILD_PREREQUIRES+="
|
|
cmd:dot
|
|
cmd:doxygen
|
|
"
|
|
fi
|
|
|
|
defineDebugInfoPackage libopenshot$secondaryArchSuffix \
|
|
$libDir/libopenshot.so.$portVersion
|
|
|
|
BUILD()
|
|
{
|
|
python=$portPackageLinksDir/cmd~python3/bin/python3
|
|
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
|
|
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
|
|
|
|
export LDFLAGS="-Wl,--as-needed" # Trim unneeded links
|
|
|
|
cmake . $cmakeDirArgs \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DPYTHON_MODULE_PATH=$installLocation \
|
|
-DENABLE_RUBY=OFF \
|
|
-DUSE_SYSTEM_JSONCPP=ON
|
|
make $jobArgs
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
make $jobArgs doc
|
|
fi
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
prepareInstalledDevelLibs libopenshot
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
install -d -m 755 $developDocDir
|
|
mv -T $docDir/libopenshot $developDocDir
|
|
rm -rf $documentationDir
|
|
packageEntries doc \
|
|
$developDir
|
|
fi
|
|
|
|
python=$portPackageLinksDir/cmd~python3/bin/python3
|
|
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
|
|
pythonLocation=$prefix/lib/python$pythonVersion
|
|
installLocation=$pythonLocation/vendor-packages
|
|
pythonDebugInfoDir=$(getPackagePrefix python3_debuginfo)/$relativeDebugInfoDir
|
|
extractDebugInfo $installLocation/_openshot.so \
|
|
"$pythonDebugInfoDir/_openshot.so(libopenshot_python3-$portFullVersion).debuginfo"
|
|
# python package
|
|
packageEntries python3 \
|
|
$pythonLocation
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make $jobArgs test
|
|
}
|