Refresh patches
authorStéphane Glondu <glondu@debian.org>
Wed, 12 Jun 2024 06:34:09 +0000 (08:34 +0200)
committerStéphane Glondu <glondu@debian.org>
Wed, 12 Jun 2024 13:19:16 +0000 (15:19 +0200)
- remove rpath patch, which is no longer adequate
- add a patch to fix a call to test in configure.ac

debian/patches/0001-Don-t-use-rpath.patch [deleted file]
debian/patches/0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
debian/patches/0003-Check-for-definition-of-AT_SECURE-before-using-it.patch
debian/patches/0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
debian/patches/0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch
debian/patches/0006-Do-not-error-on-warnings-in-autoconf.patch
debian/patches/0007-Put-manpages-in-section-3o-instead-of-3.patch
debian/patches/0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch
debian/patches/0008-Fix-call-to-test-in-configure.ac.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0001-Don-t-use-rpath.patch b/debian/patches/0001-Don-t-use-rpath.patch
deleted file mode 100644 (file)
index 3140fe9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Stefano Zacchiroli <zack@debian.org>
-Date: Tue, 19 May 2009 17:24:14 +0200
-Subject: Don't use rpath
-
----
- tools/ocamlmklib.ml | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/tools/ocamlmklib.ml b/tools/ocamlmklib.ml
-index 1cf8ef9..37c7f41 100644
---- a/tools/ocamlmklib.ml
-+++ b/tools/ocamlmklib.ml
-@@ -55,6 +55,11 @@ and rpath = ref []          (* rpath options *)
- and debug = ref false       (* -g option *)
- and verbose = ref false
-+(* Debian specific: inhibit rpath *)
-+let byteccrpath = ""
-+and nativeccrpath = ""
-+and mksharedlibrpath = ""
-+
- let starts_with s pref =
-   String.length s >= String.length pref &&
-   String.sub s 0 (String.length pref) = pref
index 2b302460e709311154f1ae579a5829c139fbf66b..1765bb9120bec8e6cdf7bdb4dc059c6b34305e96 100644 (file)
@@ -12,20 +12,21 @@ Bug-Debian: https://bugs.debian.org/702349
 Forwarded: no
 Last-Update: <2021-12-21>
 ---
- configure.ac | +++
- 1 file changed, 3 insertions(+)
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index ebb8bbd..d27d47b 100644
+index 0c9d638..c62f23d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -987,6 +987,9 @@ AS_IF([test x"$enable_shared" != "xno"],
-       natdynlinkopts="-Wl,-E"
-       supports_shared_libraries=true])])
+@@ -1249,6 +1249,10 @@ AS_CASE([$host],
+     [oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
+      natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])
  
++# Use CCLINKFLAGS for linking all executables and shared libraries
++
 +mksharedlib="$mksharedlib $CCLINKFLAGS"
 +mkexe="$mkexe $CCLINKFLAGS"
-+
- AS_IF([test -z "$mkmaindll"], [mkmaindll=$mksharedlib])
  
  # Configure native dynlink
index f7a6aa2ff2d75009bf0bd458052b14429bd72480..fdbb27216b484c1dfd065d544c8f8fef7c0e45a0 100644 (file)
@@ -6,14 +6,14 @@ This fixes compilation on kfreebsd-*.
 
 Forwarded: https://github.com/ocaml/ocaml/pull/8842
 ---
- otherlibs/unix/envir.c | 2 +-
+ otherlibs/unix/envir_unix.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/otherlibs/unix/envir.c b/otherlibs/unix/envir.c
-index 3ad4b9c..bdc4193 100644
---- a/otherlibs/unix/envir.c
-+++ b/otherlibs/unix/envir.c
-@@ -39,7 +39,7 @@ CAMLprim value unix_environment_unsafe(value unit)
+diff --git a/otherlibs/unix/envir_unix.c b/otherlibs/unix/envir_unix.c
+index cef6cb0..977db1c 100644
+--- a/otherlibs/unix/envir_unix.c
++++ b/otherlibs/unix/envir_unix.c
+@@ -39,7 +39,7 @@ CAMLprim value caml_unix_environment_unsafe(value unit)
  
  static char **secure_environ(void)
  {
index a39bdb4e2598c369466c10a79c354adcb0886349..4109c6c68bb701d86f90d58a169b18c9d1181a07 100644 (file)
@@ -8,12 +8,12 @@ Bug: https://github.com/ocaml/ocaml/issues/9800
  1 file changed, 10 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index d27d47b..48b438a 100644
+index c62f23d..d5d432a 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1199,6 +1199,16 @@ AS_CASE([$arch],
-        [common_cflags="-no-pie $common_cflags"],
-     [])])
+@@ -1502,6 +1502,16 @@ AS_CASE([$arch],
+       # Alpine and other musl-based Linux distributions
+       [common_cflags="-no-pie $common_cflags"])])
  
 +# Disable DT_TEXTREL warnings on Linux i386
 +# See https://github.com/ocaml/ocaml/issues/9800
