diff options
author | Adrian Perez de Castro | 2020-02-14 00:22:56 +0200 |
---|---|---|
committer | Adrian Perez de Castro | 2020-02-14 00:22:56 +0200 |
commit | e00e4f8069e31b41bc5da40d9c95456d2d654127 (patch) | |
tree | 793097df9996aab80c73be5da9cb3b377b6f05cd | |
download | aur-e00e4f8069e31b41bc5da40d9c95456d2d654127.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | system-blocksruntime.patch | 21 |
4 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..11896845103a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = libdispatch + pkgdesc = Comprehensive support for concurrent code execution on multicore hardware + pkgver = 5.1.4 + pkgrel = 1 + url = https://apple.github.io/swift-corelibs-libdispatch + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + arch = aarch64 + license = Apache + makedepends = git + makedepends = clang + makedepends = cmake + depends = libblocksruntime + conflicts = libdispatch-git + conflicts = swift + conflicts = swift-development + source = libdispatch::git+https://github.com/apple/swift-corelibs-libdispatch.git#tag=swift-5.1.4-RELEASE + source = system-blocksruntime.patch + sha512sums = SKIP + sha512sums = 2a7950849d4244308674b997d07dd088c534acdc3d9229354257270177703fdaaaa39a65885c8550fd98d0d3fcaea569a539a46c4bc465f9a8c6ad26244170fc + +pkgname = libdispatch + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..358d27227f89 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!/PKGBUILD +!/.SRCINFO +!/.gitignore +!/*.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a04c1a998efd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Adrian Perez de Castro <aperez@igalia.com> +pkgname=libdispatch +pkgver=5.1.4 +pkgrel=1 +pkgdesc='Comprehensive support for concurrent code execution on multicore hardware' +arch=(i686 x86_64 arm armv6h armv7h aarch64) +url=https://apple.github.io/swift-corelibs-libdispatch +license=(Apache) +depends=(libblocksruntime) +makedepends=(git clang cmake) +conflicts=(libdispatch-git swift swift-development) +source=("${pkgname}::git+https://github.com/apple/swift-corelibs-libdispatch.git#tag=swift-${pkgver}-RELEASE" + system-blocksruntime.patch) +sha512sums=(SKIP + '2a7950849d4244308674b997d07dd088c534acdc3d9229354257270177703fdaaaa39a65885c8550fd98d0d3fcaea569a539a46c4bc465f9a8c6ad26244170fc') + +prepare () { + cd "${pkgname}" + patch -p1 < "${srcdir}/system-blocksruntime.patch" +} + +build () { + rm -rf _build + mkdir _build + cd _build + CC=clang CXX=clang++ cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBlocksRuntime_INCLUDE_DIR=/usr/include \ + -DBlocksRuntime_LIBRARIES=/usr/lib/libBlocksRuntime.so \ + "../${pkgname}" + cmake --build . -j $(nproc) +} + +check () { + cmake --build _build --target test +} + +package () { + DESTDIR="${pkgdir}" cmake --install _build +} diff --git a/system-blocksruntime.patch b/system-blocksruntime.patch new file mode 100644 index 000000000000..fa7762afcc54 --- /dev/null +++ b/system-blocksruntime.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f3f221..dd6c7a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -123,7 +123,7 @@ endif() + + option(INSTALL_PRIVATE_HEADERS "installs private headers in the same location as the public ones" OFF) + +-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) ++if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin AND OFF) + set(BlocksRuntime_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/src/BlocksRuntime) + + # NOTE(compnerd) use the `BUILD_SHARED_LIBS` variable to determine what type +@@ -182,6 +182,7 @@ if(__BUILTIN_TRAP) + endif() + + find_package(LibRT) ++find_package(BlocksRuntime) + + check_function_exists(_pthread_workqueue_init HAVE__PTHREAD_WORKQUEUE_INIT) + check_function_exists(getprogname HAVE_GETPROGNAME) |