logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

mono-6.4.0.198.ebuild (2932B)


  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
  5. SLOT="0"
  6. IUSE="nls minimal pax_kernel xen doc"
  7. inherit autotools eutils linux-info mono-env flag-o-matic pax-utils multilib-minimal
  8. DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
  9. HOMEPAGE="https://www.mono-project.com/Main_Page"
  10. LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
  11. SRC_URI="http://download.mono-project.com/sources/mono/${P}.tar.xz"
  12. #Note: mono works incorrect with older versions of libgdiplus
  13. #details on dotnet overlay issue: https://github.com/gentoo/dotnet/issues/429
  14. COMMONDEPEND="
  15. !minimal? ( >=dev-dotnet/libgdiplus-5.6.1 )
  16. ia64? ( sys-libs/libunwind )
  17. nls? ( sys-devel/gettext )
  18. "
  19. RDEPEND="${COMMONDEPEND}"
  20. DEPEND="${COMMONDEPEND}
  21. sys-devel/bc
  22. virtual/yacc
  23. pax_kernel? ( sys-apps/elfix )
  24. dev-util/cmake
  25. "
  26. PATCHES=(
  27. "${FILESDIR}"/${PN}-5.0.1.1-x86_32.patch
  28. "${FILESDIR}"/mono-5.12-try-catch.patch
  29. )
  30. pkg_pretend() {
  31. linux-info_pkg_setup
  32. if use kernel_linux; then
  33. if linux_config_exists; then
  34. linux_chkconfig_builtin SYSVIPC || die "SYSVIPC not enabled in the kernel"
  35. else
  36. # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
  37. ewarn "kernel config not found"
  38. ewarn "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
  39. ewarn "See https://bugs.gentoo.org/261869 for more info."
  40. fi
  41. fi
  42. }
  43. pkg_setup() {
  44. mono-env_pkg_setup
  45. }
  46. src_prepare() {
  47. # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
  48. # get killed in the build proces when MPROTECT is enable. #286280
  49. # RANDMMAP kill the build proces to #347365
  50. # use paxmark.sh to get PT/XT logic #532244
  51. if use pax_kernel ; then
  52. ewarn "We are disabling MPROTECT on the mono binary."
  53. # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
  54. sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
  55. fi
  56. # mono build system can fail otherwise
  57. strip-flags
  58. default
  59. # PATCHES contains configure.ac patch
  60. eautoreconf
  61. multilib_copy_sources
  62. }
  63. multilib_src_configure() {
  64. local myeconfargs=(
  65. --disable-silent-rules
  66. $(use_with xen xen_opt)
  67. --without-ikvm-native
  68. --disable-dtrace
  69. $(use_with doc mcs-docs)
  70. $(use_enable nls)
  71. )
  72. econf "${myeconfargs[@]}"
  73. }
  74. multilib_src_test() {
  75. cd mcs/tests || die
  76. emake check
  77. }
  78. multilib_src_install() {
  79. default_src_install
  80. # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
  81. # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
  82. # for reference.
  83. rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
  84. rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
  85. }