mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
157 lines
4.6 KiB
Bash
157 lines
4.6 KiB
Bash
SUMMARY="Japanese reference/study tool"
|
|
DESCRIPTION="Kiten is a Japanese reference and study tool. It features an English to Japanese and \
|
|
Japanese to English dictionary, as well as a Kanji dictionary. For the Kanji dictionary there are \
|
|
multiple ways supported to look up characters."
|
|
HOMEPAGE="https://apps.kde.org/kiten"
|
|
COPYRIGHT="2010-2025 KDE Organisation"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/kiten-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="98563b39feae0be033a0f33bb426379dd89ff2b3d37209eebdb5594990ba9982"
|
|
SOURCE_DIR="kiten-$portVersion"
|
|
ADDITIONAL_FILES="kiten.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="6.6.0"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
kiten$secondaryArchSuffix = $portVersion
|
|
app:Kiten = $portVersion
|
|
cmd:kitenkanjibrowser = $portVersion
|
|
cmd:kitenradselect = $portVersion
|
|
lib:libkiten$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libGL$secondaryArchSuffix
|
|
# KF6
|
|
lib:libKF6Archive$secondaryArchSuffix
|
|
lib:libKF6ColorScheme$secondaryArchSuffix
|
|
lib:libKF6Completion$secondaryArchSuffix
|
|
lib:libKF6ConfigCore$secondaryArchSuffix
|
|
lib:libKF6ConfigWidgets$secondaryArchSuffix
|
|
lib:libKF6CoreAddons$secondaryArchSuffix
|
|
lib:libKF6Crash$secondaryArchSuffix
|
|
lib:libKF6GuiAddons$secondaryArchSuffix
|
|
lib:libKF6I18n$secondaryArchSuffix
|
|
lib:libKF6KIOCore$secondaryArchSuffix
|
|
lib:libKF6WidgetsAddons$secondaryArchSuffix
|
|
lib:libKF6XmlGui$secondaryArchSuffix
|
|
# Qt6
|
|
lib:libQt6Core$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
kiten${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libkiten$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
kiten$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
# KF6
|
|
extra_cmake_modules$secondaryArchSuffix
|
|
devel:libKF6Archive$secondaryArchSuffix
|
|
devel:libKF6Bookmarks$secondaryArchSuffix
|
|
devel:libKF6Codecs$secondaryArchSuffix
|
|
devel:libKF6ColorScheme$secondaryArchSuffix
|
|
devel:libKF6Completion$secondaryArchSuffix
|
|
devel:libKF6ConfigCore$secondaryArchSuffix
|
|
devel:libKF6ConfigWidgets$secondaryArchSuffix
|
|
devel:libKF6CoreAddons$secondaryArchSuffix
|
|
devel:libKF6Crash$secondaryArchSuffix
|
|
devel:libKF6GuiAddons$secondaryArchSuffix
|
|
devel:libKF6I18n$secondaryArchSuffix
|
|
devel:libKF6ItemViews$secondaryArchSuffix
|
|
devel:libKF6JobWidgets$secondaryArchSuffix
|
|
devel:libKF6KIOCore$secondaryArchSuffix
|
|
devel:libKF6Service$secondaryArchSuffix
|
|
devel:libKF6Solid$secondaryArchSuffix
|
|
devel:libKF6WidgetsAddons$secondaryArchSuffix
|
|
devel:libKF6WindowSystem$secondaryArchSuffix
|
|
devel:libKF6XmlGui$secondaryArchSuffix
|
|
# Qt6
|
|
devel:libQt6Core$secondaryArchSuffix
|
|
devel:libQt6Qml$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:msgfmt$secondaryArchSuffix
|
|
cmd:msgmerge$secondaryArchSuffix
|
|
cmd:pkg_config$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,metainfo}
|
|
|
|
mkdir -p $prefix/bin
|
|
mv $appsDir/kiten $appsDir/Kiten
|
|
mv $appsDir/kitenkanjibrowser $appsDir/"Kanji Browser"
|
|
mv $appsDir/kitenradselect $appsDir/"Radical Selector"
|
|
ln -s $appsDir/"Kanji Browser" $prefix/bin/kitenkanjibrowser
|
|
ln -s $appsDir/"Radical Selector" $prefix/bin/kitenradselect
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local APP_NAME="Kiten"
|
|
local LONG_INFO="$SUMMARY"
|
|
local APP_SIGNATURE="application/x-vnd.kde-kiten"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
-e "s|@APP_NAME@|$APP_NAME|" \
|
|
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
|
$portDir/additional-files/kiten.rdef.in > kiten.rdef
|
|
|
|
addResourcesToBinaries kiten.rdef $appsDir/Kiten
|
|
addResourcesToBinaries kiten.rdef $appsDir/"Kanji Browser"
|
|
addResourcesToBinaries kiten.rdef $appsDir/"Radical Selector"
|
|
addAppDeskbarSymlink $appsDir/Kiten
|
|
|
|
prepareInstalledDevelLib \
|
|
libkiten
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
|
|
make -C build test
|
|
}
|