diff options
author | Mark Wright <gienah@gentoo.org> | 2020-07-21 20:42:11 +1000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2020-07-21 20:56:07 +1000 |
commit | 0313417f6c230e8392b630963377b84fcb33deab (patch) | |
tree | ec5c553603bf2b51beb56893be174eac5982f85c /dev-cpp | |
parent | dev-cpp/libodb: Add for dev-util/build2 (diff) | |
download | gentoo-0313417f6c230e8392b630963377b84fcb33deab.tar.gz gentoo-0313417f6c230e8392b630963377b84fcb33deab.tar.bz2 gentoo-0313417f6c230e8392b630963377b84fcb33deab.zip |
dev-cpp/libodb-sqlite: 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')
-rw-r--r-- | dev-cpp/libodb-sqlite/Manifest | 2 | ||||
-rw-r--r-- | dev-cpp/libodb-sqlite/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch | 52 | ||||
-rw-r--r-- | dev-cpp/libodb-sqlite/libodb-sqlite-2.5.0_beta19.ebuild | 117 | ||||
-rw-r--r-- | dev-cpp/libodb-sqlite/metadata.xml | 20 |
4 files changed, 191 insertions, 0 deletions
diff --git a/dev-cpp/libodb-sqlite/Manifest b/dev-cpp/libodb-sqlite/Manifest new file mode 100644 index 000000000000..1e13937d4668 --- /dev/null +++ b/dev-cpp/libodb-sqlite/Manifest @@ -0,0 +1,2 @@ +DIST build2-toolchain-0.13.0.tar.xz 4218940 BLAKE2B ed27290df21e5db843325b3e42c43c6934ce8f2b9b157538b921f9cfe3a7dccc3b56e261053373553cbd7fbff39e912ffe2282f812d0e6f158749ed5748d5e33 SHA512 0485872acd40beb700739b2995f76efcc9811dd52a38ee049576e45fcb5a7d7ae9c718beca8aeab9ab3f1c5e0270d3946f2335f88ec19476577c195417c2dbd4 +DIST libodb-sqlite-2.5.0-b.19.tar.gz 74822 BLAKE2B e9a5d3be8b453bcdc026b6349572c3bd88eb468329216bee535f4e1ac72bfe6c88b485efe2476303600209df42023099fdda88b410d9295e8cab73ed9dd03fc0 SHA512 be6dbc731d9f45dfc7e9246f404edad78d59c9d38cff6599aed56d60d4f0e8391336e2da3608f66d74559f0a8d34243eb38e7e6a1221188959321810193ae901 diff --git a/dev-cpp/libodb-sqlite/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch b/dev-cpp/libodb-sqlite/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch new file mode 100644 index 000000000000..c3717856b6b7 --- /dev/null +++ b/dev-cpp/libodb-sqlite/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-sqlite/libodb-sqlite-2.5.0_beta19.ebuild b/dev-cpp/libodb-sqlite/libodb-sqlite-2.5.0_beta19.ebuild new file mode 100644 index 000000000000..a8f86d0c81e3 --- /dev/null +++ b/dev-cpp/libodb-sqlite/libodb-sqlite-2.5.0_beta19.ebuild @@ -0,0 +1,117 @@ +# 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=" + dev-cpp/libodb + dev-db/sqlite:3 +" +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() { + cd "${WORKDIR}" || die + for i in ${BUILD2_P}/libodb-sqlite/buildfile ${MY_P}/buildfile; do + printf 'cxx.libs += %s\ncxx.poptions += %s\n' \ + "-L${EPREFIX}/usr/$(get_libdir) $($(tc-getPKG_CONFIG) sqlite3 --libs)" \ + "$($(tc-getPKG_CONFIG) sqlite3 --cflags)" >> \ + ${i} \ + || die + done + + cd "${BS}" || die + eapply "${FILESDIR}"/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch + 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 + + cd "${S}" || 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-sqlite/metadata.xml b/dev-cpp/libodb-sqlite/metadata.xml new file mode 100644 index 000000000000..31fe31dbd5b6 --- /dev/null +++ b/dev-cpp/libodb-sqlite/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> |