summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2023-08-22 18:16:35 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2023-08-22 18:16:35 +0000
commit3abf0ef40ab6e4121b542944f82c921b678cbbe7 (patch)
tree87fb541abcecb260b8b36b7e3ed8c97a500b2732
parent2023-08-22 17:46:44 UTC (diff)
parentapp-editors/vscode: remove broken symlink (diff)
downloadgentoo-3abf0ef40ab6e4121b542944f82c921b678cbbe7.tar.gz
gentoo-3abf0ef40ab6e4121b542944f82c921b678cbbe7.tar.bz2
gentoo-3abf0ef40ab6e4121b542944f82c921b678cbbe7.zip
Merge updates from master
-rw-r--r--app-editors/vscode/vscode-1.81.0-r1.ebuild (renamed from app-editors/vscode/vscode-1.81.0.ebuild)1
-rw-r--r--app-editors/vscode/vscode-1.81.1-r1.ebuild (renamed from app-editors/vscode/vscode-1.81.1.ebuild)1
-rw-r--r--dev-libs/simdjson/Manifest2
-rw-r--r--dev-libs/simdjson/simdjson-3.2.3.ebuild (renamed from dev-libs/simdjson/simdjson-3.2.2.ebuild)0
-rw-r--r--eclass/crossdev.eclass77
-rw-r--r--eclass/kernel-2.eclass7
-rw-r--r--mail-mta/courier/Manifest1
-rw-r--r--mail-mta/courier/courier-1.3.3.ebuild311
-rw-r--r--mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch68
-rw-r--r--mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch14
-rw-r--r--mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild66
-rw-r--r--profiles/base/package.use.mask8
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild42
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild43
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild43
-rw-r--r--sys-devel/clang-crossdev-wrappers/metadata.xml11
-rw-r--r--sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild36
-rw-r--r--sys-libs/musl/musl-1.2.4.ebuild34
-rw-r--r--sys-libs/musl/musl-9999.ebuild40
26 files changed, 930 insertions, 127 deletions
diff --git a/app-editors/vscode/vscode-1.81.0.ebuild b/app-editors/vscode/vscode-1.81.0-r1.ebuild
index 5a160dc35b29..fee057a1ff89 100644
--- a/app-editors/vscode/vscode-1.81.0.ebuild
+++ b/app-editors/vscode/vscode-1.81.0-r1.ebuild
@@ -107,7 +107,6 @@ src_install() {
dosym -r "/opt/${PN}/bin/code" "usr/bin/vscode"
dosym -r "/opt/${PN}/bin/code" "usr/bin/code"
- dosym -r "/opt/${PN}/bin/code-tunnel" "usr/bin/code-tunnel"
domenu "${FILESDIR}/vscode.desktop"
domenu "${FILESDIR}/vscode-url-handler.desktop"
domenu "${FILESDIR}/vscode-wayland.desktop"
diff --git a/app-editors/vscode/vscode-1.81.1.ebuild b/app-editors/vscode/vscode-1.81.1-r1.ebuild
index 9c672dc963a9..8a367acedd94 100644
--- a/app-editors/vscode/vscode-1.81.1.ebuild
+++ b/app-editors/vscode/vscode-1.81.1-r1.ebuild
@@ -99,7 +99,6 @@ src_install() {
dosym -r "/opt/${PN}/bin/code" "usr/bin/vscode"
dosym -r "/opt/${PN}/bin/code" "usr/bin/code"
- dosym -r "/opt/${PN}/bin/code-tunnel" "usr/bin/code-tunnel"
domenu "${FILESDIR}/vscode.desktop"
domenu "${FILESDIR}/vscode-url-handler.desktop"
domenu "${FILESDIR}/vscode-wayland.desktop"
diff --git a/dev-libs/simdjson/Manifest b/dev-libs/simdjson/Manifest
index 66ed5cd3ef57..8e2b93cdc9cd 100644
--- a/dev-libs/simdjson/Manifest
+++ b/dev-libs/simdjson/Manifest
@@ -1,4 +1,4 @@
DIST simdjson-3.2.0.gh.tar.gz 1653237 BLAKE2B b1745b2a96d9ff9f7187329191007e63a5f0c7051fb85a97212cf06076740ca01be035858bbb66805d10ba49ff90d05961a8b77750fc0d789e8dfe5865937f0b SHA512 02723d05fe88cfc69c1ec3eef92ae9e7da169a99645992829d4e40a00edecb98e21593dc9e04aeb2959cbcdbb8f40bb464daef9eb26cf3bd344c39271f6add2e
DIST simdjson-3.2.1.gh.tar.gz 1655680 BLAKE2B 5d65c624fb89bf1b50a0287da2ef184d732b5eefa6e76bf39dc7bdbd6fdd6882cae4ddbc6e8c0f0fdd762c5e396828aa32fe99b1aba78e820f7419f3b5fa258e SHA512 eeac785c7868362f51f3fb87cb4e0cfc77b2c4e3767afbe1d22df87f16a3cb4af1dc27a1df5ba3c139cb0a3053bc30afcdcb31515ce4e757c309ed2c0f3f507e
-DIST simdjson-3.2.2.gh.tar.gz 2272967 BLAKE2B 31c8d38ba95b7d8a6542f21a5f7470d3c2fba192a2293a4735ee34f3bfc46f8cd248a2ceeef95a7a66e479a8b90d1453157fee88a465c2ba7ce1aa4c69139799 SHA512 63d62df5d74065af4ca68b9124382141e43106b63932de72aaecb326d39ef49e311829e7de80c88346cae0c70cbfe57f36496e9f0aa81fe1e20589759db11a9e
+DIST simdjson-3.2.3.gh.tar.gz 2273010 BLAKE2B 80df73db30ba898c11b143aaf0bb1c7592092306a67690b20979e7bdbbd8b039bc51b2668110d2a6dccfe6f3cce78ef107990b6f945f68ada1ca3e2f49ad121d SHA512 20436bbb7036e1cfdd4f044e767da0b646bfeb0593b22ba2bf6d76d94733cb90a97ebe88e666a5951cb0fea839601346a52fead9562eb25975510fc5ee04c791
DIST simdjson-data-a5b13babe65c1bba7186b41b43d4cbdc20a5c470.tar.gz 6635706 BLAKE2B 563376147f18d590a176a5a0398365db1a3e677b773c018f335efa7fff05ac22ac5dc37613792082a32e6c9b91a773a590f7dfd15efa5ba660f9142b128b28a7 SHA512 168198404b11b8c76ff4f53645d7b5a88a5c72b4a5b6646b4410859ec3416ae9b37fc59f7d2f014ccc785615ea5c31dc00b145dbb1a7acb701b94029dd4ea1e1
diff --git a/dev-libs/simdjson/simdjson-3.2.2.ebuild b/dev-libs/simdjson/simdjson-3.2.3.ebuild
index 33a873755541..33a873755541 100644
--- a/dev-libs/simdjson/simdjson-3.2.2.ebuild
+++ b/dev-libs/simdjson/simdjson-3.2.3.ebuild
diff --git a/eclass/crossdev.eclass b/eclass/crossdev.eclass
new file mode 100644
index 000000000000..d6c99e4f32b7
--- /dev/null
+++ b/eclass/crossdev.eclass
@@ -0,0 +1,77 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: crossdev.eclass
+# @MAINTAINER:
+# cat@catcream.org
+# @AUTHOR:
+# Alfred Persson Forsberg <cat@catcream.org> (21 Jul 2023)
+# @SUPPORTED_EAPIS: 7 8
+# @BLURB: Convenience wrappers for packages used by the Crossdev tool.
+
+inherit toolchain-funcs
+
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_CROSSDEV_ECLASS} ]]; then
+_CROSSDEV_ECLASS=1
+
+# @ECLASS_VARIABLE: _CROSS_CATEGORY_PREFIX
+# @INTERNAL
+# @DESCRIPTION:
+# This variable specifies the category prefix for a Crossdev
+# package. For GCC Crossdev it is "cross-", and for LLVM it is
+# "cross_llvm-"
+_CROSS_CATEGORY_PREFIX=""
+
+# @ECLASS_VARIABLE: _IS_CROSSPKG_LLVM
+# @INTERNAL
+# @DESCRIPTION:
+# Is true if the package is in a LLVM Crossdev category, otherwise false
+_IS_CROSSPKG_LLVM=0
+if [[ ${CATEGORY} == cross_llvm-* ]] ; then
+ _IS_CROSSPKG_LLVM=1
+ _CROSS_CATEGORY_PREFIX="cross_llvm-"
+fi
+
+# @ECLASS_VARIABLE: _IS_CROSSPKG_GCC
+# @INTERNAL
+# @DESCRIPTION:
+# Is true if the package is in a GCC Crossdev category, otherwise false
+_IS_CROSSPKG_GCC=0
+if [[ ${CATEGORY} == cross-* ]] ; then
+ _IS_CROSSPKG_GCC=1
+ _CROSS_CATEGORY_PREFIX="cross-"
+fi
+
+# @ECLASS_VARIABLE: _IS_CROSSPKG
+# @INTERNAL
+# @DESCRIPTION:
+# Is true if the package is in a any Crossdev category, otherwise false
+[[ ${_IS_CROSSPKG_LLVM} == 1 || ${_IS_CROSSPKG_GCC} == 1 ]] && _IS_CROSSPKG=1
+
+# Default CBUILD and CTARGET to CHOST if unset.
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ # cross-aarch64-gentoo-linux-musl -> aarch64-gentoo-linux-musl
+ [[ ${_IS_CROSSPKG} == 1 ]] && export CTARGET=${CATEGORY#${_CROSS_CATEGORY_PREFIX}}
+fi
+
+# @FUNCTION: target_is_not_host
+# @RETURN: Shell true if we're targeting an triple other than host
+target_is_not_host() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+# @FUNCTION: is_crosspkg
+# @RETURN: Shell true if package belongs to any crossdev category
+is_crosspkg() {
+ [[ ${_IS_CROSSPKG} == 1 ]]
+}
+
+fi
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index bdeabb9fc2dc..dc9ed25e8b60 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -281,7 +281,7 @@
# If you do change them, there is a chance that we will not fix resulting bugs;
# that of course does not mean we're not willing to help.
-inherit estack multiprocessing toolchain-funcs
+inherit crossdev estack multiprocessing toolchain-funcs
case ${EAPI} in
7|8) ;;
@@ -293,11 +293,6 @@ esac
# I will remove it when I come up with something more reasonable.
[[ ${PROFILE_ARCH} == ppc64 ]] && CHOST="powerpc64-${CHOST#*-}"
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then
- export CTARGET=${CATEGORY/cross-}
-fi
-
HOMEPAGE="https://www.kernel.org/ https://wiki.gentoo.org/wiki/Kernel ${HOMEPAGE}"
: "${LICENSE:="GPL-2"}"
diff --git a/mail-mta/courier/Manifest b/mail-mta/courier/Manifest
index 191b0e755c28..06fe82d3f99e 100644
--- a/mail-mta/courier/Manifest
+++ b/mail-mta/courier/Manifest
@@ -1,2 +1,3 @@
DIST courier-1.1.5.tar.bz2 7654159 BLAKE2B 7ad09b4b3c8ec201ea275851aec4efb34861a2881c765228b58063d26f17580fbe8ffe4e882d43b74ed048c3bf711e0eb08cb45eb1ba25ab2073a8c411a6cd4f SHA512 6b7040a73b09a4fc0ad4d93c576d7d7026aa743e5bbfe3ae14d2474dd9cffdb3419eceb14000cc0beeae40886796d9973e9f8611a7ea925cf2e0ab928904038a
DIST courier-1.2.3.tar.bz2 7842828 BLAKE2B eac13d5c36279df1533af1e62e6b7b9fe0d5015f1f602a8291a2e507965a90d80167b6c443a983220de70a5f12ba6c19a1983ea12480e8cc2fe946c5524bfa6e SHA512 72e96d6fb3e91d8f41c46b45601e2ebb0ce790317ddbc6030e02b294c421ef92b6c7a6de5dc463cbad1196cb6f5efe996e34c6aa1381ddd429c3d83fc48e74e6
+DIST courier-1.3.3.tar.bz2 7895876 BLAKE2B bb60630ba6ff3a4faee8096765ab00a417a7bef4bc22c8f0c423ce063c9a51762f015cb6ceadcebbad6032ad0fb30f5ecd5465cf8bc868bd0c8b4d0156838397 SHA512 92565c65392d4b26b519fc814571400d5b91f350e45828da6a274edb85b2875a579aa4a004ed1ecca1b8a9a53f44163231221408b9e90f1bda18ef7cc23e500a
diff --git a/mail-mta/courier/courier-1.3.3.ebuild b/mail-mta/courier/courier-1.3.3.ebuild
new file mode 100644
index 000000000000..5a2068123d54
--- /dev/null
+++ b/mail-mta/courier/courier-1.3.3.ebuild
@@ -0,0 +1,311 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic
+
+DESCRIPTION="An MTA designed specifically for maildirs"
+HOMEPAGE="https://www.courier-mta.org/"
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="postgres ldap mysql pam nls ipv6 spell fax crypt norewrite \
+ fam web webmail gnutls"
+
+DEPEND="
+ >=net-libs/courier-authlib-0.72.0
+ >=net-libs/courier-unicode-2.2.6:=
+ net-dns/libidn2:=
+ gnutls? ( net-libs/gnutls:= )
+ !gnutls? (
+ dev-libs/openssl:0=
+ )
+ >=sys-libs/gdbm-1.8.0:=
+ dev-libs/libpcre2
+ app-misc/mime-types
+ fax? ( >=media-libs/netpbm-9.12 app-text/ghostscript-gpl >=net-dialup/mgetty-1.1.28 )
+ pam? ( sys-libs/pam )
+ mysql? ( dev-db/mysql-connector-c )
+ ldap? ( >=net-nds/openldap-1.2.11:= )
+ postgres? ( dev-db/postgresql:= )
+ spell? ( app-text/aspell )
+ fam? ( virtual/fam )
+ !mail-filter/maildrop
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/msmtp[mta]
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/postfix
+ !mail-mta/sendmail
+ !mail-mta/ssmtp[mta]
+ !mail-mta/opensmtpd
+ !net-mail/dot-forward
+ !sys-apps/ucspi-tcp
+ "
+
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ sys-process/procps"
+
+# get rid of old style virtual/imapd - bug 350792
+# all blockers really needed?
+RDEPEND="${RDEPEND}
+ !net-mail/courier-imap
+ !net-mail/cyrus-imapd"
+
+PDEPEND="pam? ( net-mail/mailbase )
+ crypt? ( >=app-crypt/gnupg-1.0.4 )"
+
+src_prepare() {
+ use norewrite && eapply "${FILESDIR}/norewrite.patch"
+ default
+}
+
+src_configure() {
+ filter-flags '-fomit-frame-pointer'
+
+ local myconf
+ myconf=""
+
+ use ldap && myconf="${myconf} --with-ldapconfig=/etc/courier/maildropldap.conf"
+
+ econf ${myconf} \
+ $(use_with fam) \
+ $(use_with ipv6) \
+ $(use_with spell ispell) \
+ $(use_with ldap ldapaliasd) \
+ $(use_enable ldap maildroldap) \
+ $(use_with gnutls) \
+ --with-notice=unicode \
+ --enable-mimetypes=/etc/mime.types \
+ --prefix=/usr \
+ --disable-root-check \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc/courier \
+ --datadir=/usr/share/courier \
+ --sharedstatedir=/var/lib/courier/com \
+ --localstatedir=/var/lib/courier \
+ --with-piddir=/var/run/courier \
+ --with-authdaemonvar=/var/lib/courier/authdaemon \
+ --with-mailuser=mail \
+ --with-mailgroup=mail \
+ --with-paranoid-smtpext \
+ --with-db=gdbm \
+ --disable-autorenamesent \
+ --cache-file="${S}/configuring.cache" \
+ --host="${CHOST}" debug=true || die "./configure"
+}
+
+src_compile() {
+ default
+}
+
+etc_courier() {
+ # Import existing /etc/courier/file if it exists.
+ # Add option only if it was not already set or even commented out
+ file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`"
+ [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \
+ cp "/etc/courier/${file}" "${D}/etc/courier/${file}"
+ grep -q "${word}" "${D}/etc/courier/${file}" || \
+ echo "${2}" >> "${D}/etc/courier/${file}"
+}
+
+etc_courier_chg() {
+ file="${1}" ; key="${2}" ; value="${3}" ; section="${4}"
+ [ -z "${section}" ] && section="${2}"
+ grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}"
+ sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file}
+}
+
+src_install() {
+ local f
+ diropts -o mail -g mail
+ keepdir /var/lib/courier/tmp
+ keepdir /var/lib/courier/msgs
+ make install DESTDIR="${D}" || die "install"
+ make install-configure DESTDIR="${D}" || die "install-configure"
+
+ # init script takes care of this
+ rm -rf "${D}/var/run"
+
+ # Get rid of files we dont want
+ if ! use webmail ; then
+ rm -rf "${D}/usr/$(get_libdir)/courier/courier/webmail" \
+ "${D}/usr/$(get_libdir)/courier/courier/sqwebmaild" \
+ "${D}/usr/share/courier/sqwebmail/" \
+ "${D}/usr/sbin/webmaild" \
+ "${D}/usr/sbin/webgpg" \
+ "${D}/etc/courier/webmail.authpam" \
+ "${D}/var/lib/courier/webmail-logincache" \
+ "${D}"/etc/courier/sqwebmaild*
+ fi
+
+ if ! use web ; then
+ rm -rf "${D}/usr/share/courier/courierwebadmin/" \
+ "${D}/etc/courier/webadmin"
+ fi
+
+ for dir2keep in $(cd "${D}" && find ./var/lib/courier -type d) ; do
+ keepdir "$dir2keep" || die "failed running keepdir: $dir2keep"
+ done
+
+ newinitd "${FILESDIR}/courier-init-r4" "courier"
+ use fam || sed -i -e's|^.*use famd$||g' "${D}/etc/init.d/courier"
+
+ cd "${D}/etc/courier"
+ if use webmail ; then
+ insinto /etc/courier
+ newins "${FILESDIR}/apache-sqwebmail.inc" apache-sqwebmail.inc
+ fi
+
+ for f in *.dist ; do cp "${f}" "${f%%.dist}" ; done
+ if use ldap ; then
+ [ -e ldapaliasrc ] && ( chown root:mail ldapaliasrc ; chmod 640 ldapaliasrc )
+ else
+ rm -f ldapaliasrc
+ fi
+
+ ( [ -e /etc/courier/sizelimit ] && cat /etc/courier/sizelimit || echo 0 ) \
+ > "${D}/etc/courier/sizelimit"
+ etc_courier maildroprc ""
+ etc_courier esmtproutes ""
+ etc_courier backuprelay ""
+ etc_courier locallowercase ""
+ etc_courier bofh "opt BOFHBADMIME=accept"
+ etc_courier bofh "opt BOFHSPFTRUSTME=1"
+ etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none,error,softfail,fail"
+ etc_courier bofh "opt BOFHSPFHELO=pass,neutral,unknown,none"
+ etc_courier bofh "opt BOFHSPFFROM=all"
+ etc_courier bofh "opt BOFHSPFMAILFROM=all"
+ etc_courier bofh "#opt BOFHSPFHARDERROR=fail"
+ etc_courier esmtpd "BOFHBADMIME=accept"
+ etc_courier esmtpd-ssl "BOFHBADMIME=accept"
+ etc_courier esmtpd-msa "BOFHBADMIME=accept"
+
+ use fam && etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
+ use fam || etc_courier_chg imapd IMAP_CAPABILITY "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256"
+
+ # Fix for a sandbox violation on subsequential merges
+ # - ticho@gentoo.org, 2005-07-10
+ dosym ../share/courier/pop3d /usr/sbin/courier-pop3d
+ dosym ../share/courier/pop3d-ssl /usr/sbin/courier-pop3d-ssl
+ dosym ../share/courier/imapd /usr/sbin/courier-imapd
+ dosym ../share/courier/imapd-ssl /usr/sbin/courier-imapd-ssl
+
+ cd "${S}"
+ cp imap/README README.imap
+ use nls && cp unicode/README README.unicode
+ dodoc AUTHORS BENCHMARKS COPYING* ChangeLog* INSTALL NEWS README* TODO courier/doc/*.txt
+ dodoc libs/tcpd/README.couriertls
+ mv "${D}/usr/share/courier/htmldoc" "${D}/usr/share/doc/${PF}/html"
+
+ if use webmail ; then
+ insinto /usr/$(get_libdir)/courier/courier
+ insopts -m 755 -o mail -g mail
+ doins "${S}/courier/webmaild"
+ fi
+
+ if use web ; then
+ insinto /etc/courier/webadmin
+ insopts -m 400 -o mail -g mail
+ doins "${FILESDIR}/password.dist"
+ fi
+
+ # avoid name collisions in /usr/sbin, make webadmin match
+ cd "${D}/usr/sbin"
+ for f in imapd imapd-ssl pop3d pop3d-ssl ; do mv "${f}" "courier-${f}" ; done
+ if use web ; then
+ sed -i -e 's:\$sbindir\/imapd:\$sbindir\/courier-imapd:g' \
+ -e 's:\$sbindir\/imapd-ssl:\$sbindir\/courier-imapd-ssl:g' \
+ "${D}/usr/share/courier/courierwebadmin/admin-40imap.pl" \
+ || ewarn "failed to fix webadmin"
+ sed -i -e 's:\$sbindir\/pop3d:\$sbindir\/courier-pop3d:g' \
+ -e 's:\$sbindir\/pop3d-ssl:\$sbindir\/courier-pop3d-ssl:g' \
+ "${D}/usr/share/courier/courierwebadmin/admin-45pop3.pl" \
+ || ewarn "failed to fix webadmin"
+ fi
+
+ # users should be able to send mail. Could be restricted with suictl.
+ chmod u+s "${D}/usr/bin/sendmail"
+
+ dosym ../bin/sendmail /usr/sbin/sendmail
+}
+
+src_test() {
+ if [ `whoami` != 'root' ]; then
+ # Disable valgrind checks
+ echo '#!/bin/sh' > libs/imap/testsuitevalgrind
+ echo '#!/bin/sh' > libs/maildir/testsuitevalgrind
+ sed -i -e 's:VALGRIND=:#VALGRIND=:g' libs/maildrop/Makefile*
+ emake -j1 check
+ else
+ einfo "make check skipped, can't run as root."
+ einfo "You can enable it with FEATURES=\"userpriv\""
+ fi
+}
+
+pkg_postinst() {
+ use fam && elog "fam daemon is needed for courier-imapd" \
+ || ewarn "courier was built without fam support"
+}
+
+pkg_config() {
+ mailhost="$(hostname)"
+ export mailhost
+
+ domainname="$(domainname)"
+ if [ "x$domainname" = "x(none)" ] ; then
+ domainname="$(echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/")"
+ fi
+ export domainname
+
+ if [[ -z "${ROOT}" ]] ; then
+ file="${ROOT}/etc/courier/locals"
+ if [ ! -f "${file}" ] ; then
+ echo "localhost" > "${file}";
+ echo "${domainname}" >> "${file}";
+ fi
+ file="${ROOT}/etc/courier/esmtpacceptmailfor.dir/${domainname}"
+ if [ ! -f "${file}" ] ; then
+ echo "${domainname}" > "${file}"
+ /usr/sbin/makeacceptmailfor
+ fi
+
+ file="${ROOT}/etc/courier/smtpaccess/${domainname}"
+ if [ ! -f "${file}" ]
+ then
+ netstat -nr | grep "^[1-9]" | while read network gateway netmask rest
+ do
+ i=1
+ net=""
+ TIFS="${IFS}"
+ IFS="."
+ for o in "${netmask}"
+ do
+ if [ "${o}" == "255" ]
+ then
+ [ "_${net}" == "_" ] || net="${net}."
+ t="$(echo "${network}" | cut -d " " -f ${i})"
+ net="${net}${t}"
+ fi
+ i="$((${i} + 1))"
+ done
+ IFS="${TIFS}"
+ echo "doing configuration - relay control for the network ${net} !"
+ echo "${net} allow,RELAYCLIENT" >> ${file}
+ done
+ /usr/sbin/makesmtpaccess
+ fi
+ fi
+
+ echo "creating cert for esmtpd-ssl:"
+ /usr/sbin/mkesmtpdcert
+ echo "creating cert for imapd-ssl:"
+ /usr/sbin/mkpop3dcert
+ echo "creating cert for pop3d-ssl:"
+ /usr/sbin/mkimapdcert
+}
diff --git a/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch b/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch
new file mode 100644
index 000000000000..6bf34627039f
--- /dev/null
+++ b/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch
@@ -0,0 +1,68 @@
+--- a/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt
++++ b/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt
+@@ -165,12 +165,9 @@
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE)
+
+-install(TARGETS bridge-gui
+- RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
+- BUNDLE DESTINATION "${CMAKE_INSTALL_PREFIX}"
+- LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}"
+- )
++install(TARGETS bridge-gui)
+
++if(0)
+ qt_generate_deploy_app_script(
+ TARGET bridge-gui
+ FILENAME_VARIABLE deploy_script
+@@ -185,3 +182,4 @@
+ endif()
+
+ include(Deploy${DEPLOY_OS}.cmake)
++endif()
+--- a/internal/frontend/bridge-gui/bridge-gui/main.cpp
++++ b/internal/frontend/bridge-gui/bridge-gui/main.cpp
+@@ -53,7 +53,7 @@
+
+ QString const bridgeLock = "bridge-v3.lock"; ///< The file name used for the bridge-gui lock file.
+ QString const bridgeGUILock = "bridge-v3-gui.lock"; ///< The file name used for the bridge-gui lock file.
+-QString const exeName = "bridge" + exeSuffix; ///< The bridge executable file name.*
++QString const exeName = "proton-mail-bridge" + exeSuffix; ///< The bridge executable file name.*
+ qint64 const grpcServiceConfigWaitDelayMs = 180000; ///< The wait delay for the gRPC config file in milliseconds.
+ QString const waitFlag = "--wait"; ///< The wait command-line flag.
+
+--- a/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt
++++ b/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt
+@@ -161,6 +161,9 @@
+
+ target_precompile_headers(bridgepp PRIVATE Pch.h)
+
++install(TARGETS bridgepp)
++
++if(0)
+ #*****************************************************************************************************************************************************
+ # GoogleTest
+ #*****************************************************************************************************************************************************
+@@ -198,3 +201,4 @@
+
+ include(GoogleTest)
+ gtest_discover_tests(bridgepp-test)
++endif()
+--- a/internal/frontend/bridge-gui/BridgeSetup.cmake
++++ b/internal/frontend/bridge-gui/BridgeSetup.cmake
+@@ -45,6 +45,7 @@
+ endif()
+
+
++if(0)
+ #****************************************************************************************************************************************************
+ # vcpkg, toolchain, and architecture
+ #****************************************************************************************************************************************************
+@@ -87,4 +88,5 @@
+ set(VCPKG_TARGET_TRIPLET x64-windows)
+ endif()
+
+-set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "toolchain")
+\ No newline at end of file
++set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "toolchain")
++endif()
diff --git a/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch b/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch
deleted file mode 100644
index 3c8df6c2ef9d..000000000000
--- a/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Such things really should be opt-in rather than opt-out, and doubly so given
-Gentoo does not package the bridge GUI yet.
-
---- a/internal/vault/types_settings.go
-+++ b/internal/vault/types_settings.go
-@@ -96,7 +96,7 @@
- ShowAllMail: true,
- Autostart: true,
- AutoUpdate: true,
-- TelemetryDisabled: false,
-+ TelemetryDisabled: true,
-
- LastVersion: "0.0.0",
- FirstStart: true,
diff --git a/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild
index 7d85059d6295..013049b4d5c9 100644
--- a/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild
+++ b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit go-module systemd xdg-utils
+inherit cmake go-module systemd xdg-utils
MY_PN="${PN/-mail/}"
MY_P="${MY_PN}-${PV}"
@@ -22,11 +22,21 @@ IUSE="gui"
PROPERTIES="test_network"
RESTRICT="test"
-RDEPEND="app-crypt/libsecret"
+RDEPEND="app-crypt/libsecret
+ gui? (
+ >=dev-libs/protobuf-21.12:=
+ dev-libs/sentry-native
+ dev-qt/qtbase:6=[gui,icu,widgets]
+ dev-qt/qtdeclarative:6=[widgets]
+ dev-qt/qtsvg:6=
+ media-libs/mesa
+ net-libs/grpc:=
+ )
+"
DEPEND="${RDEPEND}"
PATCHES=(
- "${FILESDIR}"/${PN}-3.3.2-telemetry_default.patch
+ "${FILESDIR}"/${PN}-3.3.2-gui_gentoo.patch
)
S="${WORKDIR}"/${MY_P}
@@ -34,14 +44,39 @@ S="${WORKDIR}"/${MY_P}
src_prepare() {
xdg_environment_reset
default
+ if use gui; then
+ local PATCHES=()
+ BUILD_DIR="${WORKDIR}"/gui_build \
+ CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+ cmake_src_prepare
+ fi
+}
+
+src_configure() {
+ if use gui; then
+ # TODO:
+ # - auto-sync version number between the two executables
+ # - can we leave BRIDGE_TAG unset? Seems it gets displayed in some info box
+ local mycmakeargs=(
+ -DBRIDGE_APP_FULL_NAME="Proton Mail Bridge"
+ -DBRIDGE_APP_VERSION="${PV}+git"
+ -DBRIDGE_REPO_ROOT="${S}"
+ -DBRIDGE_TAG="NOTAG"
+ -DBRIDGE_VENDOR="Gentoo Linux"
+ )
+ BUILD_DIR="${WORKDIR}"/gui_build \
+ CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+ cmake_src_configure
+ fi
}
src_compile() {
+ emake build-nogui
+
if use gui; then
- eerror "Since version 3.0.0, GUI support in ${PN} requires Qt6 and is therefore currently not available"
- die "USE=gui requires Qt6"
- else
- emake build-nogui
+ BUILD_DIR="${WORKDIR}"/gui_build \
+ CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+ cmake_src_compile
fi
}
@@ -53,31 +88,32 @@ src_install() {
exeinto /usr/bin
newexe bridge ${PN}
+ if use gui; then
+ BUILD_DIR="${WORKDIR}"/gui_build \
+ CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+ cmake_src_install
+ mv "${ED}"/usr/bin/bridge-gui "${ED}"/usr/bin/${PN}-gui || die
+ fi
+
systemd_newuserunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
einstalldocs
}
pkg_postinst() {
- use gui && xdg_icon_cache_update
-
if [[ -n "${REPLACING_VERSIONS}" ]]; then
local oldver
for oldver in ${REPLACING_VERSIONS}; do
if ver_test "${oldver}" -lt 3.2.0; then
- ewarn "Please note that since version 3.2.0, ${PN} can share usage statistics with upstream."
+ ewarn "Please note that since version 3.2.0, ${PN} by default shares usage statistics with upstream."
ewarn "For details, please see"
ewarn
ewarn " https://proton.me/support/share-usage-statistics"
ewarn
- ewarn "Gentoo ebuilds change the default value of the 'send telemetry' setting to disabled."
+ ewarn "This behaviour can be disabled through ${PN}-gui, under Advanced Settings."
ewarn
break
fi
done
fi
}
-
-pkg_postrm() {
- use gui && xdg_icon_cache_update
-}
diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index 14d383b0a158..8d5a62e7f36d 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -558,14 +558,6 @@ app-office/abiword ots
<sys-devel/clang-17 llvm_targets_Xtensa
<sys-devel/llvm-17 llvm_targets_Xtensa
-# Marek Szuba <marecki@gentoo.org> (2020-11-30)
-# 3.0.0+ use currently unpackaged Qt6
-# Older versions: vendored therecipe/qt violates network sandbox + uses external binary
-# Qt libraries; see https://github.com/ProtonMail/proton-bridge/issues/16
-# The qt module itself apparently can be made to build against system Qt5
-# but making it do so while vendored is a non-trivial task.
-mail-mta/proton-mail-bridge gui
-
# Michał Górny <mgorny@gentoo.org> (2020-09-27)
# The respective dependencies are masked for removal.
net-im/telepathy-connection-managers gadu icq meanwhile steam yahoo
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
new file mode 100644
index 000000000000..8bed967647fa
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
new file mode 100644
index 000000000000..6cce67ad5210
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS=""
+PROPERTIES="live"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
new file mode 100644
index 000000000000..6cce67ad5210
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS=""
+PROPERTIES="live"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/metadata.xml b/sys-devel/clang-crossdev-wrappers/metadata.xml
new file mode 100644
index 000000000000..ae058f380024
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cat@catcream.org</email>
+ <description>proxy</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
index 50726932b7b2..855c52056bcb 100644
--- a/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/musl/musl-1.2.4.ebuild b/sys-libs/musl/musl-1.2.4.ebuild
index a0653436a844..20b3c7f93d59 100644
--- a/sys-libs/musl/musl-1.2.4.ebuild
+++ b/sys-libs/musl/musl-1.2.4.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit flag-o-matic toolchain-funcs prefix
+inherit crossdev flag-o-matic toolchain-funcs prefix
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://git.musl-libc.org/musl"
inherit git-r3
@@ -25,14 +25,6 @@ SRC_URI+="
https://dev.gentoo.org/~blueness/musl-misc/iconv.c
"
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
HOMEPAGE="https://musl.libc.org"
@@ -49,19 +41,15 @@ QA_PRESTRIPPED="usr/lib/crtn.o"
# built as part as crossdev. Also, elide the blockers when in cross-*,
# as it doesn't make sense to block the normal CBUILD libxcrypt at all
# there when we're installing into /usr/${CHOST} anyway.
-if [[ ${CATEGORY} == cross-* ]] ; then
+if is_crosspkg ; then
IUSE="${IUSE/crypt/+crypt}"
else
RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
fi
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
just_headers() {
- use headers-only && is_crosscompile
+ use headers-only && target_is_not_host
}
pkg_setup() {
@@ -74,7 +62,7 @@ pkg_setup() {
# fix for #667126, copied from glibc ebuild
# make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
+ if target_is_not_host || tc-is-cross-compiler ; then
CHOST=${CTARGET} strip-unsupported-flags
fi
}
@@ -86,7 +74,7 @@ src_unpack() {
# We only verify the release; not the additional (fixed, safe) files
# we download.
# (Seem to get IPC error on verifying in cross?)
- ! is_crosscompile && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
fi
default
@@ -108,7 +96,7 @@ src_configure() {
just_headers && export CC=true
local sysroot
- is_crosscompile && sysroot=/usr/${CTARGET}
+ target_is_not_host && sysroot=/usr/${CTARGET}
./configure \
--target=${CTARGET} \
--prefix="${EPREFIX}${sysroot}/usr" \
@@ -121,7 +109,7 @@ src_compile() {
just_headers && return 0
emake
- if [[ ${CATEGORY} != cross-* ]] ; then
+ if ! is_crosspkg ; then
emake -C "${T}" getconf getent iconv \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" \
@@ -142,7 +130,7 @@ src_install() {
# musl provides ldd via a sym link to its ld.so
local sysroot=
- is_crosscompile && sysroot=/usr/${CTARGET}
+ target_is_not_host && sysroot=/usr/${CTARGET}
local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
@@ -152,7 +140,7 @@ src_install() {
rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die
fi
- if [[ ${CATEGORY} != cross-* ]] ; then
+ if ! is_crosspkg ; then
# Fish out of config:
# ARCH = ...
# SUBARCH = ...
@@ -187,7 +175,7 @@ src_install() {
doenvd "${T}"/00musl
fi
- if is_crosscompile ; then
+ if target_is_not_host ; then
into /usr/${CTARGET}
dolib.a libssp_nonshared.a
else
@@ -204,7 +192,7 @@ pkg_preinst() {
}
pkg_postinst() {
- is_crosscompile && return 0
+ target_is_not_host && return 0
[ -n "${ROOT}" ] && return 0
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
index a72d5929d386..20b3c7f93d59 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit eapi8-dosym flag-o-matic toolchain-funcs prefix
+inherit crossdev flag-o-matic toolchain-funcs prefix
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://git.musl-libc.org/musl"
inherit git-r3
@@ -13,7 +13,7 @@ else
SRC_URI="https://musl.libc.org/releases/${P}.tar.gz"
SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86"
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )"
fi
@@ -25,14 +25,6 @@ SRC_URI+="
https://dev.gentoo.org/~blueness/musl-misc/iconv.c
"
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
HOMEPAGE="https://musl.libc.org"
@@ -49,19 +41,15 @@ QA_PRESTRIPPED="usr/lib/crtn.o"
# built as part as crossdev. Also, elide the blockers when in cross-*,
# as it doesn't make sense to block the normal CBUILD libxcrypt at all
# there when we're installing into /usr/${CHOST} anyway.
-if [[ ${CATEGORY} == cross-* ]] ; then
+if is_crosspkg ; then
IUSE="${IUSE/crypt/+crypt}"
else
RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
fi
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
just_headers() {
- use headers-only && is_crosscompile
+ use headers-only && target_is_not_host
}
pkg_setup() {
@@ -74,7 +62,7 @@ pkg_setup() {
# fix for #667126, copied from glibc ebuild
# make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
+ if target_is_not_host || tc-is-cross-compiler ; then
CHOST=${CTARGET} strip-unsupported-flags
fi
}
@@ -86,7 +74,7 @@ src_unpack() {
# We only verify the release; not the additional (fixed, safe) files
# we download.
# (Seem to get IPC error on verifying in cross?)
- ! is_crosscompile && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
fi
default
@@ -108,7 +96,7 @@ src_configure() {
just_headers && export CC=true
local sysroot
- is_crosscompile && sysroot=/usr/${CTARGET}
+ target_is_not_host && sysroot=/usr/${CTARGET}
./configure \
--target=${CTARGET} \
--prefix="${EPREFIX}${sysroot}/usr" \
@@ -121,7 +109,7 @@ src_compile() {
just_headers && return 0
emake
- if [[ ${CATEGORY} != cross-* ]] ; then
+ if ! is_crosspkg ; then
emake -C "${T}" getconf getent iconv \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" \
@@ -142,9 +130,9 @@ src_install() {
# musl provides ldd via a sym link to its ld.so
local sysroot=
- is_crosscompile && sysroot=/usr/${CTARGET}
+ target_is_not_host && sysroot=/usr/${CTARGET}
local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
- dosym8 -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
+ dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
if ! use crypt ; then
# Allow sys-libs/libxcrypt[system] to provide it instead
@@ -152,7 +140,7 @@ src_install() {
rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die
fi
- if [[ ${CATEGORY} != cross-* ]] ; then
+ if ! is_crosspkg ; then
# Fish out of config:
# ARCH = ...
# SUBARCH = ...
@@ -187,7 +175,7 @@ src_install() {
doenvd "${T}"/00musl
fi
- if is_crosscompile ; then
+ if target_is_not_host ; then
into /usr/${CTARGET}
dolib.a libssp_nonshared.a
else
@@ -204,7 +192,7 @@ pkg_preinst() {
}
pkg_postinst() {
- is_crosscompile && return 0
+ target_is_not_host && return 0
[ -n "${ROOT}" ] && return 0