From 933ca5bea0b4499f2c97e97d55a1550fb8eb65a14241689292d2abdf10a4b1a4 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 5 Nov 2019 14:48:32 +0000 Subject: [PATCH 1/2] - Require current dune macros - Update to version 1.0.4, via _service file - Remove curses.const.patch - Remove curses.getsyx.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-curses?expand=0&rev=28 --- _service | 14 ++++++++ curses.const.patch | 11 ------ curses.getsyx.patch | 11 ------ ocaml-curses-1.0.3.tar.gz | 3 -- ocaml-curses-1.0.4.tar.xz | 3 ++ ocaml-curses.changes | 8 +++++ ocaml-curses.spec | 71 ++++++++------------------------------- 7 files changed, 39 insertions(+), 82 deletions(-) create mode 100644 _service delete mode 100644 curses.const.patch delete mode 100644 curses.getsyx.patch delete mode 100644 ocaml-curses-1.0.3.tar.gz create mode 100644 ocaml-curses-1.0.4.tar.xz diff --git a/_service b/_service new file mode 100644 index 0000000..fae3b8c --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://github.com/olafhering/ocaml-curses.git + git + 1.0.4 + dune-wip + ocaml-curses + + + *.tar + xz + + + diff --git a/curses.const.patch b/curses.const.patch deleted file mode 100644 index 54fdacf..0000000 --- a/curses.const.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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)); } - diff --git a/curses.getsyx.patch b/curses.getsyx.patch deleted file mode 100644 index ada6dd3..0000000 --- a/curses.getsyx.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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) diff --git a/ocaml-curses-1.0.3.tar.gz b/ocaml-curses-1.0.3.tar.gz deleted file mode 100644 index e2ae9df..0000000 --- a/ocaml-curses-1.0.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:990a55ff99223edaa04387802907b00c475b46dd921dc5f8c5ede15ac673656f -size 54053 diff --git a/ocaml-curses-1.0.4.tar.xz b/ocaml-curses-1.0.4.tar.xz new file mode 100644 index 0000000..8493f6a --- /dev/null +++ b/ocaml-curses-1.0.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a83b2d2812e98b5598fec1381ebe5170128cb67f53ff7998a575a1f982891bc +size 39684 diff --git a/ocaml-curses.changes b/ocaml-curses.changes index 66d0df5..84077da 100644 --- a/ocaml-curses.changes +++ b/ocaml-curses.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de + +- Require current dune macros +- Update to version 1.0.4, via _service file +- Remove curses.const.patch +- Remove curses.getsyx.patch + ------------------------------------------------------------------- Wed Oct 9 05:48:16 UTC 2019 - ohering@suse.de diff --git a/ocaml-curses.spec b/ocaml-curses.spec index d8c719d..529b16a 100644 --- a/ocaml-curses.spec +++ b/ocaml-curses.spec @@ -12,27 +12,24 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: ocaml-curses -Version: 1.0.3 +Version: 1.0.4 Release: 0 %{?ocaml_preserve_bytecode} Summary: OCaml bindings for ncurses License: LGPL-2.1+ Group: Development/Languages/OCaml Url: http://savannah.nongnu.org/projects/ocaml-tmk/ -Source0: http://download.savannah.gnu.org/releases/ocaml-tmk/%{name}-%{version}.tar.gz -Patch0: curses.const.patch -Patch1: curses.getsyx.patch +Source0: %{name}-%{version}.tar.xz BuildRequires: ncurses-devel BuildRequires: ocaml -BuildRequires: ocaml-oasis -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-rpm-macros >= 20191009 -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: ocaml-dune +BuildRequires: ocaml-rpm-macros >= 20191101 +BuildRequires: ocamlfind(dune.configurator) %description OCaml bindings for ncurses. @@ -41,6 +38,7 @@ OCaml bindings for ncurses. Summary: Development files for %{name} Group: Development/Languages/OCaml Requires: %{name} = %{version} +Requires: ncurses-devel %description devel The %{name}-devel package contains libraries and signature files for @@ -50,61 +48,20 @@ developing applications that use %{name}. %autosetup -p1 %build -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 -#define CURSES_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: %{license} -LicenseFile: LICENSE -Plugins: META(`oasis version`) -BuildTools: ocamlbuild - -Library curses - Path: . - Install: true - Modules: Curses - CSources: ml_curses.c, config.h - CCOpt: %{optflags} -fPIC -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 +dune_release_pkgs='curses' +%ocaml_dune_setup +%ocaml_dune_build %install -%ocaml_oasis_findlib_install +%ocaml_dune_install %ocaml_create_file_list -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%check +dune_test_tolerate_fail='dune_test_tolerate_fail' +%ocaml_dune_test %files -f %{name}.files %files devel -f %{name}.files.devel -%{oasis_docdir_html} %changelog From c2fad46ded55c11dfb4732b75222bad7daeba0e8f553ab5e791a6f967ae13027 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 5 Nov 2019 14:52:31 +0000 Subject: [PATCH 2/2] pkg-config OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-curses?expand=0&rev=29 --- ocaml-curses.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ocaml-curses.spec b/ocaml-curses.spec index 529b16a..4fb02a2 100644 --- a/ocaml-curses.spec +++ b/ocaml-curses.spec @@ -30,6 +30,7 @@ BuildRequires: ocaml BuildRequires: ocaml-dune BuildRequires: ocaml-rpm-macros >= 20191101 BuildRequires: ocamlfind(dune.configurator) +BuildRequires: pkg-config %description OCaml bindings for ncurses.