aboutsummaryrefslogtreecommitdiffstats
path: root/community/leveldb
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2019-04-15 15:25:24 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-04-16 19:03:18 +0000
commitab339b422695520397b2c6019e4eb64b221cc7dd (patch)
tree17e476539e4e7771c78cefa3904ea48c436e16eb /community/leveldb
parentaf6fef65030279d789dea9f7268e8b071fd1564f (diff)
downloadaports-ab339b422695520397b2c6019e4eb64b221cc7dd.tar.bz2
aports-ab339b422695520397b2c6019e4eb64b221cc7dd.tar.xz
community/leveldb: upgrade to 1.21
Diffstat (limited to 'community/leveldb')
-rw-r--r--community/leveldb/APKBUILD40
-rw-r--r--community/leveldb/fix-cmakelist-soname.patch15
2 files changed, 41 insertions, 14 deletions
diff --git a/community/leveldb/APKBUILD b/community/leveldb/APKBUILD
index 0edc1c5a5d..cb7a1d0709 100644
--- a/community/leveldb/APKBUILD
+++ b/community/leveldb/APKBUILD
@@ -1,30 +1,42 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=leveldb
-pkgver=1.20
-pkgrel=1
+pkgver=1.21
+pkgrel=0
pkgdesc="A fast and lightweight key/value database library by Google"
url="https://github.com/google/leveldb"
arch="all"
license="BSD-3-Clause"
-makedepends="snappy-dev"
+makedepends="cmake snappy-dev"
subpackages="$pkgname-dev $pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz"
-
-builddir="$srcdir/$pkgname-$pkgver"
+source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/$pkgver.tar.gz
+ fix-cmakelist-soname.patch
+ "
build() {
- cd "$builddir"
+ mkdir build && cd build
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DLEVELDB_BUILD_TESTS=ON \
+ -DLEVELDB_INSTALL=ON \
+ -DBUILD_SHARED_LIBS=ON
+
make
}
-package() {
- cd "$builddir"
- mkdir -p "$pkgdir"/usr/lib "$pkgdir"/usr/share/doc
- cp -a out-shared/lib*.so* "$pkgdir"/usr/lib
- cp -a include "$pkgdir"/usr/
- cp -a doc "$pkgdir"/usr/share/doc/$pkgname
+check() {
+ cd "$builddir"/build
+ make test
+}
+package() {
+ cd "$builddir"/build
+ make DESTDIR="$pkgdir" install
+ mkdir -p "$pkgdir"/usr/share/doc
+ cp -a ../doc "$pkgdir"/usr/share/doc/$pkgname
}
-sha512sums="c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2 leveldb-1.20.tar.gz"
+sha512sums="c76eb7d8749ea811e37839a9b5d424b37ac096e7d01c8f29d810a29e16e8af5a284284845869a7c32de62b740ed6a3e98683a969ff4633dba1980e44b5c03c08 leveldb-1.21.tar.gz
+9aee8cce98559d277340828354c8f767398c16dcdafc445541f32b088e54d2055cf8975621da6a0ecfa74634765bed08d677729682910aecf2d69aeb2ed80309 fix-cmakelist-soname.patch"
diff --git a/community/leveldb/fix-cmakelist-soname.patch b/community/leveldb/fix-cmakelist-soname.patch
new file mode 100644
index 0000000000..523114534b
--- /dev/null
+++ b/community/leveldb/fix-cmakelist-soname.patch
@@ -0,0 +1,15 @@
+Already fixed in master so can be removed with next release (1.21+)
+-------------
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -213,6 +213,10 @@
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ )
++
++set_target_properties(leveldb
++ PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
++
+ target_compile_definitions(leveldb
+ PRIVATE
+ # Used by include/export.h when building shared libraries.