aboutsummaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorPaul Healy <lmiphay@gmail.com>2016-01-07 21:55:45 +0000
committerPaul Healy <lmiphay@gmail.com>2016-01-07 21:55:45 +0000
commit1bbcefc8b98eccd8c7e1a66075461bb1ed29099c (patch)
tree3f9671aa2102eae8091d976757dc17326ae3a67b /dev-db
parentmake the cleaned plasmate a use optional dep (diff)
downloadlmiphay-1bbcefc8b98eccd8c7e1a66075461bb1ed29099c.tar.gz
lmiphay-1bbcefc8b98eccd8c7e1a66075461bb1ed29099c.tar.bz2
lmiphay-1bbcefc8b98eccd8c7e1a66075461bb1ed29099c.zip
add live ebuild for mariadb++
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mariadb++/Manifest2
-rw-r--r--dev-db/mariadb++/files/makefile.patch72
-rw-r--r--dev-db/mariadb++/mariadb++-9999.ebuild34
3 files changed, 108 insertions, 0 deletions
diff --git a/dev-db/mariadb++/Manifest b/dev-db/mariadb++/Manifest
new file mode 100644
index 0000000..e256bfa
--- /dev/null
+++ b/dev-db/mariadb++/Manifest
@@ -0,0 +1,2 @@
+AUX makefile.patch 1970 SHA256 a0704fd728a0413190ab1d81e5c76e729cde7eb59025c990f9a86dd2338bca19 SHA512 fdaa4f0a2277855f8e72c2c94547fe8cd08c19d260a9bbf62a1d60ba87e66c8c4fc7ab663a752c29a2885c30837928e98c4d48307635bae9b458f60a59506a12 WHIRLPOOL 509e5cd385dce3fa02c6162554e0ffb8bd9e7d6a6404e8f2849ba36d381d67f96f6a518b061bbfe893e96a9402edc4b8a5417ea2151ddb13344b734ea7410de7
+EBUILD mariadb++-9999.ebuild 727 SHA256 3738f26ca271799630f73eb1b7434e0646863b32469cb4b4dff8fd506614298a SHA512 5a81f16a612bb56f68522f814a21cadbcbf108f70db5afc8c86cbd1538db379d844d6064af4b3fdfde0f7a9476e293a9699b1d8924f90d37bc7819ca377f2edf WHIRLPOOL dd8fc96081d4a6dc4ea5611d7cc2b3a382030fd4b509796f346a51bd3e45d0da431f4d2b3572484765fdb60b5c4ab2050df09c3698c2292dca707de8cc3e6a0f
diff --git a/dev-db/mariadb++/files/makefile.patch b/dev-db/mariadb++/files/makefile.patch
new file mode 100644
index 0000000..68283fb
--- /dev/null
+++ b/dev-db/mariadb++/files/makefile.patch
@@ -0,0 +1,72 @@
+diff --git a/makefile b/makefile
+index 9321d8f..a010a28 100644
+--- a/makefile
++++ b/makefile
+@@ -2,7 +2,8 @@
+
+ # Includes
+ IDIR =include
+-IDIR_NATIVE?=../mariadb-native-client/include
++# e.g. this should point at either the GPL MySQL C driver, or the LGPL MariaDB Connector/C
++IDIR_MYSQLC =/usr/include/mysql
+
+ # Default folders
+ ODIR=obj
+@@ -14,28 +15,29 @@ DIRS=$(LDIR) $(ODIR) $(OSDIR)
+ # Sources
+ SRCS=account.cpp bind.cpp concurrency.cpp connection.cpp date_time.cpp decimal.cpp exceptions.cpp last_error.cpp private.cpp result_set.cpp save_point.cpp statement.cpp time.cpp time_span.cpp transaction.cpp worker.cpp
+
+-CXX =g++
+ AR =ar -r -s
+-CPPFLAGS=-I$(IDIR) -I$(IDIR_NATIVE) -std=c++11 #-DMARIADB_WITHOUT_CPP11
+-CXXFLAGS=-Wall -O2
++CPPFLAGS=-I$(IDIR) -I$(IDIR_MYSQLC) -std=c++11 #-DMARIADB_WITHOUT_CPP11
+ LIBS =-lz -lssl -lstdc++ -pthread
+ TARGET =libmariadb++.a
+-MKDIR =mkdir -p
++SHLIB_TARGET =libmariadb++.so
+
+ OBJS=$(patsubst %.cpp,$(OSDIR)/%.o,$(SRCS))
+ DEPS=$(patsubst %.cpp,$(OSDIR)/%.d,$(SRCS))
+
+-.PHONY: clean all
++.PHONY: clean all makedirs
+
+-all: $(TARGET)
++all: makedirs $(LDIR)/$(TARGET) $(LDIR)/$(SHLIB_TARGET)
+
+ # Build target
+-$(TARGET): makedirs $(LDIR) $(ODIR) $(OSDIR) $(OBJS) $(DEPS)
++$(LDIR)/$(TARGET): $(OBJS) $(DEPS)
+ $(AR) $(LDIR)/$(TARGET) $(OBJS)
+
++$(LDIR)/$(SHLIB_TARGET): $(OBJS) $(DEPS)
++ $(CXX) -shared -Wl,-soname,libmariadb++.so.1 -o $(LDIR)/$(SHLIB_TARGET) $(OBJS)
++
+ # Objects generation
+ $(OSDIR)/%.o: $(SDIR)/%.cpp
+- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@
+
+ # Generating dependencies
+ $(OSDIR)/%.d: $(SDIR)/%.cpp
+@@ -43,17 +45,8 @@ $(OSDIR)/%.d: $(SDIR)/%.cpp
+
+ #Cleanup objects / dependencies and target
+ clean:
+- rm -f $(OBJS) $(DEPS) $(TARGET)
++ rm -rf $(DIRS)
+
+-# Create directories
+ makedirs:
+- @$(call make-dirs)
+-
+-define make-dirs
+- for dir in $(DIRS);\
+- do\
+- mkdir -p $$dir;\
+- done
+-endef
+-
++ mkdir -p $(DIRS)
+
diff --git a/dev-db/mariadb++/mariadb++-9999.ebuild b/dev-db/mariadb++/mariadb++-9999.ebuild
new file mode 100644
index 0000000..cc3850d
--- /dev/null
+++ b/dev-db/mariadb++/mariadb++-9999.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib bzr
+
+DESCRIPTION="A C++ client library for the MariaDB and MySQL databases"
+HOMEPAGE="https://launchpad.net/mariadb++"
+EBZR_REPO_URI="lp:mariadb++"
+
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ || ( dev-db/mariadb dev-db/mariadb-connector-c )
+ dev-libs/openssl
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/makefile.patch"
+}
+
+src_install() {
+ dolib.a lib/libmariadb++.a
+ newlib.so lib/libmariadb++.so libmariadb++.so.1
+ dosym libmariadb++.so.1 /usr/$(get_libdir)/libmariadb++.so
+ insinto /usr/include
+ doins -r include/mariadb++
+}