aboutsummaryrefslogtreecommitdiff
path: root/devel/hs-readline
diff options
context:
space:
mode:
Diffstat (limited to 'devel/hs-readline')
-rw-r--r--devel/hs-readline/Makefile74
-rw-r--r--devel/hs-readline/distinfo3
-rw-r--r--devel/hs-readline/files/patch-Setup.hs8
-rw-r--r--devel/hs-readline/pkg-descr4
-rw-r--r--devel/hs-readline/pkg-plist19
5 files changed, 108 insertions, 0 deletions
diff --git a/devel/hs-readline/Makefile b/devel/hs-readline/Makefile
new file mode 100644
index 000000000000..c509bedbb5e1
--- /dev/null
+++ b/devel/hs-readline/Makefile
@@ -0,0 +1,74 @@
+# New ports collection makefile for: hs-readline
+# Date created: July 09 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+
+PORTNAME= readline
+PORTVERSION= 1.0.1.0
+CATEGORIES= devel haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= Haskell interface to the GNU readline library
+
+BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+
+GHC_VERSION= 6.10.4
+HSREADLINE_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+HSREADLINE_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ HSREADLINE_VERSION=${HSREADLINE_VERSION} \
+ HSREADLINE_LIBDIR_REL=${HSREADLINE_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.13
+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}/${HSREADLINE_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/devel/hs-readline/distinfo b/devel/hs-readline/distinfo
new file mode 100644
index 000000000000..70db17e19cba
--- /dev/null
+++ b/devel/hs-readline/distinfo
@@ -0,0 +1,3 @@
+MD5 (readline-1.0.1.0.tar.gz) = eade9576def53ed293628a2f8580007e
+SHA256 (readline-1.0.1.0.tar.gz) = 07f2f039f32bf18838a4875d0f3caa3ed9436dd52b962b2061f0bb8a3316fa1d
+SIZE (readline-1.0.1.0.tar.gz) = 52394
diff --git a/devel/hs-readline/files/patch-Setup.hs b/devel/hs-readline/files/patch-Setup.hs
new file mode 100644
index 000000000000..cc3d6bccc53c
--- /dev/null
+++ b/devel/hs-readline/files/patch-Setup.hs
@@ -0,0 +1,8 @@
+--- Setup.hs.orig 2009-07-16 09:03:11.000000000 +0000
++++ Setup.hs 2009-07-16 09:03:29.000000000 +0000
+@@ -3,4 +3,4 @@
+ import Distribution.Simple
+
+ main :: IO ()
+-main = defaultMainWithHooks defaultUserHooks
++main = defaultMainWithHooks autoconfUserHooks
diff --git a/devel/hs-readline/pkg-descr b/devel/hs-readline/pkg-descr
new file mode 100644
index 000000000000..c80da8f32ec9
--- /dev/null
+++ b/devel/hs-readline/pkg-descr
@@ -0,0 +1,4 @@
+An interface to the GNU readline library. More information on readline can be
+found at <http://www.gnu.org/directory/readline.html>.
+
+WWW: http://hackage.haskell.org/package/readline
diff --git a/devel/hs-readline/pkg-plist b/devel/hs-readline/pkg-plist
new file mode 100644
index 000000000000..3e1414d88292
--- /dev/null
+++ b/devel/hs-readline/pkg-plist
@@ -0,0 +1,19 @@
+@comment $FreeBSD$
+%%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSreadline-%%HSREADLINE_VERSION%%.o
+%%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Console/Readline.hi
+%%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Console/SimpleLineEditor.hi
+%%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsReadline.h
+%%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsReadlineConfig.h
+%%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSreadline-%%HSREADLINE_VERSION%%.a
+%%HSREADLINE_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include
+@dirrm %%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Console
+@dirrm %%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System
+@dirrm %%HSREADLINE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%HSREADLINE_LIBDIR_REL%%
+@exec /bin/sh %D/%%HSREADLINE_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister readline
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old