[packages/openjdk8] some progress with building
jajcus
jajcus at pld-linux.org
Thu Sep 17 16:01:45 CEST 2015
commit 5b4e4f2029cedce6ca6797d0e14efcf5ab23545e
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Thu Sep 17 16:00:29 2015 +0200
some progress with building
The code compiles, nothing more. It is not even the right snapshot.
adjust-mflags.patch | 11 +++++++++++
format_strings.patch | 22 ++++++++++++++++++++++
make-cacerts.sh | 4 +++-
openjdk8.spec | 40 ++++++++++++++++++++++++++--------------
4 files changed, 62 insertions(+), 15 deletions(-)
---
diff --git a/openjdk8.spec b/openjdk8.spec
index 48520a9..f9e1120 100644
--- a/openjdk8.spec
+++ b/openjdk8.spec
@@ -1,8 +1,10 @@
#
# TODO:
+# - use the release snapshots (the jdk8u repo?) instead of latest 'b' tag
# - make it build
# - make it install
# - fix BuildRequires
+# - fix build with system giflib
#
%bcond_with bootstrap # build a bootstrap version, using icedtea6
@@ -42,6 +44,8 @@ Source6: openjdk8-langtools-b%{minor}.tar.bz2
Source7: openjdk8-nashorn-b%{minor}.tar.bz2
# Source7-md5: 19581a68b0ffa30d8a23f384fcb8c91d
Source10: make-cacerts.sh
+Patch0: adjust-mflags.patch
+Patch1: format_strings.patch
URL: http://openjdk.java.net/
BuildRequires: alsa-lib-devel
BuildRequires: ant
@@ -53,25 +57,13 @@ BuildRequires: cups-devel
BuildRequires: /usr/bin/jar
BuildRequires: freetype-devel >= 2.3
BuildRequires: gawk
-BuildRequires: giflib-devel >= 5.1
-BuildRequires: glib2-devel
+#BuildRequires: giflib-devel >= 5.1
BuildRequires: glibc-misc
-BuildRequires: gtk+2-devel
-BuildRequires: heimdal-devel
-BuildRequires: java-rhino
-BuildRequires: java-xalan
%buildrequires_jdk
-BuildRequires: lcms2-devel
-BuildRequires: libffi-devel
BuildRequires: libjpeg-devel
-BuildRequires: pcsc-lite-devel
-BuildRequires: libpng-devel
-BuildRequires: libsctp-devel
-BuildRequires: libstdc++-static
BuildRequires: lsb-release
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.557
-BuildRequires: systemtap-sdt-devel
BuildRequires: unzip
BuildRequires: util-linux
BuildRequires: xorg-lib-libX11-devel
@@ -409,6 +401,9 @@ for d in *-jdk8-b* ; do
ln -s "$d" "${d%%-jdk8-b*}"
done
+%patch0 -p1
+%patch1 -p1
+
%build
# Make sure we have /proc mounted - otherwise idlc will fail later.
if [ ! -f /proc/self/stat ]; then
@@ -417,11 +412,28 @@ if [ ! -f /proc/self/stat ]; then
fi
unset JAVA_HOME
+export SHELL=/bin/bash
mkdir -p build-bin
export PATH="$(pwd)/build-bin:$PATH"
-%{__make}
+chmod a+x configure
+
+%configure \
+ --with-extra-cflags="%{rpmcflags}" \
+ --with-extra-cxxflags="%{rpmcxxflags}" \
+ --with-extra-ldflags="%{rpmldflags}" \
+ --with-giflib=bundled \
+ --with-zlib=system
+
+specdir="$(dirname build/*-release/spec.gmk)"
+cat > $specdir/custom-spec.gmk <<EOF
+SHELL=/bin/bash
+EOF
+[ -d tmp-bin ] || ln -s "$specdir/jdk/bin" tmp-bin
+
+%{__make} \
+ LOG=debug
%{?with_cacerts:%{__sh} %{SOURCE10}}
diff --git a/adjust-mflags.patch b/adjust-mflags.patch
new file mode 100644
index 0000000..cb09212
--- /dev/null
+++ b/adjust-mflags.patch
@@ -0,0 +1,11 @@
+--- jdk8-jdk8-b132.orig/hotspot/make/linux/makefiles/adjust-mflags.sh 2015-09-17 14:17:39.000000000 +0200
++++ jdk8-jdk8-b132/hotspot/make/linux/makefiles/adjust-mflags.sh 2015-09-17 14:19:01.000000000 +0200
+@@ -64,7 +64,7 @@
+ echo "$MFLAGS" \
+ | sed '
+ s/^-/ -/
+- s/ -\([^ ][^ ]*\)j/ -\1 -j/
++ s/ -\([^ ][^ ]*\)j\([0-9][0-9]*\)/ -\1 -j\2/
+ s/ -j[0-9][0-9]*/ -j/
+ s/ -j\([^ ]\)/ -j -\1/
+ s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/
diff --git a/format_strings.patch b/format_strings.patch
new file mode 100644
index 0000000..124f47a
--- /dev/null
+++ b/format_strings.patch
@@ -0,0 +1,22 @@
+--- jdk8-jdk8-b132/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp.orig 2015-09-17 14:58:44.000000000 +0200
++++ jdk8-jdk8-b132/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp 2015-09-17 14:59:36.000000000 +0200
+@@ -81,7 +81,7 @@
+ int assert_failed(const char* p) {
+ char message[1<<12];
+ sprintf(message, "@assert failed: %s\n", p);
+- fprintf(stdout, 1+message);
++ fputs(1+message, stdout);
+ breakpoint();
+ unpack_abort(message);
+ return 0;
+--- jdk8-jdk8-b132/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp.orig 2015-09-17 14:57:57.000000000 +0200
++++ jdk8-jdk8-b132/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp 2015-09-17 15:01:09.000000000 +0200
+@@ -3712,7 +3712,7 @@
+ default:
+ if (nrefs == 0) {
+ buf = getbuf(20);
+- sprintf((char*)buf.ptr, TAG_NAME[tag]);
++ strcpy((char*)buf.ptr, TAG_NAME[tag]);
+ } else if (nrefs == 1) {
+ return refs[0]->string();
+ } else {
diff --git a/make-cacerts.sh b/make-cacerts.sh
index 865676f..b99cf2b 100755
--- a/make-cacerts.sh
+++ b/make-cacerts.sh
@@ -49,7 +49,9 @@ CERTBUNDLE=$DESTDIR/etc/certs/ca-certificates.crt
ETCCERTSDIR=$DESTDIR/etc/openssl/certs
KEYSTORE=$PWD/cacerts
-KEYTOOL=$PWD/openjdk.build/bin/keytool
+KEYTOOL=$PWD/tmp-bin/keytool
+
+export LC_ALL=C.utf-8
# Adds a certificate to the list of trusted ones.
# Adds the certificate to the cacerts file
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openjdk8.git/commitdiff/5b4e4f2029cedce6ca6797d0e14efcf5ab23545e
More information about the pld-cvs-commit
mailing list