diff options
author | Louis Sautier <sautier.louis@gmail.com> | 2018-06-16 02:25:55 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2018-06-17 22:34:17 +0200 |
commit | 9f7dccacaa7f480ab2f1d230e2673d143483e034 (patch) | |
tree | c865c8f7aefd06e3eb59ff097785eb2ebf9cd108 | |
parent | dev-libs/leveldb: add bugs-to to metadata.xml (diff) | |
download | gentoo-9f7dccacaa7f480ab2f1d230e2673d143483e034.tar.gz gentoo-9f7dccacaa7f480ab2f1d230e2673d143483e034.tar.bz2 gentoo-9f7dccacaa7f480ab2f1d230e2673d143483e034.zip |
dev-libs/leveldb: bump to 1.20, sub-slot to avoid ABI breakage
* Upstream broke the ABI without changing the SONAME so we have to
introduce a sub-slot, see
https://github.com/google/leveldb/issues/536
All reverse dependencies should now have the slot operator set, which
will trigger rebuilds when required. The case of bitcoin is special
because they only support specific leveldb versions.
* Properly handle USE=static-libs when USE=snappy isn't set, change
package.use.mask entry. See https://bugs.gentoo.org/651604
* Update the patch to build libmemenv.so which is required by bitcoin,
see https://github.com/google/leveldb/issues/236
* The patch also disables test building, allowing us to make src_compile
more elegant.
* Remove MIPS patch which was merged: https://github.com/google/leveldb/pull/272
* Bump to EAPI=7
Closes: https://bugs.gentoo.org/609966
Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r-- | dev-libs/leveldb/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch | 33 | ||||
-rw-r--r-- | dev-libs/leveldb/leveldb-1.20.ebuild | 63 | ||||
-rw-r--r-- | profiles/base/package.use.mask | 2 |
4 files changed, 98 insertions, 1 deletions
diff --git a/dev-libs/leveldb/Manifest b/dev-libs/leveldb/Manifest index fe266e35e0c0..b8841988af29 100644 --- a/dev-libs/leveldb/Manifest +++ b/dev-libs/leveldb/Manifest @@ -6,4 +6,5 @@ DIST leveldb-1.14.0.tar.gz 208282 BLAKE2B 438520df4fdaee3cd2439d8f242b119a923e53 DIST leveldb-1.15.0.tar.gz 205691 BLAKE2B 29ebe99ba8b2c44943a2c07c6c0e3a2136c53e15cbbb1fb807cb198b8849433c84ee5c4976fd898a84f2bddb38e543a0e45aedfabc1a46029ca23d39f8b0103e SHA512 af5b18a7750ac553659075c1c34aa2fddf6322b6837f096589cf5908c7050fd19053cd98d19fd7097e0840392b318f0166360d3a0595adcaaabcfdf393246775 DIST leveldb-1.17.tar.gz 207037 BLAKE2B edeb366b9b17fec1a2bc0c0ca8636068bdd65dd1c017a4508c787714da0a202912d1283de9c77c94c9d34784fe552ab344e671fa351ec14f775b1e1037ffbef0 SHA512 d35401a92fa2b59c46e97ab94a9c70d0d5f97dbc7868a75354e088489338c078f47feaa3371489c481317b45ace6bd207d29676f5c18076ced86aa3f9fa44e58 DIST leveldb-1.18.tar.gz 209376 BLAKE2B 08d63fe8aed45d38befd29caddee5a229ff847d254b30be55715793a621e840641d53af47e4fd93286ff0445d6001be26aa00063c075681659f7ceb692184249 SHA512 3d9c55a7bf8692914784ec33c273704ce9978496b071c7b661708f049d0d4ccd51a44441f50c3e536725caeb9896575192f52708a4bb1c0222cecdeec89919a3 +DIST leveldb-1.20.tar.gz 223141 BLAKE2B 57ab5cb191679b8fbfaa28fa0a61ee1dcd757bb9c70215dd325daebfd93b30aa9bbe3c993a1758aa9804a7cd6f2c31df7cf98bdf98320cd1aebc14f5eb77d9a5 SHA512 c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2 DIST leveldb-1.9.0.tar.gz 203872 BLAKE2B 5fa6d361d82bd386a722b24f52b851791555c6cf77939bd6b55feaa75f0db0e216f84b2b3d23f4cac3bf522fb5fcbbf8b7adb46e4731d0ba161c82124cde9abf SHA512 47b0a3272eef2d677ddeb8d0c973e59a1be4bff580528c3bc3f83a654f41485ecc86892d9124ce21ef747c220f98cdad687436849dc978adfd42f8c8c05b9160 diff --git a/dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch b/dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch new file mode 100644 index 000000000000..d443ef0ad262 --- /dev/null +++ b/dev-libs/leveldb/files/leveldb-1.20-memenv-so.patch @@ -0,0 +1,33 @@ +# Create libmemenv.so and don't compile programs by default +# Add a static_programs target to compile test programs +--- a/Makefile 2018-06-03 16:52:28.839614213 +0200 ++++ b/Makefile 2018-06-03 16:52:18.209544310 +0200 +@@ -128,15 +128,27 @@ + ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB1) + $(SHARED_OUTDIR)/$(SHARED_LIB2): $(SHARED_OUTDIR)/$(SHARED_LIB3) + ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB2) ++SHARED_MEMENV_LIB1 = libmemenv.$(PLATFORM_SHARED_EXT) ++SHARED_MEMENV_LIB2 = $(SHARED_MEMENV_LIB1).$(SHARED_VERSION_MAJOR) ++SHARED_MEMENV_LIB3 = $(SHARED_MEMENV_LIB1).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR) ++SHARED_MEMENV_LIBS = $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB1) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB2) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) ++$(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB1): $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) ++ ln -fs $(SHARED_MEMENV_LIB3) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB1) ++$(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB2): $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) ++ ln -fs $(SHARED_MEMENV_LIB3) $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB2) + SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a + endif + + $(SHARED_OUTDIR)/$(SHARED_LIB3): $(SHARED_LIBOBJECTS) + $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED_LIB2) $(SHARED_LIBOBJECTS) -o $(SHARED_OUTDIR)/$(SHARED_LIB3) $(LIBS) ++$(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3): $(SHARED_MEMENVOBJECTS) ++ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED_MEMENV_LIB2) $(SHARED_MEMENVOBJECTS) -o $(SHARED_OUTDIR)/$(SHARED_MEMENV_LIB3) $(LIBS) + + endif # PLATFORM_SHARED_EXT + +-all: $(SHARED_LIBS) $(SHARED_PROGRAMS) $(STATIC_OUTDIR)/libleveldb.a $(STATIC_OUTDIR)/libmemenv.a $(STATIC_PROGRAMS) ++all: $(SHARED_LIBS) $(SHARED_MEMENV_LIBS) ++ ++static_programs: $(STATIC_PROGRAMS) + + check: $(STATIC_PROGRAMS) + for t in $(notdir $(TESTS)); do echo "***** Running $$t"; $(STATIC_OUTDIR)/$$t || exit 1; done diff --git a/dev-libs/leveldb/leveldb-1.20.ebuild b/dev-libs/leveldb/leveldb-1.20.ebuild new file mode 100644 index 000000000000..e8b13b5798a1 --- /dev/null +++ b/dev-libs/leveldb/leveldb-1.20.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib toolchain-funcs + +DESCRIPTION="a fast key-value storage library written at Google" +HOMEPAGE="http://leveldb.org/ https://github.com/google/leveldb" +SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +# https://github.com/google/leveldb/issues/536 +SLOT="0/1" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" +IUSE="+snappy static-libs kernel_FreeBSD +tcmalloc test" + +DEPEND="tcmalloc? ( dev-util/google-perftools ) + snappy? ( + app-arch/snappy:= + )" +RDEPEND="${DEPEND}" + +# https://bugs.gentoo.org/651604 +REQUIRED_USE="snappy? ( !static-libs )" + +# https://github.com/google/leveldb/issues/234 +# https://github.com/google/leveldb/issues/236 +PATCHES=( "${FILESDIR}"/{${PN}-1.18-configure.patch,${P}-memenv-so.patch} ) + +src_configure() { + # These vars all get picked up by build_detect_platform + tc-export AR CC CXX + export OPT="-DNDEBUG ${CPPFLAGS}" + + TARGET_OS=$(usex kernel_FreeBSD FreeBSD Linux) \ + USE_SNAPPY=$(usex snappy) \ + USE_TCMALLOC=no \ + TMPDIR=${T} \ + sh -x ./build_detect_platform build_config.mk ./ || die +} + +src_compile() { + default + usex static-libs && emake out-static/lib{leveldb,memenv}.a + use test && emake static_programs +} + +src_test() { + emake check +} + +src_install() { + insinto /usr/include + doins -r include/. + # This matches the path Debian picked. Upstream provides no guidance. + insinto /usr/include/leveldb/helpers + doins helpers/memenv/memenv.h + + dolib.so out-shared/libleveldb*$(get_libname)* + use static-libs && dolib.a out-static/lib{leveldb,memenv}.a + dolib.so out-shared/libmemenv*$(get_libname)* +} diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask index 4b3e7e6c0c6c..5b96db88c846 100644 --- a/profiles/base/package.use.mask +++ b/profiles/base/package.use.mask @@ -17,7 +17,7 @@ www-plugins/gnash directfb # Requires app-arch/snappy[static-libs] that is no longer available. # Bugs #651604, #651606. app-emulation/qemu static -dev-libs/leveldb static-libs +<dev-libs/leveldb-1.20 static-libs sys-block/fio static sys-cluster/ceph static-libs |