| 1 |
pacho |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
jdhore |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/mono/mono-2.10.9-r1.ebuild,v 1.1 2012/07/21 11:02:32 pacho Exp $
|
| 4 |
pacho |
1.1 |
|
| 5 |
|
|
EAPI="4"
|
| 6 |
|
|
|
| 7 |
|
|
inherit linux-info mono eutils flag-o-matic multilib go-mono pax-utils
|
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
|
| 10 |
|
|
HOMEPAGE="http://www.mono-project.com/Main_Page"
|
| 11 |
|
|
|
| 12 |
|
|
LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
|
| 13 |
|
|
SLOT="0"
|
| 14 |
jdhore |
1.2 |
KEYWORDS="~amd64 ~ppc x86"
|
| 15 |
pacho |
1.1 |
|
| 16 |
|
|
IUSE="minimal pax_kernel xen"
|
| 17 |
|
|
|
| 18 |
|
|
#Bash requirement is for += operator
|
| 19 |
|
|
COMMONDEPEND="!dev-util/monodoc
|
| 20 |
|
|
!minimal? ( =dev-dotnet/libgdiplus-${GO_MONO_REL_PV}* )
|
| 21 |
|
|
ia64? ( sys-libs/libunwind )"
|
| 22 |
|
|
RDEPEND="${COMMONDEPEND}
|
| 23 |
|
|
|| ( www-client/links www-client/lynx )"
|
| 24 |
|
|
|
| 25 |
|
|
DEPEND="${COMMONDEPEND}
|
| 26 |
|
|
sys-devel/bc
|
| 27 |
|
|
virtual/yacc
|
| 28 |
|
|
>=app-shells/bash-3.2
|
| 29 |
|
|
pax_kernel? ( sys-apps/paxctl )"
|
| 30 |
|
|
|
| 31 |
|
|
MAKEOPTS="${MAKEOPTS} -j1"
|
| 32 |
|
|
|
| 33 |
|
|
RESTRICT="test"
|
| 34 |
|
|
|
| 35 |
|
|
pkg_setup() {
|
| 36 |
|
|
if use kernel_linux
|
| 37 |
|
|
then
|
| 38 |
|
|
get_version
|
| 39 |
|
|
if linux_config_exists
|
| 40 |
|
|
then
|
| 41 |
|
|
if linux_chkconfig_present SYSVIPC
|
| 42 |
|
|
then
|
| 43 |
|
|
einfo "CONFIG_SYSVIPC is set, looking good."
|
| 44 |
|
|
else
|
| 45 |
|
|
eerror "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
|
| 46 |
|
|
eerror "See http://bugs.gentoo.org/261869 for more info."
|
| 47 |
|
|
die "Please set CONFIG_SYSVIPC in your kernel .config"
|
| 48 |
|
|
fi
|
| 49 |
|
|
else
|
| 50 |
|
|
ewarn "Was unable to determine your kernel .config"
|
| 51 |
|
|
ewarn "Please note that if CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
|
| 52 |
|
|
ewarn "See http://bugs.gentoo.org/261869 for more info."
|
| 53 |
|
|
fi
|
| 54 |
|
|
fi
|
| 55 |
|
|
PATCHES=( "${FILESDIR}/${PN}-2.10.2-threads-access.patch"
|
| 56 |
|
|
"${FILESDIR}/${P}-CVE-2012-3382.patch" )
|
| 57 |
|
|
}
|
| 58 |
|
|
|
| 59 |
|
|
src_prepare() {
|
| 60 |
|
|
go-mono_src_prepare
|
| 61 |
|
|
|
| 62 |
|
|
# we need to sed in the paxctl -mr in the runtime/mono-wrapper.in so it don't
|
| 63 |
|
|
# get killed in the build proces when MPROTEC is enable. #286280
|
| 64 |
|
|
# RANDMMAP kill the build proces to #347365
|
| 65 |
|
|
if use pax_kernel ; then
|
| 66 |
|
|
ewarn "We are disabling MPROTECT on the mono binary."
|
| 67 |
|
|
sed '/exec/ i\paxctl -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in
|
| 68 |
|
|
fi
|
| 69 |
|
|
}
|
| 70 |
|
|
|
| 71 |
|
|
src_configure() {
|
| 72 |
|
|
# mono's build system is finiky, strip the flags
|
| 73 |
|
|
strip-flags
|
| 74 |
|
|
|
| 75 |
|
|
# Remove this at your own peril. Mono will barf in unexpected ways.
|
| 76 |
|
|
append-flags -fno-strict-aliasing
|
| 77 |
|
|
|
| 78 |
|
|
# NOTE: We need the static libs for now so mono-debugger works.
|
| 79 |
|
|
# See http://bugs.gentoo.org/show_bug.cgi?id=256264 for details
|
| 80 |
|
|
#
|
| 81 |
|
|
# --without-moonlight since www-plugins/moonlight is not the only one
|
| 82 |
|
|
# using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
|
| 83 |
|
|
#
|
| 84 |
|
|
# --with-profile4 needs to be always enabled since it's used by default
|
| 85 |
|
|
# and, otherwise, problems like bug #340641 appear.
|
| 86 |
|
|
#
|
| 87 |
|
|
# sgen fails on ppc, bug #359515
|
| 88 |
|
|
|
| 89 |
|
|
local myconf=""
|
| 90 |
|
|
use ppc && myconf="${myconf} --with-sgen=no"
|
| 91 |
|
|
go-mono_src_configure \
|
| 92 |
|
|
--enable-static \
|
| 93 |
|
|
--disable-quiet-build \
|
| 94 |
|
|
--without-moonlight \
|
| 95 |
|
|
--with-libgdiplus=$(use minimal && printf "no" || printf "installed" ) \
|
| 96 |
|
|
$(use_with xen xen_opt) \
|
| 97 |
|
|
--without-ikvm-native \
|
| 98 |
|
|
--with-jit \
|
| 99 |
|
|
--disable-dtrace \
|
| 100 |
|
|
--with-profile4 \
|
| 101 |
|
|
${myconf}
|
| 102 |
|
|
}
|
| 103 |
|
|
|
| 104 |
|
|
src_test() {
|
| 105 |
|
|
echo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
| 106 |
|
|
|
| 107 |
|
|
export MONO_REGISTRY_PATH="${T}/registry"
|
| 108 |
|
|
export XDG_DATA_HOME="${T}/data"
|
| 109 |
|
|
export MONO_SHARED_DIR="${T}/shared"
|
| 110 |
|
|
export XDG_CONFIG_HOME="${T}/config"
|
| 111 |
|
|
export HOME="${T}/home"
|
| 112 |
|
|
|
| 113 |
|
|
emake -j1 check
|
| 114 |
|
|
}
|
| 115 |
|
|
|
| 116 |
|
|
src_install() {
|
| 117 |
|
|
go-mono_src_install
|
| 118 |
|
|
|
| 119 |
|
|
# Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
|
| 120 |
|
|
# mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
|
| 121 |
|
|
# for reference.
|
| 122 |
|
|
rm -f "${ED}"/usr/$(get_libdir)/mono/2.0/mscorlib.dll.so
|
| 123 |
|
|
rm -f "${ED}"/usr/$(get_libdir)/mono/2.0/mcs.exe.so
|
| 124 |
|
|
}
|
| 125 |
|
|
|
| 126 |
|
|
#THINK!!!! Before touching postrm and postinst
|
| 127 |
|
|
#Reference phase order:
|
| 128 |
|
|
#pkg_preinst
|
| 129 |
|
|
#pkg_prerm
|
| 130 |
|
|
#pkg_postrm
|
| 131 |
|
|
#pkg_postinst
|
| 132 |
|
|
|
| 133 |
|
|
pkg_preinst() {
|
| 134 |
|
|
local symlink
|
| 135 |
|
|
local NUNIT_DIR="/usr/$(get_libdir)/mono/nunit"
|
| 136 |
|
|
local pv_atom
|
| 137 |
|
|
if [[ "$(readlink "${ROOT}"/${NUNIT_DIR})" == *"mono-nunit"* ]]
|
| 138 |
|
|
then
|
| 139 |
|
|
for pv_atom in 2.2{,-r1,-r2,-r3,-r4} '2.4_pre*' '2.4_rc*' 2.4
|
| 140 |
|
|
do
|
| 141 |
|
|
if has_version "=dev-lang/mono-${pv_atom}"
|
| 142 |
|
|
then
|
| 143 |
|
|
einfo "If you just received a file collision warning message,"
|
| 144 |
|
|
einfo "be advised that this is a known problem, which will now be fixed:"
|
| 145 |
|
|
ebegin "Found broken symlinks created by $(best_version dev-lang/mono), fixing"
|
| 146 |
|
|
for symlink in \
|
| 147 |
|
|
"${ROOT}/${NUNIT_DIR}" \
|
| 148 |
|
|
"${ROOT}/usr/$(get_libdir)/pkgconfig/nunit.pc" \
|
| 149 |
|
|
"${ROOT}/usr/bin/nunit-console" \
|
| 150 |
|
|
"${ROOT}/usr/bin/nunit-console2"
|
| 151 |
|
|
do
|
| 152 |
|
|
if [[ -L "${symlink}" ]]
|
| 153 |
|
|
then
|
| 154 |
|
|
rm -f "${symlink}" &> /dev/null
|
| 155 |
|
|
fi
|
| 156 |
|
|
done
|
| 157 |
|
|
eend 0
|
| 158 |
|
|
break
|
| 159 |
|
|
fi
|
| 160 |
|
|
done
|
| 161 |
|
|
fi
|
| 162 |
|
|
}
|
| 163 |
|
|
|
| 164 |
|
|
#pkg_postinst() {
|
| 165 |
|
|
# elog "PLEASE TAKE NOTE!"
|
| 166 |
|
|
# elog ""
|
| 167 |
|
|
# elog "Some of the namespaces supported by Mono require extra packages to be installed."
|
| 168 |
|
|
# elog "Below is a list of namespaces and the corresponding package you must install:"
|
| 169 |
|
|
# elog ""
|
| 170 |
|
|
# elog ">=x11-libs/cairo-1.6.4"
|
| 171 |
|
|
# elog " Mono.Cairo"
|
| 172 |
|
|
# elog "Also read:"
|
| 173 |
|
|
# elog "http://www.mono-project.com/Mono.Cairo"
|
| 174 |
|
|
# elog ""
|
| 175 |
|
|
# elog ">=dev-db/firebird-2.0.4.13130.1"
|
| 176 |
|
|
# elog " FirebirdSql.Data.Firebird"
|
| 177 |
|
|
# elog "Also read:"
|
| 178 |
|
|
# elog "http://www.mono-project.com/Firebird_Interbase"
|
| 179 |
|
|
# elog ""
|
| 180 |
|
|
# elog "dev-db/sqlite:3"
|
| 181 |
|
|
# elog " Mono.Data.Sqlite"
|
| 182 |
|
|
# elog "Also read:"
|
| 183 |
|
|
# elog "http://www.mono-project.com/SQLite"
|
| 184 |
|
|
# elog ""
|
| 185 |
|
|
# elog ">=dev-db/oracle-instantclient-basic-10.2"
|
| 186 |
|
|
# elog " System.Data.OracleClient"
|
| 187 |
|
|
# elog "Also read:"
|
| 188 |
|
|
# elog "http://www.mono-project.com/Oracle"
|
| 189 |
|
|
# elog ""
|
| 190 |
|
|
# elog "Mono also has support for packages that are not included in portage:"
|
| 191 |
|
|
# elog ""
|
| 192 |
|
|
# elog "No ebuild available:"
|
| 193 |
|
|
# elog " IBM.Data.DB2"
|
| 194 |
|
|
# elog "Also read: http://www.mono-project.com/IBM_DB2"
|
| 195 |
|
|
# elog ""
|
| 196 |
|
|
# elog "No ebuild needed:"
|
| 197 |
|
|
# elog " Mono.Data.SybaseClient"
|
| 198 |
|
|
# elog "Also read: http://www.mono-project.com/Sybase"
|
| 199 |
|
|
#}
|
| 200 |
|
|
|
| 201 |
|
|
# NOTICE: THE COPYRIGHT FILES IN THE TARBALL ARE UNCLEAR!
|
| 202 |
|
|
# WHENEVER YOU THINK SOMETHING IS GPL-2+, IT'S ONLY GPL-2
|
| 203 |
|
|
# UNLESS MIGUEL DE ICAZA HIMSELF SAYS OTHERWISE.
|
| 204 |
|
|
|
| 205 |
|
|
# mono
|
| 206 |
|
|
# The code we use is LGPL, but contributions must be made under the MIT/X11
|
| 207 |
|
|
# license, so Novell can serve its paying customers. Exception is mono/man.
|
| 208 |
|
|
# LICENSE="LGPL-2.1"
|
| 209 |
|
|
|
| 210 |
|
|
# mono/man
|
| 211 |
|
|
# LICENSE="MIT"
|
| 212 |
|
|
|
| 213 |
|
|
# mcs/mcs
|
| 214 |
|
|
# mcs/gmcs
|
| 215 |
|
|
# LICENSE="GPL-2 MIT"
|
| 216 |
|
|
|
| 217 |
|
|
# tests
|
| 218 |
|
|
# LICENSE="MIT"
|
| 219 |
|
|
|
| 220 |
|
|
# mcs/class
|
| 221 |
|
|
# Except the listed exceptions:
|
| 222 |
|
|
# LICENSE="MIT"
|
| 223 |
|
|
|
| 224 |
|
|
# mcs/class/ByteFX.Data
|
| 225 |
|
|
# mcs/class/Npgsql
|
| 226 |
|
|
# LICENSE="LGPL-2.1"
|
| 227 |
|
|
|
| 228 |
|
|
# mcs/class/FirebirdSql.Data.Firebird
|
| 229 |
|
|
# LICENSE="IDPL"
|
| 230 |
|
|
|
| 231 |
|
|
# mcs/class/ICSharpCode.SharpZipLib
|
| 232 |
|
|
# LICENSE="GPL-2-with-linking-exception"
|
| 233 |
|
|
|
| 234 |
|
|
# mcs/class/MicrosoftAjaxLibrary
|
| 235 |
|
|
# LICENSE="Ms-Pl"
|
| 236 |
|
|
|
| 237 |
|
|
# mcs/class/Microsoft.JScript/Microsoft.JScript/TokenStream.cs
|
| 238 |
|
|
# mcs/class/Microsoft.JScript/Microsoft.JScript/Token.cs
|
| 239 |
|
|
# mcs/class/Microsoft.JScript/Microsoft.JScript/Parser.cs
|
| 240 |
|
|
# mcs/class/Microsoft.JScript/Microsoft.JScript/Decompiler.cs
|
| 241 |
|
|
# LICENSE="|| ( NPL-1.1 GPL-2 )"
|
| 242 |
|
|
|
| 243 |
|
|
# mcs/jay
|
| 244 |
|
|
# LICENSE="BSD-4"
|
| 245 |
|
|
|
| 246 |
|
|
# mcs/tools
|
| 247 |
|
|
# Except the listed exceptions:
|
| 248 |
|
|
# LICENSE="MIT"
|
| 249 |
|
|
|
| 250 |
|
|
# mcs/tools/mdoc/Mono.Documentation/monodocs2html.cs
|
| 251 |
|
|
# LICENSE="GPL-2"
|
| 252 |
|
|
|
| 253 |
|
|
# mcs/tools/sqlsharp/SqlSharpCli.cs
|
| 254 |
|
|
# LICENSE="GPL-2"
|
| 255 |
|
|
|
| 256 |
|
|
# mcs/tools/csharp/repl.cs
|
| 257 |
|
|
# LICENSE="|| ( MIT GPL-2 )"
|
| 258 |
|
|
|
| 259 |
|
|
# mcs/tools/mono-win32-setup.nsi
|
| 260 |
|
|
# LICENSE="GPL-2"
|
| 261 |
|
|
|
| 262 |
|
|
# samples
|
| 263 |
|
|
# LICENSE="MIT"
|