From b8767f8de5df449caff669ebce09f016f613d72f Mon Sep 17 00:00:00 2001 From: fossdd Date: Sat, 15 Jun 2024 10:14:07 +0000 Subject: [PATCH] testing/zint: new aport --- testing/zint/APKBUILD | 62 ++++++++++++++++++++++++++++++ testing/zint/no-rpath.patch | 27 +++++++++++++ testing/zint/shared-libqzint.patch | 14 +++++++ 3 files changed, 103 insertions(+) create mode 100644 testing/zint/APKBUILD create mode 100644 testing/zint/no-rpath.patch create mode 100644 testing/zint/shared-libqzint.patch diff --git a/testing/zint/APKBUILD b/testing/zint/APKBUILD new file mode 100644 index 00000000000..3d47c1d6a36 --- /dev/null +++ b/testing/zint/APKBUILD @@ -0,0 +1,62 @@ +# Contributor: fossdd +# Maintainer: fossdd +pkgname=zint +pkgver=2.13.0 +pkgrel=0 +pkgdesc="Barcode encoding library supporting over 50 symbologies" +url="https://zint.org.uk/" +arch="all" +license="GPL-3.0-or-later" +makedepends=" + cmake + ninja + qt6-qtsvg-dev + qt6-qttools-dev + " +subpackages=" + $pkgname-qt + $pkgname-dev + $pkgname-doc + " +source="https://downloads.sourceforge.net/zint/zint-$pkgver-src.tar.gz + no-rpath.patch + shared-libqzint.patch + " +builddir="$srcdir/$pkgname-$pkgver-src" +options="!check" # tests fail + +build() { + CMAKE_PREFIX_PATH="6.0.0" \ + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_QT6=ON \ + -DZINT_TEST="$(want_check && echo ON || echo OFF)" + + cmake --build build +} + +check() { + cmake --build build --target test +} + +package() { + DESTDIR="$pkgdir" cmake --install build +} + +qt() { + pkgdesc="Zint Barcode Studio GUI" + depends="hicolor-icon-theme" + + amove usr/bin/zint-qt + amove usr/include/qzint.h + amove usr/lib/libQZint.so* + + install -Dm644 "$builddir"/zint-qt.desktop "$subpkgdir"/usr/share/applications/zint-qt.desktop + install -Dm644 "$builddir"/zint-qt.png "$subpkgdir"/usr/share/icons/hicolor/48x48/apps/zint-qt.png +} + +sha512sums=" +8dacd8088ab9c99ea64bf1aa49b618251d1e2d49382817d536a824ef25d9e8f0e2d8dbd0baa5dc1b4945dbede83d1af08e9f317107b1356a3ceb382acb6dd8c2 zint-2.13.0-src.tar.gz +20e500a2ee201742fd9924548d845a70cb250eab33f6de8f796e288cd19096f7f955499559ff97b0025b23f78d233875a5348be447bde18d6c98db3bcb72fa5e no-rpath.patch +11011523e7a130d59e1a7061ab17c394119194f9490fc3b9870b30344916138eca5dc9c4c0f38357364093bf4f50c78d143df7f344f6d190c00e9f0a16aa8c7b shared-libqzint.patch +" diff --git a/testing/zint/no-rpath.patch b/testing/zint/no-rpath.patch new file mode 100644 index 00000000000..4bee17b0b21 --- /dev/null +++ b/testing/zint/no-rpath.patch @@ -0,0 +1,27 @@ +Disable creation of rpath +--- +diff --git a/SetPaths.cmake b/SetPaths.cmake +index 310a4a6..61bfd45 100644 +--- a/SetPaths.cmake ++++ b/SetPaths.cmake +@@ -257,17 +257,5 @@ endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + + + +-# setup default RPATH/install_name handling, may be overridden by KDE4_HANDLE_RPATH_FOR_[LIBRARY|EXECUTABLE] +-# default is to build with RPATH for the install dir, so it doesn't need to relink +-if (UNIX) +- if (APPLE) +- set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) +- else (APPLE) +- # add our LIB_INSTALL_DIR to the RPATH and use the RPATH figured out by cmake when compiling +- set(CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR} ) +- set(CMAKE_SKIP_BUILD_RPATH TRUE) +- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +- endif (APPLE) +-endif (UNIX) ++ + +-- +2.45.0 diff --git a/testing/zint/shared-libqzint.patch b/testing/zint/shared-libqzint.patch new file mode 100644 index 00000000000..230e98294c8 --- /dev/null +++ b/testing/zint/shared-libqzint.patch @@ -0,0 +1,14 @@ +create shared libQZint instead of static one +--- +diff -r c65c3e1348ca backend_qt/CMakeLists.txt +--- a/backend_qt/CMakeLists.txt ++++ b/backend_qt/CMakeLists.txt +@@ -12,7 +12,7 @@ + qt5_wrap_cpp(QZint_SRCS qzint.h) + endif() + +-add_library(${PROJECT_NAME} STATIC ${QZint_SRCS}) ++add_library(${PROJECT_NAME} SHARED ${QZint_SRCS}) + + set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}" + VERSION ${ZINT_VERSION})