packages (OPENJDK-1_6): openjdk/openjdk.spec - extract and remove -jX from ...

glen glen at pld-linux.org
Wed Dec 30 16:17:49 CET 2009


Author: glen                         Date: Wed Dec 30 15:17:49 2009 GMT
Module: packages                      Tag: OPENJDK-1_6
---- Log message:
- extract and remove -jX from __make

---- Files affected:
packages/openjdk:
   openjdk.spec (1.8.2.4 -> 1.8.2.5) 

---- Diffs:

================================================================
Index: packages/openjdk/openjdk.spec
diff -u packages/openjdk/openjdk.spec:1.8.2.4 packages/openjdk/openjdk.spec:1.8.2.5
--- packages/openjdk/openjdk.spec:1.8.2.4	Wed Dec 30 16:03:26 2009
+++ packages/openjdk/openjdk.spec	Wed Dec 30 16:17:44 2009
@@ -4,9 +4,6 @@
 %define		_classdataversion	50.0
 %define		buildnum		b17
 
-# It does not work with openjdk Makefile. Use HOTSPOT_BUILD_JOBS instead.
-%undefine	_smp_mflags
-
 Summary:	Open-source JDK, an implementation of the Java Platform
 Summary(pl.UTF-8):	JDK o otwartych źrodłach - implementacja platformy Java
 Name:		openjdk
@@ -30,6 +27,10 @@
 ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# make -j1 does not work because there is some stupid magick which takes MFLAGS
+# and says -jN is not allowed. remove %{_smp_mflags} from %__make.
+%{expand:%%global	__make		%(echo %{__make} | sed -e 's/\b%{?_smp_mflags}//')}
+
 %description
 Open-source JDK, an implementation of the Java Platform.
 
@@ -41,19 +42,20 @@
 %patch0 -p0
 
 %build
+smp_mflags=%{?_smp_mflags}
+HOTSPOT_BUILD_JOBS=${smp_mflags:-1}${smp_mflags#-j}
 unset JAVA_HOME
 unset CLASSPATH
 LC_ALL=C
 LANG=C
 
-HOTSPOT_BUILD_JOBS=%(echo "%{__make}" | sed -e 's#.*-j\([[:space:]]*[0-9]\+\)#\1#g')
-[ "$HOTSPOT_BUILD_JOBS" = "%{__make}" ] && HOTSPOT_BUILD_JOBS=1
-HOTSPOT_BUILD_JOBS=$(echo $HOTSPOT_BUILD_JOBS)
-
 export JAVA_HOME CLASSPATH LC_ALL LANG HOTSPOT_BUILD_JOBS
 
-%{__make} -j1 sanity
-%{__make} -j1 \
+echo "Make: %{__make}"
+echo "Build Jobs: $HOTSPOT_BUILD_JOBS"
+
+%{__make} sanity
+%{__make} \
 	UTILS_USR_BIN_PATH="" \
 	CC="%{__cc}" \
 	CXX="%{__cxx}" \
@@ -101,6 +103,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.8.2.5  2009/12/30 15:17:44  glen
+- extract and remove -jX from __make
+
 Revision 1.8.2.4  2009/12/30 15:03:26  glen
 - make jobs extraction from openoffice.org.spec
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openjdk/openjdk.spec?r1=1.8.2.4&r2=1.8.2.5&f=u



More information about the pld-cvs-commit mailing list