diff options
Diffstat (limited to 'dev-util/build2')
5 files changed, 203 insertions, 4 deletions
diff --git a/dev-util/build2/Manifest b/dev-util/build2/Manifest index beebbfc7df2d..7e6c62be6d49 100644 --- a/dev-util/build2/Manifest +++ b/dev-util/build2/Manifest @@ -1,4 +1,8 @@ +AUX build2-0.13.0-libcpp-undefined-symol-vtable-for-match_any_but_newline-exec.patch 912 BLAKE2B e3e90530c8593be5a6853542299081d795c0ae1719d68fb9c68e1bb7007aa6e43c7311721be5fb7886c5e67f3151a4fa0dbb244a6ee1916f17d6f29f5ce7990c SHA512 262feeffe5cbe9dade81d903c4d07bd1526f7942e42febdf84017d8190d4abcae0e39a8a1799db63018cb62dab0cb9c94f1a8de330aef96549a242f6da54a4cf AUX build2-0.13.0_alpha0_pre20200710-nousrlocal.patch 1931 BLAKE2B 5faca35d7501cd0348910719286bcab2736cd94166db626bd77a62b90512ed6d99fbc2548a6ff30b0f5badecdcaa67a462a6ff11f51af8f9b9faba24fd8edefd SHA512 f57de10af06aa138a7c153e56d35b173a4804324557611baabb38ac00cfde0c8db2b59b57d5ad23a3f76877168745f1d40be1b7527241b47a163df4cc5879967 +AUX build2-0.14.0-update-for-install.patch 508 BLAKE2B 71de52e22fe72ced3368fec8badaa82bd3665706142ba99b602bb5a18203f858b0d8ff4a27cf7041deb5a11f16f544006af04583188ca587a0e8c6b5ffea1851 SHA512 a4fc266ee6904a92bacb83080d19a71f178fb92e38957fe29fe35220f64d1bac5a78306d35b0dfa7086580de597c601a1679f03375590ce76b4fcb52aa435ac9 DIST build2-toolchain-0.13.0.tar.xz 4218940 BLAKE2B ed27290df21e5db843325b3e42c43c6934ce8f2b9b157538b921f9cfe3a7dccc3b56e261053373553cbd7fbff39e912ffe2282f812d0e6f158749ed5748d5e33 SHA512 0485872acd40beb700739b2995f76efcc9811dd52a38ee049576e45fcb5a7d7ae9c718beca8aeab9ab3f1c5e0270d3946f2335f88ec19476577c195417c2dbd4 -EBUILD build2-0.13.0.ebuild 3301 BLAKE2B 62ee4afadbdc4f38fdbe54281c6c12e53dc3b2c3de9ac32300568215d885d71ef2b38cb0704299974936290838db40ac0cf3a48fa4fd2e9af0f75913b1915dec SHA512 7a0da7306be500b845b6c44c0828cb4c7eef6d51f76eb04dfe7ee630f4f41f48d46f892a9ea15283b5694aeed9dee822e2aaf6e9823de4d1a38776f1f50f1d92 +DIST build2-toolchain-0.14.0.tar.xz 4687616 BLAKE2B 98b2ec93c18027cbb3294650b3ad5d3dc97c1f06a6580437eac2db0297d3517cf327179f3a7c6efc611bffed5d028a034382d408ca58a976311d50a26534323c SHA512 d238a4ddfce8506b51b3b775738e818e7e0b36961a09ae0912c0c8688057b8393afebd4c0a28c6e6827c2e72ad5b82bc5e1231f798a66c2bb86b2b1e4ece73ef +EBUILD build2-0.13.0.ebuild 3396 BLAKE2B 2d16b9376910721e4af95c6166e535f059312c7abab5d66e43a2db22288039b3fe346409e5aa7ebbd06a062c7573da88406ac054ae049bb6829f54fdb4f04637 SHA512 9eddaf2a6ba49bc24039b1c2ecae8141f49653418357a8b968bd0baa29d21704b6a73b92028e7dc9a62ab907d4c235f8ac316a73d5d6dbca7439ef9e96c252dc +EBUILD build2-0.14.0.ebuild 4141 BLAKE2B 068e3004941fcff986a2bfa41c23c572cce402ffb4b9d450f94a852089f01f93095dbf3dfb717b8b4f0fe278ae625d356173b8efd0f348f6ef81407096bb04f7 SHA512 5a446d755e7a8cb572246d94a8472151d5e239ba4a8a153f55eb9b99a1c91dfc2c562c4be99cb7cdd781d28e24d9f7a2238584cf263d6679fe616c9e227ce1ce MISC metadata.xml 1094 BLAKE2B 19ebcbb7dddf61a1be4c003e45e6b177aca720ed5e416e5402db5c88b8cbd66edfa12661c099b7cf4aa931ef52211413eea1861aba321b910cc4b1a3426d47ec SHA512 462583a9494a117e1115895730135f9349750befadeb14bf1d5f00794a249fb6ee3b335710159f84c7d1cd26bfc28aaa0759514a015d8668c0e0e5853064c153 diff --git a/dev-util/build2/build2-0.13.0.ebuild b/dev-util/build2/build2-0.13.0.ebuild index e5b6999ee800..be9a2ab78a0a 100644 --- a/dev-util/build2/build2-0.13.0.ebuild +++ b/dev-util/build2/build2-0.13.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -27,6 +27,7 @@ DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}"/${PN}-0.13.0_alpha0_pre20200710-nousrlocal.patch + "${FILESDIR}"/${PN}-0.13.0-libcpp-undefined-symol-vtable-for-match_any_but_newline-exec.patch ) S="${WORKDIR}/${MY_P}" @@ -104,7 +105,6 @@ src_configure() { 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} @@ -120,7 +120,8 @@ src_test() { } src_install() { - b install + b install \ + config.install.chroot="${D}" mkdir -p "${ED}"/usr/share/doc/${PF}/html || die mv -f "${ED}"/usr/share/doc/${PF}/*.xhtml "${ED}"/usr/share/doc/${PF}/html || die } diff --git a/dev-util/build2/build2-0.14.0.ebuild b/dev-util/build2/build2-0.14.0.ebuild new file mode 100644 index 000000000000..7382fef53347 --- /dev/null +++ b/dev-util/build2/build2-0.14.0.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN=build2-toolchain +MY_P="${MY_PN}-${PV}" + +inherit toolchain-funcs multiprocessing +SRC_URI="https://download.build2.org/${PV}/${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-cpp/libodb-2.5.0_beta21 + ~dev-cpp/libodb-sqlite-2.5.0_beta21 + dev-db/sqlite:3 +" +BDEPEND="virtual/pkgconfig" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.13.0_alpha0_pre20200710-nousrlocal.patch + "${FILESDIR}"/${PN}-0.14.0-update-for-install.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 \ + || die + sed \ + -e 's:libsqlite3[/]\?::' \ + -i buildfile build/bootstrap.build \ + || die + + for i in build2/build2/buildfile build2/libbuild2/buildfile; do + printf 'cxx.libs += %s\ncxx.poptions += %s\n' \ + "$($(tc-getPKG_CONFIG) libodb --libs)" \ + "$($(tc-getPKG_CONFIG) libodb --cflags)" >> \ + "${i}" \ + || die + printf 'cxx.libs += %s\ncxx.poptions += %s\n' \ + "$($(tc-getPKG_CONFIG) libodb-sqlite --libs)" \ + "$($(tc-getPKG_CONFIG) libodb-sqlite --cflags)" >> \ + "${i}" \ + || die + done + sed \ + -e 's:libodb[/]\?::' \ + -e 's:libodb-sqlite[/]\?::' \ + -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 + + 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.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: build2/ bpkg/ bdep/ libbuild2-kconfig/ \ + config.install.chroot="${D}" + rm -rf "${ED}"/usr/include/odb \ + "${ED}"/usr/include/pkgconf/libpkgconf \ + || die + rm -f "${ED}"/usr/include/sqlite3.h \ + "${ED}"/usr/include/sqlite3ext.h \ + "${ED}"/usr/$(get_libdir)/libodb.so \ + "${ED}"/usr/$(get_libdir)/libodb-*.so \ + "${ED}"/usr/$(get_libdir)/libodb-sqlite.so \ + "${ED}"/usr/$(get_libdir)/libodb-sqlite-*.so \ + "${ED}"/usr/$(get_libdir)/libpkgconf.so \ + "${ED}"/usr/$(get_libdir)/libsqlite3.so \ + "${ED}"/usr/$(get_libdir)/pkgconfig/libodb-sqlite.pc \ + "${ED}"/usr/$(get_libdir)/pkgconfig/libodb.shared.pc \ + "${ED}"/usr/$(get_libdir)/pkgconfig/libodb-sqlite.shared.pc \ + "${ED}"/usr/$(get_libdir)/pkgconfig/libpkgconf.pc \ + "${ED}"/usr/$(get_libdir)/pkgconfig/libodb.pc \ + || die + mkdir -p "${ED}"/usr/share/doc/${PF}/html || die + mv -f "${ED}"/usr/share/doc/${PF}/*.xhtml "${ED}"/usr/share/doc/${PF}/html || die +} diff --git a/dev-util/build2/files/build2-0.13.0-libcpp-undefined-symol-vtable-for-match_any_but_newline-exec.patch b/dev-util/build2/files/build2-0.13.0-libcpp-undefined-symol-vtable-for-match_any_but_newline-exec.patch new file mode 100644 index 000000000000..00b685600c8e --- /dev/null +++ b/dev-util/build2/files/build2-0.13.0-libcpp-undefined-symol-vtable-for-match_any_but_newline-exec.patch @@ -0,0 +1,38 @@ +--- build2-toolchain-0.13.0-orig/build2/libbuild2/script/regex.cxx 2020-06-10 19:25:37.000000000 +1000 ++++ build2-toolchain-0.13.0/build2/libbuild2/script/regex.cxx 2020-08-10 14:00:05.698012838 +1000 +@@ -5,6 +5,35 @@ + + #include <libbuild2/script/regex.hxx> + ++#if defined(_LIBCPP_VERSION) ++template <> ++void ++std::__1::__match_any_but_newline<build2::script::regex::line_char>::__exec(__state& __s) const ++{ ++ if (__s.__current_ != __s.__last_) ++ { ++ switch (*__s.__current_) ++ { ++ case '\r': ++ case '\n': ++ __s.__do_ = __state::__reject; ++ __s.__node_ = nullptr; ++ break; ++ default: ++ __s.__do_ = __state::__accept_and_consume; ++ ++__s.__current_; ++ __s.__node_ = this->first(); ++ break; ++ } ++ } ++ else ++ { ++ __s.__do_ = __state::__reject; ++ __s.__node_ = nullptr; ++ } ++} ++#endif ++ + using namespace std; + + namespace build2 diff --git a/dev-util/build2/files/build2-0.14.0-update-for-install.patch b/dev-util/build2/files/build2-0.14.0-update-for-install.patch new file mode 100644 index 000000000000..28467f67dc24 --- /dev/null +++ b/dev-util/build2/files/build2-0.14.0-update-for-install.patch @@ -0,0 +1,12 @@ +--- build2-toolchain-0.14.0-orig/buildfile 2021-10-19 20:44:33.000000000 +1100 ++++ build2-toolchain-0.14.0/buildfile 2022-03-26 20:47:10.191006537 +1100 +@@ -6,9 +6,6 @@ + # installation instructions in the BOOTSTRAP-* file corresponding to + # your platform/compiler. + # +-assert ($build.meta_operation == 'dist' || \ +- $build.meta_operation == 'configure' || \ +- $build.meta_operation == 'disfigure') 'only dist and configure supported' + + # Package repository URL (or path). + # |