SHA256
1
0
forked from pool/jurand
Fridrich Strba 2023-09-27 07:06:22 +00:00 committed by Git OBS Bridge
parent 5182fa2558
commit 7ac8e4e66e
3 changed files with 61 additions and 1 deletions

34
jurand-cxx20.patch Normal file
View File

@ -0,0 +1,34 @@
diff -urEbwB jurand-1.3.1.orig/Makefile jurand-1.3.1/Makefile
--- jurand-1.3.1.orig/Makefile 2023-09-27 07:17:18.384159160 +0200
+++ jurand-1.3.1/Makefile 2023-09-27 08:55:18.229794175 +0200
@@ -12,7 +12,8 @@
test: test.sh test-compile
@./$<
-CXXFLAGS += -g -std=c++2a -Isrc -Wall -Wextra -Wpedantic
+CXXFLAGS += -g -std=gnu++2a -Isrc -Wall -Wextra -Wpedantic -D_GLIBCXX_USE_CXX11_ABI=1
+LDFLAGS += -pthread
$(eval $(call Variable_rule,target/compile_flags,$(CXX) $(CXXFLAGS)))
$(eval $(call Variable_rule,target/link_flags,$(CXX) $(LDFLAGS) $(LDLIBS)))
diff -urEbwB jurand-1.3.1.orig/src/java_symbols.hpp jurand-1.3.1/src/java_symbols.hpp
--- jurand-1.3.1.orig/src/java_symbols.hpp 2023-09-27 07:17:18.384159160 +0200
+++ jurand-1.3.1/src/java_symbols.hpp 2023-09-27 08:42:56.218651442 +0200
@@ -630,14 +630,14 @@
if (not parameters.in_place_)
{
- auto osyncstream = std::osyncstream(std::cout);
+ auto oss = std::osyncstream(std::cout);
if (not path.empty())
{
- osyncstream << path.native() << ":\n";
+ oss << path.native() << ":\n";
}
- osyncstream.write(content.c_str(), content.size());
+ oss.write(content.c_str(), content.size());
}
else if (content.size() < original_content.size())
{

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Sep 27 07:04:00 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* jurand-cxx20.patch
+ fix name class between osyncstream variable and
std::osyncstream
+ allow building on SLE-12-SP5 and SLE-15-SP2
-------------------------------------------------------------------
Wed Sep 27 05:00:00 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@ -16,19 +16,26 @@
#
%{!?_rpmmacrodir:%global _rpmmacrodir %{_rpmconfigdir}/macros.d}
%{!?make_build:%global make_build make %{?_smp_mflags}}
Name: jurand
Version: 1.3.1
Release: 0
Summary: A tool for manipulating Java symbols
License: Apache-2.0
Group: Development/Languages/Java
URL: https://github.com/fedora-java/jurand
Source0: https://github.com/fedora-java/jurand/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: jurand-cxx20.patch
BuildRequires: asciidoc
BuildRequires: diffutils
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: xmlto
%if 0%{?suse_version} > 1599
BuildRequires: gcc-c++
%else
BuildRequires: gcc11-c++
%endif
%description
The tool can be used for patching .java sources in cases where using sed is
@ -37,8 +44,14 @@ rather than applying simple regular expressions on the source code.
%prep
%setup -q
%patch0 -p1
%build
%if 0%{?suse_version} <= 1599
export CXX=g++-11
export CC=gcc-11
%endif
%make_build test-compile manpages
%install
@ -50,6 +63,10 @@ export mandir=%{_mandir}/man7
./install.sh
%check
%if 0%{?suse_version} <= 1599
export CXX=g++-11
export CC=gcc-11
%endif
%make_build test
%files -f target/installed_files