summaryrefslogtreecommitdiffstats
path: root/protobuf
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-06-29 19:29:54 +0000
committer Eric Hameleers <alien@slackware.com>2020-06-29 19:29:54 +0000
commit5f7027cd76f7f6530c99a0a5c307ad3a22e8af20 (patch)
treebdf1bd46021845ac504efa239bbb1b27f40156ec /protobuf
parent2d34e08b32f1984f9d17848e41872fb69e21187f (diff)
downloadasb-5f7027cd76f7f6530c99a0a5c307ad3a22e8af20.tar.gz
asb-5f7027cd76f7f6530c99a0a5c307ad3a22e8af20.tar.xz
protobuf: update to 3.12.3
Diffstat (limited to 'protobuf')
-rwxr-xr-xprotobuf/build/protobuf.SlackBuild50
1 files changed, 27 insertions, 23 deletions
diff --git a/protobuf/build/protobuf.SlackBuild b/protobuf/build/protobuf.SlackBuild
index 8d08498e..e6b543df 100755
--- a/protobuf/build/protobuf.SlackBuild
+++ b/protobuf/build/protobuf.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2014 Eric Hameleers, Eindhoven, NL
+# Copyright 2014, 2020 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -27,12 +27,14 @@
# By: Eric Hameleers <alien@slackware.com>
# For: protobuf
# Descr: Google's data interchange format
-# URL: http://code.google.com/p/protobuf
-# Build needs:
+# URL: https://developers.google.com/protocol-buffers/
+# Build needs: pysetuptools
# Needs:
# Changelog:
# 2.5.0-1: 24/Mar/2014 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 3.12.3-1: 29/jun/2020 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
# Run 'sh protobuf.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -41,12 +43,12 @@
# -----------------------------------------------------------------------------
PRGNAM=protobuf
-VERSION=${VERSION:-2.5.0}
+VERSION=${VERSION:-3.12.3}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
-DOCS="CHANGES.txt CONTRIBUTORS.txt COPYING.txt INSTALL.txt README.txt"
+DOCS="BUILD CHANGES.txt CONTRIBUTORS.txt LICENSE README.md WORKSPACE"
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -56,28 +58,26 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.bz2"
-SRCURL="http://protobuf.googlecode.com/files/${PRGNAM}-${VERSION}.tar.bz2"
+SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
+SRCURL="https://github.com/protocolbuffers/${PRGNAM}/releases/download/v${VERSION}/${PRGNAM}-all-${VERSION}.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
##
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- armv6hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
@@ -86,10 +86,7 @@ case "$ARCH" in
armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ *) SLKCFLAGS=${SLKCFLAGS:-"-O2"}
SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
;;
esac
@@ -176,10 +173,15 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
# The Python bindings need to be installed separately:
cd python
- python setup.py install --root=$PKG \
- 2>&1 | tee $OUTPUT/install-${PRGNAM}_python.log
+ python2 setup.py install --cpp_implementation --root=$PKG \
+ 2>&1 | tee $OUTPUT/install-${PRGNAM}_python2.log
+ python3 setup.py install --cpp_implementation --root=$PKG \
+ 2>&1 | tee $OUTPUT/install-${PRGNAM}_python3.log
cd -
# Add documentation:
@@ -202,6 +204,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
+cat $SRCDIR/slack-required > $PKG/install/slack-required
# Build the package:
cd $PKG
@@ -210,6 +213,7 @@ cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
# Restore the original umask:
umask ${_UMASK_}