aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-05-23 06:41:50 +0800
committerpgj <pgj@FreeBSD.org>2010-05-23 06:41:50 +0800
commit2895aa97338047cd559fa9bd0586d799dc99f03a (patch)
treea9dc08da2736702569cfb9ffc12399651e8a5377
parent988bcdfc0bbcd3a778a48fcbb719810254fb1fba (diff)
downloadfreebsd-ports-gnome-2895aa97338047cd559fa9bd0586d799dc99f03a.tar.gz
freebsd-ports-gnome-2895aa97338047cd559fa9bd0586d799dc99f03a.tar.zst
freebsd-ports-gnome-2895aa97338047cd559fa9bd0586d799dc99f03a.zip
- Fix OPTIONS support for Cabal ports by introducing
bsd.cabal.options.mk - Fix ports broken with non-default options Triggered by: Yuri Pankov <yuri.pankov@gmail.com>
-rw-r--r--archivers/hs-zip-archive-ghc/Makefile1
-rw-r--r--archivers/hs-zip-archive/Makefile1
-rw-r--r--converters/hs-dataenc/Makefile2
-rw-r--r--devel/darcs/Makefile1
-rw-r--r--devel/hs-ansi-terminal/Makefile1
-rw-r--r--devel/hs-ansi-wl-pprint/Makefile1
-rw-r--r--devel/hs-darcs/Makefile1
-rw-r--r--devel/hs-hashed-storage/Makefile2
-rw-r--r--lang/ghc/bsd.cabal.options.mk11
-rw-r--r--security/hs-SHA/Makefile2
-rw-r--r--textproc/hs-citeproc-hs/Makefile1
-rw-r--r--textproc/hs-highlighting-kate-ghc/Makefile3
-rw-r--r--textproc/hs-highlighting-kate/Makefile3
-rw-r--r--textproc/hs-pandoc/Makefile3
-rw-r--r--textproc/hs-pandoc/pkg-plist1
-rw-r--r--textproc/hs-tagsoup/Makefile1
-rw-r--r--textproc/pandoc/Makefile3
-rw-r--r--textproc/pandoc/pkg-plist1
-rw-r--r--x11-wm/hs-xmonad-contrib/Makefile5
-rw-r--r--x11-wm/xmonad-contrib/Makefile5
-rw-r--r--x11/hs-X11/Makefile9
-rw-r--r--x11/hs-x11-ghc/Makefile9
22 files changed, 53 insertions, 14 deletions
diff --git a/archivers/hs-zip-archive-ghc/Makefile b/archivers/hs-zip-archive-ghc/Makefile
index 61d5bf92409a..2d9e6e07f795 100644
--- a/archivers/hs-zip-archive-ghc/Makefile
+++ b/archivers/hs-zip-archive-ghc/Makefile
@@ -17,6 +17,7 @@ USE_HACKAGE= binary digest>=0.0.0.1 utf8-string>=0.3.1 zlib
OPTIONS= EXECUTABLE "Build the Zip executable" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_EXECUTABLE)
diff --git a/archivers/hs-zip-archive/Makefile b/archivers/hs-zip-archive/Makefile
index 61d5bf92409a..2d9e6e07f795 100644
--- a/archivers/hs-zip-archive/Makefile
+++ b/archivers/hs-zip-archive/Makefile
@@ -17,6 +17,7 @@ USE_HACKAGE= binary digest>=0.0.0.1 utf8-string>=0.3.1 zlib
OPTIONS= EXECUTABLE "Build the Zip executable" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_EXECUTABLE)
diff --git a/converters/hs-dataenc/Makefile b/converters/hs-dataenc/Makefile
index 00283c6059cf..85233b72767e 100644
--- a/converters/hs-dataenc/Makefile
+++ b/converters/hs-dataenc/Makefile
@@ -16,10 +16,12 @@ CABAL_SETUP= Setup.hs
OPTIONS= BUILDTESTS "Build unit and quickcheck tests" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_BUILDTESTS)
CONFIGURE_ARGS+= --flags="BuildTests"
+USE_HACKAGE+= QuickCheck>=2.1.0.0 test-framework test-framework-hunit test-framework-quickcheck2
EXECUTABLE+= tests
PLIST_SUB+= MAYBE_BUILDTESTS=""
.else
diff --git a/devel/darcs/Makefile b/devel/darcs/Makefile
index 4e9cce17d02d..70ad11a8774b 100644
--- a/devel/darcs/Makefile
+++ b/devel/darcs/Makefile
@@ -31,6 +31,7 @@ OPTIONS= CURL "Use libcurl for HTTP support" on \
MMAP "Compile with mmap support" off \
TEST "Compile unit tests" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_CURL)
diff --git a/devel/hs-ansi-terminal/Makefile b/devel/hs-ansi-terminal/Makefile
index c9a6cf21e0ee..cb27705e649d 100644
--- a/devel/hs-ansi-terminal/Makefile
+++ b/devel/hs-ansi-terminal/Makefile
@@ -14,6 +14,7 @@ COMMENT= Simple ANSI terminal support, with Windows compatibility
OPTIONS= EXAMPLE "Build the example application" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_EXAMPLE)
diff --git a/devel/hs-ansi-wl-pprint/Makefile b/devel/hs-ansi-wl-pprint/Makefile
index 8255d47bf323..ce9bd2dbe55a 100644
--- a/devel/hs-ansi-wl-pprint/Makefile
+++ b/devel/hs-ansi-wl-pprint/Makefile
@@ -16,6 +16,7 @@ USE_HACKAGE= ansi-terminal>=0.4.0
OPTIONS= EXAMPLE "Build the example application" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_EXAMPLE)
diff --git a/devel/hs-darcs/Makefile b/devel/hs-darcs/Makefile
index 4e9cce17d02d..70ad11a8774b 100644
--- a/devel/hs-darcs/Makefile
+++ b/devel/hs-darcs/Makefile
@@ -31,6 +31,7 @@ OPTIONS= CURL "Use libcurl for HTTP support" on \
MMAP "Compile with mmap support" off \
TEST "Compile unit tests" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_CURL)
diff --git a/devel/hs-hashed-storage/Makefile b/devel/hs-hashed-storage/Makefile
index deff1a5b20b6..ef4a5f0a092f 100644
--- a/devel/hs-hashed-storage/Makefile
+++ b/devel/hs-hashed-storage/Makefile
@@ -18,10 +18,12 @@ USE_HACKAGE= binary dataenc mmap>=0.5 zlib
OPTIONS= TEST "Build tests" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_TEST)
CONFIGURE_ARGS+= --flags="test"
+USE_HACKAGE+= test-framework test-framework-hunit test-framework-quickcheck2 QuickCheck>=2.0.0.0 zip-archive
EXECUTABLE+= hashed-storage-test
PLIST_SUB+= MAYBE_TEST=""
.else
diff --git a/lang/ghc/bsd.cabal.options.mk b/lang/ghc/bsd.cabal.options.mk
new file mode 100644
index 000000000000..438f371c28f8
--- /dev/null
+++ b/lang/ghc/bsd.cabal.options.mk
@@ -0,0 +1,11 @@
+#
+# $FreeBSD$
+#
+# bsd.cabal.options.mk -- Support options for ports based on Haskell Cabal.
+#
+# Created by: Gabor Pali <pgj@FreeBSD.org>
+#
+# Maintained by: haskell@FreeBSD.org
+#
+
+PKGNAMEPREFIX?= hs-
diff --git a/security/hs-SHA/Makefile b/security/hs-SHA/Makefile
index 6ee57fb40da4..84a2cb48c164 100644
--- a/security/hs-SHA/Makefile
+++ b/security/hs-SHA/Makefile
@@ -19,10 +19,12 @@ USE_HACKAGE= binary
OPTIONS= TEST "Build the SHA test suite" off \
EXE "Build a SHA2-384 executable similar to 'md5sum'" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_TEST)
CONFIGURE_ARGS+= --flags="Test"
+USE_HACKAGE+= QuickCheck>=2.0.0.0
EXECUTABLE+= test_sha
PLIST_SUB+= MAYBE_TEST=""
.else
diff --git a/textproc/hs-citeproc-hs/Makefile b/textproc/hs-citeproc-hs/Makefile
index 00996428c1f0..e2e991bf7606 100644
--- a/textproc/hs-citeproc-hs/Makefile
+++ b/textproc/hs-citeproc-hs/Makefile
@@ -18,6 +18,7 @@ PORTDATA= *
OPTIONS= BIBUTILS "Use Chris Putnam's Bibutils" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_BIBUTILS)
diff --git a/textproc/hs-highlighting-kate-ghc/Makefile b/textproc/hs-highlighting-kate-ghc/Makefile
index d3b1f0a9fb7b..bcf28714b49a 100644
--- a/textproc/hs-highlighting-kate-ghc/Makefile
+++ b/textproc/hs-highlighting-kate-ghc/Makefile
@@ -17,11 +17,12 @@ USE_HACKAGE= pcre-light
OPTIONS= EXECUTABLE "Build the Highlight executable" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_EXECUTABLE)
CONFIGURE_ARGS+= --flags="executable"
-EXECUTABLE+= Highlighting
+EXECUTABLE+= Highlight
PLIST_SUB+= MAYBE_EXECUTABLE=""
.else
CONFIGURE_ARGS+= --flags="-executable"
diff --git a/textproc/hs-highlighting-kate/Makefile b/textproc/hs-highlighting-kate/Makefile
index d3b1f0a9fb7b..bcf28714b49a 100644
--- a/textproc/hs-highlighting-kate/Makefile
+++ b/textproc/hs-highlighting-kate/Makefile
@@ -17,11 +17,12 @@ USE_HACKAGE= pcre-light
OPTIONS= EXECUTABLE "Build the Highlight executable" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_EXECUTABLE)
CONFIGURE_ARGS+= --flags="executable"
-EXECUTABLE+= Highlighting
+EXECUTABLE+= Highlight
PLIST_SUB+= MAYBE_EXECUTABLE=""
.else
CONFIGURE_ARGS+= --flags="-executable"
diff --git a/textproc/hs-pandoc/Makefile b/textproc/hs-pandoc/Makefile
index 941804ba49de..7d604d9e5e64 100644
--- a/textproc/hs-pandoc/Makefile
+++ b/textproc/hs-pandoc/Makefile
@@ -26,6 +26,7 @@ OPTIONS= HIGHLIGHTING "Compile in support for syntax highlighting" off \
LIBRARY "Build the pandoc library" on \
CITEPROC "Compile in support for citeproc-hs" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_HIGHLIGHTING)
@@ -74,8 +75,10 @@ IGNORE= cannot be compiled in this configuration. Please (re)run 'make config'
.if defined(WITH_CITEPROC)
CONFIGURE_ARGS+= --flags="citeproc"
USE_HACKAGE+= citeproc-hs
+PLIST_SUB+= MAYBE_CITEPROC=""
.else
CONFIGURE_ARGS+= --flags="-citeproc"
+PLIST_SUB+= MAYBE_CITEPROC="@comment "
.endif
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
diff --git a/textproc/hs-pandoc/pkg-plist b/textproc/hs-pandoc/pkg-plist
index 0f186a4140ea..6855f3c090ee 100644
--- a/textproc/hs-pandoc/pkg-plist
+++ b/textproc/hs-pandoc/pkg-plist
@@ -3,6 +3,7 @@
%%MAYBE_EXECUTABLE%%bin/pandoc
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Paths_pandoc.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc.hi
+%%MAYBE_LIBRARY%%%%MAYBE_CITEPROC%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/Biblio.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/Blocks.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/CharacterReferences.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/Definition.hi
diff --git a/textproc/hs-tagsoup/Makefile b/textproc/hs-tagsoup/Makefile
index 44f9bf9ad9c5..771d2712eb51 100644
--- a/textproc/hs-tagsoup/Makefile
+++ b/textproc/hs-tagsoup/Makefile
@@ -20,6 +20,7 @@ INSTALL_PORTDATA= cd ${WRKSRC} && \
OPTIONS= TESTPROG "Build the test program" on
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_TESTPROG)
diff --git a/textproc/pandoc/Makefile b/textproc/pandoc/Makefile
index 941804ba49de..7d604d9e5e64 100644
--- a/textproc/pandoc/Makefile
+++ b/textproc/pandoc/Makefile
@@ -26,6 +26,7 @@ OPTIONS= HIGHLIGHTING "Compile in support for syntax highlighting" off \
LIBRARY "Build the pandoc library" on \
CITEPROC "Compile in support for citeproc-hs" off
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
.include <bsd.port.options.mk>
.if defined(WITH_HIGHLIGHTING)
@@ -74,8 +75,10 @@ IGNORE= cannot be compiled in this configuration. Please (re)run 'make config'
.if defined(WITH_CITEPROC)
CONFIGURE_ARGS+= --flags="citeproc"
USE_HACKAGE+= citeproc-hs
+PLIST_SUB+= MAYBE_CITEPROC=""
.else
CONFIGURE_ARGS+= --flags="-citeproc"
+PLIST_SUB+= MAYBE_CITEPROC="@comment "
.endif
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
diff --git a/textproc/pandoc/pkg-plist b/textproc/pandoc/pkg-plist
index 0f186a4140ea..6855f3c090ee 100644
--- a/textproc/pandoc/pkg-plist
+++ b/textproc/pandoc/pkg-plist
@@ -3,6 +3,7 @@
%%MAYBE_EXECUTABLE%%bin/pandoc
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Paths_pandoc.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc.hi
+%%MAYBE_LIBRARY%%%%MAYBE_CITEPROC%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/Biblio.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/Blocks.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/CharacterReferences.hi
%%MAYBE_LIBRARY%%%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Pandoc/Definition.hi
diff --git a/x11-wm/hs-xmonad-contrib/Makefile b/x11-wm/hs-xmonad-contrib/Makefile
index a8693f955af2..81f5950c2611 100644
--- a/x11-wm/hs-xmonad-contrib/Makefile
+++ b/x11-wm/hs-xmonad-contrib/Makefile
@@ -19,7 +19,8 @@ USE_XORG= x11
OPTIONS= XFT "Enable Xft support for fonts" On
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
+.include <bsd.port.options.mk>
.if defined(WITH_XFT)
CONFIGURE_ARGS+= --flags="use_xft"
@@ -27,4 +28,4 @@ USE_HACKAGE+= X11-xft>=0.2
.endif
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/x11-wm/xmonad-contrib/Makefile b/x11-wm/xmonad-contrib/Makefile
index a8693f955af2..81f5950c2611 100644
--- a/x11-wm/xmonad-contrib/Makefile
+++ b/x11-wm/xmonad-contrib/Makefile
@@ -19,7 +19,8 @@ USE_XORG= x11
OPTIONS= XFT "Enable Xft support for fonts" On
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
+.include <bsd.port.options.mk>
.if defined(WITH_XFT)
CONFIGURE_ARGS+= --flags="use_xft"
@@ -27,4 +28,4 @@ USE_HACKAGE+= X11-xft>=0.2
.endif
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/x11/hs-X11/Makefile b/x11/hs-X11/Makefile
index 56dacff9c3d2..35c69bbc1549 100644
--- a/x11/hs-X11/Makefile
+++ b/x11/hs-X11/Makefile
@@ -21,14 +21,15 @@ DISTNAME= X11-${PORTVERSION}
OPTIONS= XINERAMA "Build with Xinerama support" off
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
+.include <bsd.port.options.mk>
.if defined(WITH_XINERAMA)
USE_XORG+= xinerama
-CONFIGURE_ARGS+= --configure-option=--with-xinerama
+CONFIGURE_ARGS+= --configure-option="--with-xinerama"
.else
-CONFIGURE_ARGS+= --configure-option=--without-xinerama
+CONFIGURE_ARGS+= --configure-option="--without-xinerama"
.endif
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/x11/hs-x11-ghc/Makefile b/x11/hs-x11-ghc/Makefile
index 56dacff9c3d2..35c69bbc1549 100644
--- a/x11/hs-x11-ghc/Makefile
+++ b/x11/hs-x11-ghc/Makefile
@@ -21,14 +21,15 @@ DISTNAME= X11-${PORTVERSION}
OPTIONS= XINERAMA "Build with Xinerama support" off
-.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.options.mk"
+.include <bsd.port.options.mk>
.if defined(WITH_XINERAMA)
USE_XORG+= xinerama
-CONFIGURE_ARGS+= --configure-option=--with-xinerama
+CONFIGURE_ARGS+= --configure-option="--with-xinerama"
.else
-CONFIGURE_ARGS+= --configure-option=--without-xinerama
+CONFIGURE_ARGS+= --configure-option="--without-xinerama"
.endif
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>