From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/
Date: Fri, 13 May 2022 02:48:45 +0000 (UTC) [thread overview]
Message-ID: <1652408969.7e1fc3f22395c5a7733a1a4462551f69c892ce3e.ionen@gentoo> (raw)
commit: 7e1fc3f22395c5a7733a1a4462551f69c892ce3e
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue May 10 05:32:32 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri May 13 02:29:29 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e1fc3f2
dev-util/mingw64-runtime: re-arrange ebuilds some more
Mostly just style, but also now checking tuples again to ensure
more deterministic results (e.g. a cpp check gone wrong could
give 32bit despite x86_64 tuple), then fallback on the cpp check
rather than die like tuple check formerly did.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../mingw64-runtime-10.0.0-r1.ebuild | 109 ++++++++++++++++++++
.../mingw64-runtime-8.0.0-r3.ebuild | 111 +++++++++++++++++++++
.../mingw64-runtime-9.0.0-r2.ebuild | 109 ++++++++++++++++++++
3 files changed, 329 insertions(+)
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild
new file mode 100644
index 000000000000..8c12697778ba
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="https://www.mingw-w64.org/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# USE=libraries needs working stage2 compiler: bug #665512
+IUSE="headers-only idl libraries tools"
+RESTRICT="strip"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch
+)
+
+pkg_setup() {
+ : ${CBUILD:=${CHOST}}
+ : ${CTARGET:=${CHOST}}
+ [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] &&
+ CTARGET=${CATEGORY#cross-}
+
+ [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false
+
+ [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] &&
+ die "Invalid configuration, please see: https://wiki.gentoo.org/wiki/Mingw"
+}
+
+src_configure() {
+ CHOST=${CTARGET}
+ strip-unsupported-flags
+
+ # Normally mingw64 does not use dynamic linker.
+ # But at configure time it uses $LDFLAGS.
+ # When default -Wl,--hash-style=gnu is passed
+ # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected
+ # for target ld and binaries crash at shutdown.
+ filter-ldflags '-Wl,--hash-style=*'
+
+ local prefix=${EPREFIX}/usr
+ ${MW_CROSS} && prefix+=/${CTARGET}/usr
+
+ local conf=(
+ --prefix="${prefix}"
+ --libdir="${prefix}"/lib
+ $(use_with !headers-only crt)
+
+ # By default configure tries to set --sysroot=${prefix}. We disable
+ # this behaviour with --with-sysroot=no to use gcc's sysroot default.
+ # That way we can cross-build mingw64-runtime with cross-emerge.
+ --with-sysroot=no
+ )
+
+ if use !headers-only; then
+ conf+=(
+ $(use_enable idl)
+ $(use_with libraries)
+ $(use_with tools)
+ )
+
+ # prefer tuple to determine if should do 32 or 64bits, but fall
+ # back to cpp test if missing (bug #584858, see also #840662)
+ local b32=true
+ case ${CHOST} in
+ x86_64-*) b32=false;;
+ i*86-*) ;;
+ *) [[ $($(tc-getCPP) -dM - <<<'') =~ __MINGW64__ ]] && b32=false;;
+ esac
+ ${b32} &&
+ conf+=( --enable-lib32 --disable-lib64 ) ||
+ conf+=( --disable-lib32 --enable-lib64 )
+
+ # prepare temporary headers install to build against same-version
+ mkdir ../headers || die
+ pushd ../headers >/dev/null || die
+ ECONF_SOURCE=${S} econf --prefix="${T}"/root --without-crt
+ popd >/dev/null || die
+
+ append-cppflags "-I${T}/root/include"
+ fi
+
+ econf "${conf[@]}"
+}
+
+src_compile() {
+ use headers-only || emake -C ../headers install
+
+ default
+}
+
+src_install() {
+ default
+
+ if ${MW_CROSS}; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ rm -r "${ED}"/usr/share || die
+}
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild
new file mode 100644
index 000000000000..f287baeaa601
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="https://www.mingw-w64.org/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# USE=libraries needs working stage2 compiler: bug #665512
+IUSE="headers-only idl libraries tools"
+RESTRICT="strip"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch
+ "${FILESDIR}"/${P}-__rdtsc.patch
+ "${FILESDIR}"/${P}-udivmod.patch
+)
+
+pkg_setup() {
+ : ${CBUILD:=${CHOST}}
+ : ${CTARGET:=${CHOST}}
+ [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] &&
+ CTARGET=${CATEGORY#cross-}
+
+ [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false
+
+ [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] &&
+ die "Invalid configuration, please see: https://wiki.gentoo.org/wiki/Mingw"
+}
+
+src_configure() {
+ CHOST=${CTARGET}
+ strip-unsupported-flags
+
+ # Normally mingw64 does not use dynamic linker.
+ # But at configure time it uses $LDFLAGS.
+ # When default -Wl,--hash-style=gnu is passed
+ # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected
+ # for target ld and binaries crash at shutdown.
+ filter-ldflags '-Wl,--hash-style=*'
+
+ local prefix=${EPREFIX}/usr
+ ${MW_CROSS} && prefix+=/${CTARGET}/usr
+
+ local conf=(
+ --prefix="${prefix}"
+ --libdir="${prefix}"/lib
+ $(use_with !headers-only crt)
+
+ # By default configure tries to set --sysroot=${prefix}. We disable
+ # this behaviour with --with-sysroot=no to use gcc's sysroot default.
+ # That way we can cross-build mingw64-runtime with cross-emerge.
+ --with-sysroot=no
+ )
+
+ if use !headers-only; then
+ conf+=(
+ $(use_enable idl)
+ $(use_with libraries)
+ $(use_with tools)
+ )
+
+ # prefer tuple to determine if should do 32 or 64bits, but fall
+ # back to cpp test if missing (bug #584858, see also #840662)
+ local b32=true
+ case ${CHOST} in
+ x86_64-*) b32=false;;
+ i*86-*) ;;
+ *) [[ $($(tc-getCPP) -dM - <<<'') =~ __MINGW64__ ]] && b32=false;;
+ esac
+ ${b32} &&
+ conf+=( --enable-lib32 --disable-lib64 ) ||
+ conf+=( --disable-lib32 --enable-lib64 )
+
+ # prepare temporary headers install to build against same-version
+ mkdir ../headers || die
+ pushd ../headers >/dev/null || die
+ ECONF_SOURCE=${S} econf --prefix="${T}"/root --without-crt
+ popd >/dev/null || die
+
+ append-cppflags "-I${T}/root/include"
+ fi
+
+ econf "${conf[@]}"
+}
+
+src_compile() {
+ use headers-only || emake -C ../headers install
+
+ default
+}
+
+src_install() {
+ default
+
+ if ${MW_CROSS}; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ rm -r "${ED}"/usr/share || die
+}
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild
new file mode 100644
index 000000000000..8c12697778ba
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="https://www.mingw-w64.org/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# USE=libraries needs working stage2 compiler: bug #665512
+IUSE="headers-only idl libraries tools"
+RESTRICT="strip"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch
+)
+
+pkg_setup() {
+ : ${CBUILD:=${CHOST}}
+ : ${CTARGET:=${CHOST}}
+ [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] &&
+ CTARGET=${CATEGORY#cross-}
+
+ [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false
+
+ [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] &&
+ die "Invalid configuration, please see: https://wiki.gentoo.org/wiki/Mingw"
+}
+
+src_configure() {
+ CHOST=${CTARGET}
+ strip-unsupported-flags
+
+ # Normally mingw64 does not use dynamic linker.
+ # But at configure time it uses $LDFLAGS.
+ # When default -Wl,--hash-style=gnu is passed
+ # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected
+ # for target ld and binaries crash at shutdown.
+ filter-ldflags '-Wl,--hash-style=*'
+
+ local prefix=${EPREFIX}/usr
+ ${MW_CROSS} && prefix+=/${CTARGET}/usr
+
+ local conf=(
+ --prefix="${prefix}"
+ --libdir="${prefix}"/lib
+ $(use_with !headers-only crt)
+
+ # By default configure tries to set --sysroot=${prefix}. We disable
+ # this behaviour with --with-sysroot=no to use gcc's sysroot default.
+ # That way we can cross-build mingw64-runtime with cross-emerge.
+ --with-sysroot=no
+ )
+
+ if use !headers-only; then
+ conf+=(
+ $(use_enable idl)
+ $(use_with libraries)
+ $(use_with tools)
+ )
+
+ # prefer tuple to determine if should do 32 or 64bits, but fall
+ # back to cpp test if missing (bug #584858, see also #840662)
+ local b32=true
+ case ${CHOST} in
+ x86_64-*) b32=false;;
+ i*86-*) ;;
+ *) [[ $($(tc-getCPP) -dM - <<<'') =~ __MINGW64__ ]] && b32=false;;
+ esac
+ ${b32} &&
+ conf+=( --enable-lib32 --disable-lib64 ) ||
+ conf+=( --disable-lib32 --enable-lib64 )
+
+ # prepare temporary headers install to build against same-version
+ mkdir ../headers || die
+ pushd ../headers >/dev/null || die
+ ECONF_SOURCE=${S} econf --prefix="${T}"/root --without-crt
+ popd >/dev/null || die
+
+ append-cppflags "-I${T}/root/include"
+ fi
+
+ econf "${conf[@]}"
+}
+
+src_compile() {
+ use headers-only || emake -C ../headers install
+
+ default
+}
+
+src_install() {
+ default
+
+ if ${MW_CROSS}; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ rm -r "${ED}"/usr/share || die
+}
next reply other threads:[~2022-05-13 2:48 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 2:48 Ionen Wolkens [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-03 12:31 [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/ Ionen Wolkens
2024-05-30 6:39 Ionen Wolkens
2024-05-22 3:32 Ionen Wolkens
2024-05-21 3:01 Ionen Wolkens
2024-05-21 3:01 Ionen Wolkens
2024-05-07 14:28 Ionen Wolkens
2024-03-24 18:39 Ionen Wolkens
2024-01-15 17:33 Ionen Wolkens
2023-12-22 17:38 Ionen Wolkens
2023-06-26 10:12 Ionen Wolkens
2023-04-29 9:43 Ionen Wolkens
2022-10-31 0:54 Ionen Wolkens
2022-10-23 7:20 Ionen Wolkens
2022-09-14 23:24 Ionen Wolkens
2022-07-16 17:03 Ionen Wolkens
2022-06-29 17:48 Ionen Wolkens
2022-06-29 17:22 Ionen Wolkens
2022-06-21 2:01 Ionen Wolkens
2022-06-21 2:01 Ionen Wolkens
2022-05-21 18:38 Ionen Wolkens
2022-05-21 18:38 Ionen Wolkens
2022-05-14 2:23 Ionen Wolkens
2022-05-13 2:48 Ionen Wolkens
2022-05-13 2:48 Ionen Wolkens
2022-04-24 21:09 Ionen Wolkens
2022-04-22 8:02 Ionen Wolkens
2022-04-17 2:33 Ionen Wolkens
2022-04-17 2:33 Ionen Wolkens
2022-04-17 2:33 Ionen Wolkens
2022-04-17 2:33 Ionen Wolkens
2021-07-05 22:50 Sergei Trofimovich
2021-04-16 10:25 David Seifert
2020-09-30 18:28 Sergei Trofimovich
2020-09-30 18:28 Sergei Trofimovich
2020-01-12 16:43 Sergei Trofimovich
2020-01-12 16:43 Sergei Trofimovich
2019-09-16 21:18 Sergei Trofimovich
2019-08-13 7:10 Sergei Trofimovich
2018-11-25 15:27 Sergei Trofimovich
2018-10-06 22:59 Sergei Trofimovich
2018-10-06 17:35 Sergei Trofimovich
2018-10-05 22:43 Sergei Trofimovich
2018-09-17 22:05 Alon Bar-Lev
2018-06-15 20:56 Alon Bar-Lev
2018-03-24 21:16 Sergei Trofimovich
2018-03-24 14:34 Sergei Trofimovich
2018-01-07 19:39 Sergei Trofimovich
2017-12-29 11:45 Sergei Trofimovich
2017-05-22 9:46 Alon Bar-Lev
2017-03-29 20:04 Alon Bar-Lev
2017-01-06 18:39 Alon Bar-Lev
2016-11-11 23:39 Alon Bar-Lev
2016-08-07 19:40 Alon Bar-Lev
2016-06-07 19:10 Alon Bar-Lev
2015-08-14 7:50 Alon Bar-Lev
2015-08-14 7:50 Alon Bar-Lev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1652408969.7e1fc3f22395c5a7733a1a4462551f69c892ce3e.ionen@gentoo \
--to=ionen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox