SHA256
1
0
forked from pool/libsvm

2 Commits

3 changed files with 29 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
--- libsvm-3.3/java/Makefile 2024-09-26 17:44:00.135921357 +0200
+++ libsvm-3.3/java/Makefile 2024-09-26 17:46:18.746958191 +0200
@@ -11,7 +11,8 @@
export CLASSPATH := .:$(CLASSPATH)
all: $(FILES)
- jar cvf libsvm.jar *.class libsvm/*.class
+ jar --date="$$(date -u -d @$${SOURCE_DATE_EPOCH:-$$(date +%s)} +%Y-%m-%dT%H:%M:%SZ)" \
+ --create --verbose --file=libsvm.jar *.class libsvm/*.class
.java.class:
$(JAVAC) $(JAVAC_FLAGS) $<

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Sep 26 16:05:53 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* libsvm-reproducible-jar-mtime.patch
+ Use SOURCE_DATE_EPOCH for reproducible jar mtime
+ Applied if building with Java >= 17
-------------------------------------------------------------------
Fri Mar 1 10:07:24 UTC 2024 - pgajdos@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package libsvm
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,7 @@ Release: 0
URL: https://www.csie.ntu.edu.tw/~cjlin/libsvm/
Source0: https://www.csie.ntu.edu.tw/~cjlin/libsvm/%{name}-%{fileversion}.tar.gz
Patch0: libsvm-java8.patch
Patch1: libsvm-reproducible-jar-mtime.patch
BuildRequires: %{python_module devel}
BuildRequires: gcc-c++
BuildRequires: java-devel >= 1.8
@@ -88,14 +89,19 @@ Requires: %{libname} = %{version}
Requires: java >= 1.6.0
Requires: javapackages-tools
Requires(post): javapackages-tools
Requires(postun):javapackages-tools
Requires(postun): javapackages-tools
BuildArch: noarch
%description java
This package contains the Java bindings for libsvm.
%prep
%autosetup -p1 -n %{name}-%{fileversion}
%setup -n %{name}-%{fileversion}
%patch -P 0 -p1
# The "--date" option was added into jar in OpenJDK 17
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
%patch -P 1 -p1
%endif
%build
# We can't override CFLAGS, we have to patch the Makefile.