From 90393f30abba8a1d966dde6f55bb4ee0d6cc1e54 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Mon, 1 Nov 2021 16:16:55 +0100 Subject: [PATCH] ffmpegthumbnailer, new recipe (#6355) --- .../ffmpegthumbnailer-2.2.2.recipe | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.2.recipe diff --git a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.2.recipe b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.2.recipe new file mode 100644 index 000000000..fd3be2000 --- /dev/null +++ b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.2.recipe @@ -0,0 +1,95 @@ +SUMMARY="A lightweight video thumbnailer" +DESCRIPTION="FFmpegthumbnailer is a lightweight video thumbnailer that can be \ +used by file managers to create thumbnails for your video files. The \ +thumbnailer uses ffmpeg to decode frames from the video files, so supported \ +videoformats depend on the configuration flags of ffmpeg. + +This thumbnailer was designed to be as fast and lightweight as possible. The \ +only dependencies are ffmpeg and libpng." +HOMEPAGE="https://github.com/dirkvdb/ffmpegthumbnailer" +COPYRIGHT="2008-2012 Dirk Vanden Boer" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="$HOMEPAGE/releases/download/$portVersion/ffmpegthumbnailer-$portVersion.tar.bz2" +CHECKSUM_SHA256="1cb24059c38223f657b300c84dd80491b7040d4b69471c4fea69be862bc99b5b" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +commandBinDir=$binDir +commandSuffix=$secondaryArchSuffix +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +libVersion="4.15.1" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + ffmpegthumbnailer$secondaryArchSuffix = $portVersion + cmd:ffmpegthumbnailer$commandSuffix = $portVersion + lib:libffmpegthumbnailer$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavfilter$secondaryArchSuffix + lib:libavformat$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + ffmpegthumbnailer${secondaryArchSuffix}_devel = $portVersion + devel:libffmpegthumbnailer$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + ffmpegthumbnailer$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libavcodec$secondaryArchSuffix + devel:libavfilter$secondaryArchSuffix + devel:libavformat$secondaryArchSuffix + devel:libavutil$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + cmake -B build -S . -DCMAKE_BUILD_TYPE=None \ + $cmakeDirArgs \ + -DCMAKE_INSTALL_BINDIR=$commandBinDir \ + -DENABLE_GIO=ON \ + -DENABLE_THUMBNAILER=ON + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + prepareInstalledDevelLib libffmpegthumbnailer + fixPkgconfig + + packageEntries devel \ + $developDir +} + +TEST() +{ + cd build + CTEST_OUTPUT_ON_FAILURE=TRUE ctest +}