summaryrefslogtreecommitdiff
path: root/textproc/hs-HaXml
diff options
context:
space:
mode:
authorOliver Braun <obraun@FreeBSD.org>2003-06-15 20:01:01 +0000
committerOliver Braun <obraun@FreeBSD.org>2003-06-15 20:01:01 +0000
commit29f34459aca470bf24119dbc8e2497d433d907db (patch)
treeda573b9c383c5db9d050f957e70ce325d0db7427 /textproc/hs-HaXml
parento New port mldonkey-core version 2.5.3: Client 'core' for the (diff)
* Install for nhc98 _AND_ ghc by default. Use WITHOUT_{NHC98|GHC} to change
this behaviour. * Remove ghc's package.conf.old. * Bump PORTREVISION.
Notes
Notes: svn path=/head/; revision=83042
Diffstat (limited to 'textproc/hs-HaXml')
-rw-r--r--textproc/hs-HaXml/Makefile28
-rw-r--r--textproc/hs-HaXml/pkg-plist2
2 files changed, 18 insertions, 12 deletions
diff --git a/textproc/hs-HaXml/Makefile b/textproc/hs-HaXml/Makefile
index b2352ef57300..9275163223bc 100644
--- a/textproc/hs-HaXml/Makefile
+++ b/textproc/hs-HaXml/Makefile
@@ -6,7 +6,7 @@
PORTNAME= haxml
PORTVERSION= 1.09
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= textproc haskell
MASTER_SITES= http://www.haskell.org/HaXml/ \
ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/
@@ -19,10 +19,8 @@ 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
-.else
-WITH_GHC= yes
.endif
-.if defined(WITH_GHC)
+.if !defined(WITHOUT_GHC)
BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
.endif
@@ -34,9 +32,10 @@ ALL_TARGET= #empty
CONFIGURE_ARGS+= --prefix=${PREFIX}/bin
-.if !defined(WITHOUT_NHC98) && !defined(WITH_GHC)
+.if defined(WITHOUT_GHC)
CONFIGURE_ARGS+= --buildwith=nhc98
-.elif defined(WITHOUT_NHC98)
+.endif
+.if defined(WITHOUT_NHC98)
CONFIGURE_ARGS+= --buildwith=ghc
.endif
@@ -45,7 +44,7 @@ PLIST_SUB+= NHC98=""
.else
PLIST_SUB+= NHC98="@comment "
.endif
-.if defined(WITH_GHC)
+.if !defined(WITHOUT_GHC)
GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
PLIST_SUB+= GHC="" GHC_VERSION="${GHC_VERSION}"
.else
@@ -54,14 +53,18 @@ PLIST_SUB+= GHC="@comment "
pre-everything::
@${ECHO_CMD} ""
-.if defined(WITH_GHC) && !defined(WITHOUT_NHC98)
+.if defined(WITHOUT_GHC) && defined(WITHOUT_NHC98)
+ @${ECHO_CMD} "Without everything?"
+ @${ECHO_CMD} ""
+ @${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."
-.else
+.elif defined(WITHOUT_GHC)
@${ECHO_CMD} " HaXml will be installed for nhc98 only."
- @${ECHO_CMD} " Define WITH_GHC to install for ghc, too."
- @${ECHO_CMD} " Define WITHOUT_NHC98 to install for ghc only."
.endif
@${ECHO_CMD} ""
@@ -69,9 +72,10 @@ post-patch:
@${REINPLACE_CMD} -e 's,/bin/false,/usr/bin/false,' ${WRKSRC}/configure
post-install:
-.if defined(WITH_GHC)
+.if !defined(WITHOUT_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
@(cd ${WRKSRC} && ${INSTALL_PROGRAM} \
Canonicalise DtdToHaskell MkOneOf Validate Xtract ${PREFIX}/bin)
diff --git a/textproc/hs-HaXml/pkg-plist b/textproc/hs-HaXml/pkg-plist
index f33dffe4263a..59d89f6a8913 100644
--- a/textproc/hs-HaXml/pkg-plist
+++ b/textproc/hs-HaXml/pkg-plist
@@ -153,4 +153,6 @@ bin/Xtract
%%PORTDOCS%%@dirrm share/doc/haxml/HaXml
%%PORTDOCS%%@dirrm share/doc/haxml
%%GHC%%@exec %D/bin/ghc-pkg -a < %D/lib/ghc-%%GHC_VERSION%%/imports/HaXml/pkg.conf
+%%GHC%%@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
%%GHC%%@unexec %D/bin/ghc-pkg -r HaXml
+%%GHC%%@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old