!3 修复安全编译的sp选项

From: @gongzt
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2021-09-10 02:23:09 +00:00 committed by Gitee
commit 4f538f5c6d
2 changed files with 19 additions and 2 deletions

12
add_sp.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nur labltk-labltk-8.06.4/support/Makefile labltk.new/support/Makefile
--- labltk-labltk-8.06.4/support/Makefile 2017-10-30 17:17:52.000000000 +0800
+++ labltk.new/support/Makefile 2021-09-09 17:19:14.856798739 +0800
@@ -28,7 +28,7 @@
cltkFile.$(O) cltkMain.$(O) cltkMisc.$(O) cltkTimer.$(O) \
cltkVar.$(O) cltkWait.$(O) cltkImg.$(O)
-CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g
+CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g ${RPM_OPT_FLAGS}
COMPFLAGS=
THFLAGS=-I +threads -I vmthreads

View File

@ -5,7 +5,7 @@
%endif
Name: ocaml-labltk
Version: 8.06.4
Release: 1
Release: 2
Summary: Tcl/Tk interface for OCaml
License: LGPLv2+ with exceptions
URL: https://github.com/garrigue/labltk
@ -13,6 +13,7 @@ Source0: https://github.com/garrigue/labltk/archive/labltk-%{version
# This adds debugging (-g) everywhere.
Patch1: labltk-8.06.0-enable-debugging.patch
Patch2: labltk-8.06.4-enable-more-debugging.patch
Patch3: add_sp.patch
BuildRequires: ocaml tcl-devel tk-devel
%description
labltk or mlTk is a library for interfacing OCaml with the scripting
@ -30,6 +31,7 @@ This package contains the development files.
%setup -q -n labltk-labltk-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
find -name .gitignore -delete
find -type f | xargs sed -i -e 's/-warn-error/-w/g'
@ -39,7 +41,7 @@ unset MAKEFLAGS
%if !%{native_compiler}
make byte
%else
make all
make all
make opt
%endif
@ -81,5 +83,8 @@ install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
%{_libdir}/ocaml/labltk/*.mli
%changelog
* Thur Sept 9 2021 gongzhengtang <gongzhengtang@huawei.com> - 8.06.4-2
- fix sp
* Fri Oct 9 2020 maminjie <maminjie1@huawei.com> - 8.06.4-1
- package init