aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/hs-HaXml/Makefile
diff options
context:
space:
mode:
authorobraun <obraun@FreeBSD.org>2004-01-30 05:59:15 +0800
committerobraun <obraun@FreeBSD.org>2004-01-30 05:59:15 +0800
commitd29831282eeb8c307ca497ed44614f6609ecadfc (patch)
tree1fe80dd65952fc9cfb5f361d053cb0ec02f9dcd8 /textproc/hs-HaXml/Makefile
parent899ac51328724255aab08b70004e585a00b46a84 (diff)
downloadfreebsd-ports-gnome-d29831282eeb8c307ca497ed44614f6609ecadfc.tar.gz
freebsd-ports-gnome-d29831282eeb8c307ca497ed44614f6609ecadfc.tar.zst
freebsd-ports-gnome-d29831282eeb8c307ca497ed44614f6609ecadfc.zip
* Upgrade to 1.11.
* Change knobs. GHC, NHC98 and HUGS are now auto-detected. If not already installed, define WITH_GHC, WITH_NHC98 resp. WITH_HUGS. * Build package with WITH_GHC, WITH_NHC98, and WITH_HUGS defined.
Diffstat (limited to 'textproc/hs-HaXml/Makefile')
-rw-r--r--textproc/hs-HaXml/Makefile87
1 files changed, 54 insertions, 33 deletions
diff --git a/textproc/hs-HaXml/Makefile b/textproc/hs-HaXml/Makefile
index 121f32804263..46ea61fb8163 100644
--- a/textproc/hs-HaXml/Makefile
+++ b/textproc/hs-HaXml/Makefile
@@ -5,8 +5,7 @@
# $FreeBSD$
PORTNAME= haxml
-PORTVERSION= 1.09
-PORTREVISION= 2
+PORTVERSION= 1.11
CATEGORIES= textproc haskell
MASTER_SITES= http://www.haskell.org/HaXml/ \
ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/
@@ -16,55 +15,79 @@ DISTNAME= HaXml-${PORTVERSION}
MAINTAINER= obraun@FreeBSD.org
COMMENT= A collection of utilities for using Haskell and XML together
-.if !defined(WITHOUT_NHC98)
-BUILD_DEPENDS= nhc98:${PORTSDIR}/lang/nhc98
-RUN_DEPENDS= nhc98:${PORTSDIR}/lang/nhc98
-.endif
-.if !defined(WITHOUT_GHC)
-BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
-RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
-.endif
-
USE_REINPLACE= yes
HAS_CONFIGURE= yes
USE_GMAKE= yes
-ALL_TARGET= #empty
CONFIGURE_ARGS+= --prefix=${PREFIX}/bin
-.if defined(WITHOUT_GHC)
-CONFIGURE_ARGS+= --buildwith=nhc98
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/bin/nhc98)
+WITH_NHC98= yes
+.endif
+.if exists(${LOCALBASE}/bin/ghc)
+WITH_GHC= yes
+.endif
+.if exists(${LOCALBASE}/bin/hugs)
+WITH_HUGS= yes
+.endif
+
+.if defined(PACKAGE_BUILDING)
+WITH_NHC98= yes
+WITH_GHC= yes
+WITH_HUGS= yes
+.endif
+
+.if defined(WITH_NHC98)
+BUILD_DEPENDS+= nhc98:${PORTSDIR}/lang/nhc98
+RUN_DEPENDS= nhc98:${PORTSDIR}/lang/nhc98
+.endif
+.if defined(WITH_GHC)
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
.endif
-.if defined(WITHOUT_NHC98)
-CONFIGURE_ARGS+= --buildwith=ghc
+.if defined(WITH_HUGS)
+BUILD_DEPENDS+= hugs:${PORTSDIR}/lang/hugs
+RUN_DEPENDS+= hugs:${PORTSDIR}/lang/hugs
.endif
-.if !defined(WITHOUT_NHC98)
+.if defined(WITH_NHC98)
PLIST_SUB+= NHC98=""
.else
PLIST_SUB+= NHC98="@comment "
.endif
-.if !defined(WITHOUT_GHC)
+.if defined(WITH_GHC)
GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
PLIST_SUB+= GHC="" GHC_VERSION="${GHC_VERSION}"
.else
PLIST_SUB+= GHC="@comment "
.endif
+.if defined(WITH_HUGS)
+PLIST_SUB+= HUGS=""
+.else
+PLIST_SUB+= HUGS="@comment "
+.endif
pre-everything::
@${ECHO_CMD} ""
-.if defined(WITHOUT_GHC) && defined(WITHOUT_NHC98)
- @${ECHO_CMD} "Without everything?"
- @${ECHO_CMD} ""
+.if defined(WITH_NHC98)
+ @${ECHO_CMD} " HaXml will be installed for nhc98."
+.else
+ @${ECHO_CMD} " Define WITH_NHC98 to install HaXml for nhc98."
+.endif
+.if defined(WITH_GHC)
+ @${ECHO_CMD} " HaXml will be installed for ghc."
+.else
+ @${ECHO_CMD} " Define WITH_GHC to install HaXml for ghc."
+.endif
+.if defined(WITH_HUGS)
+ @${ECHO_CMD} " HaXml will be installed for hugs"
+.else
+ @${ECHO_CMD} " Define WITH_HUGS to install HaXml for hugs"
+.endif
+.if !defined(WITH_GHC) && !defined(WITH_NHC98) && !defined(WITH_HUGS)
@${FALSE}
-.elif !defined(WITHOUT_GHC) && !defined(WITHOUT_NHC98)
- @${ECHO_CMD} " HaXml will be installed for both nhc98 and ghc."
- @${ECHO_CMD} " Define WITHOUT_GHC to avoid installation for ghc."
- @${ECHO_CMD} " Define WITHOUT_NHC98 to avoid installation for nhc98."
-.elif defined(WITHOUT_NHC98)
- @${ECHO_CMD} " HaXml will be installed for ghc only."
-.elif defined(WITHOUT_GHC)
- @${ECHO_CMD} " HaXml will be installed for nhc98 only."
.endif
@${ECHO_CMD} ""
@@ -72,16 +95,14 @@ post-patch:
@${REINPLACE_CMD} -e 's,/bin/false,/usr/bin/false,' ${WRKSRC}/configure
post-install:
-.if !defined(WITHOUT_GHC)
+.if defined(WITH_GHC)
@${INSTALL_DATA} ${WRKSRC}/obj/ghc/pkg.conf \
${PREFIX}/lib/ghc-${GHC_VERSION}/imports/HaXml/
@${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.endif
.if !defined(NOPORTDOCS)
- @${RM} -rf ${WRKSRC}/docs/CVS
- @${RM} -rf ${WRKSRC}/docs/HaXml/CVS
@${MKDIR} ${DOCSDIR}
@(cd ${WRKSRC} && ${CP} -R docs/* ${DOCSDIR})
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>