- Add knob for GHC, prefer lang/ghc6

- Strip PORTNAME, generate PKGNAMESUFFIX depending on GHC version
- Add patch file req'd for ghc6, fix package.conf
=> Bump PORTREVISION

PR:		ports/58349
Submitted by:	maintainer
This commit is contained in:
Oliver Braun 2003-10-21 21:56:23 +00:00
parent 6bfe18a3d2
commit fd737c39b7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=91848
3 changed files with 36 additions and 8 deletions

View File

@ -4,8 +4,9 @@
#
# $FreeBSD$
PORTNAME= tclhaskell-ghc
PORTNAME= tclhaskell
PORTVERSION= 1.2
PORTREVISION= 1
CATEGORIES= devel haskell tcl83
MASTER_SITES= http://www.dcs.gla.ac.uk/~meurig/TclHaskell/
PKGNAMEPREFIX= hs-
@ -14,20 +15,36 @@ DISTNAME= TclHaskell1_2
MAINTAINER= stolz@i2.informatik.rwth-aachen.de
COMMENT= Tcl/Tk binding for Haskell
.if defined(WITH_GHC5)
GHC= ghc-5.04.3
GHCDEP= ghc
.else
GHC= ghc-6.0.1
GHCDEP= ghc6
.endif
PKGNAMESUFFIX= -${GHCDEP}
LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83
BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc
RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc
BUILD_DEPENDS= ${GHC}:${PORTSDIR}/lang/${GHCDEP}
RUN_DEPENDS= ${GHC}:${PORTSDIR}/lang/${GHCDEP}
WRKSRC= ${WRKDIR}/TclHaskell1.2/src
USE_GMAKE= YES
USE_REINPLACE= YES
GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
GHC_LIB= ${LOCALBASE}/lib/ghc-${GHC_VERSION}
GHC_VERSION= `${LOCALBASE}/bin/${GHC} --numeric-version`
GHC_LIB= ${LOCALBASE}/lib/${GHC}
PLIST_SUB+= GHC_VERSION="${GHC_VERSION}"
PKGINSTALL= ${WRKDIR}/pkg-install
MAKE_ENV+= INSTALL_DATA="${INSTALL_DATA}" \
MKDIR="${MKDIR}"
MKDIR="${MKDIR}" GHC="${GHC}"
pre-everything::
@${ECHO}
@${ECHO} "This port prefers lang/ghc6. To build this port with"
@${ECHO} "the Glasgow Haskell Compiler 5.x, restart this build with"
@${ECHO} "WITH_GHC5=YES."
@${ECHO}
post-patch:
${REINPLACE_CMD} -e "s,/local.*tclhaskell,${GHC_LIB}," ${WRKSRC}/Makefile

View File

@ -0,0 +1,11 @@
--- TclPrimGhc.hs.orig Tue Oct 21 17:29:21 2003
+++ TclPrimGhc.hs Tue Oct 21 17:29:43 2003
@@ -42,7 +42,7 @@
writeElt pstr 0 str
return pstr
where
- len = Word.intToWord32 (length str + 1)
+ len = fromIntegral (length str + 1)
writeElt addr n [] = writeCharOffAddr addr n '\0'
writeElt addr n (v :vs) = do

View File

@ -13,10 +13,10 @@ Package
extra_libraries = ["tcl83","tk83","HSTclHaskell_cbits"],
include_dirs = ["$GHC_LIB/include"],
c_includes = [],
package_deps = [ "rts","lang","concurrent" ],
package_deps = [ "rts","lang","concurrent","data" ],
extra_ghc_opts = [ "-fglasgow-exts", "-fvia-C" ],
extra_cc_opts = [],
extra_ld_opts = [ "-L$PKG_PREFIX/lib -lncurses" ]
extra_ld_opts = [ "-L$PKG_PREFIX/lib", "-lncurses" ]
}
CONFEOF
fi