summaryrefslogtreecommitdiff
path: root/www/ocsigen/patches
diff options
context:
space:
mode:
Diffstat (limited to 'www/ocsigen/patches')
-rw-r--r--www/ocsigen/patches/patch-Makefile70
-rw-r--r--www/ocsigen/patches/patch-src_Makefile13
-rw-r--r--www/ocsigen/patches/patch-src_http_ocsigen_senders.ml57
-rw-r--r--www/ocsigen/patches/patch-src_http_ocsigen_senders.mli16
4 files changed, 32 insertions, 124 deletions
diff --git a/www/ocsigen/patches/patch-Makefile b/www/ocsigen/patches/patch-Makefile
index 4e8e073473e..8b60aea6152 100644
--- a/www/ocsigen/patches/patch-Makefile
+++ b/www/ocsigen/patches/patch-Makefile
@@ -1,20 +1,20 @@
-$NetBSD: patch-Makefile,v 1.2 2012/12/15 11:16:07 jaapb Exp $
+$NetBSD: patch-Makefile,v 1.3 2016/12/30 11:55:53 jaapb Exp $
-Correct installation procedure for pkgsrc environment
---- Makefile.orig 2012-12-07 15:17:09.000000000 +0000
+Use BSD_* installation commands
+--- Makefile.orig 2016-11-15 15:04:34.000000000 +0000
+++ Makefile
-@@ -67,61 +67,53 @@ install.opt: install.META.opt install.fi
+@@ -67,66 +67,43 @@ install.opt: install.META.opt install.fi
# BB If install is not run by root but OCSIGENUSER, OCSIGENGROUP is somebody
# BB different, make files universally accessible, we cannot chown.
-INSTALL_CAN_PUT_PERMISSIONS=yes
-+INSTALL_CAN_PUT_PERMISSIONS=no
- INSTALL_USER_GROUP=-o $(OCSIGENUSER) -g $(OCSIGENGROUP)
- INSTALL_MOD_660=660
- INSTALL_MOD_644=644
- INSTALL_MOD_755=755
- INSTALL_MOD_770=770
- INSTALL_MOD_750=750
+-INSTALL_USER_GROUP=-o $(OCSIGENUSER) -g "$(OCSIGENGROUP)"
+-INSTALL_MOD_660=660
+-INSTALL_MOD_644=644
+-INSTALL_MOD_755=755
+-INSTALL_MOD_770=770
+-INSTALL_MOD_750=750
+-USERNAME=$(shell whoami)
-ifneq ($(shell id -u), 0)
- ifneq ($(OCSIGENUSER), $(USERNAME))
- INSTALL_CAN_PUT_PERMISSIONS=no
@@ -31,56 +31,45 @@ Correct installation procedure for pkgsrc environment
- INSTALL_MOD_770=777
- INSTALL_MOD_750=777
-endif
-+#ifneq ($(shell id -u), 0)
-+# ifneq ($(OCSIGENUSER), $(USERNAME))
-+# INSTALL_CAN_PUT_PERMISSIONS=no
-+# endif
-+# ifneq ($(shell groups ${USERNAME}|grep -q ${OCSIGENGROUP}; echo $$?), 0)
-+# INSTALL_CAN_PUT_PERMISSIONS=no
-+# endif
-+#endif
-+#ifeq ($(INSTALL_CAN_PUT_PERMISSIONS), no)
-+# INSTALL_USER_GROUP=
-+# INSTALL_MOD_660=666
-+# INSTALL_MOD_644=666
-+# INSTALL_MOD_755=777
-+# INSTALL_MOD_770=777
-+# INSTALL_MOD_750=777
-+#endif
++INSTALL_CAN_PUT_PERMISSIONS=no
install.files:
@echo INSTALL_CAN_PUT_PERMISSIONS: ${INSTALL_CAN_PUT_PERMISSIONS}
-- ## Command pipe
+ ## Command pipe
- $(INSTALL) -m ${INSTALL_MOD_755} -d $(dir $(TEMPROOT)$(COMMANDPIPE))
-- [ -p $(TEMPROOT)$(COMMANDPIPE) ] || \
++ $(BSD_INSTALL_DATA_DIR) $(dir $(TEMPROOT)$(COMMANDPIPE))
+ [ -p $(TEMPROOT)$(COMMANDPIPE) ] || \
- { mkfifo -m ${INSTALL_MOD_660} $(TEMPROOT)$(COMMANDPIPE); \
-- if [ "${INSTALL_CAN_PUT_PERMISSIONS}" = yes ]; \
-- then $(CHOWN) -R $(OCSIGENUSER):$(OCSIGENGROUP) $(TEMPROOT)$(COMMANDPIPE); \
-- fi; }
++ { mkfifo ${INSTALL_MOD_660} $(TEMPROOT)$(COMMANDPIPE); \
+ if [ "${INSTALL_CAN_PUT_PERMISSIONS}" = yes ]; \
+ then $(CHOWN) -R $(OCSIGENUSER):"$(OCSIGENGROUP)" $(TEMPROOT)$(COMMANDPIPE); \
+ fi; }
## Configuration files
- $(INSTALL) -m ${INSTALL_MOD_755} -d $(TEMPROOT)$(CONFIGDIR)/conf.d
- ${INSTALL} -m ${INSTALL_MOD_644} ${PROJECTNAME}.conf.sample $(TEMPROOT)$(CONFIGDIR)/
-+ $(BSD_INSTALL_DATA_DIR) -d $(TEMPROOT)$(CONFIGDIR)/conf.d
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(CONFIGDIR)/conf.d
+ ${BSD_INSTALL_DATA} ${PROJECTNAME}.conf.sample $(TEMPROOT)$(CONFIGDIR)/
[ -f $(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf ] || \
- { $(INSTALL) -m ${INSTALL_MOD_644} $(PROJECTNAME).conf.sample \
+ { $(BSD_INSTALL_DATA) $(PROJECTNAME).conf.sample \
$(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf; }
- -mv $(TEMPROOT)$(CONFIGDIR)/mime.types $(TEMPROOT)$(CONFIGDIR)/mime.types.old
+- -mv $(TEMPROOT)$(CONFIGDIR)/mime.types $(TEMPROOT)$(CONFIGDIR)/mime.types.old
++#-mv $(TEMPROOT)$(CONFIGDIR)/mime.types $(TEMPROOT)$(CONFIGDIR)/mime.types.old
## Log directory
- $(INSTALL) -m ${INSTALL_MOD_644} src/files/mime.types $(TEMPROOT)$(CONFIGDIR)
- $(INSTALL) -d -m ${INSTALL_MOD_755} ${INSTALL_USER_GROUP} $(TEMPROOT)$(LOGDIR)
+ $(BSD_INSTALL_DATA) src/files/mime.types $(TEMPROOT)$(CONFIGDIR)
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(LOGDIR)
## Static files
- $(INSTALL) -d -m ${INSTALL_MOD_755} ${INSTALL_USER_GROUP} $(TEMPROOT)$(STATICPAGESDIR)
- $(INSTALL) -d -m ${INSTALL_MOD_750} ${INSTALL_USER_GROUP} $(TEMPROOT)$(DATADIR)
- $(INSTALL) -m ${INSTALL_MOD_644} ${INSTALL_USER_GROUP} \
-+ $(BSD_INSTALL_DATA_DIR) -d $(TEMPROOT)$(STATICPAGESDIR)
-+ $(BSD_INSTALL_DATA_DIR) -d $(TEMPROOT)$(DATADIR)
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(STATICPAGESDIR)
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(DATADIR)
+ $(BSD_INSTALL_DATA) \
local/var/www/*.html $(TEMPROOT)$(STATICPAGESDIR)
- $(INSTALL) -d -m ${INSTALL_MOD_755} ${INSTALL_USER_GROUP} \
-+ $(BSD_INSTALL_DATA_DIR) -d \
++ $(BSD_INSTALL_DATA_DIR) \
$(TEMPROOT)$(STATICPAGESDIR)/ocsigenstuff
- $(INSTALL) -m ${INSTALL_MOD_644} ${INSTALL_USER_GROUP} \
+ $(BSD_INSTALL_DATA) \
@@ -88,8 +77,13 @@ Correct installation procedure for pkgsrc environment
$(TEMPROOT)$(STATICPAGESDIR)/ocsigenstuff
- $(INSTALL) -d -m ${INSTALL_MOD_755} $(TEMPROOT)$(MANDIR)
- $(INSTALL) -m ${INSTALL_MOD_644} src/files/${PROJECTNAME}.1 $(TEMPROOT)$(MANDIR)
-+ $(BSD_INSTALL_MAN_DIR) -d $(TEMPROOT)$(MANDIR)
++ $(BSD_INSTALL_MAN_DIR) $(TEMPROOT)$(MANDIR)
+ $(BSD_INSTALL_MAN) src/files/${PROJECTNAME}.1 $(TEMPROOT)$(MANDIR)
uninstall:
-make -C doc uninstall
+- -rm -f $(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf.sample
++ -rm -F $(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf.sample
+ -rm -f $(TEMPROOT)$(MANDIR)/${PROJECTNAME}.1
+ -rm -f $(TEMPROOT)$(COMMANDPIPE)
+ -rmdir --ignore-fail-on-non-empty $(TEMPROOT)$(CONFIGDIR)/conf.d
diff --git a/www/ocsigen/patches/patch-src_Makefile b/www/ocsigen/patches/patch-src_Makefile
deleted file mode 100644
index 1ef9606afeb..00000000000
--- a/www/ocsigen/patches/patch-src_Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_Makefile,v 1.2 2012/12/15 11:16:07 jaapb Exp $
-
-Proper support of ocamlfind in pkgsrc
---- src/Makefile.orig 2012-12-07 15:17:09.000000000 +0000
-+++ src/Makefile
-@@ -119,6 +119,7 @@ raw_install:
- $(OCAMLFIND) install $(PROJECTNAME) \
- -destdir $(TEMPROOT)$(LIBDIR) \
- -patch-version ${VERSION} \
-+ -ldconf ignore \
- ${INTF} $(INSTALL_IMPL) $(DOC) files/META
- # Extensions
- $(INSTALL) -m 755 -d $(TEMPROOT)${LIBDIR}/${PROJECTNAME}/extensions/
diff --git a/www/ocsigen/patches/patch-src_http_ocsigen_senders.ml b/www/ocsigen/patches/patch-src_http_ocsigen_senders.ml
deleted file mode 100644
index 7631bfc324f..00000000000
--- a/www/ocsigen/patches/patch-src_http_ocsigen_senders.ml
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-src_http_ocsigen_senders.ml,v 1.1 2016/06/20 19:35:56 jaapb Exp $
-
-Catch up with Tyxml (patch from upstream, not in release yet)
---- src/http/ocsigen_senders.ml.orig 2016-04-12 12:46:24.000000000 +0000
-+++ src/http/ocsigen_senders.ml
-@@ -77,7 +77,7 @@ module Make_XML_Content(Xml : Xml_sigs.I
- ~stream:(x, None) ())
- end
-
--module Html5_content = Make_XML_Content(Xml)(Html5.M)
-+module Html_content = Make_XML_Content(Tyxml.Xml)(Tyxml.Html)
-
-
- (*****************************************************************************)
-@@ -473,11 +473,11 @@ struct
- let get_etag ?options c = None
-
- let error_page s msg c =
-- Html5.M.html
-- (Html5.M.head (Html5.M.title (Html5.M.pcdata s)) [])
-- (Html5.M.body
-- (Html5.M.h1 [Html5.M.pcdata msg]::
-- Html5.M.p [Html5.M.pcdata s]::
-+ Tyxml.Html.html
-+ (Tyxml.Html.head (Tyxml.Html.title (Tyxml.Html.pcdata s)) [])
-+ (Tyxml.Html.body
-+ (Tyxml.Html.h1 [Tyxml.Html.pcdata msg]::
-+ Tyxml.Html.p [Tyxml.Html.pcdata s]::
- c)
- )
-
-@@ -512,11 +512,11 @@ struct
- error_page
- ("Error "^str_code)
- error_msg
-- [Html5.M.p
-- [Html5.M.pcdata (Printexc.to_string exn);
-- Html5.M.br ();
-- Html5.M.em
-- [Html5.M.pcdata "(Ocsigen running in debug mode)"]
-+ [Tyxml.Html.p
-+ [Tyxml.Html.pcdata (Printexc.to_string exn);
-+ Tyxml.Html.br ();
-+ Tyxml.Html.em
-+ [Tyxml.Html.pcdata "(Ocsigen running in debug mode)"]
- ]]
- | _ ->
- error_page
-@@ -524,7 +524,7 @@ struct
- error_msg
- []
- in
-- Html5_content.result_of_content err_page >>= fun r ->
-+ Html_content.result_of_content err_page >>= fun r ->
- Lwt.return
- (Result.update r
- ~cookies:cookies_to_set
diff --git a/www/ocsigen/patches/patch-src_http_ocsigen_senders.mli b/www/ocsigen/patches/patch-src_http_ocsigen_senders.mli
deleted file mode 100644
index f55fe42f685..00000000000
--- a/www/ocsigen/patches/patch-src_http_ocsigen_senders.mli
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-src_http_ocsigen_senders.mli,v 1.1 2016/06/20 19:35:56 jaapb Exp $
-
-Catch up with Tyxml (patch from upstream, not in release yet)
---- src/http/ocsigen_senders.mli.orig 2016-04-12 12:46:24.000000000 +0000
-+++ src/http/ocsigen_senders.mli
-@@ -23,8 +23,8 @@ module File_content : Ocsigen_http_frame
- with type t =
- string * Ocsigen_charset_mime.charset_assoc * Ocsigen_charset_mime.mime_assoc
-
--module Html5_content :
-- Ocsigen_http_frame.HTTP_CONTENT with type t = Html5.M.doc
-+module Html_content :
-+ Ocsigen_http_frame.HTTP_CONTENT with type t = Tyxml.Html.doc
-
- module Make_XML_Content(Xml : Xml_sigs.Iterable)
- (Typed_xml : Xml_sigs.Typed_xml with module Xml := Xml) :