ports/101202: [PATCH] www/ocaml-net: update to 1.1.2

Stanislav Sedov ssedov at mbsd.msk.ru
Tue Aug 1 17:00:28 UTC 2006


>Number:         101202
>Category:       ports
>Synopsis:       [PATCH] www/ocaml-net: update to 1.1.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 01 17:00:27 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Stanislav Sedov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #7: Sun Jun 18 20:51:36 MSD 2006
>Description:
- Use new ocaml framework (depends on ports/101100)
- Permissions safeness by replacing cp->install
- Full PREFIX safeness
- Change DOCSDIR and EXAMPLESDIR to subdirectory of ocaml
- Update to 1.1.2

I removed the following files:
- pkg-deinstall
- pkg-install

It seems that all dependend ports build fine.

Short changelog:
Bugfixes:

- FastCGI: For 64 bit platforms, large header fields (>127 bytes) were
  decoded improperly.

- Netsmtp: Fixed handling of empty lines.

- Neturl: Double slashes ( // ) in paths are now tolerated if used in an
  unambiguous way.

- Neturl: In apply_relative_url, a case was forgotten: If the base URL
  has a host name but does not have a path, the missing path / is
  silently added.

Enhancements:

- FastCGI: It is possible to pass the cgi_config record to the
  FastCGI functions.

- CGI in general: POST data neither encoded as
  "application/x-www-form-urlencoded" nor as "multipart/form-data" is
  accepted if the cgi_config record permits it. The data are stored
  into the single argument "BODY" (without any processing).

- Neturl: New function fixup_url_string.

- CGI in general: Web servers sending SERVER_NAME strings including
  port numbers are now tolerated.

Copy of this message was sent to (stephane at freebsd.org).

>How-To-Repeat:
>Fix:

--- ocaml-net-1.1.2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/ocaml-net/Makefile /var/tmp/ocaml-net/Makefile
--- /usr/ports/www/ocaml-net/Makefile	Sat Jan  7 10:45:07 2006
+++ /var/tmp/ocaml-net/Makefile	Tue Aug  1 20:51:57 2006
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	net
-PORTVERSION=	1.1.1
+PORTVERSION=	1.1.2
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	ocamlnet
@@ -16,68 +16,90 @@
 MAINTAINER=	stephane at freebsd.org
 COMMENT=	OCaml modules for Internet applications
 
-BUILD_DEPENDS=	ocamlc:${PORTSDIR}/lang/ocaml \
-		ocamlfind:${PORTSDIR}/devel/ocaml-findlib \
-		${LOCALBASE}/lib/ocaml/site-lib/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre
-RUN_DEPENDS=	ocamlc:${PORTSDIR}/lang/ocaml \
-		${LOCALBASE}/lib/ocaml/site-lib/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre
+BUILD_DEPENDS=	${SA_DIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre
+RUN_DEPENDS=	${SA_DIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre
 
 .if !defined(WITHOUT_NETHTTPD)
-BUILD_DEPENDS+=	${LOCALBASE}/lib/ocaml/site-lib/equeue/equeue.a:${PORTSDIR}/devel/ocaml-equeue
-RUN_DEPENDS+=	${LOCALBASE}/lib/ocaml/site-lib/equeue/equeue.a:${PORTSDIR}/devel/ocaml-equeue
+BUILD_DEPENDS+=	${SA_DIR}/equeue/equeue.a:${PORTSDIR}/devel/ocaml-equeue
+RUN_DEPENDS+=	${SA_DIR}/equeue/equeue.a:${PORTSDIR}/devel/ocaml-equeue
 .endif
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
 
 USE_GMAKE=	yes
+USE_OCAML=	yes
+USE_OCAML_FINDLIB=yes
+USE_OCAML_LDCONFIG=yes
 
 HAS_CONFIGURE=	yes
 # seems required to build www/ocaml-wdialog:
 CONFIGURE_ARGS+=	-enable-compatcgi
 
 ALL_TARGET=	all opt
+SA_DIR=		${LOCALBASE}/${OCAML_SITELIBDIR}
+OCAML_PKGDIRS=	cgi netstring pop smtp
+MASTERPORT=	${PORTSDIR}/devel/ocaml-camlidl
 
 .if !defined(NOPORTDOCS)
-DOCSDIR=	${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
-EXAMPLESDIR=	${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
+DOCSDIR=	${PREFIX}/share/doc/ocaml/${PORTNAME}
+EXAMPLESDIR=	${PREFIX}/share/examples/ocaml/${PORTNAME}
 
 PORTDOCS=	*
 .endif
 
+.if !defined(WITHOUT_NETHTTPD)
+OCAML_PKGDIRS+=	nethttpd
+.endif
+
+# XXX: exists untill it will be committed to bsd.port.mk
+COPYTREE_SHARE=	${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
+		2>&1) && \
+		${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \
+		${FIND} $$1/ -type d -exec ${CHMOD} 755 {} \; && \
+		${FIND} $$1/ -type f -exec ${CHMOD} ${SHAREMODE} {} \;' --
+
+.include <bsd.port.pre.mk>
+.include "${MASTERPORT}/bsd.ocaml.mk"
+
+post-extract:
+	@${REINPLACE_CMD} -E -e \
+		"s,([[:space:]]*)cp([[:space:]]+.*),\1\$${BSD_INSTALL_DATA}\2,"\
+		${WRKSRC}/netstring/Makefile
+# For nonstandard prefixes
+.if !exists(${OCAMLFIND_DESTDIR})
+	${MKDIR} ${OCAMLFIND_DESTDIR}
+.endif
+.if !exists(${OCAMLFIND_LDCONF})
+	${TOUCH} ${OCAMLFIND_LDCONF}
+.endif
+
 post-install:
 	@${FIND} ${PREFIX}/lib/ocaml/site-lib/cgi -type f | \
 		${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
-	@${ECHO_CMD} "@dirrm lib/ocaml/site-lib/cgi" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec ocamlfind remove cgi 2>/dev/null || true" >> ${TMPPLIST}
 	@${FIND} ${PREFIX}/lib/ocaml/site-lib/netstring -type f | \
 		${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
-	@${ECHO_CMD} "@dirrm lib/ocaml/site-lib/netstring" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec ocamlfind remove netstring 2>/dev/null || true" >> ${TMPPLIST}
 	@${FIND} ${PREFIX}/lib/ocaml/site-lib/pop -type f | \
 		${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
-	@${ECHO_CMD} "@dirrm lib/ocaml/site-lib/pop" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec ocamlfind remove pop 2>/dev/null || true" >> ${TMPPLIST}
 	@${FIND} ${PREFIX}/lib/ocaml/site-lib/smtp -type f | \
 		${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
-	@${ECHO_CMD} "@dirrm lib/ocaml/site-lib/smtp" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec ocamlfind remove smtp 2>/dev/null || true" >> ${TMPPLIST}
 .if !defined(WITHOUT_NETHTTPD)
 	@${FIND} ${PREFIX}/lib/ocaml/site-lib/nethttpd -type f | \
 		${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
-	@${ECHO_CMD} "@dirrm lib/ocaml/site-lib/nethttpd" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec ocamlfind remove nethttpd 2>/dev/null || true" >> ${TMPPLIST}
 .endif
 
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
-	${CP} -R ${WRKSRC}/../doc/ ${DOCSDIR}
+	@(cd ${WRKSRC}/../doc/html && ${COPYTREE_SHARE} \* ${DOCSDIR})
 	@${MKDIR} ${EXAMPLESDIR}
-	${CP} -R ${WRKSRC}/../examples/ ${EXAMPLESDIR}
-	@${CHMOD} -R +r ${EXAMPLESDIR}
+	@(cd ${WRKSRC}/../examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
 	@${FIND} ${EXAMPLESDIR} -type f | \
 		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
 	@${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
 		${SED} 's,^${PREFIX}/, at dirrm ,' >> ${TMPPLIST}
+	@${ECHO_CMD} "@unexec rmdir %D/share/doc/ocaml 2>/dev/null || true" \
+		>> ${TMPPLIST}
+	@${ECHO_CMD} "@unexec rmdir %D/share/examples/ocaml 2>/dev/null ||true"\
+		>> ${TMPPLIST}
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/www/ocaml-net/distinfo /var/tmp/ocaml-net/distinfo
--- /usr/ports/www/ocaml-net/distinfo	Sat Jan  7 10:45:07 2006
+++ /var/tmp/ocaml-net/distinfo	Tue Aug  1 20:24:39 2006
@@ -1,3 +1,3 @@
-MD5 (ocamlnet-1.1.1.tar.gz) = 4347d04ae16e69b61940f8679eeeef07
-SHA256 (ocamlnet-1.1.1.tar.gz) = ce9a88a2597e0ea5a3b164979e56bd3f8a02d3277fb8830e16be4b9d3b474be1
-SIZE (ocamlnet-1.1.1.tar.gz) = 793905
+MD5 (ocamlnet-1.1.2.tar.gz) = 0d7a057c607c6224888b1631ba11c31a
+SHA256 (ocamlnet-1.1.2.tar.gz) = 88f370a18b92154f9486f0fb6ae068669bd5ff0cfb04a15becb6e6a0f601d50b
+SIZE (ocamlnet-1.1.2.tar.gz) = 817450
diff -ruN --exclude=CVS /usr/ports/www/ocaml-net/pkg-deinstall /var/tmp/ocaml-net/pkg-deinstall
--- /usr/ports/www/ocaml-net/pkg-deinstall	Thu Oct 28 02:45:28 2004
+++ /var/tmp/ocaml-net/pkg-deinstall	Thu Jan  1 03:00:00 1970
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-mv ${PKG_PREFIX}/lib/ocaml/ld.conf ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp
-grep -v netstring ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp > ${PKG_PREFIX}/lib/ocaml/ld.conf
-rm -f ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp
diff -ruN --exclude=CVS /usr/ports/www/ocaml-net/pkg-install /var/tmp/ocaml-net/pkg-install
--- /usr/ports/www/ocaml-net/pkg-install	Thu Oct 28 02:45:28 2004
+++ /var/tmp/ocaml-net/pkg-install	Thu Jan  1 03:00:00 1970
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-if ! grep "${PKG_PREFIX}/lib/ocaml/site-lib/netstring" ${PKG_PREFIX}/lib/ocaml/ld.conf >/dev/null 2>&1; then
-  echo "${PKG_PREFIX}/lib/ocaml/site-lib/netstring" >> ${PKG_PREFIX}/lib/ocaml/ld.conf
-fi
--- ocaml-net-1.1.2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list