summaryrefslogtreecommitdiff
path: root/user/protobuf
diff options
context:
space:
mode:
Diffstat (limited to 'user/protobuf')
-rw-r--r--user/protobuf/APKBUILD47
1 files changed, 25 insertions, 22 deletions
diff --git a/user/protobuf/APKBUILD b/user/protobuf/APKBUILD
index fcaba3da2..1ef7ec988 100644
--- a/user/protobuf/APKBUILD
+++ b/user/protobuf/APKBUILD
@@ -3,8 +3,8 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=protobuf
_gemname=google-protobuf
-pkgver=3.11.4
-_tstver=1.8.1
+pkgver=3.18.1
+_tstver=1.11.0
pkgrel=0
pkgdesc="Library for extensible, efficient structure packing"
url="https://github.com/google/protobuf"
@@ -13,16 +13,15 @@ options="!check" # Broken everywhere.
license="BSD-3-Clause"
depends_dev="zlib-dev"
makedepends="$depends_dev autoconf automake libtool ruby ruby-dev ruby-rake
- ruby-rake-compiler python3 python3-dev"
+ ruby-rake-compiler ruby-io-console ruby-irb ruby-power_assert
+ ruby-rake-compiler ruby-test-unit ruby-reline ruby-rubygems-tasks
+ python3 python3-dev"
checkdepends="ruby-json ruby-test-unit"
subpackages="ruby-$_gemname:_ruby py3-$pkgname:_python $pkgname-dev $pkgname-vim::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz
googletest-$_tstver.tar.gz::https://github.com/google/googletest/archive/release-$_tstver.tar.gz"
prepare() {
- default_prepare
- ./autogen.sh
-
# symlink tests to the test directory
rm -rf third_party/*
ln -sf "$srcdir"/googletest-release-$_tstver \
@@ -31,18 +30,26 @@ prepare() {
build() {
# Build Protobuf
- CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" LDFLAGS="$LDFLAGS -latomic" \
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --localstatedir=/var
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} cmake
make
# Build for Ruby
cd "$builddir"/ruby
# Generate proto files for built-in protocols.
- rake genproto
+ export LD_LIBRARY_PATH=${builddir}
+ export CPPFLAGS="-L${builddir}"
+ export PATH="${builddir}:$PATH"
+ rake
gem build $_gemname.gemspec
gem install --local \
--install-dir dist \
@@ -53,16 +60,12 @@ build() {
# Build for Python 3
cd "$builddir"/python
- export LD_LIBRARY_PATH=${builddir}/src/.libs
python3 setup.py build --cpp_implementation
# Build test-suite
- local test; for test in googletest googlemock; do
- cd "$builddir/third_party/googletest/$test"
- autoreconf -vfi
- ./configure
- make
- done
+ cd "$builddir"/third_party/googletest/
+ cmake .
+ make
}
check() {
@@ -111,5 +114,5 @@ vim() {
"$subpkgdir"/usr/share/vim/vimfiles/syntax/proto.vim
}
-sha512sums="777bbb0e9e2375eaebe6b8c87abd660bac70ee469c9ad00dd25917b82d7fb5bbe33cf87f0d69c90e19d55c07a7285ec20974ba4768623ce9ccfadf147fd5e261 protobuf-3.11.4.tar.gz
-e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7 googletest-1.8.1.tar.gz"
+sha512sums="d8ee0ae70ca4920787fca0e7d3053281754123a54280ce678d6ccaf294949959719a882c9e07300ab94e666ceb800967bcd549fa603d89b73f91e9368bd8f119 protobuf-3.18.1.tar.gz
+6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 googletest-1.11.0.tar.gz"