From bd45792828012ee549dffcc033054a23cd27f481 Mon Sep 17 00:00:00 2001 From: psykose Date: Mon, 26 Jun 2023 13:24:42 +0000 Subject: [PATCH] testing/qownnotes: upgrade to 23.6.6 --- testing/qownnotes/APKBUILD | 55 +++++++++++++++++++++---------- testing/qownnotes/botan.patch | 17 ++++++++++ testing/qownnotes/exclude.patch | 31 +++++++++++++++++ testing/qownnotes/md4c.patch | 15 +++++++++ testing/qownnotes/no-werror.patch | 12 +++++++ 5 files changed, 112 insertions(+), 18 deletions(-) create mode 100644 testing/qownnotes/botan.patch create mode 100644 testing/qownnotes/exclude.patch create mode 100644 testing/qownnotes/md4c.patch create mode 100644 testing/qownnotes/no-werror.patch diff --git a/testing/qownnotes/APKBUILD b/testing/qownnotes/APKBUILD index e5708949be2..a057768e1de 100644 --- a/testing/qownnotes/APKBUILD +++ b/testing/qownnotes/APKBUILD @@ -1,17 +1,33 @@ # Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=qownnotes -pkgver=22.8.4 +pkgver=23.6.6 pkgrel=0 pkgdesc="Plain-text file markdown note taking with Nextcloud/ownCloud integration" url="https://www.qownnotes.org/" arch="all !ppc64le !s390x !armhf" # armhf blocked by qt5-qtdeclarative license="GPL-2.0-only" -makedepends="qt5-qtdeclarative-dev qt5-qtsvg-dev qt5-qtxmlpatterns-dev - qt5-qttools-dev qt5-qtbase-dev qt5-qtwebsockets-dev botan-dev - qt5-qtx11extras-dev" +makedepends=" + botan-dev + cmake + md4c-dev + qt5-qtbase-dev + qt5-qtdeclarative-dev + qt5-qtsvg-dev + qt5-qttools-dev + qt5-qtwebsockets-dev + qt5-qtx11extras-dev + qt5-qtxmlpatterns-dev + samurai + " subpackages="$pkgname-lang" -source="https://download.tuxfamily.org/qownnotes/src/qownnotes-$pkgver.tar.xz" +source="https://download.tuxfamily.org/qownnotes/src/qownnotes-$pkgver.tar.xz + botan.patch + exclude.patch + md4c.patch + no-werror.patch + " +options="!check" # no tests prepare() { default_prepare @@ -19,19 +35,16 @@ prepare() { } build() { - /usr/lib/qt5/bin/qmake \ - QMAKE_CFLAGS_RELEASE="$CFLAGS" \ - QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS" \ - QMAKE_LFLAGS_RELEASE="$LDFLAGS" - make -} - -check() { - make check + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=None \ + -DBUILD_WITH_SYSTEM_BOTAN=ON + cmake --build build } package() { - install -D -m755 QOwnNotes "$pkgdir/usr/bin/QOwnNotes" + DESTDIR="$pkgdir" cmake --install build + install -D -m755 build/QOwnNotes "$pkgdir/usr/bin/QOwnNotes" install -D -m644 PBE.QOwnNotes.desktop "$pkgdir/usr/share/applications/PBE.QOwnNotes.desktop" install -D -m644 "images/icons/128x128/apps/QOwnNotes.png" "$pkgdir/usr/share/pixmaps/QOwnNotes.png" for format in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256 512x512 ; do @@ -40,10 +53,16 @@ package() { } lang() { - install -d "$subpkgdir/usr/share/QOwnNotes/languages/" - install -D -m644 "$builddir"/languages/*.qm "$subpkgdir/usr/share/QOwnNotes/languages/" + pkgdesc="Translations for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel lang" + + amove usr/share/qt5/translations } sha512sums=" -57f10786a2bb107172c3797e561b0885c9a916f1a6c4233c1672929ae3438c7796b6e7b62d3e32a4c29ecd38587ac31352db872ff5c88a503b0725f04145fc64 qownnotes-22.8.4.tar.xz +c64460a92dd4d250d69dacecc7d6f74c248c51909cfec19603e56ee12fea77de86ad38155cee5d3e48bf52422f3f7e3efe1aaa03c8260f35d901350d2094ac8e qownnotes-23.6.6.tar.xz +81b3171f826a310be0e78e56f9f9780a226b4aea5a81ddd7d3cdc90e3a6d460c242a20766e4db72df1b0a6a99edced04f85f2fa3d939e5f7969a624044365e33 botan.patch +4fe0cb83bc32b3fdbd31ed97a1c228a558579daabb0a5aee7c2b6a357256e04fc90cdbf7dde8897670130737bda5db2de0db664f1c1407875b2012f22ec038be exclude.patch +f8a279b4485aad1649cb1941761cec385be035affd8acc71b071f368461593dfe787c8fc7080d9e0b18b5dceac2a897a0b4f8e8345d6f6301a244ed4c14386ff md4c.patch +4129d840d17046015947c55c382db26938bfa4605a8737d69161eff6e44adaa06cd8c908e411f754595fe204e46a801ec1e8dc79121eab62dfd631ff6998fce9 no-werror.patch " diff --git a/testing/qownnotes/botan.patch b/testing/qownnotes/botan.patch new file mode 100644 index 00000000000..cb01653cdf8 --- /dev/null +++ b/testing/qownnotes/botan.patch @@ -0,0 +1,17 @@ +link to system botan +-- +diff --git a/libraries/botan/CMakeLists.txt b/libraries/botan/CMakeLists.txt +index 4836a38..97ad24a 100644 +--- a/libraries/botan/CMakeLists.txt ++++ b/libraries/botan/CMakeLists.txt +@@ -18,7 +18,9 @@ target_link_libraries(botan PUBLIC Qt5::Core) + target_include_directories(botan PUBLIC ${CMAKE_CURRENT_LIST_DIR}) + + if(BUILD_WITH_SYSTEM_BOTAN) +- find_package(Botan2 REQUIRED) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(Botan2 REQUIRED botan-2 IMPORTED_TARGET) ++ add_library(Botan2::Botan2 ALIAS PkgConfig::Botan2) + if(NOT TARGET Botan2::Botan2) + message(FATAL_ERROR "Could not find system Botan 2 library using PkgConfig") + endif() diff --git a/testing/qownnotes/exclude.patch b/testing/qownnotes/exclude.patch new file mode 100644 index 00000000000..1a5fb36c69a --- /dev/null +++ b/testing/qownnotes/exclude.patch @@ -0,0 +1,31 @@ +prevent install of a bunch of useless stuff that is already linked in +-- +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d41d0c..d42ab53 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -56,20 +56,20 @@ set(BUILD_SHARED_LIBS OFF) + # Disable building tests inside QHotKey library + set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + set(QHOTKEY_EXAMPLES OFF) +-add_subdirectory(libraries/qhotkey) ++add_subdirectory(libraries/qhotkey EXCLUDE_FROM_ALL) + + # FakeVim library + set(CREATE_STATIC_LIBRARY ON) + if(MSVC) + add_compile_definitions(FAKEVIM_STATIC_DEFINE QTCREATOR_UTILS_STATIC_LIB) + endif() +-add_subdirectory(libraries/fakevim) +-add_subdirectory(libraries/diff_match_patch) ++add_subdirectory(libraries/fakevim EXCLUDE_FROM_ALL) ++add_subdirectory(libraries/diff_match_patch EXCLUDE_FROM_ALL) + + option(USE_QLITE_HTML "Build using QLiteHtml for preview" OFF) + if (USE_QLITEHTML) + add_definitions(-DUSE_QLITEHTML=1) +- add_subdirectory(libraries/qlitehtml) ++ add_subdirectory(libraries/qlitehtml EXCLUDE_FROM_ALL) + endif() + + diff --git a/testing/qownnotes/md4c.patch b/testing/qownnotes/md4c.patch new file mode 100644 index 00000000000..712037b5751 --- /dev/null +++ b/testing/qownnotes/md4c.patch @@ -0,0 +1,15 @@ +link to system md4c +-- +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1f82fe7..77fa2a8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,7 +8,7 @@ include_directories(libraries/sonnet/src/core) + #some hunspell settings for windows + include(libraries/sonnet/src/plugins/hunspell/hunspell/CMakeLists.txt) + +-add_subdirectory(libraries/md4c) ++find_package(md4c) + + add_executable(QOwnNotes "") + diff --git a/testing/qownnotes/no-werror.patch b/testing/qownnotes/no-werror.patch new file mode 100644 index 00000000000..71bf869aeee --- /dev/null +++ b/testing/qownnotes/no-werror.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d41d0c..1f82fe7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,6 @@ if (UNIX) + # enable werror on linux + if (NOT APPLE) + message("Werror enabled on linux") +- target_compile_options(QOwnNotes PRIVATE -Werror) + endif() + endif() +