mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
* use official source uri * fix Qt plugins dir * fix mkspecs dir * fix lib version compat * remove mime cache files (!) * use system color theme * add new icon
247 lines
8.1 KiB
Bash
247 lines
8.1 KiB
Bash
SUMMARY="Hex editor based on KDE Frameworks"
|
|
DESCRIPTION="Okteta is a simple editor for the raw data of files.
|
|
|
|
Features:
|
|
* Values and characters shown either in two columns (the traditional display in hex editors) or \
|
|
in rows with the value on top of the character
|
|
* Editing and navigating similar to a text editor
|
|
* Customizable data views, with loadable and storable profiles
|
|
* Tools dockable on all sides or floating
|
|
* Numerical encodings: Hexadecimal, Decimal, Octal, Binary
|
|
* Character encodings: All 8-bit encodings as supplied by Qt, EBCDIC
|
|
* Fast data rendering on screen
|
|
* Multiple open files
|
|
* Undo/redo support
|
|
* Structures tool for analyzing and editing based on user-creatable structure definitions"
|
|
HOMEPAGE="https://apps.kde.org/okteta/"
|
|
COPYRIGHT="2010-2022 KDE Organisation"
|
|
LICENSE="GNU GPL v2
|
|
GNU GPL v3"
|
|
REVISION="2"
|
|
SOURCE_URI="https://download.kde.org/stable/okteta/$portVersion/src/okteta-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="f123b55690d6cf5f547e9a5db738a26729a82e7bd02cc0002238ce4d9fd530e3"
|
|
SOURCE_DIR="okteta-$portVersion"
|
|
PATCHES="okteta-$portVersion.patchset"
|
|
ADDITIONAL_FILES="okteta.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
GLOBAL_WRITABLE_FILES="
|
|
settings/xdg/okteta-structures.knsrc keep-old
|
|
"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
okteta$secondaryArchSuffix = $portVersion
|
|
app:Okteta$secondaryArchSuffix = $portVersion
|
|
cmd:struct2osd$commandSuffix = $portVersion
|
|
lib:libKasten4Controllers$secondaryArchSuffix = 0.4.1 compat >= 0.4
|
|
lib:libKasten4Core$secondaryArchSuffix = 0.4.1 compat >= 0.4
|
|
lib:libKasten4Gui$secondaryArchSuffix = 0.4.1 compat >= 0.4
|
|
lib:libKasten4Okteta2Controllers$secondaryArchSuffix = 0.4.0 compat >= 0.4
|
|
lib:libKasten4Okteta2Core$secondaryArchSuffix = 0.4.0 compat >= 0.4
|
|
lib:libKasten4Okteta2Gui$secondaryArchSuffix = 0.4.0 compat >= 0.4
|
|
lib:libOkteta3Core$secondaryArchSuffix = 0.10.0 compat >= 0.10
|
|
lib:libOkteta3Gui$secondaryArchSuffix = 0.10.0 compat >= 0.10
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libKF5Attica$secondaryArchSuffix
|
|
lib:libKF5Auth$secondaryArchSuffix
|
|
lib:libKF5Bookmarks$secondaryArchSuffix
|
|
lib:libKF5Codecs$secondaryArchSuffix
|
|
lib:libKF5Completion$secondaryArchSuffix
|
|
lib:libKF5ConfigCore$secondaryArchSuffix
|
|
lib:libKF5ConfigWidgets$secondaryArchSuffix
|
|
lib:libKF5CoreAddons$secondaryArchSuffix
|
|
lib:libKF5Crash$secondaryArchSuffix
|
|
lib:libKF5DBusAddons$secondaryArchSuffix
|
|
lib:libKF5DocTools$secondaryArchSuffix
|
|
lib:libKF5I18n$secondaryArchSuffix
|
|
lib:libKF5IconThemes$secondaryArchSuffix
|
|
lib:libKF5ItemViews$secondaryArchSuffix
|
|
lib:libKF5JobWidgets$secondaryArchSuffix
|
|
lib:libKF5KCMUtils$secondaryArchSuffix
|
|
lib:libKF5KIOCore$secondaryArchSuffix
|
|
lib:libKF5NewStuff$secondaryArchSuffix
|
|
lib:libKF5NewStuffCore$secondaryArchSuffix
|
|
lib:libKF5Parts$secondaryArchSuffix
|
|
lib:libKF5Service$secondaryArchSuffix
|
|
lib:libKF5Solid$secondaryArchSuffix
|
|
lib:libKF5SonnetUi$secondaryArchSuffix
|
|
lib:libKF5TextWidgets$secondaryArchSuffix
|
|
lib:libKF5WidgetsAddons$secondaryArchSuffix
|
|
lib:libKF5WindowSystem$secondaryArchSuffix
|
|
lib:libKF5XmlGui$secondaryArchSuffix
|
|
lib:libqca$secondaryArchSuffix
|
|
lib:libQt5Core$secondaryArchSuffix
|
|
lib:libQt5DBus$secondaryArchSuffix
|
|
lib:libQt5Gui$secondaryArchSuffix
|
|
lib:libQt5Network$secondaryArchSuffix
|
|
lib:libQt5PrintSupport$secondaryArchSuffix
|
|
lib:libQt5Qml$secondaryArchSuffix
|
|
lib:libQt5Script$secondaryArchSuffix
|
|
lib:libQt5ScriptTools$secondaryArchSuffix
|
|
lib:libQt5Test$secondaryArchSuffix
|
|
lib:libQt5Widgets$secondaryArchSuffix
|
|
lib:libQt5Xml$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
extra_cmake_modules$secondaryArchSuffix >= 5.93
|
|
shared_mime_info$secondaryArchSuffix
|
|
devel:libKF5Attica$secondaryArchSuffix
|
|
devel:libKF5Auth$secondaryArchSuffix
|
|
devel:libKF5Bookmarks$secondaryArchSuffix
|
|
devel:libKF5Codecs$secondaryArchSuffix
|
|
devel:libKF5Completion$secondaryArchSuffix
|
|
devel:libKF5ConfigCore$secondaryArchSuffix
|
|
devel:libKF5ConfigWidgets$secondaryArchSuffix
|
|
devel:libKF5CoreAddons$secondaryArchSuffix
|
|
devel:libKF5Crash$secondaryArchSuffix
|
|
devel:libKF5DBusAddons$secondaryArchSuffix
|
|
devel:libKF5DocTools$secondaryArchSuffix
|
|
devel:libKF5I18n$secondaryArchSuffix
|
|
devel:libKF5IconThemes$secondaryArchSuffix
|
|
devel:libKF5ItemViews$secondaryArchSuffix
|
|
devel:libKF5JobWidgets$secondaryArchSuffix
|
|
devel:libKF5KCMUtils$secondaryArchSuffix
|
|
devel:libKF5KIOCore$secondaryArchSuffix
|
|
devel:libKF5NewStuff$secondaryArchSuffix
|
|
devel:libKF5NewStuffCore$secondaryArchSuffix
|
|
devel:libKF5Parts$secondaryArchSuffix
|
|
devel:libKF5Service$secondaryArchSuffix
|
|
devel:libKF5Solid$secondaryArchSuffix
|
|
devel:libKF5SonnetUi$secondaryArchSuffix
|
|
devel:libKF5TextWidgets$secondaryArchSuffix
|
|
devel:libKF5WidgetsAddons$secondaryArchSuffix
|
|
devel:libKF5WindowSystem$secondaryArchSuffix
|
|
devel:libKF5XmlGui$secondaryArchSuffix
|
|
devel:libqca$secondaryArchSuffix >= 2
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5DBus$secondaryArchSuffix
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
devel:libQt5Network$secondaryArchSuffix
|
|
devel:libQt5PrintSupport$secondaryArchSuffix
|
|
devel:libQt5Qml$secondaryArchSuffix
|
|
devel:libQt5Script$secondaryArchSuffix
|
|
devel:libQt5ScriptTools$secondaryArchSuffix
|
|
devel:libQt5Test$secondaryArchSuffix
|
|
devel:libQt5Widgets$secondaryArchSuffix
|
|
devel:libQt5Xml$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
okteta${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libKasten4Controllers$secondaryArchSuffix = 0.4.1 compat >= 0.4
|
|
devel:libKasten4Core$secondaryArchSuffix = 0.4.1 compat >= 0.4
|
|
devel:libKasten4Gui$secondaryArchSuffix = 0.4.1 compat >= 0.4
|
|
devel:libKasten4Okteta2Controllers$secondaryArchSuffix = 0.4.0 compat >= 0.4
|
|
devel:libKasten4Okteta2Core$secondaryArchSuffix = 0.4.0 compat >= 0.4
|
|
devel:libKasten4Okteta2Gui$secondaryArchSuffix = 0.4.0 compat >= 0.4
|
|
devel:libOkteta3Core$secondaryArchSuffix = 0.10.0 compat >= 0.10
|
|
devel:libOkteta3Gui$secondaryArchSuffix = 0.10.0 compat >= 0.10
|
|
"
|
|
REQUIRES_devel="
|
|
okteta$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:gettext
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:qdbuscpp2xml$secondaryArchSuffix >= 5
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
# disable docs generation
|
|
sed -e '/add_subdirectory( doc )/ s/^#*/#/' -i CMakeLists.txt
|
|
sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt
|
|
|
|
mkdir -p build
|
|
cd build
|
|
|
|
cmake .. \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=$appsDir \
|
|
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
|
|
-DCMAKE_INSTALL_DATAROOTDIR=$dataDir \
|
|
-DCMAKE_INSTALL_LIBDIR=$libDir \
|
|
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
|
-DSHARE_INSTALL_PREFIX=$dataDir \
|
|
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt5 \
|
|
-DKDE_INSTALL_QTPLUGINDIR=$addOnsDir/Qt5 \
|
|
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
|
|
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd build
|
|
make install
|
|
|
|
# move GUI to apps dir
|
|
mv $commandBinDir/okteta $appsDir/Okteta
|
|
|
|
# move xdg files to settings dir
|
|
mv $appsDir/etc/xdg $settingsDir
|
|
rm -rf $appsDir/etc
|
|
|
|
# cleanup
|
|
rm -rf $dataDir/{applications,config.kcfg,icons,metainfo}
|
|
rm -rf $dataDir/mime/{aliases,generic-icons,globs,globs2,icons,magic}
|
|
rm -rf $dataDir/mime/{mime.cache,subclasses,treemagic,types,version,XMLnamespaces}
|
|
|
|
fixPkgconfig
|
|
|
|
prepareInstalledDevelLibs \
|
|
libKasten4Controllers \
|
|
libKasten4Core \
|
|
libKasten4Gui \
|
|
libKasten4Okteta2Controllers \
|
|
libKasten4Okteta2Core \
|
|
libKasten4Okteta2Gui \
|
|
libOkteta3Core \
|
|
libOkteta3Gui
|
|
|
|
packageEntries devel \
|
|
$libDir/cmake \
|
|
$dataDir/Qt5 \
|
|
$developDir
|
|
|
|
local APP_SIGNATURE="application/x-vnd.kde-okteta"
|
|
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/okteta.rdef.in > okteta.rdef
|
|
|
|
addResourcesToBinaries okteta.rdef $appsDir/Okteta
|
|
addAppDeskbarSymlink $appsDir/Okteta
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd build
|
|
make test
|
|
}
|