extra/protobuf to 3.6.1.3-1

This commit is contained in:
Kevin Mihelich 2019-01-05 03:35:08 +00:00
parent 6b5c067b8b
commit 6c1e8f9811

View file

@ -7,11 +7,11 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - explicitly link v5 with libatomic # - explicitly link v5/v6 with libatomic
pkgbase='protobuf' pkgbase='protobuf'
pkgname=('protobuf' 'python2-protobuf' 'python-protobuf') pkgname=('protobuf' 'python2-protobuf' 'python-protobuf')
pkgver=3.6.1 pkgver=3.6.1.3
_gtestver=1.8.0 _gtestver=1.8.0
pkgrel=1 pkgrel=1
pkgdesc="Protocol Buffers - Google's data interchange format" pkgdesc="Protocol Buffers - Google's data interchange format"
@ -19,10 +19,10 @@ arch=('x86_64')
url='https://developers.google.com/protocol-buffers/' url='https://developers.google.com/protocol-buffers/'
license=('BSD') license=('BSD')
depends=('gcc-libs' 'zlib') depends=('gcc-libs' 'zlib')
makedepends=('unzip' 'python-setuptools' 'python2-setuptools' 'clang') makedepends=('unzip' 'python-setuptools' 'python2-setuptools')
source=("$pkgbase-$pkgver.tgz::https://github.com/google/${pkgbase}/archive/v${pkgver}.tar.gz" source=("$pkgbase-$pkgver.tgz::https://github.com/google/${pkgbase}/archive/v${pkgver}.tar.gz"
"gtest-${_gtestver}.tar.gz::https://github.com/google/googletest/archive/release-${_gtestver}.tar.gz") "gtest-${_gtestver}.tar.gz::https://github.com/google/googletest/archive/release-${_gtestver}.tar.gz")
md5sums=('e8ce2659ea4f5df1a1e0dbd107dd61d9' md5sums=('df2b44d14d8745c06232d90f35845765'
'16877098823401d1bf2ed7891d7dce36') '16877098823401d1bf2ed7891d7dce36')
prepare() { prepare() {
@ -35,10 +35,6 @@ prepare() {
} }
build() { build() {
# GCC is stuck on src/google/protobuf/util/internal/protostream_objectsource_test.cc
# and src/google/protobuf/util/internal/protostream_objectwriter_test.cc.
export CC=/usr/bin/clang CXX=/usr/bin/clang++
cd "$srcdir/$pkgbase-$pkgver" cd "$srcdir/$pkgbase-$pkgver"
./autogen.sh ./autogen.sh
@ -53,7 +49,7 @@ build() {
make make
cd "$srcdir/$pkgbase-$pkgver" cd "$srcdir/$pkgbase-$pkgver"
[[ $CARCH == "arm" ]] && LIBS="-latomic" [[ $CARCH == "arm" || $CARCH == "armv6h" ]] && LIBS="-latomic"
LIBS=$LIBS ./configure --prefix=/usr LIBS=$LIBS ./configure --prefix=/usr
make make
} }
@ -63,8 +59,6 @@ check() {
} }
package_protobuf() { package_protobuf() {
conflicts=('protobuf' 'protobuf-cpp')
provides=('protobuf' 'protobuf-cpp')
replaces=('protobuf-cpp') replaces=('protobuf-cpp')
cd "$srcdir/$pkgbase-$pkgver" cd "$srcdir/$pkgbase-$pkgver"
@ -77,11 +71,9 @@ package_protobuf() {
package_python2-protobuf() { package_python2-protobuf() {
pkgdesc='Python 2 bindings for Google Protocol Buffers' pkgdesc='Python 2 bindings for Google Protocol Buffers'
depends=('python2' 'python2-six' "protobuf=$pkgver") depends=('python2' 'python2-six' "protobuf=$pkgver")
conflicts=('python2-protobuf')
provides=('python2-protobuf')
cd "$srcdir/$pkgbase-$pkgver/python" cd "$srcdir/$pkgbase-$pkgver/python"
python2 setup.py install --root="$pkgdir" python2 setup.py install --root="$pkgdir" --cpp_implementation
install -d "$pkgdir/usr/share/licenses/$pkgname" install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "/usr/share/licenses/$pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" ln -s "/usr/share/licenses/$pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
@ -90,11 +82,9 @@ package_python2-protobuf() {
package_python-protobuf() { package_python-protobuf() {
pkgdesc='Python 3 bindings for Google Protocol Buffers' pkgdesc='Python 3 bindings for Google Protocol Buffers'
depends=('python' 'python-six' "protobuf=$pkgver") depends=('python' 'python-six' "protobuf=$pkgver")
conflicts=('python-protobuf')
provides=('python-protobuf')
cd "$srcdir/$pkgbase-$pkgver/python" cd "$srcdir/$pkgbase-$pkgver/python"
python3 setup.py install --root="$pkgdir" python3 setup.py install --root="$pkgdir" --cpp_implementation
install -d "$pkgdir/usr/share/licenses/$pkgname" install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "/usr/share/licenses/$pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" ln -s "/usr/share/licenses/$pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"