diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-nsync-export.patch | 29 | ||||
-rw-r--r-- | PKGBUILD | 14 |
3 files changed, 43 insertions, 4 deletions
@@ -1,13 +1,15 @@ pkgbase = nsync pkgdesc = A C library that exports various synchronization primitives, such as mutexes pkgver = 1.25.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/google/nsync arch = x86_64 license = Apache makedepends = cmake depends = gcc-libs source = https://github.com/google/nsync/archive/1.25.0/nsync-1.25.0.tar.gz + source = 0001-nsync-export.patch sha256sums = 2be9dbfcce417c7abcc2aa6fee351cd4d292518d692577e74a2c6c05b049e442 + sha256sums = 7733d2979d9ec4ec7a9e7af8814544bdd68b5482ebaea1f00011ac8e1ea44258 pkgname = nsync diff --git a/0001-nsync-export.patch b/0001-nsync-export.patch new file mode 100644 index 000000000000..c70066abd6f8 --- /dev/null +++ b/0001-nsync-export.patch @@ -0,0 +1,29 @@ +diff -urN -x '*.orig' nsync-1.20.2.orig/CMakeLists.txt nsync-1.20.2/CMakeLists.txt +--- nsync-1.20.2.orig/CMakeLists.txt 2019-01-04 05:29:33.000000000 +0800 ++++ nsync-1.20.2/CMakeLists.txt 2019-03-03 17:41:18.480996400 +0800 +@@ -398,11 +402,11 @@ + + set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON) + +-install (TARGETS nsync ++install (TARGETS nsync EXPORT nsync + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development) + +-install (TARGETS nsync_cpp OPTIONAL ++install (TARGETS nsync_cpp EXPORT nsync_cpp OPTIONAL + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development) + +@@ -427,3 +433,11 @@ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT Development) + endforeach () ++ ++install(EXPORT nsync ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nsync ++ FILE nsyncConfig.cmake) ++ ++install(EXPORT nsync_cpp ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nsync_cpp ++ FILE nsync_cppConfig.cmake) @@ -2,15 +2,23 @@ pkgname=nsync pkgver=1.25.0 -pkgrel=1 +pkgrel=2 pkgdesc='A C library that exports various synchronization primitives, such as mutexes' arch=(x86_64) url='https://github.com/google/nsync' license=(Apache) depends=(gcc-libs) makedepends=(cmake) -source=("https://github.com/google/nsync/archive/$pkgver/$pkgname-$pkgver.tar.gz") -sha256sums=('2be9dbfcce417c7abcc2aa6fee351cd4d292518d692577e74a2c6c05b049e442') +source=("https://github.com/google/nsync/archive/$pkgver/$pkgname-$pkgver.tar.gz" + "0001-nsync-export.patch") +sha256sums=('2be9dbfcce417c7abcc2aa6fee351cd4d292518d692577e74a2c6c05b049e442' + '7733d2979d9ec4ec7a9e7af8814544bdd68b5482ebaea1f00011ac8e1ea44258') + +prepare() { + cd $pkgname-$pkgver + # Based on https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-nsync/0001-nsync-mingw-w64.patch + patch -Np1 -i ../0001-nsync-export.patch +} build() { cmake -B build -S $pkgname-$pkgver \ |