!16 [sync] PR-15: fix bug

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2023-09-01 03:14:45 +00:00 committed by Gitee
commit 8eec725211
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 42 additions and 1 deletions

View File

@ -1,11 +1,13 @@
Name: LZMA-SDK
Version: 22.00
Release: 2
Release: 3
Summary: SDK for lzma compression
License: Public Domain
URL: http://sourceforge.net/projects/sevenzip/
Source0: https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/lzma2200.7z
Patch0: remove-Werror.patch
BuildRequires: gcc-c++ p7zip
%description
The LZMA SDK provides the documentation, samples, header files, libraries, and
@ -31,6 +33,7 @@ Development headers for %{name}.
%prep
%setup -q -c -n lzma2200
%patch -P0 -p1
%define debug_package %{nil}
for f in .c .cpp .cs .dsp .dsw .h .java .txt makefile; do
@ -86,6 +89,9 @@ find -iname '*.h' | xargs -I {} install -m 0755 -D {} %{buildroot}/%{_includedir
%doc DOC/7z*.txt DOC/Methods.txt DOC/lzma.txt DOC/lzma-history.txt
%changelog
* Mon Aug 28 2023 dillon chen <dillon.chen@gmail.com> - 22.00-3
- remove -Werror under gcc 12.3.1 compiler
* Wed Aug 03 2022 tanjinghui1 <tanjinghui1@huawei.com> - 22.00-2
- change header file path lzma2200 to lzma

35
remove-Werror.patch Normal file
View File

@ -0,0 +1,35 @@
diff -urN lzma2200/C/7zip_gcc_c.mak lzma2200.new/C/7zip_gcc_c.mak
--- lzma2200/C/7zip_gcc_c.mak 2021-11-20 17:00:00.000000000 +0800
+++ lzma2200.new/C/7zip_gcc_c.mak 2023-08-28 15:30:50.383302888 +0800
@@ -12,7 +12,7 @@
CFLAGS_BASE_LIST = -c
# for ASM file
# CFLAGS_BASE_LIST = -S
-CFLAGS_BASE = $(MY_ARCH_2) -O2 $(CFLAGS_BASE_LIST) -Wall -Werror -Wextra $(CFLAGS_WARN) \
+CFLAGS_BASE = $(MY_ARCH_2) -O2 $(CFLAGS_BASE_LIST) -Wall -Wextra $(CFLAGS_WARN) \
-DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
diff -urN lzma2200/CPP/7zip/7zip_gcc.mak lzma2200.new/CPP/7zip/7zip_gcc.mak
--- lzma2200/CPP/7zip/7zip_gcc.mak 2022-02-02 18:00:00.000000000 +0800
+++ lzma2200.new/CPP/7zip/7zip_gcc.mak 2023-08-28 15:29:52.014979279 +0800
@@ -18,7 +18,7 @@
ifneq ($(CC), xlc)
-CFLAGS_WARN_WALL = -Wall -Werror -Wextra
+CFLAGS_WARN_WALL = -Wall -Wextra
endif
# for object file
diff -urN lzma2200/CPP/Build.mak lzma2200.new/CPP/Build.mak
--- lzma2200/CPP/Build.mak 2021-04-29 16:41:29.000000000 +0800
+++ lzma2200.new/CPP/Build.mak 2023-08-28 15:22:02.076373871 +0800
@@ -56,7 +56,6 @@
!IF "$(CC)" == "clang-cl"
CFLAGS = $(CFLAGS) \
- -Werror \
-Wextra \
-Wall \
-Weverything \