aboutsummaryrefslogtreecommitdiffstats
path: root/converters/hs-json
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-01-03 07:26:47 +0800
committerpgj <pgj@FreeBSD.org>2010-01-03 07:26:47 +0800
commitd77161832fc531e1f4248799d48a3476e7970002 (patch)
tree860d434b2d201b722dbf7c0d58b9cb000a707104 /converters/hs-json
parent4ceb8d9ade95422b2bac7de6e9e8ee415e5183c2 (diff)
downloadfreebsd-ports-gnome-d77161832fc531e1f4248799d48a3476e7970002.tar.gz
freebsd-ports-gnome-d77161832fc531e1f4248799d48a3476e7970002.tar.zst
freebsd-ports-gnome-d77161832fc531e1f4248799d48a3476e7970002.zip
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 PR: ports/142184 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Diffstat (limited to 'converters/hs-json')
-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
4 files changed, 109 insertions, 0 deletions
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