diff options
author | obraun <obraun@FreeBSD.org> | 2003-03-24 23:38:59 +0800 |
---|---|---|
committer | obraun <obraun@FreeBSD.org> | 2003-03-24 23:38:59 +0800 |
commit | 7984d3166bb1d93bf0104595a33e6e775d20db45 (patch) | |
tree | 00a1859f068e78f90c14ec1afeaea605dfb17163 /devel/hs-tclhaskell-ghc | |
parent | dd5e85c57e69d291ae91cd0e21ea6c1c9061fbf1 (diff) | |
download | freebsd-ports-gnome-7984d3166bb1d93bf0104595a33e6e775d20db45.tar.gz freebsd-ports-gnome-7984d3166bb1d93bf0104595a33e6e775d20db45.tar.zst freebsd-ports-gnome-7984d3166bb1d93bf0104595a33e6e775d20db45.zip |
Add hs-tclhaskell-ghc 1.2, tcl/Tk binding for Haskell.
PR: ports/48948
Submitted by: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
Diffstat (limited to 'devel/hs-tclhaskell-ghc')
-rw-r--r-- | devel/hs-tclhaskell-ghc/Makefile | 48 | ||||
-rw-r--r-- | devel/hs-tclhaskell-ghc/distinfo | 1 | ||||
-rw-r--r-- | devel/hs-tclhaskell-ghc/files/patch-ConcTcl.hs | 10 | ||||
-rw-r--r-- | devel/hs-tclhaskell-ghc/files/patch-Makefile | 77 | ||||
-rw-r--r-- | devel/hs-tclhaskell-ghc/pkg-descr | 3 | ||||
-rw-r--r-- | devel/hs-tclhaskell-ghc/pkg-install.in | 22 | ||||
-rw-r--r-- | devel/hs-tclhaskell-ghc/pkg-plist | 66 |
7 files changed, 227 insertions, 0 deletions
diff --git a/devel/hs-tclhaskell-ghc/Makefile b/devel/hs-tclhaskell-ghc/Makefile new file mode 100644 index 000000000000..fb306ce0a913 --- /dev/null +++ b/devel/hs-tclhaskell-ghc/Makefile @@ -0,0 +1,48 @@ +# New ports collection makefile for: tclhaskell-ghc +# Date created: 2003-03-05 +# Whom: Volker Stolz <stolz@i2.informatik.rwth-aachen.de> +# +# $FreeBSD$ + +PORTNAME= tclhaskell-ghc +PORTVERSION= 1.2 +CATEGORIES= devel haskell tcl83 +MASTER_SITES= http://www.dcs.gla.ac.uk/~meurig/TclHaskell/ +PKGNAMEPREFIX= hs- +DISTNAME= TclHaskell1_2 + +MAINTAINER= stolz@i2.informatik.rwth-aachen.de +COMMENT= Tcl/Tk binding for Haskell + +LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83 +BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc +RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc + +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} +PLIST_SUB+= GHC_VERSION="${GHC_VERSION}" +PKGINSTALL= ${WRKDIR}/pkg-install +MAKE_ENV+= INSTALL_DATA="${INSTALL_DATA}" \ + MKDIR="${MKDIR}" + +post-patch: + ${REINPLACE_CMD} -e "s,/local.*tclhaskell,${GHC_LIB}," ${WRKSRC}/Makefile + +post-install: + @${MKDIR} ${EXAMPLESDIR}/images +.for f in licence.txt demo + ${FIND} ${WRKSRC}/../${f} -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${EXAMPLESDIR}/ \; +.endfor + ${INSTALL_DATA} ${WRKSRC}/../demo/images/* ${EXAMPLESDIR}/images/ +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/../doc/* ${DOCSDIR}/ +.endif + @${SED} -e s,GHC_VERSION,${GHC_VERSION}, <${MASTERDIR}/pkg-install.in >${PKGINSTALL} + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} dummy POST-INSTALL + +.include <bsd.port.mk> diff --git a/devel/hs-tclhaskell-ghc/distinfo b/devel/hs-tclhaskell-ghc/distinfo new file mode 100644 index 000000000000..beeebaa57cc4 --- /dev/null +++ b/devel/hs-tclhaskell-ghc/distinfo @@ -0,0 +1 @@ +MD5 (TclHaskell1_2.tar.gz) = d31c5d08fd2f3432039684bc045bd6f4 diff --git a/devel/hs-tclhaskell-ghc/files/patch-ConcTcl.hs b/devel/hs-tclhaskell-ghc/files/patch-ConcTcl.hs new file mode 100644 index 000000000000..6464a5eadf38 --- /dev/null +++ b/devel/hs-tclhaskell-ghc/files/patch-ConcTcl.hs @@ -0,0 +1,10 @@ +--- ConcTcl.hs.orig Wed Mar 5 11:38:45 2003 ++++ ConcTcl.hs Wed Mar 5 11:50:13 2003 +@@ -1,6 +1,7 @@ + module ConcTcl where
+ import TclPrimImpl
+ import Concurrent
++import CVar + import IOExts
+ import IO
+ import TclCompatibility
diff --git a/devel/hs-tclhaskell-ghc/files/patch-Makefile b/devel/hs-tclhaskell-ghc/files/patch-Makefile new file mode 100644 index 000000000000..705008943b89 --- /dev/null +++ b/devel/hs-tclhaskell-ghc/files/patch-Makefile @@ -0,0 +1,77 @@ +--- Makefile.orig Wed Oct 3 16:58:55 2001 ++++ Makefile Thu Mar 6 11:50:51 2003 +@@ -11,10 +11,10 @@ + LIBDIR = $(PREFIX) + + # where to install the TclHaskell interface files +-IMPORTS = $(PREFIX)/imports ++IMPORTS = $(PREFIX)/imports/tclhaskell + + # the library files to use - change for different version +-TCLLIBS = -ltk8.3 -ltcl8.3 ++TCLLIBS = -ltk83 -ltcl83 + + # Ununcomment this line to support concurrency. + # This support does NOT work with ghci. It does not currently export +@@ -36,9 +36,9 @@ + # + ####################################################################### + +-CC = gcc +-CC_OPTS = -O +-CC_INC = -I/usr/X11/include -I/usr/local/include ++CC ?= gcc ++CC_OPTS = $(CFLAGS) ++CC_INC = -I${X11BASE}/include -I${LOCALBASE}/include -I${LOCALBASE}/include/tcl8.3 -I${LOCALBASE}/include/tk8.3 + + # ld options for generating shared libraries for Hugs: + +@@ -48,15 +48,15 @@ + + # The directories containing the X11, Tcl and Tk (binary) libraries: + +-CCLIB = -L /usr/lib/X11 -L /usr/local/lib ++CCLIB = -L${X11BASE}/lib/X11 -L${LOCALBASE}/lib + + + # the libraries required by Tcl/Tk: + + #TCLREQ = -ltk8.3 -ltcl8.3 -lX11 -lm -lsocket -lnsl -lintl -lw # (Solaris) +-TCL_REQ = -ltk8.3 -ltcl8.3 -lm -lc # (OSF/1+Linux) ++TCL_REQ = $(TCLLIBS) # -lm -lc # (OSF/1+Linux) + +-GHC = ghc ++GHC ?= ghc + + RM = rm -f + +@@ -72,7 +72,7 @@ + HIS = *.hi + + GHC_OPTS = -O -fglasgow-exts -recomp -dcore-lint -fvia-C \ +- -package concurrent -package-name TclHaskell ++ -package concurrent -package lang -package-name TclHaskell + + GHC_INC = + +@@ -95,13 +95,13 @@ + all : libHSTclHaskell.a HSTclHaskell.o libHSTclHaskell_cbits.a HSTclHaskell_cbits.o + + install : libHSTclHaskell.a HSTclHaskell.o +- mkdir -p $(LIBDIR) +- mkdir -p $(IMPORTS) +- cp -p libHSTclHaskell.a $(LIBDIR)/ +- cp -p HSTclHaskell.o $(LIBDIR)/ +- cp -p libHSTclHaskell_cbits.a $(LIBDIR)/ +- cp -p HSTclHaskell_cbits.o $(LIBDIR)/ +- cp -p $(HIS) $(IMPORTS)/ ++ ${MKDIR} $(LIBDIR) ++ ${MKDIR} $(IMPORTS) ++ ${INSTALL_DATA} libHSTclHaskell.a $(LIBDIR)/ ++ ${INSTALL_DATA} HSTclHaskell.o $(LIBDIR)/ ++ ${INSTALL_DATA} libHSTclHaskell_cbits.a $(LIBDIR)/ ++ ${INSTALL_DATA} HSTclHaskell_cbits.o $(LIBDIR)/ ++ ${INSTALL_DATA} $(HIS) $(IMPORTS)/ + + pkg : + ghc-pkg -a < tclhaskell.conf diff --git a/devel/hs-tclhaskell-ghc/pkg-descr b/devel/hs-tclhaskell-ghc/pkg-descr new file mode 100644 index 000000000000..163d8183d79d --- /dev/null +++ b/devel/hs-tclhaskell-ghc/pkg-descr @@ -0,0 +1,3 @@ +TclHaskell is a library for accessing Tk/Tcl through Haskell. + +WWW: http://www.dcs.gla.ac.uk/~meurig/TclHaskell/ diff --git a/devel/hs-tclhaskell-ghc/pkg-install.in b/devel/hs-tclhaskell-ghc/pkg-install.in new file mode 100644 index 000000000000..16cbef5544a6 --- /dev/null +++ b/devel/hs-tclhaskell-ghc/pkg-install.in @@ -0,0 +1,22 @@ +#!/bin/sh + +GHC_LIB=$PKG_PREFIX/lib/ghc-GHC_VERSION + +if [ x"$2" = xPOST-INSTALL ]; then +cat << CONFEOF | $PKG_PREFIX/bin/ghc-pkg -a +Package + {name = "TclHaskell", + import_dirs = ["$GHC_LIB/imports/tclhaskell/"], + source_dirs = [], + library_dirs = ["$GHC_LIB/"], + hs_libraries = ["HSTclHaskell"], + extra_libraries = ["tcl83","tk83","HSTclHaskell_cbits"], + include_dirs = ["$GHC_LIB/include"], + c_includes = [], + package_deps = [ "rts","lang","concurrent" ], + extra_ghc_opts = [ "-fglasgow-exts", "-fvia-C" ], + extra_cc_opts = [], + extra_ld_opts = [ "-L$PKG_PREFIX/lib -lncurses" ] +} +CONFEOF +fi diff --git a/devel/hs-tclhaskell-ghc/pkg-plist b/devel/hs-tclhaskell-ghc/pkg-plist new file mode 100644 index 000000000000..cb9ea9167372 --- /dev/null +++ b/devel/hs-tclhaskell-ghc/pkg-plist @@ -0,0 +1,66 @@ +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/ConcTcl.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TrieIO.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclWidgets.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclTrie.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclTime.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclPrimWidgets.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclPrimImpl.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclPrimExports.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclPrimCore.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclPrim.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclHandle.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclGUI.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclConf.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/TclCompatibility.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/Tcl.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/Remover.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/PlacePos.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/GUIMonad.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/ExtArray.hi +lib/ghc-%%GHC_VERSION%%/imports/tclhaskell/Utils.hi +lib/ghc-%%GHC_VERSION%%/libHSTclHaskell.a +lib/ghc-%%GHC_VERSION%%/HSTclHaskell.o +lib/ghc-%%GHC_VERSION%%/libHSTclHaskell_cbits.a +lib/ghc-%%GHC_VERSION%%/HSTclHaskell_cbits.o +%%EXAMPLESDIR%%/licence.txt +%%EXAMPLESDIR%%/demo.txt +%%EXAMPLESDIR%%/makefile +%%EXAMPLESDIR%%/BasicList.hs +%%EXAMPLESDIR%%/BasicMenu.hs +%%EXAMPLESDIR%%/Bounce.hs +%%EXAMPLESDIR%%/Buttons.hs +%%EXAMPLESDIR%%/CheckBut.hs +%%EXAMPLESDIR%%/Citems.hs +%%EXAMPLESDIR%%/Demo.hs +%%EXAMPLESDIR%%/Dialog.hs +%%EXAMPLESDIR%%/EWidgetDemo.hs +%%EXAMPLESDIR%%/Entries.hs +%%EXAMPLESDIR%%/GraphEdit.hs +%%EXAMPLESDIR%%/Hello.hs +%%EXAMPLESDIR%%/Image.hs +%%EXAMPLESDIR%%/Koch.hs +%%EXAMPLESDIR%%/Labels.hs +%%EXAMPLESDIR%%/Logo.hs +%%EXAMPLESDIR%%/Main.hs +%%EXAMPLESDIR%%/Menus.hs +%%EXAMPLESDIR%%/RadioBut.hs +%%EXAMPLESDIR%%/Ted.hs +%%EXAMPLESDIR%%/VertScale.hs +%%EXAMPLESDIR%%/images/ball.gif +%%EXAMPLESDIR%%/images/earth.gif +%%EXAMPLESDIR%%/images/earthris.gif +%%EXAMPLESDIR%%/images/face.bmp +%%EXAMPLESDIR%%/images/gray25.bmp +%%EXAMPLESDIR%%/images/letters.bmp +%%EXAMPLESDIR%%/images/noletter.bmp +%%EXAMPLESDIR%%/images/pattern.bmp +%%EXAMPLESDIR%%/images/tcllogo.gif +%%EXAMPLESDIR%%/images/teapot.ppm +%%PORTDOCS%%%%DOCSDIR%%/usermanual.doc +%%PORTDOCS%%%%DOCSDIR%%/usermanual.html +%%PORTDOCS%%%%DOCSDIR%%/usermanual.pdf +@dirrm lib/ghc-%%GHC_VERSION%%/imports/tclhaskell +@dirrm %%EXAMPLESDIR%%/images +@dirrm %%EXAMPLESDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@unexec ghc-pkg -r TclHaskell |