index 3c72e99489c80c9020213bfca6c2b3c857f72c49..d1d5df3e319c719feacdef5392bd968f52c3706a 100644 (file)
@@ -7,10 +7,10 @@ Subject: Trigger -output-complete-exe on -custom with an environment variable
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/driver/main_args.ml b/driver/main_args.ml
-index 60db017..a46e50e 100644
+index 732dea3..65239ce 100644
 --- a/driver/main_args.ml
 +++ b/driver/main_args.ml
-@@ -2005,7 +2005,6 @@ third-party libraries such as Lwt, but with a different API."
+@@ -1903,7 +1903,6 @@ third-party libraries such as Lwt, but with a different API."
      include Core
      include Compiler
      let _compat_32 = set bytecode_compatible_32
@@ -18,7 +18,7 @@ index 60db017..a46e50e 100644
      let _dcamlprimc = set keep_camlprimc_file
      let _dinstr = set dump_instr
      let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s))
-@@ -2024,6 +2023,15 @@ third-party libraries such as Lwt, but with a different API."
+@@ -1922,6 +1921,15 @@ third-party libraries such as Lwt, but with a different API."
      let _use_runtime s = use_runtime := s
      let _v () = Compenv.print_version_and_library "compiler"
      let _vmthread () = Compenv.fatal vmthread_removed_message
index 2f46a01bf2b56490358d40278efe3e7fedeb7a32..63c1c6515bca24e0e78a6c7fa6310b67151dcead 100644 (file)
@@ -8,7 +8,7 @@ Bug-Debian: https://bugs.debian.org/978875
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/tools/autogen b/tools/autogen
-index 69cc910..41be702 100755
+index cd9f6d2..7fd2f92 100755
 --- a/tools/autogen
 +++ b/tools/autogen
 @@ -16,7 +16,7 @@
index 3a1c700966ce1550a869314ef9d5936d6cdb0862..e747540912d2d6d6002df3c61da3bfe4f72021ee 100644 (file)
@@ -7,13 +7,13 @@ Subject: Put manpages in section 3o instead of 3
  1 file changed, 1 insertion(+)
 
 diff --git a/api_docgen/ocamldoc/Makefile b/api_docgen/ocamldoc/Makefile
-index 6af89ab..d4f84ae 100644
+index 5b1f894..71f5a70 100644
 --- a/api_docgen/ocamldoc/Makefile
 +++ b/api_docgen/ocamldoc/Makefile
-@@ -62,6 +62,7 @@ build/libref/%.odoc: build/%.mld | build/libref
+@@ -61,6 +61,7 @@ build/libref/%.odoc: build/%.mld | build/libref
  ALL_COMPILED_DOC=$(ALL_DOC:%=build/%.odoc)
  build/man/Stdlib.3o: $(ALL_COMPILED_DOC) | build/man
-       $(OCAMLDOC_RUN) -man -d build/man -man-mini \
+       $(V_OCAMLDOC)$(OCAMLDOC_RUN) -man -d build/man -man-mini \
 +      -man-section 3o \
        -nostdlib -hide Stdlib -lib Stdlib -t "OCaml library" \
        $(addprefix -load , $(ALL_COMPILED_DOC))
