summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorproff <proff>1999-12-15 06:00:43 +0000
committerproff <proff>1999-12-15 06:00:43 +0000
commit42b7ec8ce5cdc0f9f84f09702b96b09f8a80c788 (patch)
tree5305498bc08883678ded53f9d6baf30ebd4dad9c /lang
parent013352d02959efd6db009996cf43b4c47193b451 (diff)
downloadpkgsrc-42b7ec8ce5cdc0f9f84f09702b96b09f8a80c788.tar.gz
NetBSD changes for:
GHC: The Glasgow Haskell Compiler. The Glasgow Haskell Compiler is a robust, fully-featured, optimising compiler for the functional programming language Haskell 98 (http://www.haskell.org). GHC compiles Haskell to either native code or C. It implements numerous experimental language extensions to Haskell, including concurrency, a foreign language interface, several type-system extensions, exceptions, and so on. GHC comes with a generational garbage collector, a space and time profiler, and a comprehensive set of libraries. -Julian Assange <proff@iq.org>
Diffstat (limited to 'lang')
-rw-r--r--lang/ghc/Makefile56
-rw-r--r--lang/ghc/files/build.mk1
-rw-r--r--lang/ghc/files/md52
-rw-r--r--lang/ghc/pkg/DESCR4
-rw-r--r--lang/ghc/pkg/PLIST1
5 files changed, 41 insertions, 23 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 7c735ae741d..67ec142d337 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -1,41 +1,57 @@
-# New ports collection makefile for: ghc
-# Version required: 4.04
-# Date created: 28 August 1999
-# Whom: Simon Marlow <simonmar@microsoft.com>
-#
-# $FreeBSD: ports/lang/ghc/Makefile,v 1.1.1.1 1999/11/10 17:25:28 nectar Exp $
+# $NetBSD: Makefile,v 1.2 1999/12/15 06:00:43 proff Exp $
+# FreeBSD Id: ports/lang/ghc/Makefile,v 1.1.1.1 1999/11/10 17:25:28 nectar Exp
DISTNAME= ghc-4.04
CATEGORIES= lang
MASTER_SITES= http://www.haskell.org/ghc/dist/4.04/
-DISTFILES= ghc-4.04-src${EXTRACT_SUFX} ghc-4.04-x86-hc${EXTRACT_SUFX}
+DISTFILES= ghc-4.04-src.tar.gz ghc-4.04-x86-hc.tar.gz
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.haskell.org/ghc/
-MAINTAINER= simonmar@microsoft.com
+DEPENDS+= readline-4.0:../../devel/readline
+DEPENDS+= gmp-2.0.2:../../devel/gmp
USE_PERL5= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --enable-hc-boot --libdir=${PREFIX}/lib/ghc
-
+CONFIGURE_ARGS+= --enable-hc-boot --libdir=${PREFIX}/lib/ghc
+CONFIGURE_ENV+= HASKELL_OBJ_FMT=`cat ${WRKDIR}/obj_fmt`
WRKSRC= ${WRKDIR}/fptools
-# Note:
-# - This port will bootstrap from pre-compiled C files.
-# - ToDo: bootstrap using existing compiler, if one is installed.
+# a number of non-i386 platforms, including solaris/sparc, osf/alpha
+# etc are supported natively by ghc. pkg support for those platforms
+# and their NetBSD varients is left as a mid-level exercise for the reader
+ONLY_FOR_PLATFORM= NetBSD-*-i386
+# Note:
+# - This package will bootstrap from pre-compiled C files.
# XXX: we touch the happy-generated files to ensure that when we
# switch to non-bootstrapping mode for installation, the build system
# won't try to create them.
#
+pre-configure:
+ ( lnl=${WRKDIR}/longandlow; \
+ ${ECHO} 'int main(){exit(0);}' > $$lnl.c && \
+ ${CC} $$lnl.c -o $$lnl && \
+ file $$lnl | ( ${EGREP} '[^a-zA-Z][Ee][Ll][Ff][^a-zA-Z]' && \
+ ${ECHO} ELF || ${ECHO} a.out ) \
+ ) > ${WRKDIR}/obj_fmt
+
+ ${SED} < ${WRKSRC}/ghc/driver/ghc.lprl \
+ > ${WRKSRC}/ghc/driver/ghc.lprl.hacked \
+ '/push(@SysLibrary, "-l$LibGmp")/s%^%push(@SysLibrary, "-L'${PREFIX}/lib'");%' && \
+ ${MV} -f ${WRKSRC}/ghc/driver/ghc.lprl.hacked \
+ ${WRKSRC}/ghc/driver/ghc.lprl
pre-build:
- @${CP} ${FILESDIR}/build.mk ${WRKSRC}/mk
- @${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/ghc/compiler/rename/ParseIface.hs
- @${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/ghc/compiler/parser/Parser.hs
- @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} boot)
+ ${CP} ${FILESDIR}/build.mk ${WRKSRC}/mk
+ ${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/ghc/compiler/rename/ParseIface.hs
+ ${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/ghc/compiler/parser/Parser.hs
+ (cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} boot)
post-build:
- @echo "GhcWithHscBuiltViaC=NO" >>${WRKSRC}/mk/build.mk
- @(cd ${WRKSRC}/ghc/lib; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean boot all)
+ echo "GhcWithHscBuiltViaC=NO" >>${WRKSRC}/mk/build.mk
+ (cd ${WRKSRC}/ghc/lib; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean boot all)
-.include <bsd.port.mk>
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/ghc/files/build.mk b/lang/ghc/files/build.mk
index ce2b100c9ee..7ef78b241f2 100644
--- a/lang/ghc/files/build.mk
+++ b/lang/ghc/files/build.mk
@@ -2,3 +2,4 @@ GhcLibHcOpts = -O -split-objs -odir $*
SRC_HAPPY_OPTS += -c
GhcLibWays=
GhcLibsWithReadline = YES
+SRC_HC_OPTS += -L/usr/pkg/lib -I/usr/pkg/include
diff --git a/lang/ghc/files/md5 b/lang/ghc/files/md5
index bc313febc41..4cfa5bac005 100644
--- a/lang/ghc/files/md5
+++ b/lang/ghc/files/md5
@@ -1,2 +1,4 @@
+$NetBSD: md5,v 1.2 1999/12/15 06:00:44 proff Exp $
+
MD5 (ghc-4.04-src.tar.gz) = e1211129906c45709ecf5159eb6d9d08
MD5 (ghc-4.04-x86-hc.tar.gz) = 19287b805f9f528559a46059bbc9c4b9
diff --git a/lang/ghc/pkg/DESCR b/lang/ghc/pkg/DESCR
index ad4a4ee71e4..4951b8fec91 100644
--- a/lang/ghc/pkg/DESCR
+++ b/lang/ghc/pkg/DESCR
@@ -9,6 +9,4 @@ type-system extensions, exceptions, and so on. GHC comes with a
generational garbage collector, a space and time profiler, and a
comprehensive set of libraries.
-Documentation can be found hanging off GHC's homepage, below.
-
-WWW: http://www.haskell.org/ghc/
+-Julian Assange <proff@iq.org>
diff --git a/lang/ghc/pkg/PLIST b/lang/ghc/pkg/PLIST
index 45cee650b61..f61131f479a 100644
--- a/lang/ghc/pkg/PLIST
+++ b/lang/ghc/pkg/PLIST
@@ -1,3 +1,4 @@
+@comment $NetBSD: PLIST,v 1.2 1999/12/15 06:00:44 proff Exp $
bin/ghc
bin/ghc-4.04
bin/hp2ps