| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: haskell.mk,v 1.36 2021/09/27 14:30:47 nia Exp $ | | 1 | # $NetBSD: haskell.mk,v 1.37 2022/01/18 02:24:36 pho Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment handles Haskell Cabal packages. | | 3 | # This Makefile fragment handles Haskell Cabal packages. |
4 | # Package configuration, building, installation, registration and | | 4 | # Package configuration, building, installation, registration and |
5 | # unregistration are fully automated. | | 5 | # unregistration are fully automated. |
6 | # See https://www.haskell.org/cabal/. | | 6 | # See https://www.haskell.org/cabal/. |
7 | # | | 7 | # |
8 | # Package-settable variables: | | 8 | # Package-settable variables: |
9 | # | | 9 | # |
10 | # PKGNAME | | 10 | # PKGNAME |
11 | # Defaults to hs-${DISTNAME}. | | 11 | # Defaults to hs-${DISTNAME}. |
12 | # | | 12 | # |
13 | # HOMEPAGE | | 13 | # HOMEPAGE |
14 | # MASTER_SITES | | 14 | # MASTER_SITES |
| @@ -33,28 +33,26 @@ | | | @@ -33,28 +33,26 @@ |
33 | # | | 33 | # |
34 | # Possible values: yes, no | | 34 | # Possible values: yes, no |
35 | # Default value: yes | | 35 | # Default value: yes |
36 | # | | 36 | # |
37 | # HASKELL_ENABLE_HADDOCK_DOCUMENTATION | | 37 | # HASKELL_ENABLE_HADDOCK_DOCUMENTATION |
38 | # Whether haddock documentation should be built or not. | | 38 | # Whether haddock documentation should be built or not. |
39 | # | | 39 | # |
40 | # Possible values: yes, no | | 40 | # Possible values: yes, no |
41 | # Default value: yes | | 41 | # Default value: yes |
42 | | | 42 | |
43 | .if !defined(HASKELL_MK) | | 43 | .if !defined(HASKELL_MK) |
44 | HASKELL_MK= # defined | | 44 | HASKELL_MK= # defined |
45 | | | 45 | |
46 | MKPIE_SUPPORTED= no | | | |
47 | | | | |
48 | .include "../../mk/bsd.fast.prefs.mk" | | 46 | .include "../../mk/bsd.fast.prefs.mk" |
49 | | | 47 | |
50 | HS_UPDATE_PLIST?= no | | 48 | HS_UPDATE_PLIST?= no |
51 | | | 49 | |
52 | BUILD_DEFS+= HASKELL_ENABLE_SHARED_LIBRARY | | 50 | BUILD_DEFS+= HASKELL_ENABLE_SHARED_LIBRARY |
53 | BUILD_DEFS+= HASKELL_ENABLE_LIBRARY_PROFILING | | 51 | BUILD_DEFS+= HASKELL_ENABLE_LIBRARY_PROFILING |
54 | BUILD_DEFS+= HASKELL_ENABLE_HADDOCK_DOCUMENTATION | | 52 | BUILD_DEFS+= HASKELL_ENABLE_HADDOCK_DOCUMENTATION |
55 | | | 53 | |
56 | # Declarations for ../../mk/misc/show.mk | | 54 | # Declarations for ../../mk/misc/show.mk |
57 | _VARGROUPS+= haskell | | 55 | _VARGROUPS+= haskell |
58 | _USER_VARS.haskell= \ | | 56 | _USER_VARS.haskell= \ |
59 | HASKELL_ENABLE_SHARED_LIBRARY \ | | 57 | HASKELL_ENABLE_SHARED_LIBRARY \ |
60 | HASKELL_ENABLE_LIBRARY_PROFILING \ | | 58 | HASKELL_ENABLE_LIBRARY_PROFILING \ |
| @@ -132,26 +130,31 @@ _HASKELL_VERSION= ghc-${_HASKELL_VERSION | | | @@ -132,26 +130,31 @@ _HASKELL_VERSION= ghc-${_HASKELL_VERSION |
132 | # but per-user default environment files usually don't mark it as | | 130 | # but per-user default environment files usually don't mark it as |
133 | # visible. Tell GHC not to read any environment files. | | 131 | # visible. Tell GHC not to read any environment files. |
134 | _HASKELL_BUILD_SETUP_OPTS= -package-env - | | 132 | _HASKELL_BUILD_SETUP_OPTS= -package-env - |
135 | | | 133 | |
136 | # GHC requires C compiler. | | 134 | # GHC requires C compiler. |
137 | USE_LANGUAGES+= c | | 135 | USE_LANGUAGES+= c |
138 | | | 136 | |
139 | # Declarations for ../../mk/configure/configure.mk | | 137 | # Declarations for ../../mk/configure/configure.mk |
140 | CONFIGURE_ARGS+= --ghc | | 138 | CONFIGURE_ARGS+= --ghc |
141 | CONFIGURE_ARGS+= --with-compiler=${_HASKELL_BIN:Q} | | 139 | CONFIGURE_ARGS+= --with-compiler=${_HASKELL_BIN:Q} |
142 | CONFIGURE_ARGS+= --with-hc-pkg=${_HASKELL_PKG_BIN:Q} | | 140 | CONFIGURE_ARGS+= --with-hc-pkg=${_HASKELL_PKG_BIN:Q} |
143 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} | | 141 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} |
144 | | | 142 | |
| | | 143 | PKGSRC_OVERRIDE_MKPIE= yes |
| | | 144 | .if ${_PKGSRC_MKPIE} == "yes" |
| | | 145 | CONFIGURE_ARGS+= --ghc-option=-fPIC --ghc-option=-pie |
| | | 146 | .endif |
| | | 147 | |
145 | .if ${HASKELL_ENABLE_SHARED_LIBRARY} == "yes" | | 148 | .if ${HASKELL_ENABLE_SHARED_LIBRARY} == "yes" |
146 | CONFIGURE_ARGS+= --enable-shared --enable-executable-dynamic | | 149 | CONFIGURE_ARGS+= --enable-shared --enable-executable-dynamic |
147 | .else | | 150 | .else |
148 | CONFIGURE_ARGS+= --disable-shared --disable-executable-dynamic | | 151 | CONFIGURE_ARGS+= --disable-shared --disable-executable-dynamic |
149 | .endif | | 152 | .endif |
150 | | | 153 | |
151 | .if ${HASKELL_ENABLE_LIBRARY_PROFILING} == "yes" | | 154 | .if ${HASKELL_ENABLE_LIBRARY_PROFILING} == "yes" |
152 | CONFIGURE_ARGS+= --enable-library-profiling | | 155 | CONFIGURE_ARGS+= --enable-library-profiling |
153 | .else | | 156 | .else |
154 | CONFIGURE_ARGS+= --disable-library-profiling | | 157 | CONFIGURE_ARGS+= --disable-library-profiling |
155 | .endif | | 158 | .endif |
156 | | | 159 | |
157 | .if ${HASKELL_ENABLE_HADDOCK_DOCUMENTATION} == "yes" | | 160 | .if ${HASKELL_ENABLE_HADDOCK_DOCUMENTATION} == "yes" |