ocaml: fix some pkglintdiff -r1.147 -r1.148 pkgsrc/lang/ocaml/Makefile
(wiz)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.147 2022/10/23 13:09:30 he Exp $ | 1 | # $NetBSD: Makefile,v 1.148 2023/04/09 07:28:27 wiz Exp $ | |
2 | 2 | |||
3 | .include "Makefile.common" | 3 | .include "Makefile.common" | |
4 | 4 | |||
5 | TEST_PROGRAM= ocamltest | 5 | TEST_PROGRAM= ocamltest | |
6 | MAKE_JOBS_SAFE= no | 6 | MAKE_JOBS_SAFE= no | |
7 | UNLIMIT_RESOURCES= stacksize | 7 | UNLIMIT_RESOURCES= stacksize | |
8 | 8 | |||
9 | USE_TOOLS+= bash | 9 | USE_TOOLS+= bash | |
10 | USE_LANGUAGES+= c | 10 | USE_LANGUAGES+= c | |
11 | USE_LIBTOOL= yes | 11 | USE_LIBTOOL= yes | |
12 | USE_GNU_CONFIGURE_HOST= no | 12 | USE_GNU_CONFIGURE_HOST= no | |
13 | 13 | |||
14 | #USE_GCC_RUNTIME= yes | 14 | #USE_GCC_RUNTIME= yes | |
@@ -17,31 +17,31 @@ USE_GNU_CONFIGURE_HOST= no | @@ -17,31 +17,31 @@ USE_GNU_CONFIGURE_HOST= no | |||
17 | .include "native.mk" | 17 | .include "native.mk" | |
18 | 18 | |||
19 | # Options | 19 | # Options | |
20 | 20 | |||
21 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | 21 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | |
22 | CONFIGURE_ARGS+= --enable-native-compiler | 22 | CONFIGURE_ARGS+= --enable-native-compiler | |
23 | BUILD_TARGET= world.opt | 23 | BUILD_TARGET= world.opt | |
24 | .else | 24 | .else | |
25 | CONFIGURE_ARGS+= --disable-native-compiler | 25 | CONFIGURE_ARGS+= --disable-native-compiler | |
26 | BUILD_TARGET= world | 26 | BUILD_TARGET= world | |
27 | .endif | 27 | .endif | |
28 | 28 | |||
29 | # configure: error: fma does not work, enable emulation with --enable-imprecise-c99-float-ops | 29 | # configure: error: fma does not work, enable emulation with --enable-imprecise-c99-float-ops | |
30 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || \ | 30 | .if ${MACHINE_PLATFORM:MNetBSD-*-i386} || \ | |
31 | !empty(MACHINE_PLATFORM:MNetBSD-*-earm*) | 31 | ${MACHINE_PLATFORM:MNetBSD-*-earm*} | |
32 | CONFIGURE_ARGS+= --enable-imprecise-c99-float-ops | 32 | CONFIGURE_ARGS+= --enable-imprecise-c99-float-ops | |
33 | .endif | 33 | .endif | |
34 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) && (${OPSYS_VERSION} < 99999) | 34 | .if ${MACHINE_PLATFORM:MNetBSD-*-powerpc} && (${OPSYS_VERSION} < 99999) | |
35 | # fma(3) was added for powerpc between 9.99.98 and 9.99.99 | 35 | # fma(3) was added for powerpc between 9.99.98 and 9.99.99 | |
36 | CONFIGURE_ARGS+= --enable-imprecise-c99-float-ops | 36 | CONFIGURE_ARGS+= --enable-imprecise-c99-float-ops | |
37 | .endif | 37 | .endif | |
38 | 38 | |||
39 | # This is needed because ${WRKSRC}/build/partial-install.sh uses | 39 | # This is needed because ${WRKSRC}/build/partial-install.sh uses | |
40 | # $PWD as part of its script. However, with /bin/sh on SunOS | 40 | # $PWD as part of its script. However, with /bin/sh on SunOS | |
41 | # (cd work/foo-1.0 && echo $PWD) will show that the value of PWD is | 41 | # (cd work/foo-1.0 && echo $PWD) will show that the value of PWD is | |
42 | # set before the cd takes place and is then passed down. So the end | 42 | # set before the cd takes place and is then passed down. So the end | |
43 | # result is when ./build/partial-install.sh is called, PWD is set | 43 | # result is when ./build/partial-install.sh is called, PWD is set | |
44 | # to /usr/pkgsrc/devel/ocaml instead of ${WRKSRC}. /bin/ksh, which | 44 | # to /usr/pkgsrc/devel/ocaml instead of ${WRKSRC}. /bin/ksh, which | |
45 | # is what ${SH} is on SunOS, doesn't exhibit this behaviour. | 45 | # is what ${SH} is on SunOS, doesn't exhibit this behaviour. | |
46 | .if ${OPSYS} == "SunOS" | 46 | .if ${OPSYS} == "SunOS" | |
47 | INSTALL_MAKE_FLAGS+= SHELL=${SH:Q} | 47 | INSTALL_MAKE_FLAGS+= SHELL=${SH:Q} |
@@ -1,30 +1,30 @@ | @@ -1,30 +1,30 @@ | |||
1 | # $NetBSD: hacks.mk,v 1.9 2020/12/09 10:33:04 jaapb Exp $ | 1 | # $NetBSD: hacks.mk,v 1.10 2023/04/09 07:28:27 wiz Exp $ | |
2 | 2 | |||
3 | .if !defined(OCAML_HACKS_MK) | 3 | .if !defined(OCAML_HACKS_MK) | |
4 | OCAML_HACKS_MK= defined | 4 | OCAML_HACKS_MK= defined | |
5 | 5 | |||
6 | .include "../../mk/compiler.mk" | 6 | .include "../../mk/compiler.mk" | |
7 | 7 | |||
8 | ### [Fri Jan 17 18:06:18 JST 2014 : pho] | 8 | ### [Fri Jan 17 18:06:18 JST 2014 : pho] | |
9 | ### The linker that comes with Darwin 9 & prior does not recognize the option | 9 | ### The linker that comes with Darwin 9 & prior does not recognize the option | |
10 | ### "-no_compact_unwind" since compact unwind information is only | 10 | ### "-no_compact_unwind" since compact unwind information is only | |
11 | ### introduced (and made default) as of Darwin 10. Note that this | 11 | ### introduced (and made default) as of Darwin 10. Note that this | |
12 | ### can't be worked around with transformation | 12 | ### can't be worked around with transformation | |
13 | ### "rm:-Wl,-no_compact_unwind" because the linker option is baked | 13 | ### "rm:-Wl,-no_compact_unwind" because the linker option is baked | |
14 | ### into utils/config.ml and will later be used by the OCaml compiler | 14 | ### into utils/config.ml and will later be used by the OCaml compiler | |
15 | ### itself. | 15 | ### itself. | |
16 | ### | 16 | ### | |
17 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-9].*-*) | 17 | .if ${MACHINE_PLATFORM:MDarwin-[0-9].*-*} | |
18 | PKG_HACKS+= no_compact_unwind | 18 | PKG_HACKS+= no_compact_unwind | |
19 | SUBST_CLASSES+= no_compact_unwind | 19 | SUBST_CLASSES+= no_compact_unwind | |
20 | SUBST_MESSAGE.no_compact_unwind= Removing -no_compact_unwind from linker options | 20 | SUBST_MESSAGE.no_compact_unwind= Removing -no_compact_unwind from linker options | |
21 | SUBST_FILES.no_compact_unwind= configure | 21 | SUBST_FILES.no_compact_unwind= configure | |
22 | SUBST_SED.no_compact_unwind= -e 's/-Wl,-no_compact_unwind//g' | 22 | SUBST_SED.no_compact_unwind= -e 's/-Wl,-no_compact_unwind//g' | |
23 | SUBST_STAGE.no_compact_unwind= pre-configure | 23 | SUBST_STAGE.no_compact_unwind= pre-configure | |
24 | .endif | 24 | .endif | |
25 | 25 | |||
26 | ### [ Wed Oct 7 9:16:42 GMT 2009 : dmcmahill ] | 26 | ### [ Wed Oct 7 9:16:42 GMT 2009 : dmcmahill ] | |
27 | ### On NetBSD/i386, gcc optimisation, at least for version 4.4.1 (lang/gcc44), | 27 | ### On NetBSD/i386, gcc optimisation, at least for version 4.4.1 (lang/gcc44), | |
28 | ### produces a binary which segfaults. The binary is used during part of the | 28 | ### produces a binary which segfaults. The binary is used during part of the | |
29 | ### build process. | 29 | ### build process. | |
30 | ### | 30 | ### |
@@ -1,41 +1,41 @@ | @@ -1,41 +1,41 @@ | |||
1 | # $NetBSD: native.mk,v 1.1 2022/05/24 18:25:38 jaapb Exp $ | 1 | # $NetBSD: native.mk,v 1.2 2023/04/09 07:28:27 wiz Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment handles the native code compiler options for OCaml. | 3 | # This Makefile fragment handles the native code compiler options for OCaml. | |
4 | # It is used by ocaml.mk and the lang/ocaml package. | 4 | # It is used by ocaml.mk and the lang/ocaml package. | |
5 | # | 5 | # | |
6 | # Build def variables: | 6 | # Build def variables: | |
7 | # OCAML_USE_OPT_COMPILER | 7 | # OCAML_USE_OPT_COMPILER | |
8 | # if set to yes, will enable optimised (native code) compilation | 8 | # if set to yes, will enable optimised (native code) compilation | |
9 | # default value: depends on architecture | 9 | # default value: depends on architecture | |
10 | # | 10 | # | |
11 | # PLIST variable: | 11 | # PLIST variable: | |
12 | # PLIST.ocaml-opt for files only installed when using the optimised compiler | 12 | # PLIST.ocaml-opt for files only installed when using the optimised compiler | |
13 | # Set based on OCAML_USE_OPT_COMPILER | 13 | # Set based on OCAML_USE_OPT_COMPILER | |
14 | 14 | |||
15 | .if !defined(OCAML_NATIVE_MK) | 15 | .if !defined(OCAML_NATIVE_MK) | |
16 | OCAML_NATIVE_MK= # defined | 16 | OCAML_NATIVE_MK= # defined | |
17 | 17 | |||
18 | .include "../../mk/bsd.fast.prefs.mk" | 18 | .include "../../mk/bsd.fast.prefs.mk" | |
19 | 19 | |||
20 | BUILD_DEFS+= OCAML_USE_OPT_COMPILER | 20 | BUILD_DEFS+= OCAML_USE_OPT_COMPILER | |
21 | 21 | |||
22 | _VARGROUPS+= ocaml | 22 | _VARGROUPS+= ocaml | |
23 | _DEF_VARS.ocaml= \ | 23 | _DEF_VARS.ocaml= \ | |
24 | OCAML_USE_OPT_COMPILER | 24 | OCAML_USE_OPT_COMPILER | |
25 | 25 | |||
26 | # Default value of OCAML_USE_OPT_COMPILER | 26 | # Default value of OCAML_USE_OPT_COMPILER | |
27 | .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \ | 27 | .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \ | |
28 | !empty(MACHINE_ARCH:M*arm*) || (${MACHINE_ARCH} == "aarch64") || \ | 28 | ${MACHINE_ARCH:M*arm*} || (${MACHINE_ARCH} == "aarch64") || \ | |
29 | (${MACHINE_ARCH} == "aarch64eb") || (${MACHINE_ARCH} == "x86_64") | 29 | (${MACHINE_ARCH} == "aarch64eb") || (${MACHINE_ARCH} == "x86_64") | |
30 | OCAML_USE_OPT_COMPILER?= yes | 30 | OCAML_USE_OPT_COMPILER?= yes | |
31 | .else | 31 | .else | |
32 | OCAML_USE_OPT_COMPILER?= no | 32 | OCAML_USE_OPT_COMPILER?= no | |
33 | .endif | 33 | .endif | |
34 | 34 | |||
35 | # Things that get installed with the opt compiler | 35 | # Things that get installed with the opt compiler | |
36 | PLIST_VARS+= ocaml-opt | 36 | PLIST_VARS+= ocaml-opt | |
37 | 37 | |||
38 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | 38 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | |
39 | # The opt compiler needs the C compiler suite | 39 | # The opt compiler needs the C compiler suite | |
40 | USE_LANGUAGES+= c | 40 | USE_LANGUAGES+= c | |
41 | PLIST.ocaml-opt= yes | 41 | PLIST.ocaml-opt= yes |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: ocaml.mk,v 1.1 2022/05/24 18:25:38 jaapb Exp $ | 1 | # $NetBSD: ocaml.mk,v 1.2 2023/04/09 07:28:27 wiz Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment handles the common variables used by OCaml packages. | 3 | # This Makefile fragment handles the common variables used by OCaml packages. | |
4 | # It should be included by every package that uses OCaml. | 4 | # It should be included by every package that uses OCaml. | |
5 | # | 5 | # | |
6 | # Package-settable variables: | 6 | # Package-settable variables: | |
7 | # OCAML_USE_FINDLIB | 7 | # OCAML_USE_FINDLIB | |
8 | # package uses findlib infrastructure | 8 | # package uses findlib infrastructure | |
9 | # OCAML_FINDLIB_DIRS | 9 | # OCAML_FINDLIB_DIRS | |
10 | # directories under OCAML_SITELIBDIR that this package installs into | 10 | # directories under OCAML_SITELIBDIR that this package installs into | |
11 | # OCAML_FINDLIB_REGISTER | 11 | # OCAML_FINDLIB_REGISTER | |
12 | # register findlib directories into OCaml ld.conf | 12 | # register findlib directories into OCaml ld.conf | |
13 | # OCAML_USE_OASIS [implies OCAML_USE_FINDLIB] | 13 | # OCAML_USE_OASIS [implies OCAML_USE_FINDLIB] | |
14 | # package uses oasis infrastructure | 14 | # package uses oasis infrastructure | |
@@ -99,31 +99,31 @@ OASIS_BUILD_ARGS?= # empty | @@ -99,31 +99,31 @@ OASIS_BUILD_ARGS?= # empty | |||
99 | .include "../../devel/ocaml-oasis/buildlink3.mk" | 99 | .include "../../devel/ocaml-oasis/buildlink3.mk" | |
100 | OCAML_USE_OASIS= yes | 100 | OCAML_USE_OASIS= yes | |
101 | .endif | 101 | .endif | |
102 | 102 | |||
103 | # | 103 | # | |
104 | # Configure stuff for OASIS | 104 | # Configure stuff for OASIS | |
105 | # | 105 | # | |
106 | .if ${OCAML_USE_OASIS} == "yes" | 106 | .if ${OCAML_USE_OASIS} == "yes" | |
107 | OCAML_USE_FINDLIB= yes | 107 | OCAML_USE_FINDLIB= yes | |
108 | HAS_CONFIGURE= yes | 108 | HAS_CONFIGURE= yes | |
109 | CONFIGURE_ARGS+= --destdir "${DESTDIR}" | 109 | CONFIGURE_ARGS+= --destdir "${DESTDIR}" | |
110 | CONFIGURE_ARGS+= --prefix "${PREFIX}" | 110 | CONFIGURE_ARGS+= --prefix "${PREFIX}" | |
111 | # Force use of native code compiler according to setting | 111 | # Force use of native code compiler according to setting | |
112 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | 112 | . if ${OCAML_USE_OPT_COMPILER} == "yes" | |
113 | CONFIGURE_ARGS+= --override is_native true | 113 | CONFIGURE_ARGS+= --override is_native true | |
114 | .else | 114 | . else | |
115 | CONFIGURE_ARGS+= --override is_native false | 115 | CONFIGURE_ARGS+= --override is_native false | |
116 | .endif | 116 | . endif | |
117 | .endif | 117 | .endif | |
118 | 118 | |||
119 | # Configure stuff for DUNE | 119 | # Configure stuff for DUNE | |
120 | .if ${OCAML_USE_DUNE} == "yes" | 120 | .if ${OCAML_USE_DUNE} == "yes" | |
121 | .include "../../devel/ocaml-dune/buildlink3.mk" | 121 | .include "../../devel/ocaml-dune/buildlink3.mk" | |
122 | OCAML_USE_OPAM?= yes | 122 | OCAML_USE_OPAM?= yes | |
123 | OPAM_INSTALL_DIR?= _build/default | 123 | OPAM_INSTALL_DIR?= _build/default | |
124 | .else | 124 | .else | |
125 | OCAML_USE_OPAM?= no | 125 | OCAML_USE_OPAM?= no | |
126 | .endif | 126 | .endif | |
127 | 127 | |||
128 | # Configure stuff for OPAM | 128 | # Configure stuff for OPAM | |
129 | .if ${OCAML_USE_OPAM} == "yes" | 129 | .if ${OCAML_USE_OPAM} == "yes" | |
@@ -159,34 +159,34 @@ OCAML_FINDLIB_DIRS?= ${PKGBASE:S/^ocaml- | @@ -159,34 +159,34 @@ OCAML_FINDLIB_DIRS?= ${PKGBASE:S/^ocaml- | |||
159 | OCAML_FINDLIB_REGISTER?= yes | 159 | OCAML_FINDLIB_REGISTER?= yes | |
160 | .endif | 160 | .endif | |
161 | 161 | |||
162 | # | 162 | # | |
163 | # Compiler stuff | 163 | # Compiler stuff | |
164 | # | 164 | # | |
165 | 165 | |||
166 | # | 166 | # | |
167 | # OASIS targets | 167 | # OASIS targets | |
168 | # | 168 | # | |
169 | .if ${OCAML_USE_OASIS} == "yes" | 169 | .if ${OCAML_USE_OASIS} == "yes" | |
170 | # OASIS uses ocamlbuild | 170 | # OASIS uses ocamlbuild | |
171 | .include "../../devel/ocamlbuild/buildlink3.mk" | 171 | .include "../../devel/ocamlbuild/buildlink3.mk" | |
172 | .if ${OCAML_USE_OASIS_DYNRUN} == "yes" | 172 | . if ${OCAML_USE_OASIS_DYNRUN} == "yes" | |
173 | pre-configure: | 173 | pre-configure: | |
174 | ${RUN} cd ${WRKSRC} && ocamlfind ocamlc -linkpkg -package oasis.dynrun -o setup setup.ml && ${RM} setup.cmo setup.cmi | 174 | ${RUN} cd ${WRKSRC} && ocamlfind ocamlc -linkpkg -package oasis.dynrun -o setup setup.ml && ${RM} setup.cmo setup.cmi | |
175 | 175 | |||
176 | OASIS_EXEC= ./setup | 176 | OASIS_EXEC= ./setup | |
177 | .else | 177 | . else | |
178 | OASIS_EXEC= ocaml setup.ml | 178 | OASIS_EXEC= ocaml setup.ml | |
179 | .endif | 179 | . endif | |
180 | 180 | |||
181 | # Redefine configure target | 181 | # Redefine configure target | |
182 | do-configure: | 182 | do-configure: | |
183 | ${RUN} cd ${WRKSRC} && \ | 183 | ${RUN} cd ${WRKSRC} && \ | |
184 | ${SETENV} ${CONFIGURE_ENV} ${OASIS_EXEC} -configure ${CONFIGURE_ARGS} | 184 | ${SETENV} ${CONFIGURE_ENV} ${OASIS_EXEC} -configure ${CONFIGURE_ARGS} | |
185 | 185 | |||
186 | # Redefine build target | 186 | # Redefine build target | |
187 | do-build: | 187 | do-build: | |
188 | ${RUN} ${_ULIMIT_CMD} cd ${WRKSRC} && \ | 188 | ${RUN} ${_ULIMIT_CMD} cd ${WRKSRC} && \ | |
189 | ${SETENV} ${MAKE_ENV} ${OASIS_EXEC} -build ${OASIS_BUILD_ARGS} | 189 | ${SETENV} ${MAKE_ENV} ${OASIS_EXEC} -build ${OASIS_BUILD_ARGS} | |
190 | 190 | |||
191 | # Redefine install target | 191 | # Redefine install target | |
192 | do-install: | 192 | do-install: | |
@@ -223,31 +223,31 @@ do-install: | @@ -223,31 +223,31 @@ do-install: | |||
223 | -stublibsdir ${PREFIX}/${OCAML_SITELIBDIR}/stublibs \ | 223 | -stublibsdir ${PREFIX}/${OCAML_SITELIBDIR}/stublibs \ | |
224 | -bindir ${PREFIX}/bin \ | 224 | -bindir ${PREFIX}/bin \ | |
225 | ${OPAM_INSTALL_DIR}/$$i.install; \ | 225 | ${OPAM_INSTALL_DIR}/$$i.install; \ | |
226 | done | 226 | done | |
227 | 227 | |||
228 | .endif # ${OCAML_USE_OPAM} == "yes" | 228 | .endif # ${OCAML_USE_OPAM} == "yes" | |
229 | 229 | |||
230 | # | 230 | # | |
231 | # dune targets | 231 | # dune targets | |
232 | # | 232 | # | |
233 | .if ${OCAML_USE_DUNE} == "yes" | 233 | .if ${OCAML_USE_DUNE} == "yes" | |
234 | 234 | |||
235 | do-build: | 235 | do-build: | |
236 | .if !empty(DUNE_BUILD_PACKAGES) | 236 | . if !empty(DUNE_BUILD_PACKAGES) | |
237 | ${RUN} ${_ULIMIT_CMD} \ | 237 | ${RUN} ${_ULIMIT_CMD} \ | |
238 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | 238 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | |
239 | dune build -j ${MAKE_JOBS:U1} \ | 239 | dune build -j ${MAKE_JOBS:U1} \ | |
240 | ${DUNE_BUILD_FLAGS} -p ${DUNE_BUILD_PACKAGES:ts,} \ | 240 | ${DUNE_BUILD_FLAGS} -p ${DUNE_BUILD_PACKAGES:ts,} \ | |
241 | ${DUNE_BUILD_TARGETS} | 241 | ${DUNE_BUILD_TARGETS} | |
242 | .else | 242 | . else | |
243 | ${RUN} ${_ULIMIT_CMD} \ | 243 | ${RUN} ${_ULIMIT_CMD} \ | |
244 | cd ${WRKSRC} && dune build --profile release -j ${MAKE_JOBS:U1} \ | 244 | cd ${WRKSRC} && dune build --profile release -j ${MAKE_JOBS:U1} \ | |
245 | ${DUNE_BUILD_FLAGS} ${DUNE_BUILD_TARGETS} | 245 | ${DUNE_BUILD_FLAGS} ${DUNE_BUILD_TARGETS} | |
246 | .endif | 246 | . endif | |
247 | 247 | |||
248 | .endif # ${OCAML_USE_DUNE} == "yes" | 248 | .endif # ${OCAML_USE_DUNE} == "yes" | |
249 | 249 | |||
250 | # Add dependency on ocaml. | 250 | # Add dependency on ocaml. | |
251 | .include "../../lang/ocaml/buildlink3.mk" | 251 | .include "../../lang/ocaml/buildlink3.mk" | |
252 | 252 | |||
253 | .endif # OCAML_MK | 253 | .endif # OCAML_MK |