summaryrefslogtreecommitdiffstats
path: root/libraries/libdispatch
diff options
context:
space:
mode:
author B. Watson2022-03-04 08:43:06 +0100
committer Andrew Clemons2022-03-04 12:20:04 +0100
commit27607e35358015ea70a66d7b31c7ff2659645d8c (patch)
tree22a6a7ab9241e7997204e39c1d2fa28e04154671 /libraries/libdispatch
parent505cdfc62e37d622f9c14a3397924ecfede4195a (diff)
downloadslackbuilds-27607e35358015ea70a66d7b31c7ff2659645d8c.tar.gz
libraries/libdispatch: Fix conflict with libkqueue.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Diffstat (limited to 'libraries/libdispatch')
-rw-r--r--libraries/libdispatch/cmake.patch32
-rw-r--r--libraries/libdispatch/libdispatch.SlackBuild32
2 files changed, 16 insertions, 48 deletions
diff --git a/libraries/libdispatch/cmake.patch b/libraries/libdispatch/cmake.patch
deleted file mode 100644
index e14b03898a..0000000000
--- a/libraries/libdispatch/cmake.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- CMakeLists.txt.orig 2020-11-03 14:54:48.786455348 -0800
-+++ CMakeLists.txt 2020-11-03 15:00:16.067445503 -0800
-@@ -197,7 +197,7 @@
- check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
- check_symbol_exists(program_invocation_name "errno.h" HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
- if (HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
-- add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:_GNU_SOURCE=1>)
-+ add_definitions(-D_GNU_SOURCE=1)
- endif()
- check_symbol_exists(__printflike "bsd/sys/cdefs.h" HAVE_PRINTFLIKE)
-
-@@ -217,9 +217,9 @@
- endif()
-
- if(dtrace_EXECUTABLE)
-- add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:DISPATCH_USE_DTRACE=1>)
-+ add_definitions(-DDISPATCH_USE_DTRACE=1)
- else()
-- add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:DISPATCH_USE_DTRACE=0>)
-+ add_definitions(-DDISPATCH_USE_DTRACE=0)
- endif()
-
- find_program(leaks_EXECUTABLE leaks)
-@@ -252,7 +252,7 @@
-
- configure_file("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
- "${PROJECT_BINARY_DIR}/config/config_ac.h")
--add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:HAVE_CONFIG_H>)
-+add_definitions(-DHAVE_CONFIG_H)
-
-
- if(ENABLE_SWIFT)
diff --git a/libraries/libdispatch/libdispatch.SlackBuild b/libraries/libdispatch/libdispatch.SlackBuild
index e92adc90ed..a856400a2b 100644
--- a/libraries/libdispatch/libdispatch.SlackBuild
+++ b/libraries/libdispatch/libdispatch.SlackBuild
@@ -22,6 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220304 bkw: Modified by SlackBuilds.org: fix conflict with libkqueue.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libdispatch
@@ -38,9 +40,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -64,7 +63,7 @@ else
LIBDIRSUFFIX=""
fi
-set -eu
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -75,25 +74,30 @@ cd swift-corelibs-$PRGNAM-swift-$VERSION-RELEASE
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Disable -Werror.
sed -i 's/-Werror//' src/CMakeLists.txt
sed -i '/-Werror/d' cmake/modules/DispatchCompilerWarnings.cmake
-# Require an older cmake version.
-sed -i 's/3.15.1/3.5.2/' CMakeLists.txt
+# 20220304 bkw: Fix the build, if libkqueue is installed. Normally,
+# if kqueue's sys/event.h is detected, that means BSD, which just has
+# the include (no need to link a library). On Linux, kqueue isn't part
+# of the kernel or libc, it's a 3rd party package and not commonly
+# installed. Anything using it needs to link with -lkqueue. Upstream
+# never considered this possibility, so we have to force the issue on
+# the cmake command line:
-# cmake 3.5.2 does not have the add_compile_definitions command
-patch -p0 < $CWD/cmake.patch
+pkg-config --exists libkqueue && extra="-DCMAKE_EXE_LINKER_FLAGS=-lkqueue"
# apple software really wants clang
mkdir -p build
cd build
cmake \
+ $extra \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
@@ -104,14 +108,10 @@ cd build
-DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_TYPE=Release ..
make
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+gzip -9 $PKG/usr/man/man*/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CONTRIBUTING.md LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION