aboutsummaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-01-02 23:26:47 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-01-02 23:26:47 +0000
commit362d3145b577337e6a4f083cda6b47e4533b6fa9 (patch)
tree62f7437847bdc0d8d359720e3eece6b2d86dff9f /converters
parentdd2f74778bfafceb7bf9b9ce7fae7975faf85075 (diff)
downloadports-362d3145b577337e6a4f083cda6b47e4533b6fa9.tar.gz
ports-362d3145b577337e6a4f083cda6b47e4533b6fa9.zip
Notes
Diffstat (limited to 'converters')
-rw-r--r--converters/Makefile1
-rw-r--r--converters/hs-json/Makefile75
-rw-r--r--converters/hs-json/distinfo3
-rw-r--r--converters/hs-json/pkg-descr10
-rw-r--r--converters/hs-json/pkg-plist21
5 files changed, 110 insertions, 0 deletions
diff --git a/converters/Makefile b/converters/Makefile
index f30166d381e2..ab30862962ef 100644
--- a/converters/Makefile
+++ b/converters/Makefile
@@ -22,6 +22,7 @@
SUBDIR += fpc-iconvenc
SUBDIR += fribidi
SUBDIR += gbase
+ SUBDIR += hs-json
SUBDIR += htx
SUBDIR += i18ntools
SUBDIR += ical2html
diff --git a/converters/hs-json/Makefile b/converters/hs-json/Makefile
new file mode 100644
index 000000000000..a7e5fba283ed
--- /dev/null
+++ b/converters/hs-json/Makefile
@@ -0,0 +1,75 @@
+# New ports collection makefile for: hs-json
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= json
+PORTVERSION= 0.4.3
+CATEGORIES= converters haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= Support for serialising Haskell to and from JSON
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+
+GHC_VERSION= 6.10.4
+HSJSON_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+HSJSON_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ HSJSON_VERSION=${HSJSON_VERSION} \
+ HSJSON_LIBDIR_REL=${HSJSON_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 --hyperlink-source \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif
+
+do-install:
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${HSJSON_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/converters/hs-json/distinfo b/converters/hs-json/distinfo
new file mode 100644
index 000000000000..257212831f88
--- /dev/null
+++ b/converters/hs-json/distinfo
@@ -0,0 +1,3 @@
+MD5 (json-0.4.3.tar.gz) = 1af33c67594f69048b69d4aeafeea03e
+SHA256 (json-0.4.3.tar.gz) = 56192d1e922cc71ad1aaf31baea8ee7e1f1b862f95bc72f60548caee4a484a87
+SIZE (json-0.4.3.tar.gz) = 22575
diff --git a/converters/hs-json/pkg-descr b/converters/hs-json/pkg-descr
new file mode 100644
index 000000000000..936d5b057c6c
--- /dev/null
+++ b/converters/hs-json/pkg-descr
@@ -0,0 +1,10 @@
+JSON (JavaScript Object Notation) is a lightweight data-interchange
+format. It is easy for humans to read and write. It is easy for
+machines to parse and generate. It is based on a subset of the
+JavaScript Programming Language, Standard ECMA-262 3rd Edition -
+December 1999.
+
+This library provides a parser and pretty printer for converting
+between Haskell values and JSON.
+
+WWW: http://hackage.haskell.org/package/json
diff --git a/converters/hs-json/pkg-plist b/converters/hs-json/pkg-plist
new file mode 100644
index 000000000000..e3be3739b6c2
--- /dev/null
+++ b/converters/hs-json/pkg-plist
@@ -0,0 +1,21 @@
+@comment $FreeBSD$
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSjson-%%HSJSON_VERSION%%.o
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON/Generic.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON/Parsec.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON/Pretty.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON/ReadP.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON/String.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON/Types.hi
+%%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSjson-%%HSJSON_VERSION%%.a
+%%HSJSON_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/JSON
+@dirrm %%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text
+@dirrm %%HSJSON_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%HSJSON_LIBDIR_REL%%
+@exec /bin/sh %D/%%HSJSON_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister json
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old