media-libs/libopenshot: various changes

- splitted python modules to a separate package
- added debuginfo package
- added doc package
- patched to use system jsoncpp
This commit is contained in:
Leorize
2018-08-31 10:46:42 +07:00
parent 1e2981dc5d
commit 42905e5ba0
2 changed files with 104 additions and 17 deletions

View File

@@ -1,8 +1,8 @@
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."
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="http://www.openshot.org"
COPYRIGHT="2008-2018 OpenShot Studios, LLC"
LICENSE="GNU LGPL v3"
@@ -24,21 +24,15 @@ PROVIDES="
REQUIRES="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavdevice$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavresample$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libjsoncpp$secondaryArchSuffix
lib:libMagick++_6.Q16$secondaryArchSuffix
lib:libMagickCore_6.Q16$secondaryArchSuffix
lib:libMagickWand_6.Q16$secondaryArchSuffix
lib:libopenshot_audio$secondaryArchSuffix
lib:libpython3.6m$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Multimedia$secondaryArchSuffix
lib:libQt5MultimediaWidgets$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
@@ -53,6 +47,32 @@ 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
@@ -62,6 +82,7 @@ BUILD_REQUIRES="
devel:libavresample$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:libexecinfo$secondaryArchSuffix
devel:libjsoncpp$secondaryArchSuffix
devel:libMagick++_6.Q16$secondaryArchSuffix
devel:libopenshot_audio$secondaryArchSuffix >= 6
devel:libQt5Core$secondaryArchSuffix
@@ -81,16 +102,40 @@ BUILD_PREREQUIRES="
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
-DENABLE_RUBY=OFF \
-DUSE_SYSTEM_JSONCPP=ON
make $jobArgs
if [ -z "$secondaryArchSuffix" ]; then
make $jobArgs doc
fi
}
INSTALL()
@@ -102,6 +147,25 @@ INSTALL()
# 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()

View File

@@ -1,4 +1,4 @@
From 8914e50d286da14f88798929e0fd697f1febba24 Mon Sep 17 00:00:00 2001
From 2bc99976edf9766bbbc092a266b4c49bed87f858 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Thu, 30 Aug 2018 23:06:23 +0700
Subject: cmake: use GNUInstallDirs
@@ -60,7 +60,7 @@ index 0c4ff99..54db490 100644
2.16.4
From 5ec13a4eec5d30f45098be504735065d4cd4d9e4 Mon Sep 17 00:00:00 2001
From 475673c0de166354a51b157cc637daef8d323206 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Fri, 31 Aug 2018 00:09:35 +0700
Subject: cmake/Modules: simplify search logic
@@ -203,7 +203,7 @@ index 545f62a..978b075 100644
2.16.4
From 1404976e3a58d8b22c90f461e620487bc90a01eb Mon Sep 17 00:00:00 2001
From eab4bf0bd4aec99bfbc236d7f957e06be8a4a54a Mon Sep 17 00:00:00 2001
From: Jonathan Thomas <jonathan@openshot.org>
Date: Sat, 11 Aug 2018 18:22:18 -0500
Subject: FFmpeg4 support. Compile warnings fixes. Credit goes to many people,
@@ -943,7 +943,7 @@ index 9d43530..70ca90d 100644
2.16.4
From 054513e01a62148135c14b0710471b3f02d244d6 Mon Sep 17 00:00:00 2001
From 59741454db9a2244d6489ec866405d5e70af0901 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 31 Aug 2018 09:26:01 +0700
Subject: disable stacktrace printing, as it depends on libunwind.
@@ -973,7 +973,7 @@ index e7827d0..8b4e4ed 100644
2.16.4
From 40cf43eb4ef02753c772f4bbacdd9f68322ba4a1 Mon Sep 17 00:00:00 2001
From 584ba2f96ca81e7f2717f48b67882a872702608d Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Fri, 31 Aug 2018 09:51:13 +0700
Subject: bindings/python: allows overriding install path
@@ -1008,3 +1008,26 @@ index ceb4876..cb7c97c 100644
--
2.16.4
From 73d7f254cd46df650c97e8786883184539547893 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Fri, 31 Aug 2018 11:10:45 +0700
Subject: cmake: fix documentation installation
The glob approach used prior to this commit only works if
the documentation has been generated **before** cmake was run.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56517db..82d8e9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,5 +87,4 @@ add_subdirectory(tests)
# Find Doxygen (used for documentation)
include(cmake/Modules/UseDoxygen.cmake)
-file(GLOB_RECURSE doc_files ${CMAKE_CURRENT_BINARY_DIR}/doc/html/*.*)
-INSTALL(FILES ${doc_files} DESTINATION ${CMAKE_INSTALL_DOCDIR}/libopenshot)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ DESTINATION ${CMAKE_INSTALL_DOCDIR}/libopenshot OPTIONAL)
--
2.16.4