move prison to kde-frameworks (#9782)

This commit is contained in:
Schrijvers Luc
2023-11-22 16:48:32 +01:00
committed by GitHub
parent 9067e030de
commit 06e4f9156a

View File

@@ -1,84 +0,0 @@
SUMMARY="A Qt API for generating QRCode & DataMatrix barcodes"
DESCRIPTION="prison is a Qt-based barcode abstraction layer/library that \
provides uniform access to generation of barcodes with data. The API supports \
two types of barcodes: QRCode and DataMatrix."
HOMEPAGE="https://api.kde.org/frameworks/prison/html/index.html"
COPYRIGHT="2010-2022 KDE Foundations"
LICENSE="GNU LGPL v3"
REVISION="2"
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/prison-$portVersion.tar.xz"
CHECKSUM_SHA256="1f43de6622cf263c6b71f9a801174e2791c09b5a0d52c602715659ddfb82fb56"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/xdg/prison.categories keep-old
settings/xdg/prison.renamecategories keep-old
"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
prison$secondaryArchSuffix = $portVersion
lib:libkf5prison$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libdmtx$secondaryArchSuffix
lib:libqrencode$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
"
PROVIDES_devel="
prison${secondaryArchSuffix}_devel = $portVersion
devel:libkf5prison$secondaryArchSuffix = $libVersion
"
REQUIRES_devel="
prison$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix >= 5.65
devel:libdmtx$secondaryArchSuffix
devel:libqrencode$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix >= 5.8
devel:libQt5Gui$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
PATCH()
{
sed -e '/platforms:/ a \ \ \ \ - name: Haiku' -i $sourceDir/metainfo.yaml
}
BUILD()
{
constantSystemDataDir="`finddir B_SYSTEM_DATA_DIRECTORY`"
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
-DECM_DIR="$constantSystemDataDir"/cmake/Modules/ECM/cmake \
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DCMAKE_INSTALL_LIBDIR:PATH=$libDir \
-DCMAKE_INSTALL_INCLUDEDIR:PATH=$includeDir \
-DKDE_INSTALL_LOGGINGCATEGORIESDIR=$settingsDir/xdg
make -C build
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libKF5Prison
packageEntries devel \
$libDir/cmake \
$dataDir \
$developDir
}