!6 Update to 8.06.13

From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-05-15 10:11:04 +00:00 committed by Gitee
commit 50ea4f6ce2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 59 additions and 17 deletions

View File

@ -8,5 +8,5 @@ diff -Nur labltk-labltk-8.06.4/support/Makefile labltk.new/support/Makefile
-CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g
+CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g ${RPM_OPT_FLAGS}
COMPFLAGS=
COMPFLAGS=-I +unix
THFLAGS=-I +threads -I vmthreads

Binary file not shown.

View File

@ -0,0 +1,28 @@
This patch is required because of the following problem when linking
the test binary in ./configure. This seems unrelated to OCaml and
somehow caused by changes in Tcl (or Fedora) itself:
runtest: gcc -o tst -I/usr/local/include/tcl8.5 -I/usr/local/include/tk8.5 -I/usr/local/include tclversion.c -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -lm
tclversion.c:21:1: warning: return type defaults to 'int' [-Wimplicit-int]
21 | main ()
| ^~~~
/usr/bin/ld: /tmp/ccDzgQio.o: relocation R_RISCV_HI20 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: .gnu.build.attributes has both ordered [`.gnu.build.attributes.lo.exit' in /lib64/lp64d/../lib64/lp64d/Scrt1.o] and unordered [`.gnu.build.attributes' in /lib64/lp64d/../lib64/lp64d/Scrt1.o] sections
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
RWMJ 2022-09-20
--- labltk-8.06.12.old/config/auto-aux/runtest 2022-09-20 14:32:40.445384080 +0100
+++ labltk-8.06.12/config/auto-aux/runtest 2022-09-20 14:37:08.035133820 +0100
@@ -15,8 +15,8 @@
if test "$verbose" = yes; then
echo "runtest: $cc -o tst $* $cclibs" >&2
-$cc -o tst $* $cclibs || exit 100
+$cc -fPIC -o tst $* $cclibs || exit 100
else
-$cc -o tst $* $cclibs 2> /dev/null || exit 100
+$cc -fPIC -o tst $* $cclibs 2> /dev/null || exit 100
fi
exec ./tst

View File

@ -1,6 +1,6 @@
diff -ur labltk-8.06.11.old/support/Makefile labltk-8.06.11/support/Makefile
--- labltk-8.06.11.old/support/Makefile 2021-10-04 19:10:57.000196523 +0100
+++ labltk-8.06.11/support/Makefile 2021-10-04 19:18:06.263137991 +0100
diff -ur labltk-8.06.13.old/support/Makefile labltk-8.06.13/support/Makefile
--- labltk-8.06.13.old/support/Makefile 2021-10-04 19:10:57.000196523 +0100
+++ labltk-8.06.13/support/Makefile 2021-10-04 19:18:06.263137991 +0100
@@ -28,7 +28,7 @@
cltkFile.$(O) cltkMain.$(O) cltkMisc.$(O) cltkTimer.$(O) \
cltkVar.$(O) cltkWait.$(O) cltkImg.$(O)
@ -8,12 +8,12 @@ diff -ur labltk-8.06.11.old/support/Makefile labltk-8.06.11/support/Makefile
-CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS)
+CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g
COMPFLAGS=
COMPFLAGS=-I +unix
THFLAGS=-I +threads -I vmthreads
diff -ur labltk-8.06.11.old/support/Makefile.common labltk-8.06.11/support/Makefile.common
--- labltk-8.06.11.old/support/Makefile.common 2021-10-04 19:10:56.990196618 +0100
+++ labltk-8.06.11/support/Makefile.common 2021-10-04 19:18:06.264137981 +0100
@@ -21,17 +21,17 @@
diff -ur labltk-8.06.13.old/support/Makefile.common labltk-8.06.11/support/Makefile.common
--- labltk-8.06.13.old/support/Makefile.common 2021-10-04 19:10:56.990196618 +0100
+++ labltk-8.06.13/support/Makefile.common 2021-10-04 19:18:06.264137981 +0100
@@ -21,19 +21,19 @@
## Tools from the OCaml distribution
CAMLRUN=$(BINDIR)/ocamlrun
@ -39,3 +39,5 @@ diff -ur labltk-8.06.11.old/support/Makefile.common labltk-8.06.11/support/Makef
+CAMLOPTLIBR=$(CAMLOPT) -a -g
+MKLIB=$(BINDIR)/ocamlmklib -g
CAMLRUNGEN=$(BINDIR)/ocamlrun
ifeq (x$(RANLIB),x)
RANLIB=":"

BIN
labltk-8.06.13.tar.gz Normal file

Binary file not shown.

View File

@ -4,16 +4,17 @@
%global native_compiler 0
%endif
Name: ocaml-labltk
Version: 8.06.11
Version: 8.06.13
Release: 1
Summary: Tcl/Tk interface for OCaml
License: LGPLv2+ with exceptions
URL: https://github.com/garrigue/labltk
Source0: https://github.com/garrigue/labltk/archive/%{version}/labltk-%{version}.tar.gz
# This adds debugging (-g) everywhere.
Patch1: labltk-8.06.11-enable-debugging.patch
Patch1: labltk-8.06.13-enable-debugging.patch
Patch2: add_sp.patch
BuildRequires: ocaml tcl-devel tk-devel
Patch3: labltk-8.06.12-use-fpic-configure.patch
BuildRequires: ocaml tcl-devel tk-devel make
%description
labltk or mlTk is a library for interfacing OCaml with the scripting
language Tcl/Tk (all versions since 8.0.3, but no betas).
@ -30,17 +31,25 @@ This package contains the development files.
%setup -q -n labltk-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
find -name .gitignore -delete
find -type f | xargs sed -i -e 's/-warn-error/-w/g'
# Don't build ocamlbrowser.
mv browser browser.old
mkdir browser
echo -e 'all:\ninstall:\n' > browser/Makefile
%build
./configure
./configure -verbose
unset MAKEFLAGS
%if !%{native_compiler}
make byte
%else
make all
make opt
make all opt \
SHAREDCCCOMPOPTS="%{optflags} -fPIC" \
TK_LINK="%{__global_ldflags} -ltk8.6 -ltcl8.6"
%endif
%install
@ -50,7 +59,8 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
make install \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/labltk \
STUBLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
STUBLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
RANLIB=:
%if %{native_compiler}
install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
%endif
@ -68,7 +78,6 @@ install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
%doc examples_camltk
%doc examples_labltk
%{_bindir}/labltk
%{_bindir}/ocamlbrowser
%{_libdir}/ocaml/labltk/labltktop
%{_libdir}/ocaml/labltk/pp
%{_libdir}/ocaml/labltk/tkcompiler
@ -81,6 +90,9 @@ install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
%{_libdir}/ocaml/labltk/*.mli
%changelog
* Mon May 15 2023 liyanan <thistleslyn@163.com> - 8.06.13-1
- update version to 8.06.13
* Fri Apr 15 2022 wangkai <wangkai385@h-partners.com> -8.06.11-1
- update to 8.06.11