*/*: Bump copyright on files touched this year
[gentoo.git] / dev-java / gcj-jdk / gcj-jdk-5.4.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit java-vm-2
7
8 DESCRIPTION="Java wrappers around GCJ"
9 HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
10 SRC_URI=""
11
12 LICENSE="GPL-2"
13 KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x86-linux"
14 SLOT="0"
15 IUSE="awt"
16
17 API_DIFF_PV="4.9.2"
18
19 # perl is needed for javac wrapper
20 RDEPEND="
21         dev-java/ecj-gcj:*
22         dev-lang/perl
23         ~sys-devel/gcc-${PV}[awt?,gcj]"
24 DEPEND="${RDEPEND}"
25
26 S="${WORKDIR}"
27
28 src_install() {
29         # jre lib paths ...
30         local libarch="$(get_system_arch)"
31         local gcc_version=${PV}
32         local gccbin=$(gcc-config -B ${gcc_version})
33         gccbin=${gccbin#"${EPREFIX}"}
34         local gcclib=$(gcc-config -L ${gcc_version} | cut -d':' -f1)
35         gcclib=${gcclib#"${EPREFIX}"}
36         local gcjhome="/usr/$(get_libdir)/${P}"
37         local gcjprefix="${EPREFIX}${gcjhome}"
38         local gccchost="${CHOST}"
39         local gcjlibdir=$(echo "${EPREFIX}"/usr/$(get_libdir)/gcj-${gcc_version}-*)
40         gcjlibdir=${gcjlibdir#"${EPREFIX}"}
41
42         # links
43         dodir ${gcjhome}/bin
44         dodir ${gcjhome}/jre/bin
45         dosym ${gccbin}/gij ${gcjhome}/bin/java
46         dosym ${gccbin}/gij ${gcjhome}/jre/bin/java
47         dosym ${gccbin}/gjar ${gcjhome}/bin/jar
48         dosym ${gccbin}/gjdoc ${gcjhome}/bin/javadoc
49         dosym ${gccbin}/grmic ${gcjhome}/bin/rmic
50         dosym ${gccbin}/gjavah ${gcjhome}/bin/javah
51         dosym ${gccbin}/jcf-dump ${gcjhome}/bin/javap
52         dosym ${gccbin}/gappletviewer ${gcjhome}/bin/appletviewer
53         dosym ${gccbin}/gjarsigner ${gcjhome}/bin/jarsigner
54         dosym ${gccbin}/grmiregistry ${gcjhome}/bin/rmiregistry
55         dosym ${gccbin}/grmiregistry ${gcjhome}/jre/bin/rmiregistry
56         dosym ${gccbin}/gkeytool ${gcjhome}/bin/keytool
57         dosym ${gccbin}/gkeytool ${gcjhome}/jre/bin/keytool
58         dosym ${gccbin}/gnative2ascii ${gcjhome}/bin/native2ascii
59         dosym ${gccbin}/gorbd ${gcjhome}/bin/orbd
60         dosym ${gccbin}/gorbd ${gcjhome}/jre/bin/orbd
61         dosym ${gccbin}/grmid ${gcjhome}/bin/rmid
62         dosym ${gccbin}/grmid ${gcjhome}/jre/bin/rmid
63         dosym ${gccbin}/gserialver ${gcjhome}/bin/serialver
64         dosym ${gccbin}/gtnameserv ${gcjhome}/bin/tnameserv
65         dosym ${gccbin}/gtnameserv ${gcjhome}/jre/bin/tnameserv
66
67         dodir ${gcjhome}/jre/lib/${libarch}/client
68         dodir ${gcjhome}/jre/lib/${libarch}/server
69         dosym ${gcjlibdir}/libjvm.so ${gcjhome}/jre/lib/${libarch}/client/libjvm.so
70         dosym ${gcjlibdir}/libjvm.so ${gcjhome}/jre/lib/${libarch}/server/libjvm.so
71         use awt && dosym ${gcjlibdir}/libjawt.so ${gcjhome}/jre/lib/${libarch}/libjawt.so
72
73         dosym /usr/share/gcc-data/${gccchost}/${gcc_version}/java/libgcj-${gcc_version/_/-}.jar \
74                 ${gcjhome}/jre/lib/rt.jar
75         dodir ${gcjhome}/lib
76         dosym /usr/share/gcc-data/${gccchost}/${gcc_version}/java/libgcj-tools-${gcc_version/_/-}.jar \
77                 ${gcjhome}/lib/tools.jar
78         dosym ${gcclib}/include ${gcjhome}/include
79
80         exeinto ${gcjhome}/bin
81         sed -e "s#@JAVA@#${gcjprefix}/bin/java#" \
82                 -e "s#@ECJ_JAR@#${EPREFIX}/usr/share/eclipse-ecj/ecj.jar#" \
83                 -e "s#@RT_JAR@#${gcjprefix}/jre/lib/rt.jar#" \
84                 -e "s#@TOOLS_JAR@#${gcjprefix}/lib/tools.jar#" \
85                 "${FILESDIR}"/javac.in \
86         | newexe - javac
87         assert
88
89         java-vm_install-env
90 }
91
92 pkg_postinst() {
93         # Do not set as system VM (see below)
94         # java-vm-2_pkg_postinst
95
96         ewarn "gcj does not currently provide all the 1.5 or 1.6 APIs."
97         ewarn "See http://fuseyism.com/japi/ibmjdk15-libgcj-${API_DIFF_PV}.html"
98         ewarn "and http://fuseyism.com/japi/icedtea6-libgcj-${API_DIFF_PV}.html"
99         ewarn "Check for existing bugs relating to missing APIs and file"
100         ewarn "new ones at https://gcc.gnu.org/bugzilla/"
101         ewarn
102         ewarn "Due to this and limited manpower, we currently cannot support"
103         ewarn "using gcj-jdk as a system VM. Its main purpose is to bootstrap"
104         ewarn "IcedTea without prior binary VM installation. To do that, execute:"
105         ewarn
106         ewarn "emerge -o icedtea && emerge icedtea"
107 }