[arch-commits] Commit in (6 files)
David Runge
dvzrv at gemini.archlinux.org
Sun Dec 19 15:25:16 UTC 2021
Date: Sunday, December 19, 2021 @ 15:25:15
Author: dvzrv
Revision: 1079048
Add function2 as dependency for yabridge.
Added:
function2/
function2/repos/
function2/trunk/
function2/trunk/PKGBUILD
function2/trunk/function2-4.2.0-skip_docs.patch
function2/trunk/function2-4.2.0-system_gtest.patch
------------------------------------+
PKGBUILD | 47 +++++++++++++++++++++++++++++++++++
function2-4.2.0-skip_docs.patch | 12 ++++++++
function2-4.2.0-system_gtest.patch | 20 ++++++++++++++
3 files changed, 79 insertions(+)
Added: function2/trunk/PKGBUILD
===================================================================
--- function2/trunk/PKGBUILD (rev 0)
+++ function2/trunk/PKGBUILD 2021-12-19 15:25:15 UTC (rev 1079048)
@@ -0,0 +1,47 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=function2
+pkgver=4.2.0
+pkgrel=1
+pkgdesc="An improved drop-in replacement to std::function"
+arch=(any)
+url="https://naios.github.io/function2/"
+license=(Boost)
+makedepends=(cmake gtest)
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/Naios/${pkgname}/archive/refs/tags/${pkgver}.tar.gz"
+ "$pkgname-4.2.0-system_gtest.patch"
+ "$pkgname-4.2.0-skip_docs.patch"
+)
+sha512sums=('c7e62a9d5c8d98a5ef82bb9a94c3bd6e72c845f732ab42eee734903ee23634cb39b04264f5cf33b0e1c3449d5a89fbab75c29e14426a1d78ed210b4d035c0951'
+ 'fe7e5802dc150d415b43fecaf88d1fae3c38389844135bb20d66a577aa24d811ab9be9d662dcc03504eff77a54f2a42ba3516ae0f7d4ec552db39de78b7b1df1'
+ 'fec342025298f2a74e1b1daf381ff80b13cdc6238577379a1d805f3e38e26c8d40a24e7894d943fcb1a1dd27dafb22b521c8e6847e0d155400871bcec0e15681')
+b2sums=('56758847676163da4a5d9650f53ead7ede3d1e2d8c822d53672237414b30498ed4c60f30d52247a88552fac72e1877e1e42ea1eadb48597993eb859b4b78dd4a'
+ 'ec067d26551b1139acd133b04bf89a67d314e21025e39b38d9bdc134ba50eb58f8903eb6668a487bf07f29e308bd9b55a7aed90befbed06f48eaf020245a4535'
+ '83f7efdbaa4032716cc6a3718c8c6a1028961862c1305ebd39c2665da705fbe2ed66cd9d1806697436bdbedc2e60aa86403547e7f47fb1edfe01361253e36b20')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ # use the system installed gtest
+ patch -Np1 -i ../"$pkgname-4.2.0-system_gtest.patch"
+ # skip installing docs (to a wrong location)
+ patch -Np1 -i ../"$pkgname-4.2.0-skip_docs.patch"
+}
+
+build() {
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=None \
+ -Wno-dev \
+ -B build \
+ -S "$pkgname-$pkgver"
+ make VERBOSE=1 -C build
+}
+
+check() {
+ make VERBOSE=1 -k test -C build
+}
+
+package() {
+ make VERBOSE=1 DESTDIR="$pkgdir/" install -C build
+ install -vDm 644 "$pkgname-$pkgver/Readme.md" -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
Added: function2/trunk/function2-4.2.0-skip_docs.patch
===================================================================
--- function2/trunk/function2-4.2.0-skip_docs.patch (rev 0)
+++ function2/trunk/function2-4.2.0-skip_docs.patch 2021-12-19 15:25:15 UTC (rev 1079048)
@@ -0,0 +1,12 @@
+diff -ruN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2021-06-16 19:21:46.000000000 +0200
++++ b/CMakeLists.txt 2021-12-19 16:09:47.936130466 +0100
+@@ -45,8 +45,6 @@
+ # Headers and license files
+ install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/function2"
+ DESTINATION "include")
+- install(FILES "LICENSE.txt" DESTINATION .)
+- install(FILES "Readme.md" DESTINATION .)
+
+ # Config.cmake
+ write_basic_package_version_file(
Added: function2/trunk/function2-4.2.0-system_gtest.patch
===================================================================
--- function2/trunk/function2-4.2.0-system_gtest.patch (rev 0)
+++ function2/trunk/function2-4.2.0-system_gtest.patch 2021-12-19 15:25:15 UTC (rev 1079048)
@@ -0,0 +1,20 @@
+diff -ruN a/test/CMakeLists.txt b/test/CMakeLists.txt
+--- a/test/CMakeLists.txt 2021-06-16 19:21:46.000000000 +0200
++++ b/test/CMakeLists.txt 2021-12-19 16:06:28.983252614 +0100
+@@ -1,12 +1,12 @@
+ add_library(gtest STATIC
+- "${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/src/gtest-all.cc"
+- "${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/src/gtest_main.cc")
++ "/usr/src/googletest/src/gtest-all.cc"
++ "/usr/src/googletest/src/gtest_main.cc")
+
+ target_include_directories(gtest
+ PRIVATE
+- "${CMAKE_CURRENT_LIST_DIR}/googletest/googletest"
++ "/usr/src/googletest"
+ PUBLIC
+- "${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/include")
++ "/usr/include/gtest")
+
+ target_compile_definitions(gtest
+ PUBLIC
More information about the arch-commits
mailing list