summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-07-29 15:52:40 +0000
committerAnthony G. Basile <blueness@gentoo.org>2014-07-29 15:52:40 +0000
commit9cdc4f5e0ca1b540251e18181bdb1092033d19f1 (patch)
treeedb04fdd4c3f7b2a12872592dcfa000e60755558
parentVersion bump, remove older alpha (diff)
downloadgentoo-2-9cdc4f5e0ca1b540251e18181bdb1092033d19f1.tar.gz
gentoo-2-9cdc4f5e0ca1b540251e18181bdb1092033d19f1.tar.bz2
gentoo-2-9cdc4f5e0ca1b540251e18181bdb1092033d19f1.zip
Add patch for libmemenv.a with PIC, bug #505320
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
-rw-r--r--dev-libs/leveldb/ChangeLog8
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch60
-rw-r--r--dev-libs/leveldb/leveldb-1.15.0-r1.ebuild60
3 files changed, 127 insertions, 1 deletions
diff --git a/dev-libs/leveldb/ChangeLog b/dev-libs/leveldb/ChangeLog
index 20b66fff8c50..15031d80d2de 100644
--- a/dev-libs/leveldb/ChangeLog
+++ b/dev-libs/leveldb/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/leveldb
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/leveldb/ChangeLog,v 1.20 2014/06/30 01:13:56 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/leveldb/ChangeLog,v 1.21 2014/07/29 15:52:40 blueness Exp $
+
+*leveldb-1.15.0-r1 (29 Jul 2014)
+
+ 29 Jul 2014; Anthony G. Basile <blueness@gentoo.org>
+ +files/leveldb-1.9.0-memenv-so.patch, +leveldb-1.15.0-r1.ebuild:
+ Add patch for libmemenv.a with PIC, bug #505320
30 Jun 2014; Anthony G. Basile <blueness@gentoo.org> -leveldb-1.10.0.ebuild,
-leveldb-1.11.0.ebuild, -leveldb-1.12.0.ebuild, -leveldb-1.13.0.ebuild:
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch b/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch
new file mode 100644
index 000000000000..0df587a3f9c9
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch
@@ -0,0 +1,60 @@
+--- leveldb-1.9.0.orig/Makefile 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/Makefile 2014-03-28 22:11:05.000000000 +0000
+@@ -61,37 +61,45 @@
+ # Should we build shared libraries?
+ ifneq ($(PLATFORM_SHARED_EXT),)
+
++SHARED1 = $(PLATFORM_SHARED_EXT)
++
+ ifneq ($(PLATFORM_SHARED_VERSIONED),true)
+-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
+ SHARED2 = $(SHARED1)
+ SHARED3 = $(SHARED1)
+-SHARED = $(SHARED1)
++SHARED=%.$(SHARED1)
+ else
+ # Update db.h if you change these.
+ SHARED_MAJOR = 1
+ SHARED_MINOR = 9
+-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
+ SHARED2 = $(SHARED1).$(SHARED_MAJOR)
+ SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
+-SHARED = $(SHARED1) $(SHARED2) $(SHARED3)
+-$(SHARED1): $(SHARED3)
+- ln -fs $(SHARED3) $(SHARED1)
+-$(SHARED2): $(SHARED3)
+- ln -fs $(SHARED3) $(SHARED2)
++SHARED=%.$(SHARED1) %.$(SHARED2) %.$(SHARED3)
++%.$(SHARED1): %.$(SHARED3)
++ ln -fs $< $@
++%.$(SHARED2): %.$(SHARED3)
++ ln -fs $< $@
+ endif
+
+-$(SHARED3):
+- $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3) $(LIBS)
++%.SHARED: $(SHARED)
++ @true
++
++%.$(SHARED3):
++ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$*.$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $^ -o $@ $(LIBS)
++
++libleveldb.$(SHARED3): $(SOURCES)
++libmemenv.$(SHARED3): $(MEMENV_SOURCES)
++
++.SECONDARY: $(subst %,libleveldb,$(SHARED)) $(subst %,libmemenv,$(SHARED))
+
+ endif # PLATFORM_SHARED_EXT
+
+-all: $(SHARED) $(LIBRARY)
++all: libleveldb.SHARED $(LIBRARY)
+
+ check: all $(PROGRAMS) $(TESTS)
+ for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done
+
+ clean:
+- -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
++ -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(subst %,libleveldb,$(SHARED)) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
+ -rm -rf ios-x86/* ios-arm/*
+
+ $(LIBRARY): $(LIBOBJECTS)
diff --git a/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild
new file mode 100644
index 000000000000..87a968f47ca7
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild,v 1.1 2014/07/29 15:52:40 blueness Exp $
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="http://code.google.com/p/leveldb/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cp "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" "${S}/patch"
+ sed -i 's/\(^ SHARED_MINOR =\).*/\1 15/' "${S}/patch"
+ epatch "${S}/patch"
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}