aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-01-04 13:09:10 +0800
committerpgj <pgj@FreeBSD.org>2010-01-04 13:09:10 +0800
commit5a89f1aa782c1d193e2fa1a1f3548085d965dac1 (patch)
treefba8394dd33c8df97e6280adff62c360e4949130 /lang
parentd0f240f92e6899e36f92fbbb44a074944997a469 (diff)
downloadfreebsd-ports-gnome-5a89f1aa782c1d193e2fa1a1f3548085d965dac1.tar.gz
freebsd-ports-gnome-5a89f1aa782c1d193e2fa1a1f3548085d965dac1.tar.zst
freebsd-ports-gnome-5a89f1aa782c1d193e2fa1a1f3548085d965dac1.zip
This is an interpreter of the Unlambda language, written in the pure,
lazy, functional language Haskell. WWW: http://hackage.haskell.org/package/unlambda PR: ports/142278 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/hs-unlambda/Makefile76
-rw-r--r--lang/hs-unlambda/distinfo3
-rw-r--r--lang/hs-unlambda/pkg-descr4
-rw-r--r--lang/hs-unlambda/pkg-plist15
5 files changed, 99 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 7192a6f8e1d2..c1b765cbe22f 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -122,6 +122,7 @@
SUBDIR += hla
SUBDIR += hope
SUBDIR += hs-brainfuck
+ SUBDIR += hs-unlambda
SUBDIR += huc
SUBDIR += hugs
SUBDIR += icc
diff --git a/lang/hs-unlambda/Makefile b/lang/hs-unlambda/Makefile
new file mode 100644
index 000000000000..7c3db24bcb12
--- /dev/null
+++ b/lang/hs-unlambda/Makefile
@@ -0,0 +1,76 @@
+# New ports collection makefile for: hs-unlambda
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= unlambda
+PORTVERSION= 0.1
+CATEGORIES= lang haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= Unlambda interpreter written in Haskell
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+LIB_DEPENDS= gmp.8:${PORTSDIR}/math/libgmp4
+
+GHC_VERSION= 6.10.4
+UNLAMBDA_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+UNLAMBDA_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ UNLAMBDA_VERSION=${UNLAMBDA_VERSION} \
+ UNLAMBDA_LIBDIR_REL=${UNLAMBDA_LIBDIR_REL}
+
+.if defined(NOPORTDOCS)
+PLIST_SUB+= NOPORTDOCS=""
+.else
+PLIST_SUB+= NOPORTDOCS="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+
+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= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION}
+
+PORTDOCS= *
+.endif
+
+.SILENT:
+
+do-configure:
+ cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
+ && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX}
+
+do-build:
+ cd ${WRKSRC} && ${SETUP_CMD} build \
+ && ${SETUP_CMD} register --gen-script
+
+.if !defined(NOPORTDOCS)
+ cd ${WRKSRC} && ${SETUP_CMD} haddock --executables --hyperlink-source \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif
+
+do-install:
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${UNLAMBDA_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/lang/hs-unlambda/distinfo b/lang/hs-unlambda/distinfo
new file mode 100644
index 000000000000..a5c3fcc85bcf
--- /dev/null
+++ b/lang/hs-unlambda/distinfo
@@ -0,0 +1,3 @@
+MD5 (unlambda-0.1.tar.gz) = 2d31c90b3888043b8de77bb87f88bfcb
+SHA256 (unlambda-0.1.tar.gz) = f1ede8570bd18c4947d776c68d429a9e86559f141b0aed4614dfa8bf0b2fb676
+SIZE (unlambda-0.1.tar.gz) = 9275
diff --git a/lang/hs-unlambda/pkg-descr b/lang/hs-unlambda/pkg-descr
new file mode 100644
index 000000000000..9c1aee34f9ba
--- /dev/null
+++ b/lang/hs-unlambda/pkg-descr
@@ -0,0 +1,4 @@
+This is an interpreter of the Unlambda language,
+written in the pure, lazy, functional language Haskell.
+
+WWW: http://hackage.haskell.org/package/unlambda
diff --git a/lang/hs-unlambda/pkg-plist b/lang/hs-unlambda/pkg-plist
new file mode 100644
index 000000000000..48043fa86df0
--- /dev/null
+++ b/lang/hs-unlambda/pkg-plist
@@ -0,0 +1,15 @@
+@comment $FreeBSD$
+bin/unlambda
+%%UNLAMBDA_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSunlambda-%%UNLAMBDA_VERSION%%.o
+%%UNLAMBDA_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Unlambda.hi
+%%UNLAMBDA_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSunlambda-%%UNLAMBDA_VERSION%%.a
+%%UNLAMBDA_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%UNLAMBDA_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language
+@dirrm %%UNLAMBDA_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%UNLAMBDA_LIBDIR_REL%%
+@exec /bin/sh %D/%%UNLAMBDA_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister unlambda
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old