Hello community,

here is the log from the commit of package scilab for openSUSE:Factory checked 
in at 2018-02-14 10:51:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/scilab (Old)
 and      /work/SRC/openSUSE:Factory/.scilab.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "scilab"

Wed Feb 14 10:51:48 2018 rev:22 rq:576308 version:5.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/scilab/scilab.changes    2017-07-21 
22:49:37.462822866 +0200
+++ /work/SRC/openSUSE:Factory/.scilab.new/scilab.changes       2018-02-14 
10:51:55.821017984 +0100
@@ -1,0 +2,11 @@
+Sun Feb 11 20:19:06 UTC 2018 - badshah...@gmail.com
+
+- Disable Xcos until building with java >=9 can be fixed.
+
+-------------------------------------------------------------------
+Sun Dec 10 17:14:21 UTC 2017 - badshah...@opensuse.org
+
+- Add scilab-openjdk9-support.patch: Add support for openjdk 9;
+  patch taken from upstream git and rebased for version 5.5.2.
+
+-------------------------------------------------------------------

New:
----
  scilab-openjdk9-support.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ scilab.spec ++++++
--- /var/tmp/diff_new_pack.oI9Hzg/_old  2018-02-14 10:51:57.816946148 +0100
+++ /var/tmp/diff_new_pack.oI9Hzg/_new  2018-02-14 10:51:57.824945860 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package scilab
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -65,6 +65,8 @@
 # exclude ppc64 build as long as upstream open 
http://bugzilla.scilab.org/show_bug.cgi?id=13826
 # PATCH-FIX-UPSTREAM scilab-gcc7-nullptr-fix.patch badshah...@gmail.com -- 
Replace the character-literal '\0' by appropriate null pointer '0' to fix 
compilation with gcc >= 7
 Patch15:        scilab-gcc7-nullptr-fix.patch
+# PATCH-FIX-UPSTREAM scilab-openjdk9-support.patch badshah...@opensuse.org -- 
Add support for openjdk 9; patch taken from upstream git and rebased for 
version 5.5.2
+Patch16:        scilab-openjdk9-support.patch
 ExcludeArch:    ppc64
 # Dependencies are extracted from :
 # "http://wiki.scilab.org/Dependencies of Scilab 5.X"
@@ -94,7 +96,7 @@
 
 # GUI/Console
 BuildRequires:  ant
-BuildRequires:  java-devel >= 1.8.0
+BuildRequires:  java-devel = 9
 BuildRequires:  jpackage-utils
 
 BuildRequires:  Mesa-devel
@@ -308,6 +310,7 @@
 %patch14 -p1
 %if 0%{?suse_version} > 1320
 %patch15 -p1
+%patch16 -p1
 %endif
 
 # Fix Class-Path in manifest
@@ -316,18 +319,15 @@
 sed -i '/name="Class-Path"/d' modules/scirenderer/build.xml
 
 %build
+# Disable xcos until it can build with java >= 9
 %configure \
     --disable-static-system-lib \
     --without-umfpack \
-    --without-emf
+    --without-emf \
+    --without-xcos
 
 make
 
-export DISPLAY=%{X_display}
-Xvfb %{X_display} >& Xvfb.log &
-sleep 5
-make doc
-
 %install
 make install DESTDIR=%{buildroot}
 
@@ -348,7 +348,7 @@
 rm -fr %{buildroot}%{_datadir}/applications/%{name}-*.desktop
 
 # Fix categories and install .desktop files
-for i in scilab scinotes xcos; \
+for i in scilab scinotes; \
 do
   desktop-file-install \
     --dir=%{buildroot}%{_datadir}/applications \
@@ -435,7 +435,7 @@
 %defattr(-,root,root)
 %{_datadir}/%{name}/modules/
 # part of scilab-doc
-%exclude %{_datadir}/%{name}/modules/helptools/jar/%{name}_*.jar
+#%exclude %{_datadir}/%{name}/modules/helptools/jar/%{name}_*.jar
 %exclude %{_datadir}/%{name}/modules/*/examples
 %exclude %{_datadir}/%{name}/modules/*/help
 # part of scilab-tests
@@ -445,8 +445,8 @@
 %defattr(-,root,root)
 %{_datadir}/%{name}/modules/*/examples
 %{_datadir}/%{name}/modules/*/help
-%{_datadir}/%{name}/modules/helptools/jar/%{name}_images.jar
-%{_datadir}/%{name}/modules/helptools/jar/%{name}_en_US_help.jar
+#%{_datadir}/%{name}/modules/helptools/jar/%{name}_images.jar
+#%{_datadir}/%{name}/modules/helptools/jar/%{name}_en_US_help.jar
 
 %files modules-doc-lang -f %{name}-modules-doc.lang
 %defattr(-,root,root)

