summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2020-07-21 20:41:04 +1000
committerMark Wright <gienah@gentoo.org>2020-07-21 20:56:07 +1000
commit696d1bbadddd2fa3c3aeded11b85771493a116c3 (patch)
tree75b8c1e0d38fa0ef8c22f733a6cc87132a7e4b50 /dev-cpp/libodb
parentlicenses/Code-Synthesis-ODB add for dev-cpp/libodb (diff)
downloadgentoo-696d1bbadddd2fa3c3aeded11b85771493a116c3.tar.gz
gentoo-696d1bbadddd2fa3c3aeded11b85771493a116c3.tar.bz2
gentoo-696d1bbadddd2fa3c3aeded11b85771493a116c3.zip
dev-cpp/libodb: Add for dev-util/build2
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'dev-cpp/libodb')
-rw-r--r--dev-cpp/libodb/Manifest2
-rw-r--r--dev-cpp/libodb/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch52
-rw-r--r--dev-cpp/libodb/libodb-2.5.0_beta19.ebuild111
-rw-r--r--dev-cpp/libodb/metadata.xml20
4 files changed, 185 insertions, 0 deletions
diff --git a/dev-cpp/libodb/Manifest b/dev-cpp/libodb/Manifest
new file mode 100644
index 000000000000..b7102edd0e66
--- /dev/null
+++ b/dev-cpp/libodb/Manifest
@@ -0,0 +1,2 @@
+DIST build2-toolchain-0.13.0.tar.xz 4218940 BLAKE2B ed27290df21e5db843325b3e42c43c6934ce8f2b9b157538b921f9cfe3a7dccc3b56e261053373553cbd7fbff39e912ffe2282f812d0e6f158749ed5748d5e33 SHA512 0485872acd40beb700739b2995f76efcc9811dd52a38ee049576e45fcb5a7d7ae9c718beca8aeab9ab3f1c5e0270d3946f2335f88ec19476577c195417c2dbd4
+DIST libodb-2.5.0-b.19.tar.gz 101239 BLAKE2B d6c32e4e5bbacafbecf9e992f91604dac4bb50359d41709b81116f09ce805cd2a3388cf14b47acc60d9b5a52867de0725c1dbbc7603dda8ffaf64589b3057ecb SHA512 0a3e70afd2c2ba573676e1a2630986215b4c8e57a004f7d2f2227f301b6c58f739397a0efc8877902baf88b93aff83c9b67c9f5b5e87cc570d64bb76b7b8f66b
diff --git a/dev-cpp/libodb/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch b/dev-cpp/libodb/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch
new file mode 100644
index 000000000000..c3717856b6b7
--- /dev/null
+++ b/dev-cpp/libodb/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch
@@ -0,0 +1,52 @@
+--- build2-toolchain-e135a3112b15c88f0601583ca068f8adea7b605d-orig/build2/libbuild2/cc/module.cxx 2020-07-10 20:12:57.000000000 +1000
++++ build2-toolchain-e135a3112b15c88f0601583ca068f8adea7b605d/build2/libbuild2/cc/module.cxx 2020-07-14 14:33:58.939950579 +1000
+@@ -323,8 +323,6 @@
+
+ #ifndef _WIN32
+ static const dir_path usr_inc ("/usr/include");
+- static const dir_path usr_loc_lib ("/usr/local/lib");
+- static const dir_path usr_loc_inc ("/usr/local/include");
+ # ifdef __APPLE__
+ static const dir_path a_usr_inc (
+ "/Library/Developer/CommandLineTools/SDKs/MacOSX*.sdk/usr/include");
+@@ -486,7 +484,6 @@
+ auto& ls (lib_dirs.first);
+
+ bool ui (find (is.begin (), is.end (), usr_inc) != is.end ());
+- bool uli (find (is.begin (), is.end (), usr_loc_inc) != is.end ());
+
+ #ifdef __APPLE__
+ // On Mac OS starting from 10.14 there is no longer /usr/include.
+@@ -509,7 +506,7 @@
+ //
+ // Is Apple's /usr/include.
+ //
+- if (!ui && !uli)
++ if (!ui)
+ {
+ for (const dir_path& d: is)
+ {
+@@ -521,22 +518,16 @@
+ }
+ }
+ #endif
+- if (ui || uli)
++ if (ui)
+ {
+- bool ull (find (ls.begin (), ls.end (), usr_loc_lib) != ls.end ());
+-
+ // Many platforms don't search in /usr/local/lib by default (but do
+ // for headers in /usr/local/include). So add it as the last option.
+ //
+- if (!ull && exists (usr_loc_lib, true /* ignore_error */))
+- ls.push_back (usr_loc_lib);
+
+ // FreeBSD is at least consistent: it searches in neither. Quoting
+ // its wiki: "FreeBSD can't even find libraries that it installed."
+ // So let's help it a bit.
+ //
+- if (!uli && exists (usr_loc_inc, true /* ignore_error */))
+- is.push_back (usr_loc_inc);
+ }
+ }
+ #endif
diff --git a/dev-cpp/libodb/libodb-2.5.0_beta19.ebuild b/dev-cpp/libodb/libodb-2.5.0_beta19.ebuild
new file mode 100644
index 000000000000..df3cbb7b3e1e
--- /dev/null
+++ b/dev-cpp/libodb/libodb-2.5.0_beta19.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="${PN}-$(ver_cut 1-3)-b.$(ver_cut 5)"
+
+BUILD2_PN=build2-toolchain
+BUILD2_PV="0.13.0"
+BUILD2_P="${BUILD2_PN}-${BUILD2_PV}"
+
+inherit toolchain-funcs multiprocessing
+SRC_URI="https://pkg.cppget.org/1/beta/odb/${MY_P}.tar.gz
+ https://download.build2.org/${BUILD2_PV}/${BUILD2_P}.tar.xz"
+KEYWORDS="~amd64 ~x86"
+DESCRIPTION="Common ODB runtime library"
+HOMEPAGE="https://codesynthesis.com/products/odb/"
+
+LICENSE="|| ( Code-Synthesis-ODB GPL-2 )"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+"
+BDEPEND="virtual/pkgconfig"
+RDEPEND="${DEPEND}
+ !<dev-util/build2-0.13.0
+"
+
+BS="${WORKDIR}/${BUILD2_P}"
+S="${WORKDIR}/${MY_P}"
+
+b() {
+ local myargs=(
+ --jobs $(makeopts_jobs)
+ --verbose 3
+ )
+ export LD_LIBRARY_PATH="${BS}/libbutl/libbutl:${BS}/build2/libbuild2:${BS}/build2/libbuild2/bash:${BS}/build2/libbuild2/in:${BS}/build2/libbuild2/bin:${BS}/build2/libbuild2/c:${BS}/build2/libbuild2/cc:${BS}/build2/libbuild2/cxx:${BS}/build2/libbuild2/version:${BS}/libpkgconf/libpkgconf:${LD_LIBRARY_PATH}"
+ set -- "${BS}"/build2/build2/b-boot "${@}" "${myargs[@]}"
+ echo "${@}"
+ "${@}" || die "${@} failed"
+}
+
+src_prepare() {
+ pushd "${BS}" || die
+ eapply "${FILESDIR}"/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch
+ printf 'cxx.libs += %s\ncxx.poptions += %s\n' \
+ "-L${EPREFIX}/usr/$(get_libdir) $($(tc-getPKG_CONFIG) sqlite3 --libs)" \
+ "$($(tc-getPKG_CONFIG) sqlite3 --cflags)" >> \
+ libodb-sqlite/buildfile \
+ || die
+ sed \
+ -e 's:libsqlite3[/]\?::' \
+ -i buildfile build/bootstrap.build \
+ || die
+
+ if has_version dev-util/pkgconf; then
+ for i in build2/build2/buildfile build2/libbuild2/buildfile; do
+ printf 'cxx.libs += %s\ncxx.poptions += %s\n' \
+ "$($(tc-getPKG_CONFIG) libpkgconf --libs)" \
+ "$($(tc-getPKG_CONFIG) libpkgconf --cflags)" >> \
+ "${i}" \
+ || die
+ done
+ sed \
+ -e 's:libpkgconf[/]\?::' \
+ -i buildfile build/bootstrap.build \
+ || die
+ fi
+ popd || die
+
+ default
+}
+
+src_configure() {
+ pushd "${BS}" || die
+ emake -C build2 -f bootstrap.gmake \
+ CXX=$(tc-getCXX) \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ popd || die
+
+ b configure \
+ config.cxx="$(tc-getCXX)" \
+ config.cxx.coptions="${CXXFLAGS}" \
+ config.cxx.loptions="${LDFLAGS}" \
+ config.c="$(tc-getCC)" \
+ config.cc.coptions="${CFLAGS}" \
+ config.cc.loptions="${LDFLAGS}" \
+ config.bin.ar="$(tc-getAR)" \
+ config.bin.ranlib="$(tc-getRANLIB)" \
+ config.bin.lib=shared \
+ config.install.chroot="${D}" \
+ config.install.root="${EPREFIX}"/usr \
+ config.install.lib="${EPREFIX}"/usr/$(get_libdir) \
+ config.install.doc="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+src_compile() {
+ b update-for-install
+ use test && b update-for-test
+}
+
+src_test() {
+ b test
+}
+
+src_install() {
+ b install
+}
diff --git a/dev-cpp/libodb/metadata.xml b/dev-cpp/libodb/metadata.xml
new file mode 100644
index 000000000000..31fe31dbd5b6
--- /dev/null
+++ b/dev-cpp/libodb/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <longdescription lang="en">
+ ODB is an open-source, cross-platform, and cross-database
+ object-relational mapping (ORM) system for C++. It allows you
+ to persist C++ objects to a relational database without having
+ to deal with tables, columns, or SQL and without manually
+ writing any mapping code. ODB supports MySQL, SQLite,
+ PostgreSQL, Oracle, and Microsoft SQL Server relational
+ databases as well as C++98/03 and C++11 language standards. It
+ also comes with optional profiles for Boost and Qt which allow
+ you to seamlessly use value types, containers, and smart
+ pointers from these libraries in your persistent C++ classes.
+ </longdescription>
+</pkgmetadata>