aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ghc
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ghc')
-rw-r--r--lang/ghc/bsd.cabal.mk267
-rw-r--r--lang/ghc/bsd.hackage.mk116
2 files changed, 383 insertions, 0 deletions
diff --git a/lang/ghc/bsd.cabal.mk b/lang/ghc/bsd.cabal.mk
new file mode 100644
index 000000000000..3429a1ba80e1
--- /dev/null
+++ b/lang/ghc/bsd.cabal.mk
@@ -0,0 +1,267 @@
+#
+# $FreeBSD$
+#
+# bsd.cabal.mk -- Support for ports based on Haskell Cabal.
+#
+# Created by: Gabor Pali <pgj@FreeBSD.org>,
+# Based on works of Giuseppe Pilichi and Ashish Shukla.
+#
+# Maintained by: haskell@FreeBSD.org
+#
+
+MASTER_SITES?= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX?= hs-
+
+.if !defined(DOCUMENTATION) && \
+ (${PORTNAME} == haddock || ${PORTNAME} == ghc-paths || ${PORTNAME} == hscolour)
+NOPORTDOCS= yes
+.endif
+
+.if defined(NOPORTDOCS) && defined(DOCUMENTATION)
+IGNORE+= is a documentation-only port, do not install if no documentation needed
+.endif
+
+.if !defined(SLAVE) && !defined(DOCUMENTATION)
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+.endif
+
+.if defined(SLAVE)
+NO_PKG_REGISTER=
+.endif
+
+GHC_VERSION?= 6.10.4
+
+GHC_CMD?= ${LOCALBASE}/bin/ghc
+CABAL_SETUP?= Setup.lhs
+SETUP_CMD?= ./setup
+
+DATADIR= ${PREFIX}/share/${DISTNAME}
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+EXAMPLESDIR= ${PREFIX}/share/examples/${DISTNAME}
+
+LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ PORTNAME=${PORTNAME} \
+ PORTVERSION=${PORTVERSION} \
+ LIBDIR_REL=${LIBDIR_REL}
+
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CPPFLAGS+= -I${LOCALBASE}/include
+
+INSTALL_PORTDATA?=
+INSTALL_PORTEXAMPLES?=
+
+.if defined(USE_ALEX)
+BUILD_DEPENDS+= ${LOCALBASE}/bin/alex:${PORTSDIR}/devel/hs-alex
+.endif
+
+.if defined(USE_HAPPY)
+BUILD_DEPENDS+= ${LOCALBASE}/bin/happy:${PORTSDIR}/devel/hs-happy
+.endif
+
+.if defined(EXECUTABLE)
+LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
+.endif
+
+.if defined(EXECUTABLE) || defined(DOCUMENTATION)
+HADDOCK_EXE?= --executables
+.endif
+
+.if defined(DOCUMENTATION)
+
+.if defined(PORTREVISION) && ${PORTREVISION} != 0
+_SUF1= _${PORTREVISION}
+.endif
+
+.if defined(PORTEPOCH) && ${PORTEPOCH} != 0
+_SUF2= ,${PORTEPOCH}
+.endif
+
+PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
+
+PKGNAMESUFFIX= -docs
+USE_HACKAGE+= ${PORTNAME}==${PKGVERSION}
+.endif
+
+.if !defined(SLAVE)
+.if defined(USE_HACKAGE)
+.include "bsd.hackage.mk"
+
+.for hackage in ${USE_HACKAGE}
+__u_h_r_package= ${hackage:C/[<=>].*$//g}
+__u_h_r_port= ${${__u_h_r_package}_port}
+__u_h_r_name= ${__u_h_r_port:C/.*\///g}
+
+.if ${__u_h_r_package} == ${hackage}
+__u_h_r_version:= >=0
+.else
+__u_h_r_version:= ${hackage:C/^[^<=>]*//g}
+.endif
+
+dependencies:= ${dependencies} \
+${__u_h_r_name}${__u_h_r_version}:${PORTSDIR}/${__u_h_r_port}
+.endfor
+
+.if !defined(DOCUMENTATION)
+BUILD_DEPENDS+= ${dependencies}
+.endif
+.if !defined(STANDALONE)
+RUN_DEPENDS+= ${dependencies}
+.endif
+
+.endif
+.endif
+
+.if defined(NOPORTDOCS)
+PLIST_SUB+= NOPORTDOCS=""
+.else
+PLIST_SUB+= NOPORTDOCS="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+.if !defined(XMLDOCS) || defined(DOCUMENTATION)
+PORT_HADDOCK!= (cd ${.CURDIR}/../../lang/ghc && ${MAKE} -V PORT_HADDOCK)
+.if !empty(PORT_HADDOCK:M?0)
+BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
+.endif
+
+BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour
+
+HSCOLOUR_VERSION= 1.15
+HSCOLOUR_DATADIR= ${LOCALBASE}/share/hscolour-${HSCOLOUR_VERSION}
+
+.endif
+
+.if defined(XMLDOCS)
+BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/html:${PORTSDIR}/textproc/docbook-xsl \
+ ${LOCALBASE}/bin/xsltproc:${PORTSDIR}/textproc/libxslt
+
+USE_GMAKE= yes
+
+.endif # !XMLDOCS
+
+.if !defined(DOCUMENTATION)
+PORTDOCS= *
+.else
+PORTDOCS= html
+
+.if !empty(XMLDOCS)
+.for xmldoc in ${XMLDOCS}
+PORTDOCS+= ${xmldoc:C/^.*://g}
+.endfor
+.endif
+
+.endif # !DOCUMENTATION
+
+.endif # !NOPORTDOCS
+
+.if defined(PORTDATA) && defined(NOPORTDATA)
+__handle_datadir__= --datadir='' --datasubdir='' --docdir='${DOCSDIR}'
+.else
+__handle_datadir__=
+.endif
+
+MAN1SRC?= man/man1
+
+
+.if (!defined(XMLDOCS) || defined(DOCUMENTATION)) && !defined(NOPORTDOCS)
+CONFIGURE_ARGS+= --haddock-options=-w
+.endif
+
+.SILENT:
+
+post-patch:
+.if defined(XMLDOCS) && defined(USE_AUTOTOOLS)
+ @${REINPLACE_CMD} -e 's|/usr/local/share/xsl/docbook|${LOCALBASE}/share/xsl/docbook|' \
+ ${WRKSRC}/doc/configure.ac
+.endif
+
+do-configure:
+ cd ${WRKSRC} && ${GHC_CMD} --make ${CABAL_SETUP} -o setup -package Cabal
+ cd ${WRKSRC} && ${SETENV} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" \
+ ${SETUP_CMD} configure --ghc --prefix=${PREFIX} --extra-include-dirs="${LOCALBASE}/include" --extra-lib-dirs="${LOCALBASE}/lib" ${__handle_datadir__} ${CONFIGURE_ARGS}
+
+.if !defined(NOPORTDOCS)
+.if defined(XMLDOCS) && defined(USE_AUTOTOOLS)
+ cd ${WRKSRC}/doc && ${AUTOCONF} && ./configure --prefix=${PREFIX}
+.endif
+.endif # !NOPORTDOCS
+
+do-build:
+.if !defined(DOCUMENTATION)
+ cd ${WRKSRC} && ${SETUP_CMD} build
+.if !defined(SLAVE) && !defined(STANDALONE)
+ cd ${WRKSRC} && ${SETUP_CMD} register --gen-script
+.endif
+.endif # !DOCUMENTATION
+
+.if !defined(NOPORTDOCS)
+.if (!defined(XMLDOCS) && !defined(STANDALONE)) || defined(DOCUMENTATION)
+ cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source ${HADDOCK_EXE} \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif # STANDALONE
+.if defined(XMLDOCS)
+ @(cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} html)
+.endif # XMLDOCS
+.endif # !NOPORTDOCS
+
+do-install:
+.if !defined(DOCUMENTATION)
+ cd ${WRKSRC} && ${SETUP_CMD} install
+
+.if !defined(SLAVE) && !defined(STANDALONE)
+ cd ${WRKSRC} && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${LIBDIR_REL}/register.sh
+.endif
+
+.if !empty(INSTALL_PORTDATA) && !defined(NOPORTDATA)
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_PORTDATA}
+.endif
+
+.if !empty(INSTALL_PORTEXAMPLES) && !defined(NOPORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_PORTEXAMPLES}
+.endif
+
+.if defined(MAN1)
+.for man in ${MAN1}
+ @${INSTALL_MAN} ${WRKSRC}/${MAN1SRC}/${man} ${PREFIX}/man/man1
+.endfor
+.endif # MAN1
+
+.else
+
+ @(cd ${WRKSRC}/dist/doc/html/${PORTNAME} && ${COPYTREE_SHARE} \* ${DOCSDIR}/html)
+
+.endif # !DOCUMENTATION
+
+.if !defined(NOPORTDOCS)
+.if !empty(XMLDOCS)
+.for xmldoc in ${XMLDOCS}
+ @(cd ${WRKSRC}/${xmldoc:C/:.*$//g} && ${COPYTREE_SHARE} \* ${DOCSDIR}/${xmldoc:C/^.*://g})
+.endfor
+.endif # XMLDOCS
+.endif
+
+post-install:
+.if !defined(SLAVE) && !defined(STANDALONE) && !defined(DOCUMENTATION)
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+.endif
+
+.if defined(EXECUTABLE)
+.for exe in ${EXECUTABLE}
+ @${STRIP_CMD} ${PREFIX}/bin/${exe}
+ @${CHMOD} ${BINMODE} ${PREFIX}/bin/${exe}
+.endfor
+.endif # EXECUTABLE
+
+.if defined(SHOW_PKGMSG)
+ @${ECHO_MSG} -e "\a"
+ @${ECHO_MSG} "================================================================="
+ @${CAT} "${PKGMESSAGE}"
+ @${ECHO_MSG} "================================================================="
+ @${ECHO_MSG}
+.endif # SHOW_PKGMSG
diff --git a/lang/ghc/bsd.hackage.mk b/lang/ghc/bsd.hackage.mk
new file mode 100644
index 000000000000..a3a183fc4ca8
--- /dev/null
+++ b/lang/ghc/bsd.hackage.mk
@@ -0,0 +1,116 @@
+#
+# $FreeBSD$
+#
+# bsd.hackage.mk -- List of Haskell Cabal ports.
+#
+# Created by: Gabor Pali <pgj@FreeBSD.org>,
+# Based on works of Giuseppe Pilichi and Ashish Shukla.
+#
+# Maintained by: haskell@FreeBSD.org
+#
+
+# KEEP THE LIST ALPHABETICALLY SORTED!
+
+alex_port= devel/hs-alex # executable
+Agda_port= math/hs-Agda # executable
+Agda-executable_port= math/hs-Agda-executable # executable
+ALUT_port= audio/hs-ALUT
+arrows_port= devel/hs-arrows
+binary_port= devel/hs-binary-ghc
+bio_port= science/hs-bio
+brainfuck_port= lang/hs-brainfuck # executable
+bytestring-csv_port= textproc/hs-bytestring-csv
+c2hs_port= devel/c2hs # exectuable
+category-extras_port= math/hs-category-extras
+cgi_port= www/hs-cgi
+checkers_port= devel/hs-checkers
+convertible_port= devel/hs-convertible
+cpphs_port= devel/hs-cpphs # executable
+criterion_port= benchmarks/hs-criterion
+datetime_port= devel/hs-datetime
+DeepArrow_port= devel/hs-DeepArrow
+deepseq_port= devel/hs-deepseq
+Diff_port= textproc/hs-Diff
+digest_port= security/hs-digest-ghc
+dlist_port= devel/hs-dlist
+erf_port= math/hs-erf
+fastcgi_port= www/hs-fastcgi # lib_depends
+feed_port= textproc/hs-feed
+fgl_port= devel/hs-fgl
+FileManip_port= devel/hs-FileManip
+ghc-mtl_port= devel/hs-ghc-mtl
+ghc-paths_port= devel/hs-ghc-paths
+GLURaw_port= x11-toolkits/hs-GLURaw-ghc
+GLUT_port= x11-toolkits/hs-glut-ghc
+haddock_port= devel/hs-haddock # executable
+happy_port= devel/hs-happy # executable
+haskeline_port= devel/hs-haskeline
+haskell-src-exts_port= devel/hs-haskell-src-exts
+HaXml_port= textproc/hs-haxml # executable
+HGL_port= graphics/hs-HGL-ghc
+highlighting-kate_port= textproc/hs-highlighting-kate-ghc
+hint_port= devel/hs-hint
+hoogle_port= devel/hs-hoogle # executable
+hscolour_port= print/hs-hscolour # executable
+hslogger_port= devel/hs-hslogger
+HTTP_port= www/hs-HTTP
+http-server_port= www/hs-http-server
+json_port= converters/hs-json
+language-c_port= devel/hs-language-c-ghc
+lazysmallcheck_port= devel/hs-lazysmallcheck-ghc
+MemoTrie_port= devel/hs-MemoTrie
+mime_port= mail/hs-mime
+MissingH_port= devel/hs-MissingH
+mmap_port= devel/hs-mmap
+MonadCatchIO-mtl_port= devel/hs-MonadCatchIO-mtl
+mueval_port= devel/hs-mueval # executable
+mwc-random_port= math/hs-mwc-random
+ObjectName_port= devel/hs-ObjectName
+oeis_port= www/hs-oeis
+OpenAL_port= audio/hs-OpenAL
+OpenGL_port= x11-toolkits/hs-opengl-ghc
+OpenGLRaw_port= x11-toolkits/hs-OpenGLRaw-ghc
+pandoc_port= textproc/pandoc # executable
+pcre-light_port= devel/hs-pcre-light-ghc # lib_depends
+polyparse_port= textproc/hs-polyparse-ghc
+porte_port= ports-mgmt/porte # executable
+probability_port= math/hs-probability
+QuickCheck_port= devel/hs-QuickCheck
+reactive_port= devel/hs-reactive
+readline_port= devel/hs-readline
+safe_port= devel/hs-safe
+scgi_port= www/hs-scgi
+SHA_port= security/hs-SHA
+show_port= devel/hs-show
+smallcheck_port= devel/hs-smallcheck
+split_port= devel/hs-split
+StateVar_port= devel/hs-StateVar
+statistics_port= math/hs-statistics
+Stream_port= devel/hs-Stream
+stringsearch_port= textproc/hs-stringsearch
+tagsoup_port= textproc/hs-tagsoup # executable
+Tensor_port= devel/hs-Tensor
+testpack_port= devel/hs-testpack
+texmath_port= textproc/hs-texmath # executable
+transformers_port= devel/hs-transformers
+TypeCompose_port= devel/hs-TypeCompose
+unamb_port= devel/hs-unamb
+uniplate_port= devel/hs-uniplate
+unix-compat_port= devel/hs-unix-compat
+unlambda_port= lang/hs-unlambda # executable
+url_port= www/hs-url
+utf8-string_port= devel/hs-utf8-string-ghc
+utility-ht_port= devel/hs-utility-ht
+uuagc_port= devel/hs-uuagc # executable
+uulib_port= devel/hs-uulib
+uvector_port= devel/hs-uvector
+uvector-algorithms_port= devel/hs-uvector-algorithms
+vector-space_port= math/hs-vector-space
+X11_port= x11/hs-x11-ghc # lib_depends
+X11-xft_port= x11/hs-x11-xft-ghc
+xml_port= textproc/hs-xml
+xmobar_port= x11/xmobar # executable
+xmonad_port= x11-wm/xmonad # executable
+xmonad-contrib_port= x11-wm/xmonad-contrib
+zip-archive_port= archivers/hs-zip-archive-ghc
+zlib_port= archivers/hs-zlib