++++++ scilab-openjdk9-support.patch ++++++
From: Clément DAVID <clement.da...@esi-group.com>
Date: Fri, 8 Dec 2017 12:56:53 +0000 (+0100)
Subject: configure: detect Java 9 correctly
X-Git-Url: 
http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=34213c9e5ca5dbb2f421eeb173a67da236b9327f;hp=5cf6aebe58a73d759b4e53978fdd60bd8b0e0191

configure: detect Java 9 correctly

Change-Id: I9b77db62a6fea7ceb1176df1bbf513268dca7e37
---

Index: scilab-5.5.2/build.incl.xml
===================================================================
--- scilab-5.5.2.orig/build.incl.xml
+++ scilab-5.5.2/build.incl.xml
@@ -89,7 +89,8 @@
         <available property="jdk1.6+" classname="java.util.ArrayDeque"/>
         <available property="jdk1.7+" classname="java.nio.file.Path"/>
         <available property="jdk1.8+" 
classname="java.util.stream.DoubleStream"/>
-        <fail message="Require JDK 1.6 or higher. Found ${ant.java.version}" 
unless="jdk1.6+"/>
+        <available property="jdk1.9+" classname="java.lang.ProcessHandle"/>
+        <fail message="Require JDK 1.8 or higher. Found ${ant.java.version}" 
unless="jdk1.8+"/>
         <mkdir dir="${classes.dir}"/>
         <mkdir dir="${classes.test.dir}"/>
         <mkdir dir="${build.jar.dir}"/>
Index: scilab-5.5.2/configure
===================================================================
--- scilab-5.5.2.orig/configure
+++ scilab-5.5.2/configure
@@ -11671,6 +11671,71 @@ EOF
         echo "configure: CLASSPATH was $CLASSPATH" >&5
             fi
 
+    # The class java.lang.ProcessHandle  is new to 1.9
+
+    cat << \EOF > conftest.java
+// #line 12192 "configure"
+import java.util.regex.Pattern;
+
+import java.lang.ProcessHandle;
+
+public class conftest {
+    public static void main(String[] argv) {
+
+    }
+
+    private static int compare(String v1, String v2) {
+        String s1 = normalisedVersion(v1);
+        String s2 = normalisedVersion(v2);
+        return s1.compareTo(s2);
+    }
+
+    private static String normalisedVersion(String version) {
+        return normalisedVersion(version, ".", 4);
+    }
+
+    private static String normalisedVersion(String version, String sep, int 
maxWidth) {
+        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
+        StringBuilder sb = new StringBuilder();
+        for (String s : split) {
+            sb.append(String.format("%" + maxWidth + 's', s));
+        }
+        return sb.toString();
+    }
+}
+EOF
+
+    CLASSPATH=$ac_java_classpath
+    export CLASSPATH
+    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+       if test ""no"" = "no"; then
+           echo "yes" >&5
+              ac_java_jvm_version=1.9
+       else
+              cmd="$JAVA conftest"
+              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+               echo "yes" >&5
+                  ac_java_jvm_version=1.9
+            else
+                echo "configure: failed program was:" >&5
+                cat conftest.java >&5
+                if test -s conftest.java.output; then
+                   STDOUT=`cat conftest.java.output`
+                fi
+                echo "configure: CLASSPATH was $CLASSPATH" >&5
+                            fi
+        fi
+        if test -f conftest.java.output; then
+           rm conftest.java.output
+        fi
+    else
+        echo "configure: failed program was:" >&5
+        cat conftest.java >&5
+        echo "configure: CLASSPATH was $CLASSPATH" >&5
+            fi
+
+
 
     if test "x$ac_java_jvm_version" = "x" ; then
         as_fn_error $? "Could not detect Java version, 1.4 or newer is 
required" "$LINENO" 5
@@ -11681,7 +11746,7 @@ $as_echo "$ac_java_jvm_version" >&6; }
 
 
      case "$ac_java_jvm_version" in
-        1.6 | 1.7 | 1.8)
+        1.6 | 1.7 | 1.8 | 1.9)
         ;;
         *)
             as_fn_error $? "Wrong version of Java. Expected at least 1.6. 
Found $ac_java_jvm_version" "$LINENO" 5
@@ -11836,6 +11901,36 @@ $as_echo "$ac_cv_java_jvm_jni_working" >
     libSymbolToTest="JNI_GetCreatedJavaVMs"
 
     if test "$ac_java_jvm_name" = "jdk"; then
