From 27607e35358015ea70a66d7b31c7ff2659645d8c Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 4 Mar 2022 02:43:06 -0500 Subject: libraries/libdispatch: Fix conflict with libkqueue. Signed-off-by: B. Watson Signed-off-by: Andrew Clemons --- libraries/libdispatch/libdispatch.SlackBuild | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'libraries/libdispatch/libdispatch.SlackBuild') diff --git a/libraries/libdispatch/libdispatch.SlackBuild b/libraries/libdispatch/libdispatch.SlackBuild index e92adc90edc7f..a856400a2b59d 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 -- cgit v1.2.3