/[gentoo-x86]/dev-dotnet/ikvm/ikvm-0.46.0.1.ebuild
Gentoo

Contents of /dev-dotnet/ikvm/ikvm-0.46.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Nov 5 21:15:03 2012 UTC (7 years, 2 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
Fix LICENSE, bug 437166.

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key E7BE08CA7DC6EA25)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-dotnet/ikvm/ikvm-0.46.0.1.ebuild,v 1.5 2012/05/04 03:56:56 jdhore Exp $
4
5 EAPI="4"
6
7 inherit eutils mono multilib java-pkg-2
8
9 DESCRIPTION="Java VM for .NET"
10 HOMEPAGE="http://www.ikvm.net/ http://weblog.ikvm.net/"
11 SRC_URI="http://www.frijters.net/openjdk6-b22-stripped.zip
12 http://www.frijters.net/${PN}src-${PV}.zip"
13 LICENSE="ZLIB GPL-2-with-linking-exception"
14
15 SLOT="0"
16 KEYWORDS="amd64 ppc x86"
17 IUSE=""
18
19 RDEPEND=">=dev-lang/mono-2
20 dev-libs/glib"
21 DEPEND="${RDEPEND}
22 !dev-dotnet/ikvm-bin
23 >=dev-dotnet/nant-0.85
24 >=virtual/jdk-1.6
25 app-arch/unzip
26 virtual/pkgconfig
27 app-arch/sharutils"
28
29 src_prepare() {
30 # We cannot rely on Mono Crypto Service Provider as it doesn't work inside
31 # sandbox, we simply hard-code the path to a bundled key like Debian does.
32 epatch "${FILESDIR}"/${PN}-0.46.0.1-key.patch
33 uudecode < "${FILESDIR}"/mono.snk.uu || die
34
35 # Ensures that we use Mono's bundled copy of SharpZipLib instead of relying
36 # on ikvm-bin one
37 sed -i -e 's:../bin/ICSharpCode.SharpZipLib.dll:ICSharpCode.SharpZipLib.dll:' \
38 ikvmc/ikvmc.build ikvmstub/ikvmstub.build || die
39
40 sed -i -e 's:pkg-config --cflags:pkg-config --cflags --libs:' \
41 native/native.build || die
42
43 mkdir -p "${T}"/home/test
44 }
45
46 src_configure() {
47 :
48 }
49
50 src_compile() {
51 XDG_CONFIG_HOME="${T}/home/test" nant -t:mono-2.0 signed || die "ikvm build failed"
52 }
53
54 generate_pkgconfig() {
55 ebegin "Generating .pc file"
56 local dll LSTRING="Libs:"
57 dodir "/usr/$(get_libdir)/pkgconfig"
58 cat <<- EOF -> "${D}/usr/$(get_libdir)/pkgconfig/${PN}.pc"
59 prefix=/usr
60 exec_prefix=\${prefix}
61 libdir=\${prefix}/$(get_libdir)
62 Name: IKVM.NET
63 Description: An implementation of Java for Mono and the Microsoft .NET Framework.
64 Version: ${PV}
65 EOF
66 for dll in "${S}"/bin/IKVM.*.dll
67 do
68 LSTRING="${LSTRING} -r:"'${libdir}'"/mono/IKVM/${dll##*/}"
69 done
70 printf "${LSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${PN}.pc"
71 PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --silence-errors --libs ikvm &> /dev/null
72 eend $?
73 }
74
75 src_install() {
76 local dll dllbase exe
77 insinto /usr/$(get_libdir)/${PN}
78 doins bin/*.exe
79
80 dodir /bin
81 for exe in bin/*.exe
82 do
83 exebase=${exe##*/}
84 ebegin "Generating wrapper for ${exebase} -> ${exebase%.exe}"
85 make_wrapper ${exebase%.exe} "mono /usr/$(get_libdir)/${PN}/${exebase}"
86 eend $? || die "Failed generating wrapper for ${exebase}"
87 done
88
89 generate_pkgconfig || die "generating .pc failed"
90
91 for dll in bin/IKVM.*.dll
92 do
93 dllbase=${dll##*/}
94 ebegin "Installing and registering ${dllbase}"
95 gacutil -i bin/${dllbase} -root "${D}"/usr/$(get_libdir) \
96 -gacdir /usr/$(get_libdir) -package IKVM &>/dev/null
97 eend $? || die "Failed installing ${dllbase}"
98 done
99 }

  ViewVC Help
Powered by ViewVC 1.1.20