From b5d817e9a45ed2efdd345efd5e24c81472597d1a Mon Sep 17 00:00:00 2001 From: uglyside Date: Fri, 16 May 2025 13:47:16 +0300 Subject: [PATCH] clean up. --- programming/library/libdispatch/actions.py | 33 +++++++++++-------- .../libdispatch/files/avoid-libkqueue.patch | 11 +++++++ .../libdispatch/files/remove-werror.patch | 10 ++++++ programming/library/libdispatch/pspec.xml | 32 +++--------------- 4 files changed, 45 insertions(+), 41 deletions(-) create mode 100644 programming/library/libdispatch/files/avoid-libkqueue.patch create mode 100644 programming/library/libdispatch/files/remove-werror.patch diff --git a/programming/library/libdispatch/actions.py b/programming/library/libdispatch/actions.py index 6118e3d797..97ea26e512 100644 --- a/programming/library/libdispatch/actions.py +++ b/programming/library/libdispatch/actions.py @@ -6,26 +6,31 @@ from pisi.actionsapi import shelltools from pisi.actionsapi import cmaketools -from pisi.actionsapi import mesontools from pisi.actionsapi import pisitools +from pisi.actionsapi import get -j = ''.join([ - ' -DCMAKE_INSTALL_PREFIX=/usr', - ' -DCMAKE_BUILD_TYPE=Release', - ' -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON', - ' -DBUILD_TESTING=OFF', - ' -Bbuild -G Ninja -L ' - ]) +j = "-DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_THREAD_LIBS_INIT='-lpthread' \ + -DCMAKE_HAVE_THREADS_LIBRARY=ON \ + -DCMAKE_USE_PTHREADS_INIT=ON \ + -DBUILD_TESTING=OFF -LA \ + " def setup(): - shelltools.export("CC", "clang") - shelltools.export("CXX", "clang++") - cmaketools.configure(j) + shelltools.export("CC", "clang") + shelltools.export("CXX", "clang++") + shelltools.makedirs("build") + shelltools.cd("build") + cmaketools.configure(j, sourceDir = '..') def build(): - mesontools.build() + shelltools.cd("build") + cmaketools.make() def install(): - mesontools.install() + shelltools.cd("build") + cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) + + pisitools.dodoc("../CONTRIBUTING.md", "../INSTALL.md", "../README.md", "../TESTING.md") - pisitools.dodoc("LICENSE") diff --git a/programming/library/libdispatch/files/avoid-libkqueue.patch b/programming/library/libdispatch/files/avoid-libkqueue.patch new file mode 100644 index 0000000000..dc482798f7 --- /dev/null +++ b/programming/library/libdispatch/files/avoid-libkqueue.patch @@ -0,0 +1,11 @@ +--- tests/dispatch_test.c.orig ++++ tests/dispatch_test.c +@@ -30,7 +30,7 @@ + #include + #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) + #include +-#if __has_include() ++#if __has_include() && !defined(__linux__) + #define HAS_SYS_EVENT_H 1 + #include + #else diff --git a/programming/library/libdispatch/files/remove-werror.patch b/programming/library/libdispatch/files/remove-werror.patch new file mode 100644 index 0000000000..1c182360e6 --- /dev/null +++ b/programming/library/libdispatch/files/remove-werror.patch @@ -0,0 +1,10 @@ +--- cmake/modules/DispatchCompilerWarnings.cmake.orig 2020-05-12 13:13:59.619689872 +0300 ++++ cmake/modules/DispatchCompilerWarnings.cmake 2020-05-12 13:13:35.216171428 +0300 +@@ -2,7 +2,6 @@ + if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") + # TODO: someone needs to provide the msvc equivalent warning flags + else() +- add_compile_options($<$,$>:-Werror>) + add_compile_options($<$,$>:-Wall>) + add_compile_options($<$,$>:-Wextra>) + diff --git a/programming/library/libdispatch/pspec.xml b/programming/library/libdispatch/pspec.xml index c6d3afe89a..ea1dd62553 100644 --- a/programming/library/libdispatch/pspec.xml +++ b/programming/library/libdispatch/pspec.xml @@ -12,17 +12,15 @@ library Grand Central Dispatch. Grand Central Dispatch (GCD or libdispatch) provides comprehensive support for concurrent code execution on multicore hardware. - - https://github.com/swiftlang/swift-corelibs-libdispatch/archive/refs/tags/swift-6.1-RELEASE.tar.gz - + https://github.com/apple/swift-corelibs-libdispatch/archive/swift-5.3-RELEASE.tar.gz cmake - ninja llvm-clang llvm-clang-devel - + avoid-libkqueue.patch + remove-werror.patch @@ -33,7 +31,8 @@ /usr/lib - /usr/share + /usr/share/man + /usr/share/doc @@ -48,27 +47,6 @@ - - 2025-05-08 - 6.1 - Rebuild. - fury - uglyside@yandex.ru - - - 2022-11-25 - 5.5 - Version bump. - fury - uglyside@yandex.ru - - - 2021-09-12 - 5.4.2 - Version bump. - fury - uglyside@yandex.ru - 2021-02-24 5.3