summaryrefslogtreecommitdiff
path: root/user/protobuf/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2019-05-06 18:56:08 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2019-05-06 18:56:08 +0000
commit7bcb34d24ee80b914b14de055ab8b0560e87e7fd (patch)
treec7ab58ec15a0c0b487d9e60bb55fab78038723ba /user/protobuf/APKBUILD
parentaee6b0728a06a07700b2473cdeca06cb12fa8a81 (diff)
parentdef4421a968a5b75dd87fa986956bf10dc7921ca (diff)
downloadpackages-7bcb34d24ee80b914b14de055ab8b0560e87e7fd.tar.gz
packages-7bcb34d24ee80b914b14de055ab8b0560e87e7fd.tar.bz2
packages-7bcb34d24ee80b914b14de055ab8b0560e87e7fd.tar.xz
packages-7bcb34d24ee80b914b14de055ab8b0560e87e7fd.zip
Merge branch 'bump.djt.20190417' into 'master'
djt package bumps for 2019-05-03 See merge request !227
Diffstat (limited to 'user/protobuf/APKBUILD')
-rw-r--r--user/protobuf/APKBUILD45
1 files changed, 28 insertions, 17 deletions
diff --git a/user/protobuf/APKBUILD b/user/protobuf/APKBUILD
index f8ff737a6..ea147080d 100644
--- a/user/protobuf/APKBUILD
+++ b/user/protobuf/APKBUILD
@@ -1,10 +1,9 @@
# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
-# TODO: Build Python module, and clean up Ruby build process
pkgname=protobuf
_gemname=google-protobuf
-pkgver=3.6.1
+pkgver=3.7.1
_tstver=1.8.0
pkgrel=0
pkgdesc="Library for extensible, efficient structure packing"
@@ -12,13 +11,12 @@ url="https://github.com/google/protobuf"
arch="all"
license="BSD-3-Clause"
depends_dev="zlib-dev"
-makedepends="$depends_dev autoconf automake libtool ruby ruby-dev ruby-rake"
-subpackages="ruby-$_gemname:_ruby $pkgname-dev $pkgname-vim::noarch"
+makedepends="$depends_dev autoconf automake libtool ruby ruby-dev ruby-rake
+ ruby-rake-compiler 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
- musl-fix.patch
- trim-rakefile.patch"
-builddir="$srcdir/$pkgname-$pkgver"
+ googletest-$_tstver.tar.gz::https://github.com/google/googletest/archive/release-$_tstver.tar.gz"
prepare() {
default_prepare
@@ -33,8 +31,8 @@ prepare() {
}
build() {
+ # Build Protobuf
cd "$builddir"
-
CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" LDFLAGS="$LDFLAGS -latomic" \
./configure --prefix=/usr \
--sysconfdir=/etc \
@@ -43,11 +41,10 @@ build() {
--localstatedir=/var
make
+ # Build for Ruby
cd "$builddir"/ruby
-
# Generate proto files for built-in protocols.
rake genproto
-
gem build $_gemname.gemspec
gem install --local \
--install-dir dist \
@@ -56,7 +53,12 @@ build() {
--verbose \
$_gemname
- # build test-suite
+ # 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
@@ -65,10 +67,13 @@ build() {
done
}
-# TODO: Run tests for ruby gem.
check() {
cd "$builddir"
make check
+ cd "$builddir"/ruby
+ rake test
+ cd "$builddir"/python
+ python3 setup.py test --cpp_implementation
}
package() {
@@ -93,6 +98,14 @@ _ruby() {
rm -r ext/ tests/
}
+_python() {
+ pkgdesc="Python bindings to Google's data interchange format"
+
+ cd "$builddir"/python
+ python3 setup.py install --prefix=/usr --root="$subpkgdir" \
+ --cpp_implementation
+}
+
vim() {
pkgdesc="Vim syntax for $pkgname"
depends=""
@@ -102,7 +115,5 @@ vim() {
"$subpkgdir"/usr/share/vim/vimfiles/syntax/proto.vim
}
-sha512sums="1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839 protobuf-3.6.1.tar.gz
-1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d googletest-1.8.0.tar.gz
-875592bc5dc5efe9087ea1b340673f54c984ecd5aa3b110a2da136bdc28009af7ce1a9c57f4747ff809fc02eb6c39a0209c277177172af467a54172d9700188a musl-fix.patch
-d1d11fe76d2a1ae92f47f9eb1e0d94c67b7192a9dc4a382b6c0835f4fe4dbc2f98ca1b3c5095ad5b4e368581072330f943209c0decea02ebb47938588543fdb1 trim-rakefile.patch"
+sha512sums="7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f protobuf-3.7.1.tar.gz
+1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d googletest-1.8.0.tar.gz"