]> git.pld-linux.org Git - packages/openjdk9.git/blobdiff - openjdk8.spec
Let our RPM handle debug symbols
[packages/openjdk9.git] / openjdk8.spec
index 72d422e2fbc6fc97f5e4b495c39505282fca5d39..a99256f43c0da7bbcb2afa26ba7220df8f9cfa49 100644 (file)
@@ -2,11 +2,10 @@
 # TODO:
 #      - fix BuildRequires
 #      - fix build with system giflib
-#      - use other system libs (libjpeg, liblcms, libsctp)
+#      - use other system libs (libsctp?)
 #      - build alternative VM for x32
 #      - include icedtea-sound?
 #      - port PLD-specific changes from icedtea7?
-#      - '*** WARNING: no sources found for ...'
 
 %bcond_with bootstrap   # build a bootstrap version, using icedtea6
 %bcond_without cacerts # don't include the default CA certificates
@@ -40,6 +39,7 @@ Source2:      openjdk8-hotspot-jdk8u%{ver_u}-b%{ver_b}.tar.bz2
 Source3:       openjdk8-jaxp-jdk8u%{ver_u}-b%{ver_b}.tar.bz2
 # Source3-md5: 6bd5ae187272a209439d1a95ac6c9025
 Source4:       openjdk8-jaxws-jdk8u%{ver_u}-b%{ver_b}.tar.bz2
+# Source4-md5: 15e6a93009bdc73194e7118988d5ab8d
 Source5:       openjdk8-jdk-jdk8u%{ver_u}-b%{ver_b}.tar.bz2
 # Source5-md5: 74f2cf3815659b83993c4187e7fc4f6b
 Source6:       openjdk8-langtools-jdk8u%{ver_u}-b%{ver_b}.tar.bz2
@@ -51,11 +51,14 @@ Patch0:             adjust-mflags.patch
 Patch1:                format_strings.patch
 Patch2:                CompileDemos.patch
 Patch3:                libpath.patch
+Patch4:                system-libjpeg.patch
+Patch5:                system-libpng.patch
+Patch6:                system-lcms.patch
+Patch7:                system-pcsclite.patch
 URL:           http://openjdk.java.net/
 BuildRequires: alsa-lib-devel
 BuildRequires: ant
 BuildRequires: autoconf
-BuildRequires: automake
 BuildRequires: bash
 %{?with_cacerts:BuildRequires: ca-certificates-update}
 BuildRequires: cups-devel
@@ -65,8 +68,11 @@ BuildRequires:       gawk
 #BuildRequires:        giflib-devel >= 5.1
 BuildRequires: glibc-misc
 %buildrequires_jdk
+BuildRequires: lcms2-devel
 BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
 BuildRequires: lsb-release
+BuildRequires: pcsc-lite-devel
 BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.557
 BuildRequires: unzip
@@ -410,6 +416,10 @@ done
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 %build
 # Make sure we have /proc mounted - otherwise idlc will fail later.
@@ -418,28 +428,50 @@ if [ ! -f /proc/self/stat ]; then
        exit 1
 fi
 
+cd common/autoconf
+%{__autoconf} -o generated-configure.sh
+cd ../..
+
 mkdir -p build-bin
+
+# use the specified %%use_jdk
 export JAVA_HOME=%{java_home}
 export PATH="$JAVA_HOME/bin:$PATH"
+
+# unset CLASSPATH to be safe, gnustep puts garbage there, which openjdk hates
+unset CLASSPATH
+
 export SHELL=/bin/bash
 
 chmod a+x configure
 
+# disable-debug-symbols so openjdk debuginfo handling won't conflict with ours
 %configure \
        --with-extra-cflags="%{rpmcflags}" \
        --with-extra-cxxflags="%{rpmcxxflags}" \
        --with-extra-ldflags="%{rpmldflags}" \
+       --disable-debug-symbols \
        --with-giflib=bundled \
+       --with-libjpeg=system \
+       --with-libpng=system \
+       --with-lcms=system \
+       --with-libpcsclite=system \
        --with-zlib=system
 
 specdir="$(dirname build/*-release/spec.gmk)"
 cat > $specdir/custom-spec.gmk <<EOF
+# OpenJDK build system depends on bash
 SHELL=/bin/bash
 EOF
-[ -d tmp-bin ] || ln -s "$specdir/jdk/bin" tmp-bin
+[ -L tmp-bin ] || ln -s "$specdir/jdk/bin" tmp-bin
 
 %{__make} all \
-       LOG=debug
+       -j1 JOBS=%{__jobs} \
+       LOG=debug \
+       # these are normally set when --disable-debug-symbols is not used \
+       LIBMANAGEMENT_OPTIMIZATION=LOW \
+       LIBHPROF_OPTIMIZATION=LOW \
+       LIBVERIFY_OPTIMIZATION=LOW
 
 export PATH="$(pwd)/build-bin:$PATH"
 %{?with_cacerts:%{__sh} %{SOURCE10}}
@@ -688,8 +720,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files jre-base
 %defattr(644,root,root,755)
-%doc openjdk.build/j2sdk-image/THIRD_PARTY_README
-%doc openjdk.build/j2sdk-image/ASSEMBLY_EXCEPTION
+%doc THIRD_PARTY_README
+%doc ASSEMBLY_EXCEPTION
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*
 %dir %{dstdir}
@@ -730,11 +762,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 %dir %{jredir}/lib/%{jre_arch}/jli
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/jli/*.so
-%{jredir}/lib/%{jre_arch}/jli/*.diz
 %dir %{jredir}/lib/%{jre_arch}/server
 %{jredir}/lib/%{jre_arch}/server/Xusage.txt
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/server/*.so
-%{jredir}/lib/%{jre_arch}/server/*.diz
 %{jredir}/lib/%{jre_arch}/jvm.cfg
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libattach.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libawt.so
@@ -747,11 +777,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libj2pkcs11.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjaas_unix.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjava.so
-%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjpeg.so
-%attr(755,root,root) %{jredir}/lib/%{jre_arch}/liblcms.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsctp.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsunec.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjava_crw_demo.so
+%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjavajpeg.so
+%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjavalcms.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjawt.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjdwp.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjsdt.so
@@ -770,7 +800,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libunpack.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libverify.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libzip.so
-%{jredir}/lib/%{jre_arch}/*.diz
 %{jredir}/lib/images
 %{jredir}/lib/management
 %{jredir}/lib/security
@@ -799,7 +828,6 @@ rm -rf $RPM_BUILD_ROOT
 %{jredir}/lib/rt.jar
 %{jredir}/lib/sound.properties
 %{jredir}/lib/tzdb.dat
-%{jredir}/lib/*.diz
 %{jvmjardir}
 
 %files jre-X11
This page took 0.114636 seconds and 4 git commands to generate.