index ceadbe107e8979691f36f4e123ef3d8b6ab28ae1..07723d36c072c5dd174e51bb514ac11856f57bab 100644 (file)
@@ -5,28 +5,37 @@ Subject: Filter out -f{debug,file}-prefix-map= from ocamlc_cflags and mkexe
 Bug-Debian: https://bugs.debian.org/1030785
 Forwarded: not-needed
 ---
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 48b438a..20f0873 100644
+index d5d432a..467099f 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -37,7 +37,7 @@ CONFIGURE_ARGS="$*"
- # at the moment they are not taken into account on Windows, because
- # flexlink, which is used to build executables on this platform, can
- # not handle them.
--mkexe="\$(CC) \$(OC_CFLAGS) \$(CFLAGS) \$(OC_LDFLAGS) \$(LDFLAGS)"
-+mkexe="\$(CC) \$(OC_CFLAGS) \$(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS)) \$(OC_LDFLAGS) \$(LDFLAGS)"
- # Flags for building executable files with debugging symbols
- mkexedebugflag="-g"
-@@ -1980,7 +1980,7 @@ AS_IF([test x"$DEFAULT_STRING" = "xunsafe"],
+@@ -36,7 +36,7 @@ CONFIGURE_ARGS="$*"
+ # rely on $CFLAGS because these cannot be processed by flexlink (and are not
+ # passed)
+ mkexe_cmd='$(CC)'
+-mkexe_cflags='$(OC_CFLAGS) $(CFLAGS)'
++mkexe_cflags='$(OC_CFLAGS) $(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS))'
+ mkexe_extra_flags=''
+ mkexe_via_cc_extra_cmd=''
+ mkexe_ldflags_prefix=''
+@@ -2555,7 +2555,7 @@ AS_IF([test "$ccomptype" != "msvc"],
  
  oc_cflags="$common_cflags $internal_cflags"
  oc_cppflags="$common_cppflags $internal_cppflags"
--ocamlc_cflags="$common_cflags $sharedlib_cflags \$(CFLAGS)"
-+ocamlc_cflags="$common_cflags $sharedlib_cflags \$(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS))"
- ocamlc_cppflags="$common_cppflags \$(CPPFLAGS)"
- cclibs="$cclibs $mathlib"
+-ocamlc_cflags="$ocamlc_cflags $common_cflags $sharedlib_cflags $CFLAGS"
++ocamlc_cflags="$ocamlc_cflags $common_cflags $sharedlib_cflags $(printf "%s" "$CFLAGS" | sed -r -e 's/-fdebug-prefix-map=\S+//' -e 's/-ffile-prefix-map=\S+//')"
+ ocamlc_cppflags="$common_cppflags $CPPFLAGS"
  
+ AS_CASE([$host],
+@@ -2652,7 +2652,7 @@ AC_CONFIG_COMMANDS_PRE([
+   mkexe_exp="$mkexe_cmd_exp"
+   AS_IF([test -n "$mkexe_cflags"],
+     [mkexe="$mkexe $mkexe_cflags"
+-    mkexe_exp="$mkexe_exp $common_cflags $CFLAGS"])
++    mkexe_exp="$mkexe_exp $common_cflags $(printf "%s" "$CFLAGS" | sed -r -e 's/-fdebug-prefix-map=\S+//' -e 's/-ffile-prefix-map=\S+//')"])
+   AS_IF([test -n "$mkexe_extra_flags"],
+     [mkexe="$mkexe $mkexe_extra_flags"
+     mkexe_exp="$mkexe_exp $mkexe_extra_flags"])
diff --git a/debian/patches/0008-Fix-call-to-test-in-configure.ac.patch b/debian/patches/0008-Fix-call-to-test-in-configure.ac.patch
new file mode 100644 (file)
index 0000000..d4f3a47
--- /dev/null
@@ -0,0 +1,21 @@
+From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
+Date: Wed, 12 Jun 2024 13:09:53 +0200
+Subject: Fix call to test in configure.ac
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 467099f..a8e4222 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2690,7 +2690,7 @@ ${mkdll_ldflags}"
+   ],[
+     mkdll_ldflags='$(OC_DLL_LDFLAGS) $(LDFLAGS)'
+     mkdll_ldflags_exp="${oc_dll_ldflags}"
+-    AS_IF([test -n ${LDFLAGS}],
++    AS_IF([test -n "${LDFLAGS}"],
+       [mkdll_ldflags_exp="$mkdll_ldflags_exp $LDFLAGS"])
+     mkexe_ldflags="\$(OC_LDFLAGS) \$(LDFLAGS)"
+     mkexe_ldflags_exp="${oc_ldflags} ${LDFLAGS}"
index 56079e3be2ba753957f3783e1d22e4139be115f5..da8df5a18e1dc5cf1493cdeae06dbf5a87f949d6 100644 (file)
@@ -1,4 +1,3 @@
-0001-Don-t-use-rpath.patch
 0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
 0003-Check-for-definition-of-AT_SECURE-before-using-it.patch
 0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
@@ -6,3 +5,4 @@
 0006-Do-not-error-on-warnings-in-autoconf.patch
 0007-Put-manpages-in-section-3o-instead-of-3.patch
 0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch
+0008-Fix-call-to-test-in-configure.ac.patch