From 046c3c0984fd20387a9f86cdd0842fd81e70d94f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Jan 2023 11:54:41 +0000 Subject: gentoo auto-resync : 15:01:2023 - 11:54:40 --- dev-util/Manifest.gz | Bin 68404 -> 68413 bytes dev-util/mingw64-toolchain/Manifest | 2 + .../mingw64-toolchain-10.0.0_p2.ebuild | 315 +++++++++++++++++++++ dev-util/scons/Manifest | 2 +- dev-util/scons/scons-4.4.0-r1.ebuild | 1 - 5 files changed, 318 insertions(+), 2 deletions(-) create mode 100644 dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p2.ebuild (limited to 'dev-util') diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz index 0734100b379b..d5f1de52cdf6 100644 Binary files a/dev-util/Manifest.gz and b/dev-util/Manifest.gz differ diff --git a/dev-util/mingw64-toolchain/Manifest b/dev-util/mingw64-toolchain/Manifest index 69e99caf3162..b7c884f59f03 100644 --- a/dev-util/mingw64-toolchain/Manifest +++ b/dev-util/mingw64-toolchain/Manifest @@ -3,7 +3,9 @@ AUX gcc-12.2.0-drop-cflags-sed.patch 1077 BLAKE2B 4e0ff834cbfd4597c67d9adf2e287f AUX mingw64-runtime-10.0.0-msvcr-extra-race.patch 1987 BLAKE2B 120aa8ad9ee269ee39b3724b3ff26ecfe0865508f655919e0ac69733ed5a41454725d8756c41094ec431f2a1df947db9542ead5d81088db4085d7169e6fcfb6d SHA512 02b696643276cbcd8c129e8a03cc8843f86d0c06608260eb391112fa1aeea49f9458c6978600fc344e8293b032e4482efcc19afd3a61747594888abcc0be6e11 AUX mingw64-runtime-10.0.0-tmp-files-clash.patch 572 BLAKE2B c0604bf4bcc3de23a4144bb1482e824c145e51e19468489702002c8d0e446dbd896424d1cd498329e144892e46349286d3d9fdf257a1cc181ee0ea6f87a25b3c SHA512 01eb77360b609a32bfa65da5b4ca4c737144514c43d1d05b462e2dec8051aef921fde23ec2c39c17444464ba46354dbe109e9267b8fa77a929be1550711290fd DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 +DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173 DIST mingw-w64-v10.0.0.tar.bz2 9620291 BLAKE2B 451372403289c492ca939d65bb4d9f6e9fa6bdd6b32d79d6438d858e106e8cc291712ada1f3f7b951a4c6908e7d0385d485ca76920af39bcf86effa48408e330 SHA512 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516 EBUILD mingw64-toolchain-10.0.0_p1-r2.ebuild 9715 BLAKE2B 42bb3caaee09901b0d0ab7e90f3f53fefd3d220e4a99305130c504c387661595789acffd6ef65cdfac549f037ebfaf17294bdea287646634dd34cdccf8c9bbee SHA512 79f4bb56176112f4e77b9d7b1c8a309d56ff261fb0805a65be0dea7629163fe7d9a93fb800ea006b4d71751cb6bddff929de5491e1e84e322874470d943a146d +EBUILD mingw64-toolchain-10.0.0_p2.ebuild 9962 BLAKE2B 97e47aa304cb0750735821124466803b0dfb209f491daafc825b7e4f8c4a7add4f866ccba109353cc4af7cd020635ce8ccbaeb467ccce3fe000262419d0a908b SHA512 ecb1404d7e7593258d81c642f4ba9808aa0bfb3825cbda878ebc6ce10ce372cd17619eccd25b8e53663c53e42a97c4c956cc9f18388c7dadc343d223f0ca6492 MISC metadata.xml 432 BLAKE2B 273e7dd75d25bd1857a83a8fbad8705413e2780589beca8e9841fabd266f1e94d6f85875901829cbdd5bfd979d23c1ebacb3b07a04cb48388e0a10656ade6cca SHA512 71bf6b85f6b8b8640167a464296199f8d91d36ef048a21a1bd55383dc5ee6ccace50b153e6945163d197f8227f05c2f339899e5b3c5c67e01896241326b2f313 diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p2.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p2.ebuild new file mode 100644 index 000000000000..4fcbb96b0cb6 --- /dev/null +++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p2.ebuild @@ -0,0 +1,315 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) +inherit edo flag-o-matic multilib-build toolchain-funcs + +# Pick versions known to work for Wine and use vanilla for simplicity, +# ideally update only on mingw64-runtime bumps or if toolchain is getting +# too outdated to avoid rebuilding the entire toolchain too often. +# Do _p1++ rather than revbump if changing without bumping mingw64 itself. +BINUTILS_PV=2.40 +GCC_PV=12.2.0 +MINGW_PV=$(ver_cut 1-3) + +DESCRIPTION="All-in-one mingw64 toolchain intended for building Wine without crossdev" +HOMEPAGE=" + https://www.mingw-w64.org/ + https://gcc.gnu.org/ + https://sourceware.org/binutils/" +SRC_URI=" + mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${MINGW_PV}.tar.bz2 + mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz + mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz + https://sourceware.org/pub/binutils/releases/binutils-${BINUTILS_PV}.tar.xz" +S="${WORKDIR}" + +# l1:binutils+gcc, l2:gcc(libraries), l3:mingw64-runtime +LICENSE=" + GPL-3+ + LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) + ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain" +SLOT="0" +# unkeyworded for testing new binutils, keywording may wait until can bump +# either gcc or mingw64-runtime at same time given the long build time +#KEYWORDS="-* ~amd64 ~x86" +IUSE="+abi_x86_32 custom-cflags debug" + +RDEPEND=" + dev-libs/gmp:= + dev-libs/mpc:= + dev-libs/mpfr:= + sys-libs/zlib:= + virtual/libiconv" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/mingw64-runtime-10.0.0-msvcr-extra-race.patch + "${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch + "${FILESDIR}"/gcc-11.3.0-plugin-objdump.patch + "${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} == binary ]] && return + + tc-is-cross-compiler && + die "cross-compilation of the toolchain itself is unsupported" +} + +src_prepare() { + # rename directories to simplify both patching and the ebuild + mv binutils{-${BINUTILS_PV},} || die + mv gcc{-${GCC_PV},} || die + mv mingw-w64-v${MINGW_PV} mingw64 || die + + default +} + +src_compile() { + # not great but do everything in src_compile given bootstrapping + # process needs to be done in steps of configure+compile+install + # (done modular to have most package-specific things in one place) + + CTARGET=$(usex x86 i686 x86_64)-w64-mingw32 + + MWT_D=${T}/root # moved to ${D} in src_install + local mwtdir=/usr/lib/${PN} + local prefix=${EPREFIX}${mwtdir} + local sysroot=${MWT_D}${prefix} + local -x PATH=${sysroot}/bin:${PATH} + + filter-lto # requires setting up, and may be messy with mingw static libs + use custom-cflags || strip-flags # fancy flags are not realistic here + + local multilib=false + use abi_x86_32 && use abi_x86_64 && multilib=true + + # global configure flags + local conf=( + --build=${CBUILD:-${CHOST}} + --target=${CTARGET} + --{doc,info,man}dir=/.skip # let individual packages handle docs + ) + + # binutils + local conf_binutils=( + --prefix="${prefix}" + --host=${CHOST} + --disable-cet + --disable-default-execstack + --disable-nls + --disable-shared + --with-system-zlib + --without-debuginfod + --without-msgpack + --without-zstd + ) + mwt-binutils() { + # symlink gcc's lto plugin for AR (bug #854516) + ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV%%.*}/liblto_plugin.so \ + "${sysroot}"/lib/bfd-plugins || die + } + + # gcc (minimal -- if need more, disable only in stage1 / enable in stage3) + local conf_gcc=( + --prefix="${prefix}" + --host=${CHOST} + --disable-bootstrap + --disable-cet + --disable-gcov #843989 + --disable-gomp + --disable-libquadmath + --disable-libsanitizer + --disable-libssp + --disable-libvtv + --disable-shared + --disable-werror + --with-gcc-major-version-only + --with-system-zlib + --without-isl + --without-zstd + ) + ${multilib} || conf_gcc+=( --disable-multilib ) + + local conf_gcc_stage1=( + --enable-languages=c + --disable-libatomic + --with-sysroot="${sysroot}" + ) + local -n conf_gcc_stage2=conf_gcc_stage1 + + local conf_gcc_stage3=( + --enable-languages=c,c++ + --enable-threads=posix # needs stage3, and is required for dxvk/vkd3d + --with-sysroot="${prefix}" + --with-build-sysroot="${sysroot}" + ) + + # mingw64-runtime (split in several parts, 3 needed for gcc stages) + local conf_mingw64=( + --prefix="${prefix}"/${CTARGET} + --host=${CTARGET} + --with-sysroot=no + --without-{crt,headers} + + # mingw .dll aren't used by wine and packages wouldn't find them + # at runtime, use crossdev if need dll and proper search paths + --disable-shared + ) + + local conf_mingw64_headers=( + --enable-idl + --with-headers + ) + mwt-mingw64_headers() { ln -s ${CTARGET} "${sysroot}"/mingw || die; } #419601 + + local conf_mingw64_runtime=( --with-crt ) + ${multilib} || + conf_mingw64_runtime+=( $(usex x86 --disable-lib64 --disable-lib32 ) ) + + local conf_mingw64_libraries=( --with-libraries ) + local conf_mingw64_libraries32=( + --libdir="${prefix}"/${CTARGET}/lib32 + --with-libraries + CC="${CTARGET}-gcc -m32" + RCFLAGS="--target=pe-i386 ${RCFLAGS}" + ) + + # mingw64-runtime's idl compiler (useful not to depend on wine for widl) + local conf_widl=( --prefix="${prefix}" ) + + # mwt-build [-x] [stage-name] + # -> ./configure && make && make install && mwt-package() && mwt-package_stage() + # passes conf, conf_package, and conf_package_stage arrays to configure, and + # users can add options through environment with e.g. + # MWT_BINUTILS_CONF="--some-option" + # MWT_GCC_STAGE1_CONF="--some-gcc-stage1-only-option" + # MWT_WIDL_CONF="--some-other-option" + # EXTRA_ECONF="--global-option" (generic naming for if not reading this) + mwt-build() { + if [[ ${1} == -x ]]; then + ( + # cross-compiling, cleanup and let ./configure handle it + unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP + CHOST=${CTARGET} + filter-flags '-fstack-clash-protection' #758914 + filter-flags '-fstack-protector*' #870136 + filter-flags '-fuse-ld=*' + filter-flags '-mfunction-return=thunk*' #878849 + strip-unsupported-flags + mwt-build "${@:2}" + ) + return + fi + + local id=${1##*/} + local build_dir=${WORKDIR}/${1}${2+_${2}}-build + + # econf is not allowed in src_compile and its defaults are + # mostly unused here, so use configure directly + local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" ) + + local -n conf_id=conf_${id} conf_id2=conf_${id}_${2} + [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" ) + [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" ) + + local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF + conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} ) + + einfo "Building ${id}${2+ ${2}} in ${build_dir} ..." + + mkdir -p "${build_dir}" || die + pushd "${build_dir}" >/dev/null || die + + edo "${conf[@]}" + emake + emake DESTDIR="${MWT_D}" install + + declare -f mwt-${id} >/dev/null && edo mwt-${id} + declare -f mwt-${id}_${2} >/dev/null && edo mwt-${id}_${2} + + popd >/dev/null || die + } + + # workaround race condition with out-of-source crt build (bug #879537) + mkdir -p mingw64_runtime-build/mingw-w64-crt/lib{32,64} || die + + # build with same ordering that crossdev would do + stage3 for pthreads + mwt-build binutils + mwt-build mingw64 headers + mwt-build gcc stage1 + mwt-build -x mingw64 runtime + mwt-build gcc stage2 + ${multilib} && mwt-build -x mingw64 libraries32 + mwt-build -x mingw64 libraries + mwt-build gcc stage3 + mwt-build mingw64/mingw-w64-tools/widl + # note: /could/ system-bootstrap if already installed, but gcc and + # libraries will use the system's older mingw64 headers/static-libs + # and make this potentially fragile without more workarounds/stages + + if ${multilib}; then + # Like system's gcc, `x86_64-w64-mingw32-gcc -m32` can build for x86, + # but packages expect crossdev's i686-w64-mingw32-gcc which is the same + # just without 64bit support and would rather not build the toolchain + # twice. Dirty but wrap to allow simple interoperability with crossdev. + mwt-i686_wrapper() { + printf "#!/usr/bin/env sh\nexec \"${prefix}/bin/${bin}\" ${*} "'"${@}"\n' \ + > ${bin32} || die + chmod +x ${bin32} || die + } + pushd "${sysroot}"/bin >/dev/null || die + local bin bin32 + for bin in ${CTARGET}-*; do + bin32=${bin/x86_64-w64/i686-w64} + case ${bin#${CTARGET}-} in + as) mwt-i686_wrapper --32;; + cpp|gcc|gcc-${GCC_PV%%.*}|g++|widl) mwt-i686_wrapper -m32;; + ld|ld.bfd) mwt-i686_wrapper -m i386pe;; + windres) mwt-i686_wrapper --target=pe-i386;; + *) ln -s ${bin} ${bin32} || die;; + esac + done + popd >/dev/null || die + fi + + # portage doesn't know the right strip executable to use for CTARGET + # and it can lead to .a mangling, notably with 32bit (breaks toolchain) + dostrip -x ${mwtdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}} + + # ... and instead do it here given this saves ~60MB + if use !debug; then + einfo "Stripping ${CTARGET} static libraries ..." + find "${sysroot}"/{,lib/gcc/}${CTARGET} -type f -name '*.a' \ + -exec ${CTARGET}-strip --strip-unneeded {} + || die + fi +} + +src_install() { + mv "${MWT_D}${EPREFIX}"/* "${ED}" || die + + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog "Note that this package is primarily intended for Wine and related" + elog "packages to depend on without needing a manual crossdev setup." + elog + elog "Settings are oriented only for what these need and simplicity." + elog "Use sys-devel/crossdev if need full toolchain/customization:" + elog " https://wiki.gentoo.org/wiki/Mingw" + elog " https://wiki.gentoo.org/wiki/Crossdev" + fi + + local cross_gcc=cross-$(usex x86 i686 x86_64)-w64-mingw32/gcc + if has_version ${cross_gcc}; then + # encourage cleanup given users may not realize if switch by default + ewarn "${cross_gcc} is installed, note that ${PN}" + ewarn "is redundant with the *-w64-mingw32/{binutils,gcc,mingw64-runtime}" + ewarn "packages and optionally only one needs to be kept." + fi +} diff --git a/dev-util/scons/Manifest b/dev-util/scons/Manifest index ca0b80acf034..97bd3a1095af 100644 --- a/dev-util/scons/Manifest +++ b/dev-util/scons/Manifest @@ -4,6 +4,6 @@ DIST SCons-4.4.0.tar.gz 3096863 BLAKE2B 60f125c077dd8f50a7150db6dc1234eac988cf7e DIST scons-4.4.0-user.html 1608381 BLAKE2B ff4eb1e0f9c5e8ea7ca44cc00dc37e3e2dd38c24cb09a857c691e6a48f11e5fc86a55740037cc295e6b23df2a1c1b600adf0462320ec87cc26d4bcf919b07342 SHA512 8c1d6578270054efba34c56ddc07b4314bf62630f6a445f5b9f865cc48d593f6c92101a8d216dece201b8d6cb5bce59ff4adb51caaa40128e96b6235087f748c DIST scons-4.4.0-user.pdf 2964111 BLAKE2B 45b37c99c3f3d0e9969a16506e27aeabfd562155405f5a59ba79c24404b14e5588fbd0673d86e2266adbd25eca140c9e1cf86e271228658591c0d9285474f078 SHA512 57330f685e7c775cb1c782e40f711c2b2322fad19212a22a920aff92db974610cc78f276e1606fb827660bb488ce803e2458bb9d93c452fa0600df4478f03d06 DIST scons-4.4.0.gh.tar.gz 5808265 BLAKE2B f6ce757f2edc40551b05285098626bb62def6abda2380d4885ee4443868e715e53aaa34f26c09dc689bb6ade26d1b0e276046fe3b1d2ddf8eb40400bca9ea164 SHA512 01fcd40bf818ca22a278973af1cda3024efb74cf877f15d46607fda860448fbd577fc96ba33fef2bed3d145e662a0371f55e8c927e7ac44feea7f3081791ce11 -EBUILD scons-4.4.0-r1.ebuild 3785 BLAKE2B 35cbb9c2e862f90510fe844e9b17009fe4c0a4cb3c30927d93744de13c639e15eec01e7cc2c689f5868051016382844f0e04fd496d87d284252773dff8c553d8 SHA512 8b1149fe31dffafd80b207f34b87a24a9c8995e9469ef0b957b3cfd2745d86d56f1be13a348dfde2500d2be3e2aff2d90a277fd325f8e89000591f5b69cdee36 +EBUILD scons-4.4.0-r1.ebuild 3748 BLAKE2B 8a0d34afdd7ff554764e41608d75cece47bb47988371da296f5739d2aa2e3d0c7cd589d519edd089b26bae7385727005ab459e23549bd0d3c1a77be4a11faba2 SHA512 c7ae3e2a735b0e3adcd7b2fad1bc030eb3c557a51cc200bd38026e06c6e4adadffba236bceca0b79c47626aaf12e6da5ab74313766434927eaa9381ac069a2d0 EBUILD scons-4.4.0.ebuild 3659 BLAKE2B 1bd5799550b7874e8885f538d7ddc68b77c50012a03c8e8f71a1f68f8c3d38aacb8e851754bf1b9c0044d520049231e12630a8b372ae8316bc1da29f364934ef SHA512 1e289c45de9c534f56c851da908bf2d4bc05129b054faa35ba4fe6050077cabcf45b8048cd34e347218345df01ea0b95eee0c1634a4dd291f4be3c47647b84ea MISC metadata.xml 803 BLAKE2B 17a1596fb7b6991a9c4732c8e8c1231cd57ba42ae9e0b65a475f4a00503bacba23ae671df112909688574f836962951dcd2fd7a35bc83c34a0eeb72ecb96bbc2 SHA512 c1451442bdf49d7c85cc84831ea3a8a540581680858dc1ac117080b6a8558419d004952ade0410c0b31d9d241ae3d5eef1c81525ecb80c40cdc380b50f49e1ad diff --git a/dev-util/scons/scons-4.4.0-r1.ebuild b/dev-util/scons/scons-4.4.0-r1.ebuild index 368366ec1db3..b5cb85dfa845 100644 --- a/dev-util/scons/scons-4.4.0-r1.ebuild +++ b/dev-util/scons/scons-4.4.0-r1.ebuild @@ -39,7 +39,6 @@ RESTRICT="!test? ( test )" BDEPEND=" test? ( - dev-libs/libxml2[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] dev-python/psutil[${PYTHON_USEDEP}] ) -- cgit v1.2.3