aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Ahouansou <matthias@ahouansou.cz>2024-01-19 11:30:03 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2024-02-05 16:23:09 +0000
commit8cfe485bd988de961fd61da2d71c5687dc3f7d3b (patch)
tree8d4cc430bdea99a14b69ee1301b35264e8e55774
parent22d289971ba96a16817d7949672b07e337f44f14 (diff)
testing/contour: new aport
-rw-r--r--testing/contour/APKBUILD82
-rw-r--r--testing/contour/libunicode-fix-catch-in-cmake.patch19
2 files changed, 101 insertions, 0 deletions
diff --git a/testing/contour/APKBUILD b/testing/contour/APKBUILD
new file mode 100644
index 00000000000..288b1c7cc54
--- /dev/null
+++ b/testing/contour/APKBUILD
@@ -0,0 +1,82 @@
+# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
+# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
+pkgname=contour
+pkgver=0.4.3.6442
+pkgrel=0
+pkgdesc="Modern C++ Terminal Emulator"
+url="https://contour-terminal.org"
+arch="x86_64 " # aarch64 fails due to QOpenGLFunctions_3_3_Core, rest lack libunicode
+license="Apache-2.0"
+makedepends="
+ boxed-cpp-dev
+ catch2-3
+ cmake
+ extra-cmake-modules
+ fmt-dev
+ harfbuzz-dev
+ libunicode-dev
+ libutempter-dev
+ libxcb-dev
+ msgsl
+ ncurses
+ ninja
+ qt6-qt5compat-dev
+ qt6-qtbase-dev
+ qt6-qtdeclarative-dev
+ qt6-qtmultimedia-dev
+ range-v3-dev
+ yaml-cpp-dev
+"
+subpackages="
+ $pkgname-doc
+ $pkgname-fish-plugin:_fish:noarch
+ $pkgname-zsh-plugin:_zsh:noarch
+"
+source="$pkgname-$pkgver.tar.gz::https://github.com/contour-terminal/contour/archive/refs/tags/v$pkgver.tar.gz"
+
+build() {
+ cmake -B build -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCONTOUR_QT_VERSION=6 \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCONTOUR_INSTALL_TOOLS=ON \
+ -DCONTOUR_TESTING=ON \
+ -DCRISPY_TESTING=ON \
+ -DLIBTERMINAL_TESTING=ON
+ cmake --build build
+}
+
+check() {
+ ctest --test-dir build -C Release --output-on-failure
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+
+ rm "$pkgdir"/usr/share/contour/README.md "$pkgdir"/usr/share/contour/shell-integration/shell-integration.tcsh
+
+ mkdir -p "$pkgdir"/usr/share/licenses/"$pkgname"
+ mv "$pkgdir"/usr/share/contour/LICENSE.txt "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
+}
+
+_fish() {
+ pkgdesc="$pkgdesc (fish integration)"
+ depends="$pkgname=$pkgver-r$pkgrel"
+ install_if="$pkgname=$pkgver-r$pkgrel fish"
+
+ mkdir -p "$subpkgdir"/usr/share/fish/plugins/"$pkgname"
+ mv "$pkgdir"/usr/share/contour/shell-integration/shell-integration.fish "$subpkgdir"/usr/share/fish/plugins/"$pkgname"/contour.plugin.fish
+}
+
+_zsh() {
+ pkgdesc="$pkgdesc (zsh integration)"
+ depends="$pkgname=$pkgver-r$pkgrel"
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+
+ mkdir -p "$subpkgdir"/usr/share/zsh/plugins/"$pkgname"
+ mv "$pkgdir"/usr/share/contour/shell-integration/shell-integration.zsh "$subpkgdir"/usr/share/zsh/plugins/"$pkgname"/contour.plugin.zsh
+}
+
+sha512sums="
+f0a91fbd5abefbbac0f785bb8f454759568e3daadbad6ff1ade00fccf8b0af94f16747816598c706a698d65ce884a2e9499512942e6f22263ebc654ae6fb6879 contour-0.4.3.6442.tar.gz
+"
diff --git a/testing/contour/libunicode-fix-catch-in-cmake.patch b/testing/contour/libunicode-fix-catch-in-cmake.patch
new file mode 100644
index 00000000000..4bf665cf3e7
--- /dev/null
+++ b/testing/contour/libunicode-fix-catch-in-cmake.patch
@@ -0,0 +1,19 @@
+diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt
+index 6c5ac20..9fa13a3 100644
+--- a/src/libunicode/CMakeLists.txt
++++ b/src/libunicode/CMakeLists.txt
+@@ -223,10 +223,10 @@ if(LIBUNICODE_TESTING)
+ # supress conversion warnings for Catch2
+ # https://github.com/catchorg/Catch2/issues/2583
+ # https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22
+- set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
+- set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
+- get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
+- target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
++ # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
++ # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
++ # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
++ # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
+
+ target_link_libraries(unicode_test unicode Catch2::Catch2WithMain fmt::fmt-header-only)
+ add_test(unicode_test unicode_test)