diff options
author | Mark Wright <gienah@gentoo.org> | 2020-07-19 23:33:07 +1000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2020-07-19 23:34:18 +1000 |
commit | 67e602f6277beb596fe894ff8c11629c347eba8d (patch) | |
tree | fd23b85be247111ee1761414eb7f079605e14bd3 /dev-util/build2 | |
parent | net-im/ejabberd: keyworded 20.04 for ppc (diff) | |
download | gentoo-67e602f6277beb596fe894ff8c11629c347eba8d.tar.gz gentoo-67e602f6277beb596fe894ff8c11629c347eba8d.tar.bz2 gentoo-67e602f6277beb596fe894ff8c11629c347eba8d.zip |
dev-util/build2: for developing and packaging C and C++ code
Co-Authored-By: 4nykey@gmail.com
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'dev-util/build2')
-rw-r--r-- | dev-util/build2/Manifest | 1 | ||||
-rw-r--r-- | dev-util/build2/build2-0.13.0_alpha0_pre20200718101251.ebuild | 101 | ||||
-rw-r--r-- | dev-util/build2/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch | 52 | ||||
-rw-r--r-- | dev-util/build2/metadata.xml | 34 |
4 files changed, 188 insertions, 0 deletions
diff --git a/dev-util/build2/Manifest b/dev-util/build2/Manifest new file mode 100644 index 000000000000..a30c3d8a0c9d --- /dev/null +++ b/dev-util/build2/Manifest @@ -0,0 +1 @@ +DIST build2-toolchain-0.13.0-a.0.20200718101251.64a2db402f5e.tar.xz 4156700 BLAKE2B c05e1beaf482c32889496763f84382e0ee2585b6961fabc494b34dec940378e4450d07e2b704317419d19695d6372575fb8a3915fa85b2ce3818a9e60940375f SHA512 6ea69f84904f4ba7711fc6ec49f631eded65e7e36ab41b4264b96badf347b628b04e28873490886c7dd77f542fd6e8ecac71ab381c537cf05b269e5cc255188a diff --git a/dev-util/build2/build2-0.13.0_alpha0_pre20200718101251.ebuild b/dev-util/build2/build2-0.13.0_alpha0_pre20200718101251.ebuild new file mode 100644 index 000000000000..20a81aeca39e --- /dev/null +++ b/dev-util/build2/build2-0.13.0_alpha0_pre20200718101251.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +COMMIT="64a2db402f5e" +MY_PN=build2-toolchain +MY_P="${MY_PN}-$(ver_cut 1-3)-a.$(ver_cut 5).$(ver_cut 7).${COMMIT}" + +inherit toolchain-funcs multiprocessing +SRC_URI="https://stage.build2.org/0/$(ver_cut 1-3)-a.$(ver_cut 5)/${MY_P}.tar.xz" +KEYWORDS="~amd64 ~x86" +DESCRIPTION="cross-platform toolchain for building and packaging C++ code" +HOMEPAGE="https://build2.org" + +LICENSE="MIT" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-db/sqlite:3 +" +DEPEND="virtual/pkgconfig + ${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.13.0_alpha0_pre20200710-nousrlocal.patch +) + +S="${WORKDIR}/${MY_P}" + +b() { + local myargs=( + --jobs $(makeopts_jobs) + --verbose 3 + ) + export LD_LIBRARY_PATH="${S}/libbutl/libbutl:${S}/build2/libbuild2:${S}/build2/libbuild2/bash:${S}/build2/libbuild2/in:${S}/build2/libbuild2/bin:${S}/build2/libbuild2/c:${S}/build2/libbuild2/cc:${S}/build2/libbuild2/cxx:${S}/build2/libbuild2/version:${S}/libpkgconf/libpkgconf:${LD_LIBRARY_PATH}" + set -- "${S}"/build2/build2/b-boot "${@}" "${myargs[@]}" + echo "${@}" + "${@}" || die "${@} failed" +} + +src_prepare() { + 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 + sed \ + -e 's:libsqlite3[/]\?::' \ + -i buildfile build/bootstrap.build + + if has_version dev-util/pkgconf; then + for i in build2/buildfile libbuild2/buildfile; do + printf 'cxx.libs += %s\ncxx.poptions += %s\n' \ + "$($(tc-getPKG_CONFIG) libpkgconf --libs)" "$($(tc-getPKG_CONFIG) libpkgconf --cflags)" >> \ + "${i}" + done + sed \ + -e 's:libpkgconf[/]\?::' \ + -i buildfile build/bootstrap.build + fi + + default +} + +src_configure() { + emake -C build2 -f bootstrap.gmake \ + CXX=$(tc-getCXX) \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" + + 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 + mkdir -p "${ED}"/usr/share/doc/${PF}/html + mv -f "${ED}"/usr/share/doc/${PF}/*.xhtml "${ED}"/usr/share/doc/${PF}/html +} diff --git a/dev-util/build2/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch b/dev-util/build2/files/build2-0.13.0_alpha0_pre20200710-nousrlocal.patch new file mode 100644 index 000000000000..c3717856b6b7 --- /dev/null +++ b/dev-util/build2/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-util/build2/metadata.xml b/dev-util/build2/metadata.xml new file mode 100644 index 000000000000..4380b642027e --- /dev/null +++ b/dev-util/build2/metadata.xml @@ -0,0 +1,34 @@ +<?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"> + build2 is an open source (MIT), cross-platform build toolchain + for developing and packaging C and C++ code. It is a hierarchy + of tools that includes the build system, package dependency + manager (for package consumption), and project dependency + manager (for project development). Key features: + + Next-generation, Cargo-like integrated build toolchain for C + and C++. + + Covers entire project lifecycle: creation, development, + testing, and delivery. + + Uniform and consistent interface across all platforms and + compilers. + + Fast, multi-threaded build system with parallel building and + testing. + + Archive and version control-based package repositories. + + Dependency-free, all you need is a C++ compiler. + </longdescription> + <upstream> + <remote-id type="github">build2/build2</remote-id> + </upstream> +</pkgmetadata> |