diff --git a/labltk-8.06.0-enable-debugging.patch b/labltk-8.06.0-enable-debugging.patch new file mode 100644 index 0000000000000000000000000000000000000000..7e968116877458e492f974d07e5b9288c5c38a79 --- /dev/null +++ b/labltk-8.06.0-enable-debugging.patch @@ -0,0 +1,28 @@ +--- labltk-8.06.0.old/support/Makefile.common 2014-09-18 05:08:33.000000000 +0100 ++++ labltk-8.06.0/support/Makefile.common 2015-02-16 15:11:30.157186457 +0000 +@@ -21,17 +21,17 @@ + ## Tools from the OCaml distribution + + CAMLRUN=$(BINDIR)/ocamlrun +-CAMLC=$(BINDIR)/ocamlc$(OPT) +-CAMLOPT=$(BINDIR)/ocamlopt$(OPT) +-CAMLCB=$(BINDIR)/ocamlc +-CAMLOPTB=$(BINDIR)/ocamlopt +-CAMLCOMP=$(CAMLC) -c -warn-error A-3 ++CAMLC=$(BINDIR)/ocamlc$(OPT) -g ++CAMLOPT=$(BINDIR)/ocamlopt$(OPT) -g ++CAMLCB=$(BINDIR)/ocamlc -g ++CAMLOPTB=$(BINDIR)/ocamlopt -g ++CAMLCOMP=$(CAMLC) -c -warn-error A-3 -g + CAMLYACC=$(BINDIR)/ocamlyacc -v + CAMLLEX=$(BINDIR)/ocamllex +-CAMLLIBR=$(CAMLC) -a ++CAMLLIBR=$(CAMLC) -a -g + CAMLDEP=$(BINDIR)/ocamldep + COMPFLAGS=-g + LINKFLAGS= +-CAMLOPTLIBR=$(CAMLOPT) -a +-MKLIB=$(BINDIR)/ocamlmklib ++CAMLOPTLIBR=$(CAMLOPT) -a -g ++MKLIB=$(BINDIR)/ocamlmklib -g + CAMLRUNGEN=$(BINDIR)/ocamlrun diff --git a/labltk-8.06.4-enable-more-debugging.patch b/labltk-8.06.4-enable-more-debugging.patch new file mode 100644 index 0000000000000000000000000000000000000000..f2a02e41a76f1c152c4007257ab6a22d1333d213 --- /dev/null +++ b/labltk-8.06.4-enable-more-debugging.patch @@ -0,0 +1,11 @@ +--- labltk-8.06.4.old/support/Makefile 2017-10-30 09:19:07.000000000 +0000 ++++ labltk-8.06.4/support/Makefile 2017-11-07 21:24:58.244605912 +0000 +@@ -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) ++CCFLAGS=-I$(LIBDIR)/caml $(TK_DEFS) $(SHAREDCCCOMPOPTS) -g + + COMPFLAGS= + THFLAGS=-I +threads -I vmthreads diff --git a/labltk-8.06.4.tar.gz b/labltk-8.06.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..70059a954f10d399ed64a44d3b1360933dfc3450 Binary files /dev/null and b/labltk-8.06.4.tar.gz differ diff --git a/labltk.spec b/labltk.spec new file mode 100644 index 0000000000000000000000000000000000000000..2762818865a1375e3034c5913b53cd77b39f7f3a --- /dev/null +++ b/labltk.spec @@ -0,0 +1,85 @@ +%ifarch %{ocaml_native_compiler} +%global native_compiler 1 +%else +%global native_compiler 0 +%endif +Name: ocaml-labltk +Version: 8.06.4 +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/labltk-%{version}/labltk-%{version}.tar.gz +# This adds debugging (-g) everywhere. +Patch1: labltk-8.06.0-enable-debugging.patch +Patch2: labltk-8.06.4-enable-more-debugging.patch +BuildRequires: ocaml tcl-devel tk-devel +%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). + +%package devel +Summary: Tcl/Tk interface for OCaml +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +labltk or mlTk is a library for interfacing OCaml with the scripting +language Tcl/Tk (all versions since 8.0.3, but no betas). +This package contains the development files. + +%prep +%setup -q -n labltk-labltk-%{version} +%patch1 -p1 +%patch2 -p1 +find -name .gitignore -delete +find -type f | xargs sed -i -e 's/-warn-error/-w/g' + +%build +./configure +unset MAKEFLAGS +%if !%{native_compiler} +make byte +%else +make all +make opt +%endif + +%install +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk +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 +%if %{native_compiler} +install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk +%endif + +%files +%doc Changes README.mlTk +%dir %{_libdir}/ocaml/labltk +%{_libdir}/ocaml/labltk/*.cmi +%{_libdir}/ocaml/labltk/*.cma +%{_libdir}/ocaml/labltk/*.cmo +%{_libdir}/ocaml/stublibs/dlllabltk.so + +%files devel +%doc README.mlTk +%doc examples_camltk +%doc examples_labltk +%{_bindir}/labltk +%{_bindir}/ocamlbrowser +%{_libdir}/ocaml/labltk/labltktop +%{_libdir}/ocaml/labltk/pp +%{_libdir}/ocaml/labltk/tkcompiler +%{_libdir}/ocaml/labltk/*.a +%if %{native_compiler} +%{_libdir}/ocaml/labltk/*.cmxa +%{_libdir}/ocaml/labltk/*.cmx +%{_libdir}/ocaml/labltk/*.o +%endif +%{_libdir}/ocaml/labltk/*.mli + +%changelog +* Fri Oct 9 2020 maminjie - 8.06.4-1 +- package init diff --git a/labltk.yaml b/labltk.yaml new file mode 100644 index 0000000000000000000000000000000000000000..91661a997ed2aaca2de80a54e764323e15e2e8cc --- /dev/null +++ b/labltk.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: garrigue/labltk +tag_prefix: "^" +seperator: "."