From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Mon, 24 Nov 2008 20:22:10 +0000 (+0000) Subject: Added ocaml-lablgtk. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=ddcd49d475701a9c950151fd420ac7f6f9694cc4;p=fedora-mingw.git Added ocaml-lablgtk. --- diff --git a/.hgignore b/.hgignore index e85c993..9b812db 100644 --- a/.hgignore +++ b/.hgignore @@ -94,6 +94,7 @@ ocaml-extlib/test1 ocaml-findlib/findlib-1.2.2.tar.gz ocaml-findlib/findlib-1.2.3.tar.gz ocaml-lablgl/lablgl-1.03.tar.gz +ocaml-lablgtk/lablgtk-2.10.1.tar.gz ocaml-libvirt/ocaml-libvirt-0.4.4.2.tar.gz ocaml-xml-light/xml-light-2.2.cvs20070817.tar.gz openssl/openssl-0.9.8g-usa.tar.bz2 @@ -115,6 +116,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-ctrl/virt-ctrl-1.0.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 diff --git a/ocaml-lablgtk/mingw32-ocaml-lablgtk-2.10.1-build-hacks.patch b/ocaml-lablgtk/mingw32-ocaml-lablgtk-2.10.1-build-hacks.patch new file mode 100644 index 0000000..8d3900e --- /dev/null +++ b/ocaml-lablgtk/mingw32-ocaml-lablgtk-2.10.1-build-hacks.patch @@ -0,0 +1,30 @@ +diff -ur lablgtk-2.10.1.orig/src/Makefile lablgtk-2.10.1.mingw/src/Makefile +--- lablgtk-2.10.1.orig/src/Makefile 2008-11-24 19:32:20.000000000 +0000 ++++ lablgtk-2.10.1.mingw/src/Makefile 2008-11-24 20:02:18.000000000 +0000 +@@ -19,7 +19,8 @@ + + include $(CONFIG) + +-TARGETS = varcc$(XE) lablgtktop$(XE) lablgtk2$(XB) gdk-pixbuf-mlsource$(XE) ++#TARGETS = varcc$(XE) lablgtktop$(XE) lablgtk2$(XB) gdk-pixbuf-mlsource$(XE) ++TARGETS = varcc$(XE) lablgtk.cma lablgtk2$(XB) gtkThread.cmo gtkThInit.cmo + + all: byte + world: byte $(CAMLBEST) +@@ -294,7 +295,7 @@ + cp lablgtk2$(XB) "$(BINDIR)" + if test -f lablgladecc$(XE); then \ + cp lablgladecc$(XE) "$(BINDIR)/lablgladecc2$(XE)"; fi +- cp gdk-pixbuf-mlsource$(XE) "$(BINDIR)" ++# cp gdk-pixbuf-mlsource$(XE) "$(BINDIR)" + + installdll: + cp $(CLIBS:lib%$(XA)=dll%$(XS)) "$(DLLDIR)" || \ +@@ -325,6 +326,7 @@ + else + liblablgtk2$(XA): $(COBJS) + $(LIBRARIAN) -o lablgtk2 $(COBJS) $(GTKLIBS) ++ $(RANLIB) $@ + lablgtk.cma: liblablgtk2$(XA) $(MLOBJS) + $(LIBRARIAN) -o lablgtk -oc lablgtk2 $(MLOBJS) $(GTKLIBS) + lablgtk.cmxa: liblablgtk2$(XA) $(MLOBJS:.cmo=.cmx) diff --git a/ocaml-lablgtk/mingw32-ocaml-lablgtk.spec b/ocaml-lablgtk/mingw32-ocaml-lablgtk.spec new file mode 100644 index 0000000..a4e60c8 --- /dev/null +++ b/ocaml-lablgtk/mingw32-ocaml-lablgtk.spec @@ -0,0 +1,130 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-ocaml-lablgtk +Version: 2.10.1 +Release: 1%{?dist} +Summary: MinGW Windows port of LablGTK, OCaml interface to Gtk+ + +License: LGPLv2 with exceptions +Group: Development/Libraries + +URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html +Source0: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{version}.tar.gz + +Patch1000: mingw32-ocaml-lablgtk-2.10.1-build-hacks.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: mingw32-filesystem >= 38 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils +BuildRequires: mingw32-glib2 +BuildRequires: mingw32-gtk2 +BuildRequires: mingw32-pango + +BuildRequires: mingw32-ocaml >= 3.11.0 +BuildRequires: mingw32-ocaml-lablgl >= 1.03 + +BuildRequires: pkgconfig + +# These are all in the native package, but missing as dependencies. +#BuildRequires: ncurses-devel +#BuildRequires: gnome-panel-devel +#BuildRequires: gtkglarea2-devel +#BuildRequires: gtkspell-devel +#BuildRequires: libXmu-devel +#BuildRequires: libglade2-devel +#BuildRequires: libgnomecanvas-devel +#BuildRequires: libgnomeui-devel +#BuildRequires: librsvg2-devel + + +%description +LablGTK is is an Objective Caml interface to gtk+. + +It uses the rich type system of Objective Caml 3 to provide a strongly +typed, yet very comfortable, object-oriented interface to gtk+. This +is not that easy if you know the dynamic typing approach taken by +gtk+. + +This is the MinGW Windows port of this package. Currently it does not +support Togl (Tk integration). + + +%prep +%setup -q -n lablgtk-%{version} + +%patch1000 -p1 + +# version information in META file is wrong +perl -pi -e 's|version="1.3.1"|version="%{version}"|' META + + +%build +%{_mingw32_configure} \ + CAMLC=i686-pc-mingw32-ocamlc \ + OCAMLCDOTOPT=no \ + CAMLOPT=i686-pc-mingw32-ocamlopt \ + OCAMLOPTDOTOPT=no \ + OCAMLDEP=i686-pc-mingw32-ocamldep \ + OCAMLLIB=%{_libdir}/%{_mingw32_target}-ocaml \ + CAMLMKTOP=i686-pc-mingw32-ocamlmktop \ + CAMLMKLIB=i686-pc-mingw32-ocamlmklib \ + EXE=.exe \ + --enable-debug \ + --without-glade \ + --without-rsvg \ + --without-gl \ + --without-gnomecanvas \ + --without-gnomeui \ + --without-panel \ + --without-gtkspell \ + --without-gtksourceview + +perl -pi -e "s|-O|$RPM_OPT_FLAGS|" src/Makefile +make world + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2 +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/stublibs + +make install \ + BINDIR=$RPM_BUILD_ROOT%{_mingw32_bindir} \ + LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ + INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2 \ + DLLDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/stublibs +cp META $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2 + +# Remove unnecessary *.ml files (ones which have a *.mli). +pushd $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2 +for f in *.ml; do \ + b=`basename $f .ml`; \ + if [ -f "$b.mli" ]; then \ + rm $f; \ + fi; \ +done +popd + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_mingw32_bindir}/lablgtk2 +%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2/ + + +%changelog +* Mon Nov 24 2008 Richard W.M. Jones - 2.10.1-1 +- Initial RPM release.