From b4eb9a326892999292462e5d5f212e9b8ff56c55 Mon Sep 17 00:00:00 2001 From: Brendan Fabeny Date: Wed, 30 Jul 2014 15:00:45 +0000 Subject: [PATCH] Use staging --- graphics/ocaml-lablgl/Makefile | 34 +++++++++++++-------------------- graphics/ocaml-lablgl/pkg-descr | 2 +- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/graphics/ocaml-lablgl/Makefile b/graphics/ocaml-lablgl/Makefile index 651e795d78f7..4dc133d799d7 100644 --- a/graphics/ocaml-lablgl/Makefile +++ b/graphics/ocaml-lablgl/Makefile @@ -9,7 +9,7 @@ MASTER_SITES= http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/ \ https://forge.ocamlcore.org/frs/download.php/816/ PKGNAMEPREFIX= ocaml- -MAINTAINER= ports@FreeBSD.org +MAINTAINER= bf@FreeBSD.org COMMENT= OpenGL interface for Objective Caml LICENSE= BSD3CLAUSE @@ -35,7 +35,6 @@ EXAMPLESDIR= ${PREFIX}/share/examples/ocaml/lablgl CONFLICTS= ocaml-notk-[0-9]* ocaml-nox11-[0-9]* -NO_STAGE= yes .include USES+= tk:84,85 @@ -50,21 +49,19 @@ post-extract: post-patch: @${REINPLACE_CMD} -e "s,/usr/X11R6,${LOCALBASE},g" \ -e "s,/usr/local,${LOCALBASE},g" \ - -e "s,^\(BINDIR[ \t]*=\).*,\1${PREFIX}/bin,g" \ + -e "s,^\(BINDIR[ \t]*=\).*,\1${STAGEDIR}${PREFIX}/bin,g" \ -e "s,^\(RANLIB[ \t]*=\).*,\1ranlib,g" \ -e "s,^#\(LIBDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml,g" \ - -e "s,^#\(DLLDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml/stublibs,g" \ + -e "s,^#\(DLLDIR[ \t]*=\).*,\1${STAGEDIR}${PREFIX}/lib/ocaml/stublibs,g" \ + -e "s,^#\(INSTALLDIR[ \t]*=\).*,\1${STAGEDIR}${PREFIX}/lib/ocaml/lablGL,g" \ + -e "s!^#\(COPTS[ \t]*=\).*!\1-c ${CFLAGS} ${THR_CPP}!g" \ -e "/^TKINCLUDES/s,=.*$$,= -I${TCL_INCLUDEDIR} -I${TK_INCLUDEDIR}," \ -e "/^TKLIBS/s,=.*$$,= -L${LOCALBASE}/lib -ltk${TK_SHLIB_VER}\ -ltcl${TCL_SHLIB_VER} ${THR_LD}," \ ${WRKSRC}/Makefile.config - @${REINPLACE_CMD} \ - -e "s,^\(INSTALLDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml/lablGL,g" \ - -e "s!^\(COPTS[ \t]*=\).*!\1-c ${CFLAGS} ${THR_CPP}!g" \ - ${WRKSRC}/Makefile.common ${WRKSRC}/Makefile - @${REINPLACE_CMD} -E \ + -e '/exec ocaml/s,\$$\(INSTALLDIR\),${PREFIX}/lib/ocaml/lablGL,' \ -e 's,^(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \3,' \ -e 's,^(${PATTERN}+.*BINDIR),\1\$${BSD_INSTALL_SCRIPT} \3,' \ -e 's,^(${PATTERN}+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \3,' \ @@ -72,23 +69,18 @@ post-patch: ${WRKSRC}/Togl/src/Makefile pre-install: -# -# XXX: for incorrect PREFIX. Really should be done in bsd.ocaml.mk... -# -.if !exists(${PREFIX}/lib/ocaml/stublibs) - @${MKDIR} ${PREFIX}/lib/ocaml/stublibs -.endif + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/ocaml/stublibs post-install: - @${MKDIR} ${EXAMPLESDIR}/lablglut - @${MKDIR} ${EXAMPLESDIR}/togl + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/lablglut + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/togl @(cd ${WRKSRC}/LablGlut/examples && ${COPYTREE_SHARE} \* \ - ${EXAMPLESDIR}/lablglut '! -name Makefile') + ${STAGEDIR}${EXAMPLESDIR}/lablglut '! -name Makefile') @(cd ${WRKSRC}/Togl/examples && ${COPYTREE_SHARE} \* \ - ${EXAMPLESDIR}/togl '! -name Makefile') + ${STAGEDIR}${EXAMPLESDIR}/togl '! -name Makefile') .if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .endif .include diff --git a/graphics/ocaml-lablgl/pkg-descr b/graphics/ocaml-lablgl/pkg-descr index 23528ec031ec..9a7dffd53b16 100644 --- a/graphics/ocaml-lablgl/pkg-descr +++ b/graphics/ocaml-lablgl/pkg-descr @@ -9,4 +9,4 @@ related functions. Please see ${PREFIX}/share/doc/ocaml/lablgl/README for further information. -WWW: http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html +WWW: http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html