gcj-jdk-4.9.4.ebuild 3.6 KB

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