From 01c397f2f508be3413b032e646f1678259321e96 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Move to version 1.0.3 which supports Windows, PDCurses. --- .hgignore | 2 + ocaml-curses/mingw32-ocaml-curses-0.1-build.patch | 27 --------- .../mingw32-ocaml-curses-0.1-win32-functions.patch | 65 ---------------------- ocaml-curses/mingw32-ocaml-curses.spec | 52 +++++++++-------- 4 files changed, 27 insertions(+), 119 deletions(-) delete mode 100644 ocaml-curses/mingw32-ocaml-curses-0.1-build.patch delete mode 100644 ocaml-curses/mingw32-ocaml-curses-0.1-win32-functions.patch diff --git a/.hgignore b/.hgignore index 9df2e69..9165b23 100644 --- a/.hgignore +++ b/.hgignore @@ -85,6 +85,7 @@ ocaml-calendar/calendar-2.0.4.tar.gz ocaml-calendar/test ocaml-csv/ocaml-csv-1.1.7.tar.gz ocaml-curses/ocaml-curses-20020319.tar.gz +ocaml-curses/ocaml-curses-1.0.3.tar.gz ocaml-curses/test1 ocaml-extlib/extlib-1.5.1.tar.gz ocaml-extlib/test1 @@ -110,6 +111,7 @@ runtime/mingw-runtime-3.14-src.tar.gz runtime/mingwrt-3.15.1-mingw32-src.tar.gz sqlite/sqlite-3.5.9.tar.gz termcap/termcap-1.3.1.tar.gz +virt-top/virt-top-1.0.3.tar.gz w32api-bootstrap/w32api-3.11.tar.gz w32api/w32api-3.11-src.tar.gz w32api/w32api-3.12-mingw32-src.tar.gz diff --git a/ocaml-curses/mingw32-ocaml-curses-0.1-build.patch b/ocaml-curses/mingw32-ocaml-curses-0.1-build.patch deleted file mode 100644 index 83cbeeb..0000000 --- a/ocaml-curses/mingw32-ocaml-curses-0.1-build.patch +++ /dev/null @@ -1,27 +0,0 @@ -Split up the all and opt (native code) rules, and allow the curses -library to be specified explicitly. - -diff -ur mingw32-ocaml-curses-20020319.orig/curses/Makefile mingw32-ocaml-curses-20020319.mingw/curses/Makefile ---- mingw32-ocaml-curses-20020319.orig/curses/Makefile 2002-03-19 13:07:47.000000000 +0000 -+++ mingw32-ocaml-curses-20020319.mingw/curses/Makefile 2008-11-15 23:03:35.000000000 +0000 -@@ -5,15 +5,17 @@ - LFLAGS= - CPP=cpp - --CURSES=ncurses -+CURSES=-lncurses - --all: libmlcurses.a mlcurses.cma mlcurses.cmxa -+all: libmlcurses.a mlcurses.cma -+ -+opt: libmlcurses.a mlcurses.cmxa - - ml_curses.o: ml_curses.c functions.c - $(OCAMLC) -ccopt "$(CFLAGS)" -c $< - - libmlcurses.a: ml_curses.o -- $(OCAMLMKLIB) -o mlcurses $< -l$(CURSES) -+ $(OCAMLMKLIB) -o mlcurses $< $(CURSES) - - mlcurses.cma: curses.cmo - $(OCAMLMKLIB) -o mlcurses -linkall $^ diff --git a/ocaml-curses/mingw32-ocaml-curses-0.1-win32-functions.patch b/ocaml-curses/mingw32-ocaml-curses-0.1-win32-functions.patch deleted file mode 100644 index 67291b9..0000000 --- a/ocaml-curses/mingw32-ocaml-curses-0.1-win32-functions.patch +++ /dev/null @@ -1,65 +0,0 @@ -Remove functions that aren't supported on Win32 / PDCurses. - -diff -ur mingw32-ocaml-curses-20020319.orig/curses/functions.c mingw32-ocaml-curses-20020319.mingw/curses/functions.c ---- mingw32-ocaml-curses-20020319.orig/curses/functions.c 2002-03-18 01:20:00.000000000 +0000 -+++ mingw32-ocaml-curses-20020319.mingw/curses/functions.c 2008-11-15 23:01:46.000000000 +0000 -@@ -449,7 +449,9 @@ - /* resize */ - - ML3(wresize,err,window,int,int) -+#ifndef WIN32 - ML2(resizeterm,err,int,int) -+#endif - - /* scr_dump */ - -@@ -526,6 +528,8 @@ - ML2d(vidputs,err,chtype,(char->unit)) - BEG2 putc_function=ab; - r_err(vidputs(a_chtype(aa),putc_callback)); END -+ -+#ifndef WIN32 - ML2d(tparm,string,string,int array) - BEG2 int t[10],i,n=Wosize_val(ab); - if(n>10) n=10; -@@ -554,6 +558,7 @@ - ML1d(bool_terminfo_variable,string*string*string,int) BEG1 arrayret(bool) END - ML1d(num_terminfo_variable,string*string*string,int) BEG1 arrayret(num) END - ML1d(str_terminfo_variable,string*string*string,int) BEG1 arrayret(str) END -+#endif - - /* touch */ - -@@ -611,6 +616,7 @@ - END - #undef ca - -+#ifndef WIN32 - /* Du travail pour les esclaves de M$ */ - ML0d(winch_handler_on,unit) - BEG0 signal(SIGWINCH,winch_handler); CAMLreturn(Val_unit); END -@@ -627,4 +633,4 @@ - ioctl(a_int(aa),TIOCGWINSZ,&ws); - r_int_int(ws.ws_row,ws.ws_col); - END -- -+#endif -diff -ur mingw32-ocaml-curses-20020319.orig/curses/ml_curses.c mingw32-ocaml-curses-20020319.mingw/curses/ml_curses.c ---- mingw32-ocaml-curses-20020319.orig/curses/ml_curses.c 2002-03-18 01:20:00.000000000 +0000 -+++ mingw32-ocaml-curses-20020319.mingw/curses/ml_curses.c 2008-11-15 22:57:53.000000000 +0000 -@@ -5,12 +5,14 @@ - #include - #include - #include --#include -+#include - #include - /* Du travail pour les esclaves de M$ */ - #include -+#ifndef WIN32 - #include - #include -+#endif - - #define AWB(x) caml__dummy_##x=caml__dummy_##x; /* anti-warning bugware */ - diff --git a/ocaml-curses/mingw32-ocaml-curses.spec b/ocaml-curses/mingw32-ocaml-curses.spec index e027f5e..7f17fff 100644 --- a/ocaml-curses/mingw32-ocaml-curses.spec +++ b/ocaml-curses/mingw32-ocaml-curses.spec @@ -4,23 +4,16 @@ %define __find_requires %{_mingw32_findrequires} %define __find_provides %{_mingw32_findprovides} -# For versioning, please see the native Fedora package. -%define alphatag 20020319 - Name: mingw32-ocaml-curses -Version: 0.1 -Release: 4%{?dist} +Version: 1.0.3 +Release: 1%{?dist} Summary: MinGW Windows OCaml bindings for ncurses License: LGPLv2+ Group: Development/Libraries URL: http://savannah.nongnu.org/projects/ocaml-tmk/ -Source0: ocaml-curses-%{alphatag}.tar.gz - -# Patches for MinGW: -Patch1000: mingw32-ocaml-curses-0.1-build.patch -Patch1001: mingw32-ocaml-curses-0.1-win32-functions.patch +Source0: http://download.savannah.gnu.org/releases/ocaml-tmk/ocaml-curses-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -32,37 +25,40 @@ BuildRequires: mingw32-ocaml >= 3.11.0+beta1-9 BuildRequires: mingw32-ocaml-findlib BuildRequires: mingw32-pdcurses +# Upstream package doesn't come with a configure script so +# we have to rebuild it. +BuildRequires: autoconf, automake, libtool + %description OCaml bindings for curses. %prep -%setup -q -c -n %{name}-%{alphatag} +%setup -q -n ocaml-curses-%{version} -%patch1000 -p1 -%patch1001 -p1 +autoreconf %build ulimit -s unlimited -cd curses +%{_mingw32_configure} -make \ - OCAMLC=%{_mingw32_target}-ocamlopt \ +make all opt \ + OCAMLC=%{_mingw32_target}-ocamlc \ OCAMLOPT=%{_mingw32_target}-ocamlopt \ OCAMLMKLIB=%{_mingw32_target}-ocamlmklib \ - CURSES="" opt + OCAMLMKLIB_FLAGS="-L%{_mingw32_libdir}" \ + CLIBS="" \ + all opt -cat > META < - 1.0.3-1 +- New upstream version 1.0.3 with proper support for Windows + and PDCurses. + * Mon Nov 17 2008 Richard W.M. Jones - 0.1-4 - libmlcurses.a contained a copy of pdcurses.dll.a in error. -- 1.8.3.1