Files
haikuports/kde-apps/kompare/kompare-25.12.0.recipe
2025-12-22 08:01:26 +01:00

147 lines
4.5 KiB
Bash

SUMMARY="A program to view the differences between files"
DESCRIPTION="Kompare is a program to view the differences between files.
Features include:
* comparison of files or directories via a graphical interface
* bezier-based connection widget lets you see both source and destination \
as they really appear
* graphical viewing of patch files in normal, context, unified and \
diff formats
* interactive application of differences
* full network transparency
* ability to view plain-text diff output in embedded viewer
* easy navigation of multiple-file diffs with dockable navigation tree
* graphical interface to commonly used diff command line options
* switch source and destination with one command
* diff statistics"
HOMEPAGE="https://apps.kde.org/kompare/"
COPYRIGHT="2010-2025 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/kompare-$portVersion.tar.xz"
CHECKSUM_SHA256="848f5c19e5d054781844323cf6fe5bb3ea7e055832d847f8d09bf13729941f48"
ADDITIONAL_FILES="kompare.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
kompare$secondaryArchSuffix = $portVersion
app:Kompare = $portVersion
cmd:kompare$commandSuffix = $portVersion
lib:libkomparedialogpages$secondaryArchSuffix = 6
lib:libkompareinterface$secondaryArchSuffix = 6
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libkomparediff2$secondaryArchSuffix
# KF6
lib:libKF6Codecs$secondaryArchSuffix
lib:libKF6ColorScheme$secondaryArchSuffix
lib:libKF6Completion$secondaryArchSuffix
lib:libKF6ConfigCore$secondaryArchSuffix
lib:libKF6ConfigWidgets$secondaryArchSuffix
lib:libKF6CoreAddons$secondaryArchSuffix
lib:libKF6GuiAddons$secondaryArchSuffix
lib:libKF6I18n$secondaryArchSuffix
lib:libKF6JobWidgets$secondaryArchSuffix
lib:libKF6KIOCore$secondaryArchSuffix
lib:libKF6Parts$secondaryArchSuffix
lib:libKF6Service$secondaryArchSuffix
lib:libKF6Solid$secondaryArchSuffix
lib:libKF6SyntaxHighlighting$secondaryArchSuffix
lib:libKF6TextEditor$secondaryArchSuffix
lib:libKF6WidgetsAddons$secondaryArchSuffix
lib:libKF6XmlGui$secondaryArchSuffix
# Qt6
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Network$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:libQt6Xml$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libkomparediff2$secondaryArchSuffix >= 6
# KF6
extra_cmake_modules$secondaryArchSuffix
devel:libKF6Codecs$secondaryArchSuffix
devel:libKF6ConfigCore$secondaryArchSuffix
devel:libKF6CoreAddons$secondaryArchSuffix
devel:libKF6GuiAddons$secondaryArchSuffix
devel:libKF6I18n$secondaryArchSuffix
devel:libKF6IconThemes$secondaryArchSuffix
devel:libKF6JobWidgets$secondaryArchSuffix
devel:libKF6Parts$secondaryArchSuffix
devel:libKF6TextEditor$secondaryArchSuffix
devel:libKF6WidgetsAddons$secondaryArchSuffix
devel:libKF6XmlGui$secondaryArchSuffix
# Qt6
devel:libQt6Core$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:msgfmt$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
"
PATCH()
{
# disable docs generation
sed -e 's|DocTools||' -i CMakeLists.txt
sed -e '/add_subdirectory(doc)/ s/^#*/#/' -i CMakeLists.txt
sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt
}
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$appsDir \
-DCMAKE_SKIP_RPATH=YES \
-DBUILD_TESTING=OFF \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# cleanup
rm -rf $dataDir/{applications,icons,kio,metainfo} $developDir
mkdir -p $prefix/bin
mv $appsDir/kompare $appsDir/Kompare
ln -s $appsDir/Kompare $prefix/bin/kompare
local APP_SIGNATURE="application/x-vnd.kde-kompare"
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/kompare.rdef.in > kompare.rdef
addResourcesToBinaries kompare.rdef $appsDir/Kompare
addAppDeskbarSymlink $appsDir/Kompare
}