summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorGleb Popov <arrowd@FreeBSD.org>2022-07-28 22:48:58 +0300
committerGleb Popov <arrowd@FreeBSD.org>2022-07-28 22:52:56 +0300
commit166cea3628c726601ebfd9a5497a4808015eebd3 (patch)
tree1c7f3f05aaff74e4d87a4f4b94404fb863a1495b /textproc
parentUses/cabal.mk: Expand comment for cabal-extract target. (diff)
Uses/cabal.mk: Introduce CABAL_WRAPPER_SCRIPTS variable.
Before this change every Haskell executable was wrapped into a shell script which was installed into ${PREFIX}/bin while the actual executable was installed into {PREFIX}/libexec/cabal. This was required to set env variables pointing the Haskell program to its data files under ${PREFIX}/share. However, not every Haskell program uses this feature. Now the shell wrapping is off by default and CABAL_WRAPPER_SCRIPTS knob can be used to enable it for a given port/executable. Adjust all Haskell ports affected by this change.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/hs-pandoc/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/textproc/hs-pandoc/Makefile b/textproc/hs-pandoc/Makefile
index cece20947927..73972b841859 100644
--- a/textproc/hs-pandoc/Makefile
+++ b/textproc/hs-pandoc/Makefile
@@ -15,7 +15,6 @@ OPTIONS_DEFINE= EMBED_DATA TRYPANDOC
EMBED_DATA_DESC= Embed data files in binary for relocatable executable
EMBED_DATA_CABAL_FLAGS= embed_data_files
-EMBED_DATA_USE_CABAL= file-embed-0.0.15.0
TRYPANDOC_DESC= Build trypandoc cgi executable
TRYPANDOC_CABAL_FLAGS= trypandoc
@@ -177,11 +176,19 @@ USE_CABAL= Glob-0.10.2_3 \
zip-archive-0.4.2.1 \
zlib-0.6.3.0
-CABAL_PROJECT= remove
-EXECUTABLES= pandoc
+CABAL_PROJECT= remove
+EXECUTABLES= pandoc
+CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES}
OPTIONS_SUB= yes
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MEMBED_DATA}
+# No need to use wrapper scripts when all data is compiled into an executable
+.undef CABAL_WRAPPER_SCRIPTS
+.endif
+
.include <bsd.port.pre.mk>
.if ${ARCH} == i386