!20 支持指定 CC 编译

From: @jammyjellyfish 
Reviewed-by: @leeffo 
Signed-off-by: @leeffo
This commit is contained in:
openeuler-ci-bot 2023-04-17 01:15:27 +00:00 committed by Gitee
commit de71090628
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 41 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: jbigkit Name: jbigkit
Version: 2.1 Version: 2.1
Release: 21 Release: 22
Summary: Lossless image compression library Summary: Lossless image compression library
License: GPLv2+ License: GPLv2+
@ -13,6 +13,7 @@ Patch1: jbigkit-2.0-warnings.patch
Patch2: jbigkit-ldflags.patch Patch2: jbigkit-ldflags.patch
Patch6000: backport-CVE-2017-9937.patch Patch6000: backport-CVE-2017-9937.patch
Patch6001: support-specify-cc.patch
BuildRequires: gcc BuildRequires: gcc
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
@ -84,6 +85,9 @@ make test
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Sun Apr 16 2023 jammyjellyfish <jammyjellyfish255@outlook.com> - 2.1-22
- Support specify CC
* Fri Jan 13 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.1-21 * Fri Jan 13 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.1-21
- fix build fail - fix build fail

36
support-specify-cc.patch Normal file
View File

@ -0,0 +1,36 @@
diff -up jbigkit-2.1/libjbig/Makefile.orig2 jbigkit-2.1/libjbig/Makefile
--- jbigkit-2.1/libjbig/Makefile.orig2 2023-04-16 16:44:13.690431844 +0800
+++ jbigkit-2.1/libjbig/Makefile 2023-04-16 16:44:42.118544267 +0800
@@ -1,7 +1,7 @@
# Unix makefile for the JBIG-KIT library
# Select an ANSI/ISO C compiler here, GNU gcc is recommended
-CC = gcc
+CC ?= gcc
# Options for the compiler: A high optimization level is suggested
CFLAGS = $(RPM_OPT_FLAGS) -W -Wall -ansi -pedantic # --coverage
diff -up jbigkit-2.1/Makefile.orig2 jbigkit-2.1/Makefile
--- jbigkit-2.1/Makefile.orig2 2023-04-16 16:43:38.182291412 +0800
+++ jbigkit-2.1/Makefile 2023-04-16 16:45:00.230615896 +0800
@@ -1,7 +1,7 @@
# Unix makefile for JBIG-KIT
# Select an ANSI/ISO C compiler here, GNU gcc is recommended
-CC = gcc
+CC ?= gcc
# Options for the compiler: A high optimization level is suggested
CFLAGS = $(RPM_OPT_FLAGS) -W -Wno-unused-result
diff -up jbigkit-2.1/pbmtools/Makefile.orig2 jbigkit-2.1/pbmtools/Makefile
--- jbigkit-2.1/pbmtools/Makefile.orig2 2023-04-16 16:44:32.126504750 +0800
+++ jbigkit-2.1/pbmtools/Makefile 2023-04-16 16:44:48.254568533 +0800
@@ -1,7 +1,7 @@
# Unix makefile for the JBIG-KIT PBM tools
# Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended
-CC = gcc
+CC ?= gcc
# Options for the compiler
CFLAGS = $(RPM_OPT_FLAGS) -W -Wall -Wno-unused-result -ansi -pedantic # --coverage