summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjmmv <jmmv>2006-08-03 18:50:32 +0000
committerjmmv <jmmv>2006-08-03 18:50:32 +0000
commitf92d60798f92a52675d6b58219e4629c18c74e81 (patch)
tree226e78ca35baf5d1fb25faf31d8ac9df9951a6c7 /lang
parent186517547ae65076032fd0fa594bf9491e065179 (diff)
downloadpkgsrc-f92d60798f92a52675d6b58219e4629c18c74e81.tar.gz
Add a buildlink3.mk file and a package.mk file both aimed at making easy
the creation of packages for Hugs modules libraries. The former provides the dependency on hugs and the latter an easy way to launch the Cabal build utility.
Diffstat (limited to 'lang')
-rw-r--r--lang/hugs/buildlink3.mk18
-rw-r--r--lang/hugs/package.mk36
2 files changed, 54 insertions, 0 deletions
diff --git a/lang/hugs/buildlink3.mk b/lang/hugs/buildlink3.mk
new file mode 100644
index 00000000000..777f71f856a
--- /dev/null
+++ b/lang/hugs/buildlink3.mk
@@ -0,0 +1,18 @@
+# $NetBSD: buildlink3.mk,v 1.1 2006/08/03 18:50:32 jmmv Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+HUGS98_BUILDLINK3_MK:= ${HUGS98_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= hugs98
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nhugs98}
+BUILDLINK_PACKAGES+= hugs98
+
+.if ${HUGS98_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.hugs98+= hugs98>=200605
+BUILDLINK_PKGSRCDIR.hugs98?= ../../lang/hugs
+.endif # HUGS98_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/lang/hugs/package.mk b/lang/hugs/package.mk
new file mode 100644
index 00000000000..f56414f9b2a
--- /dev/null
+++ b/lang/hugs/package.mk
@@ -0,0 +1,36 @@
+# $NetBSD: package.mk,v 1.1 2006/08/03 18:50:32 jmmv Exp $
+#
+
+PKGNAME= hugs98-${DISTNAME}
+MASTER_SITES= http://cvs.haskell.org/Hugs/downloads/2006-05/packages/
+
+COMMENT+= (Hugs package)
+
+HUGS_RUN= ${BUILDLINK_PREFIX.hugs98}/bin/runhugs
+HUGS_CPPHS= ${BUILDLINK_PREFIX.hugs98}/bin/cpphs-hugs
+HUGS_HSC2HS= ${BUILDLINK_PREFIX.hugs98}/bin/hsc2hs-hugs
+
+PRINT_PLIST_AWK+= /^@dirrm lib\/hugs\/packages$$/ \
+ { print "@comment in hugs: " $$0; next }
+
+
+.include "../../lang/hugs/buildlink3.mk"
+
+do-configure:
+ cd ${WRKSRC} && ${HUGS_RUN} -98 Setup.hs \
+ configure \
+ --verbose \
+ --prefix=${PREFIX:Q} \
+ --hugs \
+ --with-cpphs=${HUGS_CPPHS:Q} \
+ --with-hsc2hs=${HUGS_HSC2HS:Q}
+
+do-build:
+ cd ${WRKSRC} && ${HUGS_RUN} -98 Setup.hs \
+ build \
+ --verbose
+
+do-install:
+ cd ${WRKSRC} && ${HUGS_RUN} -98 Setup.hs \
+ install \
+ --verbose