summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Reeder2022-01-31 10:59:23 -0700
committerColin Reeder2022-02-07 10:08:43 -0700
commit213e22af4584e809bdb8b8f28fba45207a3d2bb8 (patch)
tree09cabe1b6d02ccff0dbb074a8b2a684449412a8b
parent965a2c3a4b389676251f5f6e8eba7454098a464b (diff)
downloadaur-213e22af4584e809bdb8b8f28fba45207a3d2bb8.tar.gz
Merge in changes from package fork
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD32
-rw-r--r--protobuf-ifdefs.patch56
4 files changed, 85 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 34c536995a56..ea68ec90ce80 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = valhalla
pkgdesc = Routing engine for OpenStreetMap.
- pkgver = 3.1.0
- pkgrel = 2
+ pkgver = 3.1.4
+ pkgrel = 4
url = https://github.com/valhalla/valhalla
arch = x86_64
license = custom:MIT
@@ -14,10 +14,12 @@ pkgbase = valhalla
depends = boost-libs
depends = protobuf
depends = python
- depends = lua
depends = libspatialite
- source = valhalla-3.1.0::git+https://github.com/valhalla/valhalla#tag=3.1.0
+ depends = luajit
+ depends = chrono-date
+ source = valhalla-3.1.4::git+https://github.com/valhalla/valhalla#tag=3.1.4
+ source = protobuf-ifdefs.patch
+ sha256sums = SKIP
sha256sums = SKIP
pkgname = valhalla
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4308abe6d8ff
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/pkg
+/src
+/valhalla*
diff --git a/PKGBUILD b/PKGBUILD
index 31319a91fc1c..14bf5ea495be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,25 @@
-# Maintainer: Aleksandar Trifunović <akstrfn@gmail.com>
+# Maintainer: Colin Reeder <colin@vpzom.click>
+# Contributor: Aleksandar Trifunović <akstrfn@gmail.com>
-pkgname=valhalla
-pkgver=3.1.0
-pkgrel=2
+_pkgname=valhalla
+pkgname=$_pkgname
+pkgver=3.1.4
+pkgrel=4
pkgdesc="Routing engine for OpenStreetMap."
arch=('x86_64')
url="https://github.com/valhalla/valhalla"
license=('custom:MIT')
-depends=('prime_server' 'boost-libs' 'protobuf' 'python' 'lua' 'libspatialite')
+depends=('prime_server' 'boost-libs' 'protobuf' 'python' 'libspatialite' 'luajit' 'chrono-date')
makedepends=('cmake' 'git' 'vim' 'jq' 'boost')
-source=("$pkgname-$pkgver::git+${url}#tag=$pkgver")
-sha256sums=('SKIP')
+source=("$_pkgname-$pkgver::git+${url}#tag=$pkgver" "protobuf-ifdefs.patch")
+sha256sums=('SKIP' 'SKIP')
prepare() {
- cd "$pkgname-$pkgver"
+ cd "$_pkgname-$pkgver"
git submodule update --init --recursive
+
+ patch -Np1 -i ../protobuf-ifdefs.patch
+
cmake -S. -Bbuild \
-DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
-DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
@@ -27,6 +32,7 @@ prepare() {
-DENABLE_SERVICES=On \
-DENABLE_CCACHE=Off \
-DENABLE_HTTP=On \
+ -DENABLE_SINGLE_FILES_WERROR=On \
-DBUILD_SHARED_LIBS=On \
-DENABLE_BENCHMARKS=OFF \
-DENABLE_TESTS=OFF
@@ -34,23 +40,23 @@ prepare() {
}
build() {
- cd "$pkgname-$pkgver/build"
+ cd "$_pkgname-$pkgver/build"
make
}
# no tests built but ctest does not fail
check() {
- cd "$pkgname-$pkgver/build"
+ cd "$_pkgname-$pkgver/build"
ctest --parallel `nproc`
}
package() {
- cd "$pkgname-$pkgver"
+ cd "$_pkgname-$pkgver"
make -C build DESTDIR="$pkgdir/" install
rm -rf "$pkgdir/usr/share/doc/"{libvalhalla-dev,libvalhalla0,python-valhalla}
- install -Dm644 COPYING README.md CHANGELOG.md -t "$pkgdir/usr/share/licenses/$pkgname"
- cp -a docs/* "$pkgdir/usr/share/doc/$pkgname/"
+ install -Dm644 COPYING README.md CHANGELOG.md -t "$pkgdir/usr/share/licenses/$_pkgname"
+ cp -a docs/* "$pkgdir/usr/share/doc/$_pkgname/"
}
# vim: set softtabstop=2 shiftwidth=2 expandtab:
diff --git a/protobuf-ifdefs.patch b/protobuf-ifdefs.patch
new file mode 100644
index 000000000000..dbabcb1f0f4b
--- /dev/null
+++ b/protobuf-ifdefs.patch
@@ -0,0 +1,56 @@
+diff --git a/src/mjolnir/valhalla_query_transit.cc b/src/mjolnir/valhalla_query_transit.cc
+index 3c6d4f80d..27207d439 100644
+--- a/src/mjolnir/valhalla_query_transit.cc
++++ b/src/mjolnir/valhalla_query_transit.cc
+@@ -39,7 +39,11 @@ Transit read_pbf(const std::string& file_name) {
+ google::protobuf::io::CodedInputStream cs(
+ static_cast<google::protobuf::io::ZeroCopyInputStream*>(&as));
+ auto limit = std::max(static_cast<size_t>(1), buffer.size() * 2);
++#if GOOGLE_PROTOBUF_VERSION >= 3006000
++ cs.SetTotalBytesLimit(limit);
++#else
+ cs.SetTotalBytesLimit(limit, limit);
++#endif
+ Transit transit;
+ if (!transit.ParseFromCodedStream(&cs)) {
+ throw std::runtime_error("Couldn't load " + file_name);
+diff --git a/valhalla/mjolnir/transitpbf.h b/valhalla/mjolnir/transitpbf.h
+index 604fca71a..a2c8d535e 100644
+--- a/valhalla/mjolnir/transitpbf.h
++++ b/valhalla/mjolnir/transitpbf.h
+@@ -80,7 +80,11 @@ Transit read_pbf(const std::string& file_name, std::mutex& lock) {
+ google::protobuf::io::CodedInputStream cs(
+ static_cast<google::protobuf::io::ZeroCopyInputStream*>(&as));
+ auto limit = std::max(static_cast<size_t>(1), buffer.size() * 2);
++#if GOOGLE_PROTOBUF_VERSION >= 3006000
++ cs.SetTotalBytesLimit(limit);
++#else
+ cs.SetTotalBytesLimit(limit, limit);
++#endif
+ Transit transit;
+ if (!transit.ParseFromCodedStream(&cs)) {
+ throw std::runtime_error("Couldn't load " + file_name);
+@@ -98,7 +102,11 @@ Transit read_pbf(const std::string& file_name) {
+ google::protobuf::io::CodedInputStream cs(
+ static_cast<google::protobuf::io::ZeroCopyInputStream*>(&as));
+ auto limit = std::max(static_cast<size_t>(1), buffer.size() * 2);
++#if GOOGLE_PROTOBUF_VERSION >= 3006000
++ cs.SetTotalBytesLimit(limit);
++#else
+ cs.SetTotalBytesLimit(limit, limit);
++#endif
+ Transit transit;
+ if (!transit.ParseFromCodedStream(&cs)) {
+ throw std::runtime_error("Couldn't load " + file_name);
+@@ -127,7 +135,11 @@ void write_pbf(const Transit& tile, const filesystem::path& transit_tile) {
+ if (!filesystem::exists(transit_tile.parent_path())) {
+ filesystem::create_directories(transit_tile.parent_path());
+ }
++#if GOOGLE_PROTOBUF_VERSION >= 3001000
++ auto size = tile.ByteSizeLong();
++#else
+ auto size = tile.ByteSize();
++#endif
+ valhalla::midgard::mem_map<char> buffer;
+ buffer.create(transit_tile.string(), size);
+ if (!tile.SerializeToArray(buffer.get(), size)) {