* Install for nhc98 _AND_ ghc by default. Use WITHOUT_{NHC98|GHC} to change

this behaviour.
* Remove ghc's package.conf.old.
* Bump PORTREVISION.
This commit is contained in:
Oliver Braun 2003-06-15 20:01:01 +00:00
parent 6a91a09560
commit 29f34459ac
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83042
4 changed files with 36 additions and 24 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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