diff options
author | jaapb <jaapb@pkgsrc.org> | 2012-10-10 11:23:32 +0000 |
---|---|---|
committer | jaapb <jaapb@pkgsrc.org> | 2012-10-10 11:23:32 +0000 |
commit | c3d481969402b351b2ce3131e60c6e7125d7eeac (patch) | |
tree | 48fa142b8ddf605f24d608697fb511ef97d0bd03 /www/ocaml-http | |
parent | 55fe0ad5c41f8d2119c2cea2c59ca5f4f99b3554 (diff) | |
download | pkgsrc-c3d481969402b351b2ce3131e60c6e7125d7eeac.tar.gz |
Initial commit of www/ocaml-http, version 0.1.5.
OCaml HTTP is a simple OCaml library for creating HTTP daemons. It is largely
inspired by Perl's HTTP:: modules family.
Diffstat (limited to 'www/ocaml-http')
-rw-r--r-- | www/ocaml-http/DESCR | 2 | ||||
-rw-r--r-- | www/ocaml-http/Makefile | 34 | ||||
-rw-r--r-- | www/ocaml-http/PLIST | 24 | ||||
-rw-r--r-- | www/ocaml-http/distinfo | 7 | ||||
-rw-r--r-- | www/ocaml-http/patches/patch-Makefile | 77 | ||||
-rw-r--r-- | www/ocaml-http/patches/patch-Makefile.defs | 16 |
6 files changed, 160 insertions, 0 deletions
diff --git a/www/ocaml-http/DESCR b/www/ocaml-http/DESCR new file mode 100644 index 00000000000..3dd5f9dbf39 --- /dev/null +++ b/www/ocaml-http/DESCR @@ -0,0 +1,2 @@ +OCaml HTTP is a simple OCaml library for creating HTTP daemons. It is largely +inspired by Perl's HTTP:: modules family. diff --git a/www/ocaml-http/Makefile b/www/ocaml-http/Makefile new file mode 100644 index 00000000000..8bc014477bb --- /dev/null +++ b/www/ocaml-http/Makefile @@ -0,0 +1,34 @@ +# $NetBSD: Makefile,v 1.1 2012/10/10 11:23:32 jaapb Exp $ +# + +DISTNAME= ocaml-http-0.1.5 +CATEGORIES= www +MASTER_SITES= http://forge.ocamlcore.org/frs/download.php/545/ + +MAINTAINER= jaapb@NetBSD.org +HOMEPAGE= http://forge.ocamlcore.org/frs/download.php/545/ +COMMENT= Simple OCaml HTTP daemon library +LICENSE= gnu-gpl-v2 + +PKG_DESTDIR_SUPPORT= user-destdir + +WRKSRC= ${WRKDIR}/ocaml-http_0.1.5 +USE_LANGUAGES= # none +USE_TOOLS+= gmake +MAKE_ENV= PKG_DESTDIR=${DESTDIR}/${PREFIX}/lib/ocaml/site-lib/ + +BUILD_TARGET= all + +PLIST_VARS= opt +.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \ + (${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "x86_64") || \ + (${MACHINE_ARCH} == "arm") +PLIST.opt= yes +BUILD_TARGET+= opt +.endif + +.include "../../lang/ocaml/buildlink3.mk" +.include "../../devel/ocaml-findlib/buildlink3.mk" +.include "../../devel/pcre-ocaml/buildlink3.mk" +.include "../../net/ocamlnet/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/www/ocaml-http/PLIST b/www/ocaml-http/PLIST new file mode 100644 index 00000000000..fc6622917cd --- /dev/null +++ b/www/ocaml-http/PLIST @@ -0,0 +1,24 @@ +@comment $NetBSD: PLIST,v 1.1 2012/10/10 11:23:32 jaapb Exp $ +@unexec %D/libexec/ocaml-findlib-register del %D/lib/ocaml/site-lib/http +lib/ocaml/site-lib/http/META +${PLIST.opt}lib/ocaml/site-lib/http/http.a +lib/ocaml/site-lib/http/http.cma +${PLIST.opt}lib/ocaml/site-lib/http/http.cmxa +lib/ocaml/site-lib/http/http_common.cmi +lib/ocaml/site-lib/http/http_common.mli +lib/ocaml/site-lib/http/http_daemon.cmi +lib/ocaml/site-lib/http/http_daemon.mli +lib/ocaml/site-lib/http/http_message.cmi +lib/ocaml/site-lib/http/http_message.mli +${PLIST.opt}lib/ocaml/site-lib/http/http_mt.a +lib/ocaml/site-lib/http/http_mt.cma +${PLIST.opt}lib/ocaml/site-lib/http/http_mt.cmxa +lib/ocaml/site-lib/http/http_request.cmi +lib/ocaml/site-lib/http/http_request.mli +lib/ocaml/site-lib/http/http_response.cmi +lib/ocaml/site-lib/http/http_response.mli +lib/ocaml/site-lib/http/http_types.cmi +lib/ocaml/site-lib/http/http_types.mli +lib/ocaml/site-lib/http/http_user_agent.cmi +lib/ocaml/site-lib/http/http_user_agent.mli +@exec %D/libexec/ocaml-findlib-register add %D/lib/ocaml/site-lib/http diff --git a/www/ocaml-http/distinfo b/www/ocaml-http/distinfo new file mode 100644 index 00000000000..46f48e25f2a --- /dev/null +++ b/www/ocaml-http/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2012/10/10 11:23:32 jaapb Exp $ + +SHA1 (ocaml-http-0.1.5.tar.gz) = 1eaad8e37f723ac771cc38b9ed52f318247c0ec1 +RMD160 (ocaml-http-0.1.5.tar.gz) = 2e15394074ba0ca650aebbc8d456d6c98bd0aad7 +Size (ocaml-http-0.1.5.tar.gz) = 201026 bytes +SHA1 (patch-Makefile) = cd30a2461c12801bb24f30c7cc06e249ff2eba79 +SHA1 (patch-Makefile.defs) = 07f1622361029dc5c0aeb472ac71283c73272c33 diff --git a/www/ocaml-http/patches/patch-Makefile b/www/ocaml-http/patches/patch-Makefile new file mode 100644 index 00000000000..107fdcbd241 --- /dev/null +++ b/www/ocaml-http/patches/patch-Makefile @@ -0,0 +1,77 @@ +$NetBSD: patch-Makefile,v 1.1 2012/10/10 11:23:32 jaapb Exp $ + +Remove bashisms and add DESTDIR support +--- Makefile.orig 2010-10-19 10:19:18.000000000 +0000 ++++ Makefile +@@ -1,5 +1,5 @@ + include Makefile.defs +-export SHELL=/bin/bash ++#export SHELL=/bin/bash + + MODULES = \ + http_constants \ +@@ -32,7 +32,7 @@ OCAMLDOC_STUFF = *.mli + DOCDIR = doc/html + DOTDIR = doc/dot + TEXDIR = doc/latex +-DESTDIR = $(shell $(OCAMLFIND) printconf destdir) ++#DESTDIR = $(shell $(OCAMLFIND) printconf destdir) + + all: all_non_mt all_mt + opt: opt_non_mt opt_mt +@@ -76,17 +76,21 @@ depend: + $(OCAMLOPT) -c $< + + non_mt/$(THREADED_SRV).cmo: non_mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi +- cp $(THREADED_SRV).{cmi,mli} non_mt/ ++ cp $(THREADED_SRV).cmi non_mt/ ++ cp $(THREADED_SRV).mli non_mt/ + $(OCAMLC) -c $< + non_mt/$(THREADED_SRV).cmx: non_mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi +- cp $(THREADED_SRV).{cmi,mli} non_mt/ ++ cp $(THREADED_SRV).cmi non_mt/ ++ cp $(THREADED_SRV).mli non_mt/ + $(OCAMLOPT) -c $< + + mt/$(THREADED_SRV).cmo: mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi +- cp $(THREADED_SRV).{cmi,mli} mt/ ++ cp $(THREADED_SRV).cmi mt/ ++ cp $(THREADED_SRV).mli mt/ + $(OCAMLC) $(THREADS_FLAGS) -c $< + mt/$(THREADED_SRV).cmx: mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi +- cp $(THREADED_SRV).{cmi,mli} mt/ ++ cp $(THREADED_SRV).cmi mt/ ++ cp $(THREADED_SRV).mli mt/ + $(OCAMLOPT) $(THREADS_FLAGS) -c $< + + http.cma: $(patsubst %,%.cmo,$(MODULES_NON_MT)) +@@ -105,14 +109,18 @@ META: META.in + clean: + $(MAKE) -C examples/ clean + for d in . mt non_mt; do \ +- rm -f $$d/*.cm[ioax] $$d/*.cmxa $$d/*.[ao] $$d/test{,.opt}; \ ++ rm -f $$d/*.cm[ioax] $$d/*.cmxa $$d/*.[ao] $$d/test \ ++ $$d/test.opt; \ + done + rm -f {mt,non_mt}/$(THREADED_SRV).mli + docclean: + -rm -f \ + $(DOCDIR)/*.html $(DOCDIR)/*.css \ + $(DOTDIR)/*.dot $(DOTDIR)/*.ps \ +- $(TEXDIR)/*.{dvi,ps,ps.gz,pdf,aux,log,out,toc,tmp,haux,sty,tex} ++ $(TEXDIR)/*.dvi $(TEXDIR)/*.ps $(TEXDIR)/*.ps.gz \ ++ $(TEXDIR)/*.pdf $(TEXDIR)/*.aux $(TEXDIR)/*.log \ ++ $(TEXDIR)/*.out $(TEXDIR)/*.toc $(TEXDIR)/*.tmp \ ++ $(TEXDIR)/*.haux $(TEXDIR)/*.sty $(TEXDIR)/*.tex + distclean: clean + $(MAKE) -C examples/ distclean + rm -f META +@@ -139,7 +147,7 @@ deb: docclean distreal + (cd $(DISTDIR)/ && debuild) + rm -rf $(DISTDIR)/ + install: META +- $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME) \ ++ $(OCAMLFIND) install -destdir $(PKG_DESTDIR) $(PKGNAME) \ + $(patsubst %, %.mli, $(PUBLIC_MODULES)) \ + $(patsubst %, %.cmi, $(PUBLIC_MODULES)) \ + $(wildcard *.cma *.cmxa *.a) META diff --git a/www/ocaml-http/patches/patch-Makefile.defs b/www/ocaml-http/patches/patch-Makefile.defs new file mode 100644 index 00000000000..2dce8d14d1d --- /dev/null +++ b/www/ocaml-http/patches/patch-Makefile.defs @@ -0,0 +1,16 @@ +$NetBSD: patch-Makefile.defs,v 1.1 2012/10/10 11:23:32 jaapb Exp $ + +Use ocamlfind's package flag correctly +--- Makefile.defs.orig 2010-10-19 10:19:18.000000000 +0000 ++++ Makefile.defs +@@ -2,8 +2,8 @@ PKGNAME = http + DISTVERSION = $(shell dpkg-parsechangelog | egrep '^Version: ' | sed 's/^Version: //' | sed 's/-.*//') + + DEBUG_FLAGS = +-REQUIRES = unix str pcre netstring +-COMMON_FLAGS = $(DEBUG_FLAGS) -pp camlp4o -package "$(REQUIRES)" ++REQUIRES = unix,str,pcre,netstring ++COMMON_FLAGS = $(DEBUG_FLAGS) -pp camlp4o -package $(REQUIRES) + THREADS_FLAGS = -package threads -thread + OCAMLFIND = ocamlfind + OCAMLC = $(OCAMLFIND) ocamlc $(COMMON_FLAGS) |