commit: 06dad3c31c7101422896971e5afaf1fee759195a Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Tue Jun 17 23:06:41 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Jul 13 06:48:25 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06dad3c3
dev-lang/mono: add 6.14.1 Bug: https://bugs.gentoo.org/957434 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42646 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-lang/mono/Manifest | 1 + .../mono-6.14.1-disable-automagic-ccache.patch | 17 +++ dev-lang/mono/mono-6.14.1.ebuild | 133 +++++++++++++++++++++ 3 files changed, 151 insertions(+) diff --git a/dev-lang/mono/Manifest b/dev-lang/mono/Manifest index 6060718ffc12..80fc8f35e86a 100644 --- a/dev-lang/mono/Manifest +++ b/dev-lang/mono/Manifest @@ -1 +1,2 @@ DIST mono-6.12.0.199.tar.xz 304146664 BLAKE2B a38f0f1b80b300132247cee4621fc59bd65845c919ccd0cc55e00928b8a1b85b0695a9bb436c3efc0afd4e7dfa001714485964cf44239bb7c438ca6ed818dabf SHA512 9e379aaeb2e8750edbda74648c0ae9cc8cb9b2d7af85512bf2e729132c2e0322e776ef0b7657da708cbc1ae2a62f5532519d339fa68f465b30a65ca30d4a1e51 +DIST mono-6.14.1.tar.xz 303688164 BLAKE2B 6658d797905bd4fb3f5d2fee42fc1bb39916a0a6ccb6247bed70e36bba21353420303f7fa630b63c3e730f8a91b014d391bd1db39905f86f5250489617d16a5b SHA512 c16a2ecbfce93db20a7a6d11b6406c8764f5694355c1ce82081399cd7ab6d8b22e7f8fb21f7af78967b34ef54dcb682917b8cf22d61f1b72be996d1a42e9f1b9 diff --git a/dev-lang/mono/files/mono-6.14.1-disable-automagic-ccache.patch b/dev-lang/mono/files/mono-6.14.1-disable-automagic-ccache.patch new file mode 100644 index 000000000000..466bc6623d14 --- /dev/null +++ b/dev-lang/mono/files/mono-6.14.1-disable-automagic-ccache.patch @@ -0,0 +1,17 @@ +diff --git a/mono/btls/CMakeLists.txt b/mono/btls/CMakeLists.txt +index dbad836fc27..e36ee5e0a8a 100644 +--- a/mono/btls/CMakeLists.txt ++++ b/mono/btls/CMakeLists.txt +@@ -5,11 +5,6 @@ project (mono-btls) + enable_language(C) + enable_language(CXX) + +-find_program(CCACHE_PROGRAM ccache) +-if(CCACHE_PROGRAM) +- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") +-endif() +- + if (MSVC OR CYGWIN) + set(BTLS_HOST_WIN32 1) + endif () + diff --git a/dev-lang/mono/mono-6.14.1.ebuild b/dev-lang/mono/mono-6.14.1.ebuild new file mode 100644 index 000000000000..7d9d4d0aa793 --- /dev/null +++ b/dev-lang/mono/mono-6.14.1.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CHECKREQS_DISK_BUILD="4500M" +inherit autotools check-reqs flag-o-matic linux-info mono-env pax-utils multilib-minimal + +DESCRIPTION="Mono open source ECMA CLI, C# and .NET implementation" +HOMEPAGE="https://gitlab.winehq.org/mono/mono" +SRC_URI="https://dl.winehq.org/mono/sources/mono/${P}.tar.xz" + +LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 -riscv ~x86 ~amd64-linux" +IUSE="doc minimal nls pax-kernel selinux xen" + +# Note: mono works incorrect with older versions of libgdiplus +# Details on dotnet overlay issue: https://github.com/gentoo/dotnet/issues/429 +DEPEND=" + app-crypt/mit-krb5[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + !minimal? ( >=dev-dotnet/libgdiplus-6.0.2 ) + nls? ( sys-devel/gettext ) +" +RDEPEND=" + ${DEPEND} + app-misc/ca-certificates + selinux? ( sec-policy/selinux-mono ) +" +# CMake is used for bundled deps +BDEPEND=" + dev-build/cmake + app-alternatives/bc + app-alternatives/yacc + pax-kernel? ( sys-apps/elfix ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-6.14.1-disable-automagic-ccache.patch + "${FILESDIR}"/${PN}-6.12.0.199-configure-c99.patch +) + +pkg_pretend() { + linux-info_pkg_setup + + if use kernel_linux ; then + if linux_config_exists ; then + linux_chkconfig_builtin SYSVIPC || die "SYSVIPC not enabled in the kernel" + else + # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686 + ewarn "kernel config not found" + ewarn "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling." + ewarn "See https://bugs.gentoo.org/261869 for more info." + fi + fi + + # bug #687892 + check-reqs_pkg_pretend +} + +pkg_setup() { + mono-env_pkg_setup + check-reqs_pkg_setup +} + +src_prepare() { + # We need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't + # get killed in the build proces when MPROTECT is enabled, bug #286280 + # RANDMMAP kills the build process too, bug #347365 + # We use paxmark.sh to get PT/XT logic, bug #532244 + if use pax-kernel ; then + ewarn "We are disabling MPROTECT on the mono binary." + + # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9 + sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in" + fi + + default + + # Does nothing other than spam "git command not found" + sed -e '/^LLVM_VERSION :=/d' -i llvm/build.mk || die + + # PATCHES contains configure.ac patch + eautoreconf + multilib_copy_sources +} + +multilib_src_configure() { + # Many, many unsafe warnings. Miscompiled with -O3 too: bug #915985. + append-flags -O2 -fno-strict-aliasing + filter-lto + + local myeconfargs=( + $(use_with xen xen_opt) + --without-ikvm-native + --disable-dtrace + --enable-system-aot + $(multilib_native_use_with doc mcs-docs) + $(use_enable nls) + ) + + # Workaround(?) for bug #779025 + # May be able to do a real fix by adjusting path used? + if multilib_is_native_abi ; then + myeconfargs+=( --enable-system-aot ) + else + myeconfargs+=( --disable-system-aot ) + fi + + econf "${myeconfargs[@]}" +} + +multilib_src_test() { + emake -C mcs/tests check +} + +multilib_src_install() { + default + + # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora + # mono.spec and http://www.mail-archive.com/[email protected]/msg24870.html + # for reference. + rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die + rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die + + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + # bug #762265 + cert-sync "${EROOT}"/etc/ssl/certs/ca-certificates.crt +}
