Hello community, here is the log from the commit of package ocaml-labltk for openSUSE:Leap:15.2 checked in at 2020-03-15 07:11:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/ocaml-labltk (Old) and /work/SRC/openSUSE:Leap:15.2/.ocaml-labltk.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-labltk" Sun Mar 15 07:11:21 2020 rev:12 rq:783320 version:8.06.3 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/ocaml-labltk/ocaml-labltk.changes 2020-01-15 15:34:22.094899435 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.ocaml-labltk.new.3160/ocaml-labltk.changes 2020-03-15 07:11:37.544972854 +0100 @@ -1,0 +2,13 @@ +Thu Feb 20 20:20:20 UTC 2020 - [email protected] + +- Fix weird bugs in configure with ocaml-labltk.patch + partly backported from mainline +- Require current ocaml-rpm-macros + +------------------------------------------------------------------- +Wed Oct 9 05:48:16 UTC 2019 - [email protected] + +- Require a specifc ocaml version +- Use _service file and ocaml-rpm-macros + +------------------------------------------------------------------- Old: ---- labltk-8.06.3.tar.xz New: ---- _service ocaml-labltk-8.06.3.tar.xz ocaml-labltk.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocaml-labltk.spec ++++++ --- /var/tmp/diff_new_pack.WjN7GU/_old 2020-03-15 07:11:38.148973215 +0100 +++ /var/tmp/diff_new_pack.WjN7GU/_new 2020-03-15 07:11:38.152973217 +0100 @@ -23,14 +23,14 @@ Summary: Tcl/Tk framework for ocaml License: SUSE-LGPL-2.0-with-linking-exception Group: Development/Languages/OCaml -Url: https://forge.ocamlcore.org/projects/labltk/ -Source: labltk-%{version}.tar.xz -BuildRequires: ocaml +Url: https://github.com/garrigue/labltk +Source: %{name}-%{version}.tar.xz +Patch0: ocaml-labltk.patch +BuildRequires: ocaml(ocaml_base_version) = 4.05 BuildRequires: ocaml-findlib -BuildRequires: ocaml-rpm-macros >= 4.05.0 +BuildRequires: ocaml-rpm-macros >= 20200220 BuildRequires: tcl-devel BuildRequires: tk-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description LablTk is an interface to the Tcl/Tk GUI framework. It allows to @@ -53,10 +53,15 @@ This package contains the development files. It includes the ocaml browser for code editing and library browsing. %prep -%setup -q -n labltk-%{version} +%autosetup -p1 %build -./configure --use-findlib +env \ +ocamlopt=$(type -P ocamlc) \ +bash -e \ +./configure \ + --tklibs '-L%{_libdir}' \ + --use-findlib make \ byte %if 0%{?ocaml_native_compiler} @@ -82,46 +87,18 @@ find examples* -type f -exec chmod -v 644 {} \; cat $ld_conf # -mkdir -vp %{buildroot}/etc/ld.so.conf.d/ -tee %{buildroot}/etc/ld.so.conf.d/%{name}.conf <<_EOF_ -%{_libdir}/ocaml/stublibs -_EOF_ -# +%ocaml_create_file_list %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%files -%defattr(-,root,root,-) -%{_bindir}/labltk -/etc/ld.so.conf.d/*.conf -%dir %{_libdir}/ocaml -%dir %{_libdir}/ocaml/* -%if 0%{?ocaml_native_compiler} -%endif -%{_libdir}/ocaml/*/*.so -%{_libdir}/ocaml/*/*.so.owner +%files -f %{name}.files +%{_bindir}/* -%files devel -%defattr(-,root,root,-) -%doc examples_labltk -%doc examples_camltk -%{_bindir}/ocamlbrowser +%files devel -f %{name}.files.devel %{_libdir}/ocaml/*/labltktop %{_libdir}/ocaml/*/pp %{_libdir}/ocaml/*/tkcompiler -%dir %{_libdir}/ocaml -%dir %{_libdir}/ocaml/* -%{_libdir}/ocaml/*/*.a -%if 0%{?ocaml_native_compiler} -%{_libdir}/ocaml/*/*.cmx -%{_libdir}/ocaml/*/*.cmxa -%endif -%{_libdir}/ocaml/*/*.cma -%{_libdir}/ocaml/*/*.cmi -%{_libdir}/ocaml/*/*.cmo -%{_libdir}/ocaml/*/*.mli -%{_libdir}/ocaml/*/META %changelog ++++++ _service ++++++ <services> <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/garrigue/labltk.git</param> <param name="scm">git</param> <param name="versionformat">8.06.3</param> <!-- ocaml-4.05 --> <param name="revision">45da3591cbdcae1f034f4623909a98dce68aa841</param> <param name="filename">ocaml-labltk</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> <param name="compression">xz</param> </service> <service name="set_version" mode="disabled"/> </services> ++++++ ocaml-labltk.patch ++++++ --- a/config/auto-aux/hasgot +++ b/config/auto-aux/hasgot @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ######################################################################### # # @@ -31,7 +31,8 @@ while : ; do done (echo "main() {" - for f in $*; do echo " $f();"; done + fn=$1;shift;args="$@" + echo " $fn(${args// /,});" echo "}") >> hasgot.c if test "$verbose" = yes; then --- a/configure +++ b/configure @@ -19,7 +19,7 @@ installbindir='' installdir='' tk_defs='' tk_libs='' -tk_x11=yes +tk_x11=no use_findlib=no verbose=no optcomps=no @@ -63,6 +63,8 @@ while : ; do tk_libs=$2; shift;; -tk-no-x11|--tk-no-x11) tk_x11=no;; + -tk-x11|--tk-x11) + tk_x11=yes;; -use-findlib|--use-findlib) use_findlib=yes;; -verbose|--verbose) @@ -150,11 +152,17 @@ fi inf "Configuring LablTk..." +if test "x$MAKE" = x; then + MAKE=make +fi + if test $tk_x11 = no; then has_tk=true else - tk_x11_include=`cat $where/Makefile.config | grep '^X11_INCLUDES=' | sed -e 's/^X11_INCLUDES=//'` - tk_x11_libs=`cat $where/Makefile.config | grep '^X11_LIBS=' | sed -e 's/^X11_LIBS=//'` +# tk_x11_include=`cat $where/Makefile.config | grep '^X11_INCLUDES=' | sed -e 's/^X11_INCLUDES=//'` +# tk_x11_libs=`cat $where/Makefile.config | grep '^X11_LIBS=' | sed -e 's/^X11_LIBS=//'` + tk_x11_include=`$MAKE where=$where includes -f readconf.mk` + tk_x11_libs=`$MAKE where=$where libs -f readconf.mk` has_tk=true fi @@ -171,6 +179,7 @@ if test $has_tk = true; then "-I/sw/include" \ "-I/usr/pkg/include" \ "-I/usr/include" \ + "-I/usr/X11/include" \ "-I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6" \ "-I/usr/include/tcl8.6 -I/usr/include/tk8.6" \ "-I/usr/local/include/tcl8.5 -I/usr/local/include/tk8.5" \ @@ -213,12 +222,13 @@ if test $has_tk = true && test -z "$tk_l tkinclude="$tk_defs" else tkinclude="$tk_x11_include" - fi + fi case "$tkinclude" in -I/opt/local/include*) tklibdir="/opt/local/lib" ;; -I/usr/local/include*) tklibdir="/usr/local/lib" ;; -I/sw/include*) tklibdir="/sw/lib" ;; -I/usr/pkg/include*) tklibdir="/usr/pkg/lib" ;; + -I/usr/X11/include*) tklibdir="/usr/X11/lib" ;; esac if test -n "$tklibdir"; then case "$system" in @@ -226,26 +236,26 @@ if test $has_tk = true && test -z "$tk_l *) tk_libs="-L$tklibdir" ;; esac else - tk + tk_libs="" fi fi tkauxlibs="$cclibs" if test $has_tk = true; then if test -n "$tk_libs" && \ - sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs Tcl_DoOneEvent + sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs -i tcl.h Tcl_DoOneEvent 0 then tk_libs="$tk_libs $dllib" - elif sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent + elif sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs -i tcl.h Tcl_DoOneEvent 0 then tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib" - elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent + elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs -i tcl.h Tcl_DoOneEvent 0 then tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib" elif test -z "$tk_libs" && tk_libs=-L/usr/local/lib && \ - sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent + sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs -i tcl.h Tcl_DoOneEvent 0 then tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib" - elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent + elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs -i tcl.h Tcl_DoOneEvent 0 then tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib" else @@ -255,14 +265,15 @@ if test $has_tk = true; then fi if test $has_tk = true; then - if sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then + if sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs -i tk.h Tk_SetGrid NULL 1 2 3 4; then inf "Tcl/Tk libraries found." else has_tk=false - for tklibdir in "/usr/local/lib" "/opt/local/lib" "/sw/lib" "/usr/pkg/lib"; + for tklibdir in \ + "/usr/local/lib" "/opt/local/lib" "/sw/lib" "/usr/pkg/lib" "/usr/lib"; do - if test $found = no && - sh ./hasgot -L$tklibdir $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid + if test $has_tk = false && + sh ./hasgot -L$tklibdir $tk_libs $tk_x11_libs $tkauxlibs -i tk.h Tk_SetGrid NULL 1 2 3 4 then has_tk=true case "$system" in
