- Move to new upstream 3.4 version. Note this is not compatible with

ocamlnet 2.x.
This commit is contained in:
Richard W.M. Jones 2011-09-19 17:10:23 +01:00
parent 77f171272f
commit 6001d991d3
5 changed files with 12 additions and 57 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
ocamlnet-2.2.9.tar.gz
/ocamlnet-3.4.tar.gz

View File

@ -5,16 +5,14 @@
%define __strip /bin/true
Name: ocaml-ocamlnet
Version: 2.2.9
Release: 24%{?dist}
Version: 3.4
Release: 1%{?dist}
Summary: Network protocols for OCaml
Group: Development/Libraries
License: BSD
URL: http://projects.camlcity.org/projects/ocamlnet.html
Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz
Patch0: ocamlnet-ocaml310.patch
Patch1: ocamlnet-ucred.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: sparc64 s390 s390x
@ -44,10 +42,7 @@ In detail, the following features are available:
parsing and printing, OO-representation of channels, and a lot
more.
* netcgi1 and netcgi2 focus on portable web applications. netcgi1 is
the older, backward-compatible version, whereas netcgi2 bases on a
revised design, and is only partly backward-compatible. Supported
are CGI, FastCGI, AJP (mod_jk), and SCGI.
* netcgi2 focuses on portable web applications.
* rpc implements ONCRPC (alias SunRPC), the remote procedure call
technology behind NFS and other Unix services.
@ -111,11 +106,6 @@ files for developing applications that use %{name}-nethttpd.
%prep
%setup -q -n ocamlnet-%{version}
pushd src/equeue-gtk1
%patch0 -p2
popd
%patch1 -p1
./configure -enable-tcl -with-nethttpd \
-bindir %{_bindir} \
-datadir %{_datadir}/%{name} \
@ -129,8 +119,6 @@ popd
%build
# Bletcherous hack to get that extra include path in camlp4 builds.
echo -e '#!/bin/sh\n%{_bindir}/camlp4 -I %{_libdir}/ocaml/camlp4/Camlp4Parsers "$@"' > camlp4; chmod 0755 camlp4; export PATH=`pwd`:$PATH
make all
%if %opt
make opt
@ -144,10 +132,6 @@ mkdir -p $OCAMLFIND_DESTDIR
mkdir -p $OCAMLFIND_DESTDIR/stublibs
make install
# cgi/META conflicts with mod_caml
rm $RPM_BUILD_ROOT%{_libdir}/ocaml/cgi/META
rmdir $RPM_BUILD_ROOT%{_libdir}/ocaml/cgi
# rpc-generator/dummy.mli is empty and according to Gerd Stolpmann can
# be deleted safely. This avoids an rpmlint warning.
rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/rpc-generator/dummy.mli
@ -173,10 +157,12 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/ocaml/equeue-gtk2
%{_libdir}/ocaml/equeue-ssl
%{_libdir}/ocaml/equeue-tcl
%{_libdir}/ocaml/netcgi1
%{_libdir}/ocaml/netcamlbox
%{_libdir}/ocaml/netcgi2
%{_libdir}/ocaml/netcgi2-plex
%{_libdir}/ocaml/netclient
%{_libdir}/ocaml/netgssapi
%{_libdir}/ocaml/netmulticore
%{_libdir}/ocaml/netplex
%{_libdir}/ocaml/netshm
%{_libdir}/ocaml/netstring
@ -218,7 +204,6 @@ rm -rf $RPM_BUILD_ROOT
%files nethttpd
%defattr(-,root,root,-)
%doc ChangeLog RELNOTES
%{_libdir}/ocaml/nethttpd-for-netcgi1
%{_libdir}/ocaml/nethttpd-for-netcgi2
%{_libdir}/ocaml/nethttpd
%if %opt
@ -239,6 +224,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Sep 19 2011 Richard W.M. Jones <rjones@redhat.com> - 3.4-1
- Move to new upstream 3.4 version. Note this is not compatible with
ocamlnet 2.x.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.9-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View File

@ -1,23 +0,0 @@
--- src/equeue-gtk2/uq_gtk.ml.orig 2007-06-11 19:35:10.000000000 +0100
+++ src/equeue-gtk2/uq_gtk.ml 2007-06-11 20:07:54.000000000 +0100
@@ -3,6 +3,11 @@
open Equeue
open Unixqueue
+(* Ugly hack required to compile under OCaml 3.10. This unmarshals
+ * `IN. IN is a reserved word for Camlp4.Macro.
+ *)
+let __in = (Marshal.from_string "\132\149\166\190\000\000\000\003\000\000\000\000\000\000\000\000\000\000\000\000\001?\229" 0 : GMain.Io.condition)
+
IFDEF GTK1 THEN
type event_id = GMain.Io.event_source
ELSE
@@ -147,7 +152,7 @@
gtk_event_source_hup = None; } in
( match g.gtk_event_source_in with
None when i ->
- g.gtk_event_source_in <- Some(mk_handler `IN [fd] [] []);
+ g.gtk_event_source_in <- Some(mk_handler __in [fd] [] []);
| Some s when not i ->
dest_handler s;
g.gtk_event_source_in <- None

View File

@ -1,12 +0,0 @@
diff -ur ocamlnet-2.2.9/src/rpc-auth-local/rpclocal.c ocamlnet-2.2.9.new/src/rpc-auth-local/rpclocal.c
--- ocamlnet-2.2.9/src/rpc-auth-local/rpclocal.c 2007-11-01 22:12:33.000000000 +0000
+++ ocamlnet-2.2.9.new/src/rpc-auth-local/rpclocal.c 2008-02-12 21:01:21.000000000 +0000
@@ -3,6 +3,8 @@
*
*/
+#define _GNU_SOURCE /* for SO_PEERCRED / struct ucred */
+
#include "caml/mlvalues.h"
#include "caml/alloc.h"
#include "caml/memory.h"

View File

@ -1 +1 @@
3655e3be3bb2806e0a1f48bb7ce16fb3 ocamlnet-2.2.9.tar.gz
920414f896af983e7458c03a492f7c62 ocamlnet-3.4.tar.gz