mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
141 lines
4.3 KiB
Bash
141 lines
4.3 KiB
Bash
SUMMARY="Image optimizer to reduce the size of your images"
|
|
DESCRIPTION="Optimize your images with OptiImage, a useful image compressor that supports PNG, \
|
|
JPEG, WebP and SVG file types.
|
|
|
|
It supports both lossless and lossy compression modes with an option whether to keep or not \
|
|
metadata of images. It additionally has a safe mode, where a new image is created instead of \
|
|
overwriting the old one.
|
|
|
|
It uses the following tools:
|
|
* oxipng for PNG images
|
|
* jpegoptim for JPEG images
|
|
* scour for SVG images
|
|
* cwebp for WebP images"
|
|
HOMEPAGE="https://apps.kde.org/optiimage/"
|
|
COPYRIGHT="2021-2023 Carl Schwan"
|
|
LICENSE="GNU LGPL v3"
|
|
REVISION="2"
|
|
SOURCE_URI="https://invent.kde.org/graphics/optiimage/-/archive/v$portVersion/optiimage-v$portVersion.tar.bz2"
|
|
CHECKSUM_SHA256="2706354278ab407ed013335c226b6058d36de230f816933d11d07c21c8593b48"
|
|
SOURCE_DIR="optiimage-v$portVersion"
|
|
PATCHES="optiimage-$portVersion.patchset"
|
|
ADDITIONAL_FILES="optiimage.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
optiimage$secondaryArchSuffix = $portVersion
|
|
app:OptiImage$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
qqc2_desktop_style6$secondaryArchSuffix
|
|
cmd:cwebp$secondaryArchSuffix
|
|
cmd:jpegoptim
|
|
cmd:oxipng
|
|
cmd:scour
|
|
lib:libGL$secondaryArchSuffix
|
|
lib:libKirigamiAddonsStatefulApp$secondaryArchSuffix
|
|
lib:libQCoro6Core$secondaryArchSuffix
|
|
# KF6
|
|
lib:libKF6Bookmarks$secondaryArchSuffix
|
|
lib:libKF6Completion$secondaryArchSuffix
|
|
lib:libKF6ConfigCore$secondaryArchSuffix
|
|
lib:libKF6CoreAddons$secondaryArchSuffix
|
|
lib:libKF6Crash$secondaryArchSuffix
|
|
lib:libKF6I18n$secondaryArchSuffix
|
|
lib:libKF6IconThemes$secondaryArchSuffix
|
|
lib:libKF6ItemViews$secondaryArchSuffix
|
|
lib:libKF6KIOCore$secondaryArchSuffix
|
|
lib:libKF6JobWidgets$secondaryArchSuffix
|
|
lib:libKF6Service$secondaryArchSuffix
|
|
lib:libKF6Solid$secondaryArchSuffix
|
|
lib:libKF6WidgetsAddons$secondaryArchSuffix
|
|
# Qt6
|
|
lib:libQt6Core$secondaryArchSuffix
|
|
lib:libQt6Gui$secondaryArchSuffix
|
|
lib:libQt6Network$secondaryArchSuffix
|
|
lib:libQt6Qml$secondaryArchSuffix
|
|
lib:libQt6Quick$secondaryArchSuffix
|
|
lib:libQt6OpenGL$secondaryArchSuffix
|
|
lib:libQt6Svg$secondaryArchSuffix
|
|
lib:libQt6Widgets$secondaryArchSuffix
|
|
lib:libQt6Xml$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libKirigamiAddonsStatefulApp$secondaryArchSuffix
|
|
devel:libQCoro6Core$secondaryArchSuffix
|
|
# KF6
|
|
extra_cmake_modules$secondaryArchSuffix
|
|
devel:libKF6Bookmarks$secondaryArchSuffix
|
|
devel:libKF6Completion$secondaryArchSuffix
|
|
devel:libKF6ConfigCore$secondaryArchSuffix
|
|
devel:libKF6CoreAddons$secondaryArchSuffix
|
|
devel:libKF6Crash$secondaryArchSuffix
|
|
devel:libKF6I18n$secondaryArchSuffix
|
|
devel:libKF6IconThemes$secondaryArchSuffix
|
|
devel:libKF6ItemViews$secondaryArchSuffix
|
|
devel:libKF6JobWidgets$secondaryArchSuffix
|
|
devel:libKF6KIOCore$secondaryArchSuffix
|
|
devel:libKF6Service$secondaryArchSuffix
|
|
devel:libKF6Solid$secondaryArchSuffix
|
|
devel:libKF6WidgetsAddons$secondaryArchSuffix
|
|
devel:libKF6WindowSystem$secondaryArchSuffix
|
|
devel:libKirigamiPlatform$secondaryArchSuffix
|
|
# Qt6
|
|
devel:libQt6Core$secondaryArchSuffix
|
|
devel:libQt6Qml$secondaryArchSuffix
|
|
devel:libQt6Svg$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:msgmerge$secondaryArchSuffix
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_INSTALL_BINDIR=$appsDir \
|
|
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
|
|
-Wno-dev
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
mv $appsDir/optiimage $appsDir/OptiImage
|
|
|
|
# cleanup
|
|
rm -rf $dataDir/{applications,metainfo}
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local APP_NAME="OptiImage"
|
|
local LONG_INFO="$SUMMARY"
|
|
local APP_SIGNATURE="application/x-vnd.optiimage"
|
|
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/optiimage.rdef.in > optiimage.rdef
|
|
|
|
addResourcesToBinaries optiimage.rdef $appsDir/OptiImage
|
|
addAppDeskbarSymlink $appsDir/OptiImage
|
|
}
|