+        # OpenJDK 9
+        F=lib/libjava.so
+        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
+
+    echo Looking for $ac_java_jvm_dir/$F >&5
+    echo Looking for $ac_java_jvm_dir/$F
+
+           if test -f $ac_java_jvm_dir/$F ; then
+
+    echo Found $ac_java_jvm_dir/$F >&5
+    echo Found $ac_java_jvm_dir/$F
+
+                D=`dirname $ac_java_jvm_dir/$F`
+                ac_java_jvm_jni_lib_runtime_path=$D
+                ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify"
+                D=$ac_java_jvm_dir/lib/client
+        if test ! -f $D/libjvm.so; then # Check if it is in the client or 
server directory
+            # Try the server directory
+            D=$ac_java_jvm_dir/lib/server
+            if test ! -f $D/libjvm.so; then
+                as_fn_error $? "Could not find libjvm.so in
+                jre/lib/$machine/client/ or in jre/lib/$machine/server/.
+                Please report to http://bugzilla.scilab.org/"; "$LINENO" 5
+            fi
+        fi
+                
ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
+                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D 
-ljvm"
+            fi
+        fi
+
         # Sun/Blackdown 1.4 for Linux (client JVM)
 
         F=jre/lib/$machine/libjava.so
@@ -12463,7 +12558,7 @@ fi
 
 
     if test "x$JAVAH" = "x" ; then
-        as_fn_error $? "Cannot find $TOOL" "$LINENO" 5
+       JAVAH=$JAVA 
     fi
 
 
Index: scilab-5.5.2/m4/java.m4
===================================================================
--- scilab-5.5.2.orig/m4/java.m4
+++ scilab-5.5.2/m4/java.m4
@@ -314,6 +314,9 @@ Maybe JAVA_HOME is pointing to a JRE (Ja
     # The class java.util.stream.DoubleStream is new to 1.8
     AC_JAVA_TRY_COMPILE([import java.util.stream.DoubleStream;], , "no", 
ac_java_jvm_version=1.8)
 
+    # The class java.lang.ProcessHandle is new to 1.9
+    AC_JAVA_TRY_COMPILE([import java.lang.ProcessHandle;], , "no", 
ac_java_jvm_version=1.9)
+
     if test "x$ac_java_jvm_version" = "x" ; then
         AC_MSG_ERROR([Could not detect Java version, 1.4 or newer is required])
     fi
@@ -504,8 +507,32 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [
     libSymbolToTest="JNI_GetCreatedJavaVMs"
 
     if test "$ac_java_jvm_name" = "jdk"; then
-        # Sun/Blackdown 1.4 for Linux (client JVM)
 
+        # OpenJDK 9
+        F=lib/libjava.so
+        if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
+            AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F])
+            if test -f $ac_java_jvm_dir/$F ; then
+                AC_MSG_LOG([Found $ac_java_jvm_dir/$F])
+                D=`dirname $ac_java_jvm_dir/$F`
+                ac_java_jvm_jni_lib_runtime_path=$D
+                ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify"
+                D=$ac_java_jvm_dir/lib/client
+        if test ! -f $D/libjvm.so; then # Check if it is in the client or 
server directory
+            # Try the server directory
+            D=$ac_java_jvm_dir/lib/server
+            if test ! -f $D/libjvm.so; then
+                AC_MSG_ERROR([Could not find libjvm.so in
+                jre/lib/$machine/client/ or in jre/lib/$machine/server/.
+                Please report to http://bugzilla.scilab.org/])
+            fi
+        fi
+                
ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D"
+                ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D 
-ljvm"
+            fi
+        fi
+
+        # Sun/Blackdown 1.4 for Linux (client JVM)
         F=jre/lib/$machine/libjava.so
         if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then
             AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F])
@@ -771,7 +798,7 @@ AC_DEFUN([AC_JAVA_TOOLS], [
     fi
 
     TOOL=javah
-    AC_JAVA_TOOLS_CHECK(JAVAH, $TOOL, $ac_java_jvm_bin_dir)
+    AC_JAVA_TOOLS_CHECK(JAVAH, $TOOL, $ac_java_jvm_bin_dir, 1)
 
     AC_JAVA_TOOLS_CHECK(JAR, jar, $ac_java_jvm_bin_dir)
 
Index: scilab-5.5.2/configure.ac
===================================================================
--- scilab-5.5.2.orig/configure.ac
+++ scilab-5.5.2/configure.ac
@@ -821,7 +821,7 @@ if test "$with_javasci" != no -o "$with_
 
      AC_JAVA_DETECT_JVM
      case "$ac_java_jvm_version" in
-        1.6 | 1.7 | 1.8)
+        1.6 | 1.7 | 1.8 | 1.9)
         ;;
         *)
             AC_MSG_ERROR([Wrong version of Java. Expected at least 1.6. Found 
$ac_java_jvm_version])

Reply via email to