diff --git a/add_sp.patch b/add_sp.patch index d01504c87c1f307ba7cc32a61c54108a9ab18627..85f47e528a26629d78dc090554f8f266038a23be 100644 --- a/add_sp.patch +++ b/add_sp.patch @@ -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 diff --git a/labltk-8.06.11.tar.gz b/labltk-8.06.11.tar.gz deleted file mode 100644 index 90fbccb596230494873f6baebfc13c16e2fa1a3e..0000000000000000000000000000000000000000 Binary files a/labltk-8.06.11.tar.gz and /dev/null differ diff --git a/labltk-8.06.12-use-fpic-configure.patch b/labltk-8.06.12-use-fpic-configure.patch new file mode 100644 index 0000000000000000000000000000000000000000..3ce468beffc536b1297d529bba70de402ef14e09 --- /dev/null +++ b/labltk-8.06.12-use-fpic-configure.patch @@ -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 diff --git a/labltk-8.06.11-enable-debugging.patch b/labltk-8.06.13-enable-debugging.patch similarity index 70% rename from labltk-8.06.11-enable-debugging.patch rename to labltk-8.06.13-enable-debugging.patch index 71d64a52334b0d7b84e9a18894f1e41bf2e536c6..7fb2115cecac70344fd16d2bf9e3efbffd1905ae 100644 --- a/labltk-8.06.11-enable-debugging.patch +++ b/labltk-8.06.13-enable-debugging.patch @@ -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=":" diff --git a/labltk-8.06.13.tar.gz b/labltk-8.06.13.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d72da4602e02abe34f69fab70dcd67798d94dc6e Binary files /dev/null and b/labltk-8.06.13.tar.gz differ diff --git a/labltk.spec b/labltk.spec index 218a1421c26717ab8fe22ce6ef991840dacab55b..7776c73325202809784b301b57e3ddd7ec054ca3 100644 --- a/labltk.spec +++ b/labltk.spec @@ -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 - 8.06.13-1 +- update version to 8.06.13 + * Fri Apr 15 2022 wangkai -8.06.11-1 - update to 8.06.11