mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
191 lines
6.0 KiB
Bash
191 lines
6.0 KiB
Bash
SUMMARY="Image viewer for KDE"
|
|
DESCRIPTION="Gwenview is able to load and save to a variety of image formats \
|
|
supported by KDE applications, such as PNG, JPEG, and even the Gimp's XCF! \
|
|
Gwenview also sports a beautiful thumbnail toolbar when viewing images in \
|
|
fullscreen. Gwenview's simple interface doesn't get in the way and lets you \
|
|
view your images quickly and easily.
|
|
Features
|
|
* Supports simple image manipulations: rotate, mirror, flip, and resize
|
|
* Supports basic file management actions such as copy, move, delete, and others
|
|
* Functions both as a standalone application and an embedded viewer in the Konqueror web browser
|
|
* Can be extended using KIPI plugins."
|
|
HOMEPAGE="https://www.kde.org/applications/graphics/gwenview/"
|
|
COPYRIGHT="2010-2025 KDE Organisation"
|
|
LICENSE="GNU LGPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/gwenview-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="cf328a568c5ef385c8ad0500b885d13049dd599492d2479f5d831e23410bf78c"
|
|
SOURCE_DIR="gwenview-$portVersion"
|
|
PATCHES="327.patch"
|
|
ADDITIONAL_FILES="gwenview.rdef.in"
|
|
|
|
# KIO issue!
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
gwenview_kf6$secondaryArchSuffix = $portVersion
|
|
app:Gwenview = $portVersion
|
|
cmd:gwenview = $portVersion
|
|
cmd:gwenview_importer = $portVersion
|
|
lib:libgwenviewlib$secondaryArchSuffix
|
|
"
|
|
REQUIRES="
|
|
# dbus$secondaryArchSuffix
|
|
haiku$secondaryArchSuffix
|
|
lib:libcfitsio$secondaryArchSuffix
|
|
lib:libexiv2$secondaryArchSuffix
|
|
lib:libGL$secondaryArchSuffix
|
|
lib:libjpeg$secondaryArchSuffix
|
|
lib:libKDcrawQt6$secondaryArchSuffix
|
|
lib:libkImageAnnotator$secondaryArchSuffix
|
|
lib:liblcms2$secondaryArchSuffix
|
|
lib:libopenal$secondaryArchSuffix
|
|
lib:libphonon4qt6$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libtiff$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
# KF6
|
|
lib:libKF6Baloo$secondaryArchSuffix
|
|
lib:libKF6Bookmarks$secondaryArchSuffix
|
|
lib:libKF6ColorScheme$secondaryArchSuffix
|
|
lib:libKF6Completion$secondaryArchSuffix
|
|
lib:libKF6ConfigCore$secondaryArchSuffix
|
|
lib:libKF6ConfigWidgets$secondaryArchSuffix
|
|
lib:libKF6CoreAddons$secondaryArchSuffix
|
|
lib:libKF6Crash$secondaryArchSuffix
|
|
lib:libKF6FileMetadata$secondaryArchSuffix
|
|
lib:libKF6GuiAddons$secondaryArchSuffix
|
|
lib:libKF6I18n$secondaryArchSuffix
|
|
lib:libKF6IconThemes$secondaryArchSuffix
|
|
lib:libKF6ItemModels$secondaryArchSuffix
|
|
lib:libKF6ItemViews$secondaryArchSuffix
|
|
lib:libKF6JobWidgets$secondaryArchSuffix
|
|
lib:libKF6KIOCore$secondaryArchSuffix
|
|
lib:libKF6Purpose$secondaryArchSuffix
|
|
lib:libKF6Service$secondaryArchSuffix
|
|
lib:libKF6Solid$secondaryArchSuffix
|
|
lib:libKF6WidgetsAddons$secondaryArchSuffix
|
|
lib:libKF6WindowSystem$secondaryArchSuffix
|
|
lib:libKF6XmlGui$secondaryArchSuffix
|
|
lib:libPlasmaActivities$secondaryArchSuffix
|
|
# Qt6
|
|
lib:libQt6Core$secondaryArchSuffix
|
|
lib:libQt6Concurrent$secondaryArchSuffix
|
|
lib:libQt6DBus$secondaryArchSuffix
|
|
lib:libQt6Gui$secondaryArchSuffix
|
|
lib:libQt6Multimedia$secondaryArchSuffix
|
|
lib:libQt6Network$secondaryArchSuffix
|
|
lib:libQt6OpenGL$secondaryArchSuffix
|
|
lib:libQt6PrintSupport$secondaryArchSuffix
|
|
lib:libQt6Svg$secondaryArchSuffix
|
|
lib:libQt6Widgets$secondaryArchSuffix
|
|
lib:libQt6Xml$secondaryArchSuffix
|
|
"
|
|
CONFLICTS="
|
|
gwenview$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcfitsio$secondaryArchSuffix
|
|
devel:libexiv2$secondaryArchSuffix
|
|
devel:libjpeg$secondaryArchSuffix
|
|
devel:libkColorPicker$secondaryArchSuffix
|
|
devel:libKDcrawQt6$secondaryArchSuffix
|
|
devel:libkImageAnnotator$secondaryArchSuffix
|
|
devel:liblcms2$secondaryArchSuffix
|
|
devel:libphonon4qt6$secondaryArchSuffix
|
|
devel:libtiff$secondaryArchSuffix
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
# KF6
|
|
extra_cmake_modules$secondaryArchSuffix
|
|
devel:libKF6Baloo$secondaryArchSuffix
|
|
devel:libKF6Crash$secondaryArchSuffix
|
|
devel:libKF6GuiAddons$secondaryArchSuffix
|
|
devel:libKF6I18n$secondaryArchSuffix
|
|
devel:libKF6IconThemes$secondaryArchSuffix
|
|
devel:libKF6ItemModels$secondaryArchSuffix
|
|
devel:libKF6KIOCore$secondaryArchSuffix
|
|
devel:libKF6Notifications$secondaryArchSuffix
|
|
devel:libKF6Parts$secondaryArchSuffix
|
|
devel:libKF6Purpose$secondaryArchSuffix
|
|
devel:libKF6WidgetsAddons$secondaryArchSuffix
|
|
devel:libKF6WindowSystem$secondaryArchSuffix
|
|
# Plasma6
|
|
devel:libPlasmaActivities$secondaryArchSuffix
|
|
# Qt6
|
|
devel:libQt6Core$secondaryArchSuffix
|
|
devel:libQt6Multimedia$secondaryArchSuffix
|
|
devel:libQt6Qml$secondaryArchSuffix
|
|
devel:libQt6Svg$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:msgfmt$secondaryArchSuffix
|
|
cmd:msgmerge$secondaryArchSuffix
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
TEST_REQUIRES="
|
|
qthaikuplugins$secondaryArchSuffix
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
# disable doctools
|
|
sed -e '/add_subdirectory(doc)/ s/^#*/#/' -i CMakeLists.txt
|
|
# use Haiku's icon theme
|
|
sed -e 's,\ KIconTheme::initTheme();,\// KIconTheme::initTheme();,g' -i app/main.cpp
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_INSTALL_BINDIR=$prefix/bin \
|
|
-DGWENVIEW_NO_WAYLAND_GESTURES=ON \
|
|
-DBUILD_TESTING=OFF \
|
|
-Wno-dev
|
|
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# cleanup
|
|
rm -rf $dataDir/{applications,icons,metainfo}
|
|
|
|
mkdir -p $appsDir
|
|
mv $prefix/bin/gwenview $appsDir/Gwenview
|
|
ln -s $appsDir/Gwenview $prefix/bin/gwenview
|
|
|
|
local APP_SIGNATURE="application/x-vnd.kde-gwenview"
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local LONG_INFO="$SUMMARY"
|
|
sed \
|
|
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
$portDir/additional-files/gwenview.rdef.in > gwenview.rdef
|
|
|
|
addResourcesToBinaries gwenview.rdef $appsDir/Gwenview
|
|
addAppDeskbarSymlink $appsDir/Gwenview
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# 47% tests passed, 8 tests failed out of 15 (some kept idle/nuked)
|
|
ctest --test-dir build --output-on-failure \
|
|
-E "importertest|sorteddirmodeltest|recursivedirmodeltest|contextmanagertest"
|
|
}
|