aboutsummaryrefslogtreecommitdiff
path: root/libraries/libdispatch/libdispatch.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-04 02:43:06 -0500
committerAndrew Clemons <andrew.clemons@gmail.com>2022-03-05 00:20:04 +1300
commit27607e35358015ea70a66d7b31c7ff2659645d8c (patch)
tree22a6a7ab9241e7997204e39c1d2fa28e04154671 /libraries/libdispatch/libdispatch.SlackBuild
parent505cdfc62e37d622f9c14a3397924ecfede4195a (diff)
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/libdispatch.SlackBuild')
-rw-r--r--libraries/libdispatch/libdispatch.SlackBuild32
1 files changed, 16 insertions, 16 deletions
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