some existing COMPILER lines with arch restrictions etc. In the usual case this is now using "COMPILER = base-clang ports-gcc base-gcc" on ports with c++ libraries in WANTLIB. This is basically intended to be a noop on architectures using clang as the system compiler, but help with other architectures where we currently have many ports knocked out due to building with an unsuitable compiler - - some ports require c++11/newer so the GCC version in base that is used on these archirtectures is too old. - some ports have conflicts where an executable is built with one compiler (e.g. gcc from base) but a library dependency is built with a different one (e.g. gcc from ports), resulted in mixing incompatible libraries in the same address space. devel/gmp is intentionally skipped as it's on the path to building gcc - the c++ library there is unused in ports (and not built by default upstream) so intending to disable building gmpcxx in a future commit.
163 lines
4.8 KiB
Makefile
163 lines
4.8 KiB
Makefile
# $OpenBSD: Makefile,v 1.36 2018/10/24 14:28:00 sthen Exp $
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
USE_WXNEEDED= Yes
|
|
|
|
COMMENT-main= OpenJDK Software Development Kit v${V}
|
|
COMMENT-jre= OpenJDK Runtime Environment v${V}
|
|
U= 172
|
|
V= 1.8.0.${U}
|
|
B= b11
|
|
PKGNAME= jdk-${V}
|
|
PKGNAME-main= jdk-${V}
|
|
PKGNAME-jre= jre-${V}
|
|
EPOCH= 0
|
|
REVISION-jre= 1
|
|
REVISION-main= 1
|
|
|
|
DIST_SUBDIR= jdk
|
|
DISTNAME= openjdk-8u172b11-bsd-port-20180529
|
|
BOOTJDK_DATE= 20180306
|
|
EXTRACT_SUFX= .tar.xz
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
CATEGORIES= devel/jdk java
|
|
|
|
MULTI_PACKAGES= -main -jre
|
|
|
|
PSEUDO_FLAVORS= native_bootstrap
|
|
FLAVOR?=
|
|
|
|
HOMEPAGE= http://openjdk.java.net/
|
|
|
|
MASTER_SITES= http://www.intricatesoftware.com/distfiles/
|
|
MASTER_SITES1= https://spacehopper.org/mirrors/ \
|
|
http://www.intricatesoftware.com/distfiles/
|
|
MASTER_SITES2= ${MASTER_SITE_APACHE:=ant/binaries/} \
|
|
http://archive.apache.org/dist/ant/binaries/
|
|
|
|
MAINTAINER= Kurt Miller <kurt@openbsd.org>
|
|
|
|
# GPLv2 w/CLASSPATH exception
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
NO_TEST= Yes
|
|
|
|
APACHE_ANT= apache-ant-1.9.7-bin.tar.gz
|
|
SUPDISTFILES+= openjdk8-bootjdk-i386-${BOOTJDK_DATE}.tar.gz:1 \
|
|
openjdk8-bootjdk-amd64-${BOOTJDK_DATE}.tar.gz:1 \
|
|
${APACHE_ANT}:2
|
|
|
|
COMPILER = base-clang ports-gcc base-gcc
|
|
|
|
.include <bsd.port.arch.mk>
|
|
|
|
.if ${FLAVOR:Mnative_bootstrap}
|
|
INSTALLED!= (pkg_info -qe "jdk->=1.8.0.00v0,<1.9v0" && echo yes) || echo no
|
|
. if ${INSTALLED:L} != "yes"
|
|
ERRORS += "Fatal: This flavor requires an installed 1.8.0.00v0 or greater jdk package"
|
|
. endif
|
|
BUILD_DEPENDS+= jdk->=1.8.0.00v0,<1.9v0:devel/jdk/1.8 \
|
|
devel/apache-ant>=1.8.2
|
|
BOOT_JDK= ${LOCALBASE}/jdk-1.8.0
|
|
.else
|
|
BOOT_JDK_DIST= openjdk8-bootjdk-${ARCH}-${BOOTJDK_DATE}.tar.gz
|
|
. if (${ARCH}==amd64) || (${ARCH}==i386)
|
|
DISTFILES+= ${BOOT_JDK_DIST}:1
|
|
. endif
|
|
DISTFILES+= ${APACHE_ANT}:2
|
|
MAKE_ENV+= ANT_HOME=${WRKDIR}/apache-ant-1.9.3 \
|
|
LD_LIBRARY_PATH=${WRKDIR}/bootjdk-libs
|
|
CONFIGURE_ENV+= LD_LIBRARY_PATH=${WRKDIR}/bootjdk-libs
|
|
BOOT_JDK= ${WRKDIR}/bootjdk
|
|
.endif
|
|
|
|
BUILD_DEPENDS+= archivers/zip \
|
|
archivers/unzip \
|
|
print/cups,-libs \
|
|
shells/bash
|
|
|
|
LIB_DEPENDS= converters/libiconv \
|
|
graphics/giflib
|
|
|
|
WANTLIB= X11 Xext Xi Xrender Xtst c freetype gif iconv m pthread ${COMPILER_LIBCXX} z
|
|
|
|
USE_GMAKE= Yes
|
|
GMAKE= ${LOCALBASE}/bin/gmake
|
|
|
|
# Don't call make -jN, instead pass MAKE_JOBS to --with-jobs
|
|
PARALLEL_BUILD= No
|
|
|
|
CONFIGURE_STYLE=gnu
|
|
CONFIGURE_ARGS= --disable-option-checking \
|
|
--with-boot-jdk=${BOOT_JDK} \
|
|
--with-package-path=${LOCALBASE} \
|
|
--with-jobs=${MAKE_JOBS} \
|
|
--with-cacerts-file=${FILESDIR}/cacerts \
|
|
--with-debug-level=release \
|
|
--disable-ccache \
|
|
--disable-freetype-bundling \
|
|
--disable-zip-debug-info \
|
|
--disable-debug-symbols \
|
|
--enable-static-libjli \
|
|
--with-zlib=system \
|
|
--with-giflib=system \
|
|
--with-milestone=fcs \
|
|
--with-update-version=${U} \
|
|
--with-build-number=${B}
|
|
CONFIGURE_ENV+= ac_cv_path_NAWK=awk
|
|
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/common/autoconf/build-aux
|
|
|
|
# MAKE_FLAGS= LOG=debug
|
|
MAKE_ENV+= DEFAULT_LIBPATH="/usr/lib:${X11BASE}/lib:${LOCALBASE}/lib" \
|
|
COMPILER_WARNINGS_FATAL=false
|
|
|
|
.if ${PROPERTIES:Mclang}
|
|
MAKE_ENV+= USE_CLANG=true
|
|
.endif
|
|
|
|
JDKHOME= jdk-1.8.0
|
|
JREHOME= jre-1.8.0
|
|
|
|
SUBST_VARS= JDKHOME JREHOME
|
|
|
|
JVMARCH= ${MACHINE_ARCH:S/i386/x86/:S/amd64/x86_64/}
|
|
BUILDDIR= ${WRKDIST}/build/bsd-${JVMARCH}-normal-server-release/images
|
|
JDKIMAGEDIR= ${BUILDDIR}/j2sdk-image
|
|
JREIMAGEDIR= ${BUILDDIR}/j2re-image
|
|
WRKTMP= ${WRKDIR}/tmp
|
|
|
|
post-extract:
|
|
chmod +x ${WRKDIST}/configure
|
|
|
|
post-build:
|
|
@rm -rf ${JDKIMAGEDIR}/man/ja ${JDKIMAGEDIR}/man/ja_JP.UTF-8 \
|
|
${JREIMAGEDIR}/man/ja ${JREIMAGEDIR}/man/ja_JP.UTF-8
|
|
|
|
do-install:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/${JDKHOME}
|
|
cd ${JDKIMAGEDIR} && tar -cf - * | tar -C ${PREFIX}/${JDKHOME} -xf -
|
|
${INSTALL_DATA_DIR} ${PREFIX}/${JREHOME}
|
|
cd ${JREIMAGEDIR} && tar -cf - * | tar -C ${PREFIX}/${JREHOME} -xf -
|
|
|
|
# The bootjdk is the jdk image with some parts deleted
|
|
# and a copy of the system shared libs needed to run it.
|
|
# The parts deleted are not needed for bootstrap and would
|
|
# require more system shared libs to be saved.
|
|
build-bootjdk: build
|
|
@rm -rf ${WRKTMP}
|
|
@mkdir -p ${WRKTMP}/bootjdk
|
|
@mkdir -p ${WRKTMP}/bootjdk-libs
|
|
@cd ${JDKIMAGEDIR} && tar -cf - * | tar -C ${WRKTMP}/bootjdk -xf -
|
|
@cd ${WRKTMP}/bootjdk && rm -rf demo sample
|
|
@cd ${WRKTMP}/bootjdk && rm bin/appletviewer bin/policytool jre/bin/policytool
|
|
@cd ${WRKTMP}/bootjdk/jre/lib/${ARCH} && rm libnpt.so libinstrument.so libsplashscreen.so libjsound.so libawt_xawt.so
|
|
@LD_LIBRARY_PATH="${WRKTMP}/bootjdk/jre/lib/${ARCH}:${WRKTMP}/bootjdk/jre/lib/${ARCH}/server" \
|
|
find ${WRKTMP}/bootjdk -type f -perm -500 -exec ldd {} \; 2>/dev/null | \
|
|
grep rlib | cut -d"/" -f 2-20 | sort -u | grep -v "\.so$$" | \
|
|
xargs -I % cp /% ${WRKTMP}/bootjdk-libs
|
|
@cd ${WRKTMP} && tar czf openjdk8-bootjdk-${ARCH}-$$(date +%Y%m%d).tar.gz bootjdk*
|
|
@echo "New bootjdk is located at ${WRKTMP}/openjdk8-bootjdk-${ARCH}-$$(date +%Y%m%d).tar.gz"
|
|
|
|
.include <bsd.port.mk>
|