# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.3 2004/06/25 00:39:48 vapier Exp $ # # Author : foser # # mono eclass # right now only circumvents a sandbox violation by setting a mono env var ECLASS="mono" INHERITED="$INHERITED $ECLASS" # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the # shared dir to ${T} so that ${T}/.wapi can be used during the install process. export MONO_SHARED_DIR=${T} # precompile-il # Runs the mono interpreter to ahead-of-time compile bytecode to native code function precompile-il () { if [ ! -d "${D}" ]; then return -1; fi einfo "Precompiling IDL..." MONO_JIT="${D}/usr/bin/mono" if [ ! -x "${MONO_JIT}" ]; then if [ -x "/usr/bin/mono" ]; then MONO_JIT="/usr/bin/mono" else return -1; fi else MONO_PATH="${D}/usr/lib" fi MONO_GAC_PATH="${D}/usr/lib/mono" pushd "${D}" for FILE in `find -iname '*.dll' -or -iname '*.exe'`; do "${MONO_JIT}" --compile-all --aot --optimize=all,-shared "${FILE}" done popd unset MONO_JIT MONO_PATH MONO_GAC_PATH }