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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Dec 8 04:08:14 2012 UTC (7 years, 1 month ago) by zerochaos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
revert improper x86 stabilization wrt #435202 comment 2

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

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-7.1.4532.2.ebuild,v 1.4 2012/12/07 04:53:09 phajdan.jr 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/openjdk-7u4-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 ~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.7
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}-7.1.4532.2-key.patch
33 mkdir -p ../debian/ || die
34 uudecode < "${FILESDIR}"/mono.snk.uu -o ../debian/mono.snk || die
35
36 # Ensures that we use Mono's bundled copy of SharpZipLib instead of relying
37 # on ikvm-bin one
38 sed -i -e 's:../bin/ICSharpCode.SharpZipLib.dll:ICSharpCode.SharpZipLib.dll:' \
39 ikvmc/ikvmc.build ikvmstub/ikvmstub.build || die
40
41 sed -i -e 's:pkg-config --cflags:pkg-config --cflags --libs:' \
42 native/native.build || die
43
44 mkdir -p "${T}"/home/test
45
46 java-pkg-2_src_prepare
47 }
48
49 src_configure() {
50 :
51 }
52
53 src_compile() {
54 XDG_CONFIG_HOME="${T}/home/test" nant -t:mono-2.0 signed || die "ikvm build failed"
55 }
56
57 generate_pkgconfig() {
58 ebegin "Generating .pc file"
59 local dll LSTRING="Libs:"
60 dodir "/usr/$(get_libdir)/pkgconfig"
61 cat <<- EOF -> "${D}/usr/$(get_libdir)/pkgconfig/${PN}.pc"
62 prefix=/usr
63 exec_prefix=\${prefix}
64 libdir=\${prefix}/$(get_libdir)
65 Name: IKVM.NET
66 Description: An implementation of Java for Mono and the Microsoft .NET Framework.
67 Version: ${PV}
68 EOF
69 for dll in "${S}"/bin/IKVM.*.dll
70 do
71 LSTRING="${LSTRING} -r:"'${libdir}'"/mono/IKVM/${dll##*/}"
72 done
73 printf "${LSTRING}" >> "${D}/usr/$(get_libdir)/pkgconfig/${PN}.pc"
74 PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --silence-errors --libs ikvm &> /dev/null
75 eend $?
76 }
77
78 src_install() {
79 local dll dllbase exe
80 insinto /usr/$(get_libdir)/${PN}
81 doins bin/*.exe
82
83 dodir /bin
84 for exe in bin/*.exe
85 do
86 exebase=${exe##*/}
87 ebegin "Generating wrapper for ${exebase} -> ${exebase%.exe}"
88 make_wrapper ${exebase%.exe} "mono /usr/$(get_libdir)/${PN}/${exebase}"
89 eend $? || die "Failed generating wrapper for ${exebase}"
90 done
91
92 generate_pkgconfig || die "generating .pc failed"
93
94 for dll in bin/IKVM.*.dll
95 do
96 dllbase=${dll##*/}
97 ebegin "Installing and registering ${dllbase}"
98 gacutil -i bin/${dllbase} -root "${D}"/usr/$(get_libdir) \
99 -gacdir /usr/$(get_libdir) -package IKVM &>/dev/null
100 eend $? || die "Failed installing ${dllbase}"
101 done
102 }

  ViewVC Help
Powered by ViewVC 1.1.20