summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--0001-nsync-export.patch29
-rw-r--r--PKGBUILD14
3 files changed, 43 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c78485b180eb..5270442207d0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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)
diff --git a/PKGBUILD b/PKGBUILD
index 22a3b64fad2b..3d741e48437d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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 \