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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (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.6: +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.2.ebuild,v 1.6 2012/07/21 16:16:24 pacho 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 # Fix unmappable character for encoding ASCII, bug #399729
31 epatch "${FILESDIR}"/${PN}-0.46.0.2-unmappable-character.patch
32
33 # We cannot rely on Mono Crypto Service Provider as it doesn't work inside
34 # sandbox, we simply hard-code the path to a bundled key like Debian does.
35 epatch "${FILESDIR}"/${PN}-0.46.0.1-key.patch
36 uudecode < "${FILESDIR}"/mono.snk.uu || die
37
38 # Ensures that we use Mono's bundled copy of SharpZipLib instead of relying
39 # on ikvm-bin one
40 sed -i -e 's:../bin/ICSharpCode.SharpZipLib.dll:ICSharpCode.SharpZipLib.dll:' \
41 ikvmc/ikvmc.build ikvmstub/ikvmstub.build || die
42
43 sed -i -e 's:pkg-config --cflags:pkg-config --cflags --libs:' \
44 native/native.build || die
45
46 mkdir -p "${T}"/home/test
47 java-pkg-2_src_prepare
48 }
49
50 src_configure() {
51 :
52 }
53
54 src_compile() {
55 XDG_CONFIG_HOME="${T}/home/test" nant -t:mono-2.0 signed || die "ikvm build failed"
56 }
57
58 generate_pkgconfig() {
59 ebegin "Generating .pc file"
60 local dll LSTRING="Libs:"
61 dodir "/usr/$(get_libdir)/pkgconfig"
62 cat <<- EOF -> "${D}/usr/$(get_libdir)/pkgconfig/${PN}.pc"
63 prefix=/usr
64 exec_prefix=\${prefix}
65 libdir=\${prefix}/$(get_libdir)
66 Name: IKVM.NET
67 Description: An implementation of Java for Mono and the Microsoft .NET Framework.
68 Version: ${PV}
69 EOF
70 for dll in "${S}"/bin/IKVM.*.dll
71 do
72 LSTRING="${LSTRING} -r:"'${libdir}'"/mono/IKVM/${dll##*/}"
73 done
74 printf "${LSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${PN}.pc"
75 PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --silence-errors --libs ikvm &> /dev/null
76 eend $?
77 }
78
79 src_install() {
80 local dll dllbase exe
81 insinto /usr/$(get_libdir)/${PN}
82 doins bin/*.exe
83
84 dodir /bin
85 for exe in bin/*.exe
86 do
87 exebase=${exe##*/}
88 ebegin "Generating wrapper for ${exebase} -> ${exebase%.exe}"
89 make_wrapper ${exebase%.exe} "mono /usr/$(get_libdir)/${PN}/${exebase}"
90 eend $? || die "Failed generating wrapper for ${exebase}"
91 done
92
93 generate_pkgconfig || die "generating .pc failed"
94
95 for dll in bin/IKVM.*.dll
96 do
97 dllbase=${dll##*/}
98 ebegin "Installing and registering ${dllbase}"
99 gacutil -i bin/${dllbase} -root "${D}"/usr/$(get_libdir) \
100 -gacdir /usr/$(get_libdir) -package IKVM &>/dev/null
101 eend $? || die "Failed installing ${dllbase}"
102 done
103 }

  ViewVC Help
Powered by ViewVC 1.1.20