Date: Monday, April 2, 2018 @ 11:27:25 Author: zorun Revision: 313855
archrelease: copy trunk to community-x86_64 Added: restbed/repos/community-x86_64/0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch (from rev 313854, restbed/trunk/0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch) restbed/repos/community-x86_64/PKGBUILD (from rev 313854, restbed/trunk/PKGBUILD) Deleted: restbed/repos/community-x86_64/PKGBUILD restbed/repos/community-x86_64/fix-cmake-catch-include.patch -----------------------------------------------------------------+ 0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch | 64 ++++++ PKGBUILD | 99 ++++------ fix-cmake-catch-include.patch | 12 - 3 files changed, 113 insertions(+), 62 deletions(-) Copied: restbed/repos/community-x86_64/0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch (from rev 313854, restbed/trunk/0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch) =================================================================== --- 0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch (rev 0) +++ 0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch 2018-04-02 11:27:25 UTC (rev 313855) @@ -0,0 +1,64 @@ +From 78a25164be8a15bf3d677ac0f1de402e15555377 Mon Sep 17 00:00:00 2001 +From: Baptiste Jonglez <g...@bitsofnetworks.org> +Date: Mon, 2 Apr 2018 12:40:34 +0200 +Subject: [PATCH] cmake: Auto-detect Catch dependency to decide whether to + enable tests + +This automatically enables or disables tests, depending on whether Catch +is found on the system. + +Of course, it is still possible to force building tests: + +* `-DBUILD_TESTS=OFF` will disable tests even if Catch is found +* `-DBUILD_TESTS=ON` will enable tests even if Catch is not found (mostly useful because it causes cmake to fail early) +--- + CMakeLists.txt | 8 +++++++- + cmake/modules/Findcatch.cmake | 9 ++------- + 2 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6cda77e..2679d5c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,6 @@ set( VERSION "${restbed_VERSION}" ) + # + option( BUILD_SHARED "Build shared library." OFF ) + option( BUILD_EXAMPLES "Build examples applications." OFF ) +-option( BUILD_TESTS "Build all available test suites." OFF ) + option( BUILD_SSL "Build secure socket layer support." ON ) + + # +@@ -39,6 +38,13 @@ if ( BUILD_SSL ) + include_directories( SYSTEM ${ssl_INCLUDE} ) + endif ( ) + ++find_package( catch ) ++if ( CATCH_FOUND ) ++ option( BUILD_TESTS "Build all available test suites." ON) ++else ( ) ++ option( BUILD_TESTS "Build all available test suites." OFF) ++endif ( ) ++ + # + # Build + # +diff --git a/cmake/modules/Findcatch.cmake b/cmake/modules/Findcatch.cmake +index c1fd84e..ed241ec 100644 +--- a/cmake/modules/Findcatch.cmake ++++ b/cmake/modules/Findcatch.cmake +@@ -2,10 +2,5 @@ + + find_path( catch_INCLUDE catch.hpp HINTS "${PROJECT_SOURCE_DIR}/dependency/catch/include" "/usr/include" "/usr/include/catch" "/usr/include/catch2" "/usr/local/include" "/usr/local/include/catch" "/usr/local/include/catch2" "/opt/local/include" "/opt/local/include/catch" "/opt/local/include/catch2" ) + +-if ( catch_INCLUDE ) +- set( CATCH_FOUND TRUE ) +- +- message( STATUS "${Green}Found Catch include at: ${catch_INCLUDE}${Reset}" ) +-else ( ) +- message( FATAL_ERROR "${Red}Failed to locate Catch dependency.${Reset}" ) +-endif ( ) ++include(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(catch DEFAULT_MSG catch_INCLUDE) +-- +2.16.3 + Deleted: PKGBUILD =================================================================== --- PKGBUILD 2018-04-02 11:27:02 UTC (rev 313854) +++ PKGBUILD 2018-04-02 11:27:25 UTC (rev 313855) @@ -1,50 +0,0 @@ -# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org> -# Contributor: Justin Wilcox <nat1192 at gmail dot com> -pkgname=restbed -pkgver=4.6+24+gb1f0182 -pkgrel=2 -pkgdesc="A framework for asynchronous RESTful functionality in C++11 applications" -arch=('x86_64') -url="https://github.com/Corvusoft/restbed" -license=('AGPL3') -depends=('openssl') -replaces=('restbed-latest') -conflicts=('restbed-latest') -makedepends=('cmake' 'asio' 'kashmir') -checkdepends=('catch2') -_commit=b1f0182c0ea74ea5e6dc08fd540462422fd0dc7f -source=("https://github.com/Corvusoft/restbed/archive/${_commit}/$pkgname-$pkgver.tar.gz" - "fix-cmake-catch-include.patch") -sha256sums=('fb7ee67eb36eb1297e18f6ada4ba3a6fa255a6c64ff4e70a1efef5ef76c484c9' - '9f0de7baf90cb00c02ba27fff893a4d343c46a729f85817871b71cc8f3533790') - -prepare() { - cd "$srcdir/$pkgname-$_commit" - patch -p1 < "$srcdir/fix-cmake-catch-include.patch" -} - -build() { - cd "$srcdir/$pkgname-$_commit" - - mkdir -p build - cd build - cmake .. \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_SHARED=on \ - -DBUILD_SSL=on \ - -DBUILD_TESTS=on - make -} - -check() { - cd "$srcdir/$pkgname-$_commit/build" - make test -} - -package() { - cd "$srcdir/$pkgname-$_commit" - - cd build/ - make DESTDIR="$pkgdir" install -} Copied: restbed/repos/community-x86_64/PKGBUILD (from rev 313854, restbed/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2018-04-02 11:27:25 UTC (rev 313855) @@ -0,0 +1,49 @@ +# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org> +# Contributor: Justin Wilcox <nat1192 at gmail dot com> +pkgname=restbed +pkgver=4.6+28+gc3a259b +pkgrel=1 +pkgdesc="A framework for asynchronous RESTful functionality in C++11 applications" +arch=('x86_64') +url="https://github.com/Corvusoft/restbed" +license=('AGPL3') +depends=('openssl') +replaces=('restbed-latest') +conflicts=('restbed-latest') +makedepends=('cmake' 'asio' 'kashmir') +checkdepends=('catch2') +_commit=c3a259ba047fa9f5b1c3b65a3ab9e21577bf8bcc +source=("https://github.com/Corvusoft/restbed/archive/${_commit}/$pkgname-$pkgver.tar.gz" + "0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch") +sha256sums=('e1438ce6718e34c0f89c3f02efde3c07df865b89209ae10cc1b5da9ee44b7701' + '6ddf6157135a8913332c583cf8297657be83f44dce52c25ed677cc611dfdf1e7') + +prepare() { + cd "$srcdir/$pkgname-$_commit" + patch -p1 < "$srcdir/0001-cmake-Auto-detect-Catch-dependency-to-decide-whether.patch" +} + +build() { + cd "$srcdir/$pkgname-$_commit" + + mkdir -p build + cd build + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED=on \ + -DBUILD_SSL=on + make +} + +check() { + cd "$srcdir/$pkgname-$_commit/build" + make test +} + +package() { + cd "$srcdir/$pkgname-$_commit" + + cd build/ + make DESTDIR="$pkgdir" install +} Deleted: fix-cmake-catch-include.patch =================================================================== --- fix-cmake-catch-include.patch 2018-04-02 11:27:02 UTC (rev 313854) +++ fix-cmake-catch-include.patch 2018-04-02 11:27:25 UTC (rev 313855) @@ -1,12 +0,0 @@ -diff --git a/cmake/modules/Findcatch.cmake b/cmake/modules/Findcatch.cmake -index eff91fe..15c7f87 100644 ---- a/cmake/modules/Findcatch.cmake -+++ b/cmake/modules/Findcatch.cmake -@@ -1,6 +1,6 @@ - # Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved. - --find_path( catch_INCLUDE catch.hpp HINTS "${PROJECT_SOURCE_DIR}/dependency/catch/include" "/usr/include" "/usr/local/include" "/opt/local/include" ) -+find_path( catch_INCLUDE catch.hpp HINTS "${PROJECT_SOURCE_DIR}/dependency/catch/include" "/usr/include" "/usr/include/catch" "/usr/local/include" "/opt/local/include" ) - - if ( catch_INCLUDE ) - set( CATCH_FOUND TRUE )