openjdk6: some cleanups

This commit is contained in:
Tim Biermann 2023-09-09 12:42:27 +02:00
parent 7210ef2251
commit 99074f2b79
Signed by: tb
GPG Key ID: 42F8B4E30B673606

View File

@ -1,7 +1,12 @@
# Description: OpenJDK 6, bootstrap build for building OpenJDK 7 # Description: OpenJDK 6, bootstrap build for building OpenJDK 7
# URL: http://openjdk.java.net/projects/jdk6 # URL: http://openjdk.java.net/projects/jdk6
# Maintainer: John Vogel, jvogel4 at stny dot rr dot com # Maintainer:
# Depends on: alsa-lib cups freetype giflib java-init krb5 lcms2 libjpeg-turbo libpng libxslt nss xorg-libxcomposite xorg-libxinerama xorg-libxrender xorg-libxtst xorg-libxt # Depends on: alsa-lib cups freetype giflib java-init krb5 libjpeg-turbo libpng libxslt nss xorg-libxcomposite xorg-libxinerama xorg-libxrender xorg-libxt xorg-libxtst wget
# TODO:
# - https://git.launchpad.net/ubuntu/+source/openjdk-6/tree/debian/patches?h=applied/debian/experimental
# - https://git.launchpad.net/ubuntu/+source/openjdk-6/tree/patches?h=applied/debian/experimental
# take what is useful, maybe a few of the gcc related patches etc
name=openjdk6-boot name=openjdk6-boot
version=20190705 version=20190705
@ -10,15 +15,19 @@ openjdk_date=04_jan_2017
icedtea_version=1.13.13 icedtea_version=1.13.13
release=1 release=1
source=(http://icedtea.wildebeest.org/download/source/icedtea6-$icedtea_version.tar.gz source=(http://icedtea.wildebeest.org/download/source/icedtea6-$icedtea_version.tar.gz
https://crux.ster.zone/distfiles/openjdk-6-src-b41-04_jan_2017.tar.xz https://ponce.cc/slackware/sources/repo/openjdk-6-src-b41-04_jan_2017.tar.xz
fix-sysctl-include.patch icedtea6-all-source-level-1_6.patch fix-sysctl-include.patch
fix-freetype-version-detect.patch) icedtea6-all-source-level-1_6.patch
fix-freetype-version-detect.patch
ld-symbolic-functions.diff
pr2849.patch
pr2808.patch
)
unpack_source() { unpack_source() {
for file in ${source[@]}; do for file in ${source[@]}; do
case ${file##*/} in case ${file##*/} in
icedtea6-$icedtea_version.tar.gz|\ icedtea6-$icedtea_version.tar.gz)
openjdk-6-src-b41-04_jan_2017.tar.xz)
bsdtar -p -o -C $SRC -xf $(get_filename $file) ;; bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
*) *)
cp $(get_filename $file) $SRC ;; cp $(get_filename $file) $SRC ;;
@ -32,18 +41,26 @@ build() {
export CXXFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon -fpermissive -Wmaybe-uninitialized' export CXXFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon -fpermissive -Wmaybe-uninitialized'
export CFLAGS+=' -fabi-version=10 -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon -fpermissive -Wmaybe-uninitialized' export CFLAGS+=' -fabi-version=10 -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon -fpermissive -Wmaybe-uninitialized'
export CPPFLAGS="$CFLAGS" export CPPFLAGS="$CFLAGS"
#export LDFLAGS+=" -Xlinker -z -Xlinker defs -Wl,-Bsymbolic-functions"
OLD_PATH=$PATH OLD_PATH=$PATH
export JAVA_HOME=$SRC/openjdk6-boot export JAVA_HOME=/opt/java-init
export PATH=$JAVA_HOME/bin:$OLD_PATH export PATH=$JAVA_HOME/bin:$OLD_PATH
# Fix ups for java-init tools, which don't handle ambiguity well. # Fix ups for java-init tools, which don't handle ambiguity well.
cp $SRC/icedtea6-all-source-level-1_6.patch $SRC/icedtea6-$icedtea_version/patches/ for i in icedtea6-all-source-level-1_6.patch fix-freetype-version-detect.patch fix-sysctl-include.patch; do
# Fix freetype version detection. cp -v $SRC/${i} $SRC/icedtea6-$icedtea_version/patches/.
cp $SRC/fix-freetype-version-detect.patch $SRC/icedtea6-$icedtea_version/patches/ done
cp $SRC/fix-sysctl-include.patch $SRC/icedtea6-$icedtea_version/patches/ #patches/linker-libs-order.patch patches/linker-libs-order-zlib.patch patches/gcc-no-hardening.diff patches/gcc-opt-O2.diff
export DISTRIBUTION_PATCHES="patches/icedtea6-all-source-level-1_6.patch patches/fix-freetype-version-detect.patch patches/fix-sysctl-include.patch" export DISTRIBUTION_PATCHES="patches/icedtea6-all-source-level-1_6.patch patches/fix-freetype-version-detect.patch patches/fix-sysctl-include.patch"
#patch -Np1 -d icedtea6-$icedtea_version -i $SRC/pr2849.patch
#patch -Np1 -d icedtea6-$icedtea_version -i $SRC/pr2808.patch
#cd icedtea6-$icedtea_version
#autoreconf -fvi
#cd $SRC
mkdir $SRC/build-boot mkdir $SRC/build-boot
cd $SRC/build-boot cd $SRC/build-boot
@ -53,23 +70,14 @@ build() {
CONFIG_SHELL=/bin/bash \ CONFIG_SHELL=/bin/bash \
../icedtea6-$icedtea_version/configure \ ../icedtea6-$icedtea_version/configure \
--prefix=$SRC/build-boot/openjdk.build/j2sdk-image \ --prefix=$SRC/build-boot/openjdk.build/j2sdk-image \
--disable-docs \
--disable-downloading \
--disable-systemtap \
--disable-tests \
--disable-hotspot-tests \
--disable-langtools-tests \
--disable-jdk-tests \
--enable-system-kerberos \ --enable-system-kerberos \
--enable-system-gif \ --enable-system-gif \
--enable-system-jpeg \ --enable-system-jpeg \
--enable-system-png \ --enable-system-png \
--enable-system-zlib \ --enable-system-zlib \
--enable-nss \ --disable-nss \
--enable-non-nss-curves \
--with-openjdk-src-zip=$SRC/openjdk-6-src-b41-04_jan_2017.tar.xz \ --with-openjdk-src-zip=$SRC/openjdk-6-src-b41-04_jan_2017.tar.xz \
--with-pkgversion=CRUX \ --with-pkgversion=CRUX \
--without-rhino \
--with-jdk-home=$JAVA_HOME \ --with-jdk-home=$JAVA_HOME \
--with-ant-home=$JAVA_HOME/lib/ant \ --with-ant-home=$JAVA_HOME/lib/ant \
--with-abs-install-dir=/$name \ --with-abs-install-dir=/$name \
@ -78,16 +86,29 @@ build() {
--with-java=$JAVA_HOME/bin/jamvm \ --with-java=$JAVA_HOME/bin/jamvm \
--with-javah=$JAVA_HOME/bin/javah \ --with-javah=$JAVA_HOME/bin/javah \
--with-rmic=$JAVA_HOME/bin/rmic \ --with-rmic=$JAVA_HOME/bin/rmic \
--disable-docs \
--disable-downloading \
--disable-xrender \
--disable-lcms2 \
--disable-systemtap \
--disable-tests \
--disable-hotspot-tests \
--disable-langtools-tests \
--disable-jdk-tests \
--without-rhino \
--with-ecj \ --with-ecj \
--without-gcj --without-gcj
LC_ALL=C ALT_UNIXCOMMAND_PATH="" DISABLE_HOTSPOT_OS_VERSION_CHECK="ok" make LC_ALL=C \
ALT_UNIXCOMMAND_PATH="" \
DISABLE_HOTSPOT_OS_VERSION_CHECK="ok" \
make || echo "First make failed"
# rebuild using our fresh openjdk6 # rebuild using our fresh openjdk6
unset JAVA_HOME
export JAVA_HOME=$SRC/build-boot/openjdk.build/j2sdk-image export JAVA_HOME=$SRC/build-boot/openjdk.build/j2sdk-image
export PATH=$JAVA_HOME/bin:/opt/java-init/lib/ant/bin:$OLD_PATH export PATH=$JAVA_HOME/bin:/opt/java-init/lib/ant/bin:$OLD_PATH
mkdir $SRC/build mkdir $SRC/build
cd $SRC/build cd $SRC/build
@ -107,7 +128,7 @@ build() {
--enable-system-gif \ --enable-system-gif \
--enable-system-jpeg \ --enable-system-jpeg \
--enable-system-kerberos \ --enable-system-kerberos \
--enable-system-lcms \ --disable-lcms2 \
--enable-system-png \ --enable-system-png \
--enable-system-zlib \ --enable-system-zlib \
--enable-nss \ --enable-nss \
@ -123,7 +144,7 @@ build() {
LC_ALL=C \ LC_ALL=C \
ALT_UNIXCOMMAND_PATH="" \ ALT_UNIXCOMMAND_PATH="" \
DISABLE_HOTSPOT_OS_VERSION_CHECK="ok" \ DISABLE_HOTSPOT_OS_VERSION_CHECK="ok" \
make make || echo "Second make failed"
# Copy the sdk image first before pruning it, saving original for later inspection/comparison. # Copy the sdk image first before pruning it, saving original for later inspection/comparison.
mkdir -p $PKG/$name mkdir -p $PKG/$name