From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 17 11:00:07 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBC1F1065673 for ; Thu, 17 Apr 2008 11:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id ABB0B8FC1B for ; Thu, 17 Apr 2008 11:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3HB07tt003046 for ; Thu, 17 Apr 2008 11:00:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3HB07v5003039; Thu, 17 Apr 2008 11:00:07 GMT (envelope-from gnats) Resent-Date: Thu, 17 Apr 2008 11:00:07 GMT Resent-Message-Id: <200804171100.m3HB07v5003039@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jaap Boender Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B8871065670 for ; Thu, 17 Apr 2008 10:55:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id F190D8FC0C for ; Thu, 17 Apr 2008 10:55:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m3HAtZ2v007238 for ; Thu, 17 Apr 2008 10:55:35 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m3HAtY0D007237; Thu, 17 Apr 2008 10:55:34 GMT (envelope-from nobody) Message-Id: <200804171055.m3HAtY0D007237@www.freebsd.org> Date: Thu, 17 Apr 2008 10:55:34 GMT From: Jaap Boender To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/122844: Update to Mk/bsd.ocaml.mk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 11:00:07 -0000 >Number: 122844 >Category: ports >Synopsis: Update to Mk/bsd.ocaml.mk >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Apr 17 11:00:07 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jaap Boender >Release: 7.0-STABLE >Organization: >Environment: FreeBSD marion-dufresne.pps.jussieu.fr 7.0-STABLE FreeBSD 7.0-STABLE #2: Thu Mar 6 11:50:31 CET 2008 root@marion-dufresne.pps.jussieu.fr:/usr/obj/usr/src/sys/MARION-DUFRESNE i386 >Description: This is a change to bsd.ocaml.mk, so that the PLIST can be automatically generated if the package uses ocaml-findlib. A new target has been added, ocaml-plist, to do this. It is run during the post-install phase, dependent on the value of the USE_OCAML_PLIST variable. I've changed the variable OCAML_LDLIBS to OCAML_LIBDIRS for more clarity; its default value is now longer ${OCAML_SITELIBDIR}/${PORTNAME}, but dependent on the value of OCAML_PKGDIRS. >How-To-Repeat: n/a >Fix: new .mk file attached Patch attached with submission follows: # ex:ts=4 # # $MBSDlabs: portmk/bsd.ocaml.mk,v 1.18 2006/08/06 18:47:23 stas Exp $ # $FreeBSD: ports/Mk/bsd.ocaml.mk,v 1.1 2007/03/14 04:05:25 linimon Exp $ # # bsd.ocaml.mk - Support for the Objective Caml language packages # # Author: Stanislav Sedov # # Feel free to send any comments and suggestions to maintainer. # # Currently recognised variables are: # # USE_OCAML - Set if your port uses OCaml to build/install. # NO_OCAML_BUILDDEPENDS - Don't add ocamlc to BUILD|EXTRACT|PATCH_DEPENDS. # NO_OCAML_RUNDEPENDS - Don't add ocamlc to RUN_DEPENDS. # USE_OCAML_FINDLIB - Set if your port uses ocamlfind to install # packages. Package direcories will be # automatically deleted. # USE_OCAML_LDCONFIG - Set if your port installs shared libraries # into ocaml site-lib dir. OCaml ld.conf file # will be automatically processed. # USE_OCAML_PLIST - add directories to PLIST automatically # USE_OCAML_WASH - Set if your port wants to automatically # purge shared Ocaml dirs on uninstall. It's # useful when installing to non-standard PREFIX # OCAML_PKGDIRS - Directories under site-lib to be processed # if USE_OCAML_FINDLIB specified. # Default: ${PORTNAME} # OCAML_LIBDIRS - Directories under PREFIX to be automatically # added/removed from ld.conf # Default: ${OCAML_SITELIBDIR}/${X} for all X in # ${OCAML_PKGDIRS} .if !defined(OCAML_include) OCAML_MAINTAINER= stas@FreeBSD.org OCAML_include= bsd.ocaml.mk # # OCaml programs location # OCAMLC?= ${LOCALBASE}/bin/ocamlc OCAMLC_OPT?= ${LOCALBASE}/bin/ocamlc.opt OCAMLCP?= ${LOCALBASE}/bin/ocamlcp OCAMLFIND?= ${LOCALBASE}/bin/ocamlfind # # OCaml library directory # OCAML_LIBDIR?= lib/ocaml # # Where to install site libraries # OCAML_SITELIBDIR?= ${OCAML_LIBDIR}/site-lib # # OCaml compiler port dependency # OCAMLC_PORT?= ${PORTSDIR}/lang/ocaml OCAMLC_DEPEND?= ${OCAMLC}:${OCAMLC_PORT} # # OCaml package manager port dependency # OCAMLFIND_PORT?= ${PORTSDIR}/devel/ocaml-findlib OCAMLFIND_DEPEND?= ${OCAMLFIND}:${OCAMLFIND_PORT} # # Common OCaml examples and documents location # OCAML_DOCSDIR= ${PREFIX}/share/doc/ocaml OCAML_EXAMPLESDIR= ${PREFIX}/share/examples/ocaml # # Location of OCaml ld.conf file # OCAML_LDCONF?= ${OCAML_LIBDIR}/ld.conf OCAMLFIND_DESTDIR?= ${PREFIX}/${OCAML_SITELIBDIR} OCAMLFIND_LDCONF?= ${PREFIX}/${OCAML_LDCONF} .if defined(USE_OCAML) . if !defined(NO_OCAML_BUILDDEPENDS) EXTRACT_DEPENDS+= ${OCAMLC_DEPEND} PATCH_DEPENDS+= ${OCAMLC_DEPEND} BUILD_DEPENDS+= ${OCAMLC_DEPEND} . endif . if !defined(NO_OCAML_RUNDEPENDS) RUN_DEPENDS+= ${OCAMLC_DEPEND} . endif PLIST_SUB+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" .endif .if defined(USE_OCAML_FINDLIB) || defined(USE_OCAML_LDCONFIG) . if !target(post-install-script) post-install-script: ocaml-plist ocaml-findlib ocaml-ldconfig ocaml-wash . endif .endif .if defined(USE_OCAML_PLIST) . if !target(ocaml-plist) ocaml-plist: @for DIR in ${OCAML_LIBDIRS}; do \ ${FIND} ${PREFIX}/$${DIR} -type f -print | \ ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}; \ done . endif .endif .if defined(USE_OCAML_FINDLIB) # # We'll additionally add ocamlfind to RUN_DEPENDS, since # if the port requires ocamlfind to install - it requires # some ocaml libraries and these libraries RUN_DEPENDS on # ocamlfind # BUILD_DEPENDS+= ${OCAMLFIND_DEPEND} RUN_DEPENDS+= ${OCAMLFIND_DEPEND} MAKE_ENV+= OCAMLFIND_DESTDIR="${OCAMLFIND_DESTDIR}" \ OCAMLFIND_LDCONF="${OCAMLFIND_LDCONF}" # # Directories under site-lib to process automatically # OCAML_PKGDIRS?= ${PORTNAME} OCAML_LIBDIRS?= ${OCAML_PKGDIRS:C/(.*)/${OCAML_SITELIBDIR}\/\1/} . if !target(pre-install-script) pre-install-script: .if !exists(${OCAMLFIND_DESTDIR}) @${MKDIR} "${PREFIX}/${OCAML_SITELIBDIR}" .endif . endif . if !target(ocaml-findlib) ocaml-findlib: @for DIR in ${OCAML_PKGDIRS}; do \ ${ECHO_CMD} "@unexec rmdir %D/${OCAML_SITELIBDIR}/$${DIR} 2>/dev/null || true" \ >> ${TMPPLIST}; \ ${ECHO_CMD} "@unexec ${OCAMLFIND} remove $${DIR} 2>/dev/null" \ >> ${TMPPLIST}; \ done . endif .endif .if defined(USE_OCAML_LDCONFIG) # # Directories under PREFIX for appending to ld.conf # . if !target(ocaml-ldconfig) ocaml-ldconfig: @for LIB in ${OCAML_LIBDIRS}; do \ ${ECHO_CMD} "${PREFIX}/$${LIB}" >> "${PREFIX}/${OCAML_LDCONF}"; \ ${ECHO_CMD} "@exec ${ECHO_CMD} "%D/$${LIB}" >> %D/${OCAML_LDCONF}" \ >> ${TMPPLIST}; \ SED_LIB=`${ECHO_CMD} $$LIB | ${SED} -e 's,/,\\\/,g'`; \ ${ECHO_CMD} "@unexec ${SED} -i \"\" -e '/$${SED_LIB}/d' %D/${OCAML_LDCONF}"\ >> ${TMPPLIST}; \ done . endif .endif .if defined(USE_OCAML_WASH) . if !target(ocaml-wash) ocaml-wash: @${ECHO_CMD} "@unexec rmdir %D/${OCAML_SITELIBDIR} 2>/dev/null || true"\ >> ${TMPPLIST} # If ld.conf is empty @${ECHO_CMD} "@unexec if [ ! -s %D/${OCAML_LDCONF} ]; then ${RM} -f %D/${OCAML_LDCONF}; fi || true" >> ${TMPPLIST} @${ECHO_CMD} "@unexec rmdir %D/${OCAML_LIBDIR} 2>/dev/null || true" \ >> ${TMPPLIST} . endif .endif .if !target(ocaml-plist) ocaml-plist: @${DO_NADA} .endif .if !target(ocaml-findlib) ocaml-findlib: @${DO_NADA} .endif .if !target(ocaml-ldconfig) ocaml-ldconfig: @${DO_NADA} .endif .if !target(ocaml-wash) ocaml-wash: @${DO_NADA} .endif # # XXX: temporary workaround for non-standard PREFIX # .if !target(add-plist-post) add-plist-post: . if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && \ ${PREFIX} != ${LINUXBASE} && ${PREFIX} != "/usr") @${ECHO_CMD} "@unexec rmdir %D 2> /dev/null || true" >> ${TMPPLIST} . else @${DO_NADA} . endif # If we are using PORTDOCS macro port cannot delete OCAML_DOCSDIR, so # we shoud try to accomodate it . if defined(PORTDOCS) @${ECHO_CMD} "@unexec rmdir ${OCAML_DOCSDIR} 2>/dev/null || true" \ >> ${TMPPLIST} . endif .endif .endif #!defined(OCAML_include) >Release-Note: >Audit-Trail: >Unformatted: