some progress with building
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 17 Sep 2015 14:00:29 +0000 (16:00 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 17 Sep 2015 14:00:29 +0000 (16:00 +0200)
The code compiles, nothing more. It is not even the right snapshot.

adjust-mflags.patch [new file with mode: 0644]
format_strings.patch [new file with mode: 0644]
make-cacerts.sh
openjdk8.spec

diff --git a/adjust-mflags.patch b/adjust-mflags.patch
new file mode 100644 (file)
index 0000000..cb09212
--- /dev/null
@@ -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 (file)
index 0000000..124f47a
--- /dev/null
@@ -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 {
index 865676f4646df20d6399c2602da4038c26268304..b99cf2ba5dccd7249cd3bbdf9043a349c0dad1ba 100755 (executable)
@@ -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
index 48520a9ad757c5c9e81a77212288a618858b4cdd..f9e11205dc93a5b478d56446d6ef03e31232200a 100644 (file)
@@ -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}}
 
This page took 0.056992 seconds and 4 git commands to generate.