diff options
Diffstat (limited to 'development/protobuf3/protobuf3.SlackBuild')
-rw-r--r-- | development/protobuf3/protobuf3.SlackBuild | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/development/protobuf3/protobuf3.SlackBuild b/development/protobuf3/protobuf3.SlackBuild index 0cef90a454..8a37164a7b 100644 --- a/development/protobuf3/protobuf3.SlackBuild +++ b/development/protobuf3/protobuf3.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for protobuf3 -# Copyright 2017-2022 Willy Sudiarto Raharjo <willysr@slackbuilds.org> +# Copyright 2017-2024 Willy Sudiarto Raharjo <willysr@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=protobuf3 -VERSION=${VERSION:-3.20.1} +VERSION=${VERSION:-26.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -43,9 +43,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 @@ -84,28 +81,30 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -patch -p1 < $CWD/protobuf3.patch - -./autogen.sh -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --disable-static \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --enable-static=no \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -# Install the python bindings -cd python -python setup.py install --root=$PKG -python3 setup.py install --root=$PKG +patch -p1 < $CWD/soversion.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_ABSL_PROVIDER=package \ + -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +# Install the python bindings: +tar xvf $CWD/$SRCNAM-5.$VERSION.tar.gz +cd $SRCNAM-5.$VERSION +LDFLAGS+=" -L$TMP/$SRCNAM-$VERSION/build" \ +PROTOC="$TMP/$SRCNAM-$VERSION/build/protoc" \ +python3 -m build --wheel --no-isolation +python3 -m installer --destdir "$PKG" dist/*.whl cd .. rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/*.la @@ -114,7 +113,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a BUILD *.txt LICENSE *.md $PKG/usr/doc/$PRGNAM-$VERSION +cp -a *.txt LICENSE *.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |