Hello community,

here is the log from the commit of package ocaml-curses for openSUSE:Factory 
checked in at 2017-05-16 14:44:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-curses (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-curses.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-curses"

Tue May 16 14:44:08 2017 rev:2 rq:494581 version:1.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-curses/ocaml-curses.changes        
2016-10-19 13:01:10.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-curses.new/ocaml-curses.changes   
2017-05-16 14:45:02.032152271 +0200
@@ -1,0 +2,7 @@
+Wed May 10 08:23:44 UTC 2017 - oher...@suse.de
+
+- use oasis instead of autotools to fix bytecode (bsc#1031359)
+  add curses.const.patch
+  add curses.getsyx.patch
+
+-------------------------------------------------------------------

New:
----
  curses.const.patch
  curses.getsyx.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-curses.spec ++++++
--- /var/tmp/diff_new_pack.K0XnMn/_old  2017-05-16 14:45:02.792045499 +0200
+++ /var/tmp/diff_new_pack.K0XnMn/_new  2017-05-16 14:45:02.796044937 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ocaml-curses
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,15 +25,13 @@
 Group:          Development/Libraries/Other
 Url:            http://savannah.nongnu.org/projects/ocaml-tmk/
 Source0:        
http://download.savannah.gnu.org/releases/ocaml-tmk/%{name}-%{version}.tar.gz
-# Doesn't include a configure script, so we have to make one.
-BuildRequires:  autoconf
-BuildRequires:  automake
-BuildRequires:  gawk
-BuildRequires:  libtool
+Patch0:         curses.const.patch
+Patch1:         curses.getsyx.patch
 BuildRequires:  ncurses-devel
-BuildRequires:  ocaml >= 4.00.1
-BuildRequires:  ocaml-rpm-macros >= 4.02.1
-BuildRequires:  ocaml-findlib-devel >= 1.3.3-3
+BuildRequires:  ocaml
+BuildRequires:  ocaml-oasis
+BuildRequires:  ocaml-ocamldoc
+BuildRequires:  ocaml-rpm-macros >= 4.03
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 # ocaml autodep start for pkg: ocaml-curses
 # hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() 
provides/requires
@@ -56,32 +54,60 @@
 
 %prep
 %setup -q
-
+%patch0 -p1
+%patch1 -p1
 
 %build
-autoreconf
-# Parallel builds don't work (with bytecode)
-%configure --enable-widec
-make all
-%if %{ocaml_native_compiler}
-make opt
-%endif
-
+sed 's/@BOOL_WIDE_CURSES@/true/' config.ml.in | tee config.ml
+gcc -x c -E curses.ml | tee curses.ml~
+mv -v curses.ml~ curses.ml
+tee -a config.h <<_EOF_
+#define CURSES_HEADER <ncursesw/curses.h>
+#define CURSES_TERM_H <ncursesw/term.h>
+#define HAVE_TERMIOS_H 1
+#define HAVE_SYS_IOCTL_H 1
+_EOF_
+rm -fv setup.ml myocamlbuild.ml META* _* */_*
+# obs service changes every ^Version line ...
+sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
+OASISFormat: 0.4
+Name:        curses
+Version:     0
+Synopsis:    OCaml bindings for ncurses
+Authors:     Paul Pelzl
+License:     LGPL-2.1+
+LicenseFile: LICENSE
+Plugins:     META(`oasis version`)
+BuildTools:  ocamlbuild
+
+Library curses
+  Path: .
+  Install: true
+  Modules: Curses
+  CSources: ml_curses.c, config.h
+  CCOpt: -Wall -O2 -g -I$PWD -Werror -D_GNU_SOURCE -DHAVE_CONFIG_H
+  CCLib: -lncursesw
+
+Document curses
+  Title:                API reference for curses
+  Type:                 ocamlbuild
+  BuildTools+:          ocamldoc
+  InstallDir:           \$htmldir
+  Install:              true
+  XOCamlbuildPath:      .
+  XOCamlbuildLibraries: curses
+_EOF_
+%oasis_setup
+%ocaml_oasis_configure --enable-docs
+%ocaml_oasis_build
+%ocaml_oasis_doc
 
 %install
-
-export DESTDIR=%{buildroot}
-export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
-mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
-export OCAMLFILES="curses META *.cmi *.cma *.so *.mli"
-%if %{ocaml_native_compiler}
-export OCAMLFILES="$OCAMLFILES *.cmx *.cmxa *.a"
-%endif
-ocamlfind install $OCAMLFILES
+%ocaml_oasis_findlib_install
 #
 mkdir -vp %{buildroot}/etc/ld.so.conf.d/
 tee %{buildroot}/etc/ld.so.conf.d/%{name}-stub.conf <<_EOF_
-%{_libdir}/ocaml/stublibs
+%{_libdir}/ocaml/curses
 _EOF_
 #
 
@@ -89,28 +115,31 @@
 
 %postun -p /sbin/ldconfig
 
-
 %files
 %defattr(-,root,root,-)
 %doc COPYING
 /etc/ld.so.conf.d/*.conf
-%dir %{_libdir}/ocaml
 %dir %{_libdir}/ocaml/*
+%if %{ocaml_native_compiler}
+%{_libdir}/ocaml/*/*.cmxs
+%endif
 %{_libdir}/ocaml/*/*.so
-%{_libdir}/ocaml/*/*.so.owner
 
 %files devel
 %defattr(-,root,root,-)
 %doc COPYING
-%dir %{_libdir}/ocaml
+%{oasis_docdir_html}
 %dir %{_libdir}/ocaml/*
-%if %{ocaml_native_compiler}
 %{_libdir}/ocaml/*/*.a
+%if %{ocaml_native_compiler}
 %{_libdir}/ocaml/*/*.cmx
 %{_libdir}/ocaml/*/*.cmxa
 %endif
+%{_libdir}/ocaml/*/*.annot
 %{_libdir}/ocaml/*/*.cma
 %{_libdir}/ocaml/*/*.cmi
+%{_libdir}/ocaml/*/*.cmt
+%{_libdir}/ocaml/*/*.cmti
 %{_libdir}/ocaml/*/*.mli
 %{_libdir}/ocaml/*/META
 

++++++ curses.const.patch ++++++
--- a/ml_curses.c
+++ b/ml_curses.c
@@ -74,7 +74,7 @@
     Store_field(ret,2,Val_int(z)); \
     CAMLreturn(ret); }
 #define r_string(f)    \
-  { char *ret=f; \
+  { const char *ret=f; \
     if(ret==NULL) failwith("Null pointer"); \
     CAMLreturn(copy_string(ret)); }
 
++++++ curses.getsyx.patch ++++++
--- a/functions.c
+++ b/functions.c
@@ -383,7 +383,7 @@ ML0(reset_shell_mode,unit)
 ML0(resetty,unit)
 ML0(savetty,unit)
 ML0d(getsyx,int*int)
-BEG0 int x,y; getsyx(y,x); r_int_int(y,x); END
+BEG0 int x=0,y=0; getsyx(y,x); r_int_int(y,x); END
 ML2(setsyx,unit,int,int)
 ML1(curs_set,err,int)
 ML1(napms,unit,int)

Reply via email to