Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= openjdk8
  5. PKG_VERSION:= 8u131-b11
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= d57a81345acd26d8d2681201bcf00671ad54d5d6e4b61ad1fe621994ba1fb1ec
  8. PKG_DESCR:= java virtual machine
  9. PKG_SECTION:= dev/lang
  10. PKG_DEPENDS:= alsa-lib freetype libx11 libxext libxrender libxtst
  11. PKG_DEPENDS+= libxt libffi zlib
  12. PKG_BUILDDEP:= openjdk7-host libX11 libXext libXrender libXtst libXt
  13. PKG_BUILDDEP+= freetype alsa-lib cups libffi zlib
  14. PKG_NEEDS:= threads c++ iconv
  15. PKG_URL:= http://openjdk.org/
  16. PKG_HG:= http://hg.openjdk.java.net/jdk8u/jdk8u
  17. PKG_SITES:= ${PKG_HG}/archive/
  18. PKG_NOPARALLEL:= 1
  19. ICEDTEA_VERSION:= 3.4.0
  20. PKG_HOST_DEPENDS:= linux
  21. PKG_ARCH_DEPENDS:= arm mips ppc x86 x86_64
  22. DISTFILES:= jdk$(PKG_VERSION).tar.bz2
  23. WRKSRC= ${WRKDIST}/openjdk
  24. include $(ADK_TOPDIR)/mk/package.mk
  25. $(eval $(call PKG_template,OPENJDK8,openjdk8,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  26. JDKARCH:= $(ADK_TARGET_CPU_ARCH)
  27. ifeq ($(ADK_TARGET_ARCH),x86)
  28. JDKARCH:= i386
  29. endif
  30. ifeq ($(ADK_TARGET_CPU_ARCH),x86_64)
  31. JDKARCH:= amd64
  32. endif
  33. # https://bugzilla.redhat.com/show_bug.cgi?id=1306558
  34. TARGET_CFLAGS+= -fno-lifetime-dse -fno-delete-null-pointer-checks
  35. TARGET_CXXFLAGS+= -fno-lifetime-dse -fno-delete-null-pointer-checks -std=gnu++98
  36. CONFIG_STYLE:= basic
  37. CONFIGURE_ARGS+= --prefix=$(WRKINST)/usr \
  38. --with-jvm-variants=zero \
  39. --with-stdc++lib=dynamic \
  40. --enable-unlimited-crypto \
  41. --disable-debug-symbols \
  42. --with-debug-level=release \
  43. --with-zlib=system \
  44. --enable-freetype-bundling \
  45. --with-freetype=$(STAGING_TARGET_DIR)/usr \
  46. --with-freetype-include=$(STAGING_TARGET_DIR)/usr/include/freetype2 \
  47. --with-boot-jdk=$(STAGING_HOST_DIR)/bootstrap-jdk \
  48. --with-extra-cflags="$(TARGET_CFLAGS)" \
  49. --with-extra-cxxflags="$(TARGET_CXXFLAGS)" \
  50. --with-extra-ldflags="$(TARGET_LDFLAGS)" \
  51. --with-cups=$(STAGING_TARGET_DIR)/usr \
  52. --with-alsa=$(STAGING_TARGET_DIR) \
  53. --with-x=$(STAGING_TARGET_DIR)/usr \
  54. --x-includes=$(STAGING_TARGET_DIR)/usr/include \
  55. --x-libraries=$(STAGING_TARGET_DIR)/usr/lib
  56. CONFIGURE_ENV:= BUILD_CC=/usr/bin/gcc \
  57. BUILD_CXX=/usr/bin/g++ \
  58. BUILD_LD=/usr/bin/ld \
  59. ac_cv_path_POTENTIAL_CC=$(TARGET_CC) \
  60. ac_cv_path_POTENTIAL_CXX=$(TARGET_CXX) \
  61. LD=$(TARGET_CC) \
  62. OBJCOPY='$(TARGET_CROSS)objcopy' \
  63. STRIP='$(TARGET_CROSS)strip' \
  64. LIBFFI_CFLAGS="$(TARGET_CPPFLAGS)" \
  65. LIBFFI_LIBS="$(TARGET_LDFLAGS) -lffi"
  66. XAKE_FLAGS+= LD='$(TARGET_CC)' \
  67. STRIP='$(TARGET_CROSS)strip' \
  68. BUILD_CC='$(HOST_CC)' \
  69. BUILD_LD='$(HOST_CC)' \
  70. LOG=debug \
  71. JOBS="4"
  72. post-extract:
  73. (cd $(DL_DIR); \
  74. for file in jdk corba hotspot jaxp jaxws langtools nashorn; do \
  75. if [ ! -f openjdk8-$${file}$(PKG_VERSION).tar.bz2 ]; then \
  76. wget -c -O openjdk8-$${file}$(PKG_VERSION).tar.bz2 $(PKG_HG)/$${file}/archive/jdk$(PKG_VERSION).tar.bz2 ; \
  77. fi; \
  78. done; \
  79. if [ ! -f icedtea-$(ICEDTEA_VERSION).tar.xz ]; then \
  80. wget -O icedtea-$(ICEDTEA_VERSION).tar.xz http://icedtea.classpath.org/download/source/icedtea-$(ICEDTEA_VERSION).tar.xz; \
  81. fi; \
  82. )
  83. mkdir -p $(WRKDIST)/openjdk
  84. (cd $(WRKDIST); \
  85. tar --strip-components=1 -xvf $(DL_DIR)/icedtea-$(ICEDTEA_VERSION).tar.xz; \
  86. tar --strip-components=1 -C $(WRKDIST)/openjdk -xvf $(DL_DIR)/jdk$(PKG_VERSION).tar.bz2; \
  87. for file in jdk corba hotspot jaxp jaxws langtools nashorn; do \
  88. mkdir -p $(WRKDIST)/openjdk/$${file}; \
  89. tar --strip-components=1 -C $(WRKDIST)/openjdk/$${file} -xvf $(DL_DIR)/openjdk8-$${file}$(PKG_VERSION).tar.bz2 ; \
  90. done; \
  91. )
  92. (cd $(WRKDIST)/openjdk; patch -p1 < $(ADK_TOPDIR)/package/openjdk8/files/openadk.patch)
  93. (cd $(WRKDIST); \
  94. PATH=$(HOST_PATH) sed -e 's|@abs_top_srcdir@|$(WRKDIST)|g' -e '/^patch.*/d' fsg.sh.in > fsg.sh; \
  95. ${BASH} fsg.sh; \
  96. )
  97. cat $(WRKDIST)/openjdk/common/autoconf/configure.ac | PATH=$(HOST_PATH) sed -e "s|@DATE_WHEN_GENERATED@|`LC_ALL=C date +%s`|" | $(STAGING_HOST_DIR)/usr/bin/autoconf \
  98. -W all -I$(WRKDIST)/openjdk/common/autoconf - > $(WRKDIST)/openjdk/common/autoconf/generated-configure.sh
  99. $(SED) "s#^WARNINGS_ARE_ERRORS.*#WARNINGS_ARE_ERRORS=#" $(WRKDIST)/openjdk/hotspot/make/linux/makefiles/gcc.make
  100. openjdk8-install:
  101. $(INSTALL_DIR) $(IDIR_OPENJDK8)/usr/bin
  102. $(INSTALL_DIR) $(IDIR_OPENJDK8)/usr/lib/jvm
  103. $(CP) $(WRKINST)//usr/jvm/openjdk-1.8.0-internal/* \
  104. $(IDIR_OPENJDK8)/usr/lib/jvm
  105. (cd $(IDIR_OPENJDK8)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
  106. (cd $(IDIR_OPENJDK8)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
  107. include $(ADK_TOPDIR)/mk/pkg-bottom.mk