* Add patches to prevent FTBFS on non-native arch
authorSylvain Le Gall <gildor@debian.org>
Thu, 30 Aug 2007 23:28:27 +0000 (23:28 +0000)
committerSylvain Le Gall <gildor@debian.org>
Thu, 30 Aug 2007 23:28:27 +0000 (23:28 +0000)
* Don't ignore make clean errors

debian/changelog
debian/patches/00list
debian/patches/not-native-no-aspp.dpatch [new file with mode: 0755]
debian/rules

index bdf942bf164314d6994fbf9b8ef30f6428de8804..bffb65d9e57260683d354feaf902fdc71bc51bd8 100644 (file)
@@ -1,8 +1,13 @@
 ocaml (3.10.0-7) UNRELEASED; urgency=low
 
+  [ Stefano Zacchiroli ]
   * NOT RELEASED YET
 
- -- Stefano Zacchiroli <zack@debian.org>  Thu, 30 Aug 2007 16:38:26 +0200
+  [ Sylvain Le Gall ]
+  * Add patches to workaround FTBFS, as described upstream in bug 4375
+  * Don't ignore make clean error
+
+ -- Sylvain Le Gall <gildor@debian.org>  Fri, 31 Aug 2007 01:27:19 +0200
 
 ocaml (3.10.0-6) unstable; urgency=low
 
index 0fd76ca227f5effece2e6f00f5d25861a1567d88..cee54f257997e0b4734b2660a496a6dfec5ae693 100644 (file)
@@ -9,3 +9,4 @@ stdlib_man_section.dpatch
 install_scripts_config.dpatch
 install_ocamlbuild.dpatch
 arm_ccheckbound_typo.dpatch
+not-native-no-aspp
diff --git a/debian/patches/not-native-no-aspp.dpatch b/debian/patches/not-native-no-aspp.dpatch
new file mode 100755 (executable)
index 0000000..f11f5cc
--- /dev/null
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## not-native-no-aspp.dpatch by Sylvain Le Gall <gildor@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad ocaml-3.10.0~/build/mkmyocamlbuild_config.sh ocaml-3.10.0/build/mkmyocamlbuild_config.sh
+--- ocaml-3.10.0~/build/mkmyocamlbuild_config.sh       2007-03-12 12:58:48.000000000 +0100
++++ ocaml-3.10.0/build/mkmyocamlbuild_config.sh        2007-08-31 00:59:56.671774840 +0200
+@@ -3,7 +3,8 @@
+ cd `dirname $0`/..
+-sed \
++(echo "AS="; cat config/Makefile) | \
++    sed \
+     -e 's/^#ml \(.*\)/\1/' \
+     -e 's/^\(#.*\)$/(* \1 *)/' \
+     -e 's/^\(.*\$([0-9]).*\)$/(* \1 *)/' \
+@@ -13,8 +14,8 @@
+     -e 's/\^""//g' \
+     -e 's/^let <:lower<\(MAKE\|DO\).*$//g' \
+     -e 's/"true"/true/g' \
+-    -e 's/"false"/false/g' \
+-    config/Makefile | \
++    -e 's/"false"/false/g' | \
+     sed -f build/tolower.sed | \
+     sed -f build/tolower.sed | \
+     sed -f build/tolower.sed > myocamlbuild_config.ml
++
index 0d7131c2ded69dda8da53688968828b00223f6e0..9ad636ba3811cca123e90ca80b9a9af0d40f1143 100755 (executable)
@@ -119,28 +119,34 @@ build-indep-stamp:
 clean: abi-sed unpatch
        dh_testdir
        dh_testroot
-       rm -f build-arch-stamp build-indep-stamp config-stamp abi-sed
+       -$(RM) build-arch-stamp build-indep-stamp config-stamp abi-sed opt-built-stamp pre-config
 
        # Add here commands to clean up after the build process.
-       -$(MAKE) clean
+       [ ! -f "$(CURDIR)/config/Makefile" ] || $(MAKE) clean
        if test -d boot.debian; then    \
-               rm -rf boot;            \
+               $(RM) -r boot;          \
                mv boot.debian boot;    \
        fi
-       -$(MAKE) -C emacs clean
-       -$(MAKE) -C debian/ocaml-md5sums clean
-       -$(MAKE) -C debian/dh-ocaml clean
-       -$(MAKE) -C debian/policy clean
+       [ ! -f "$(CURDIR)/config/Makefile" ] || $(MAKE) -C emacs clean
+       $(MAKE) -C debian/ocaml-md5sums clean
+       $(MAKE) -C debian/dh-ocaml clean
+       $(MAKE) -C debian/policy clean
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
        -cp -f /usr/share/misc/config.sub config/gnu/config.sub
 endif
 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
        -cp -f /usr/share/misc/config.guess config/gnu/config.guess
 endif
+       # File not cleaned by upstream
+       -$(RM) _boot_log1
+       -$(RM) _boot_log2
+       -$(RM) _log
+       -$(RM) myocamlbuild_config.ml
+       -$(RM) ocaml-$(OCAMLABI)
 
        dh_clean debian/README.labltk camlp4/config/Makefile.cnf camlp4/config/Makefile config/m.h config/s.h config/Makefile emacs/ocamltags driver/ocamlcomp.sh
        debian/rules abi-sed-clean
-       rm -f debian/$(SRCTARBALL)
+       -$(RM) debian/$(SRCTARBALL)
 
 install: install-indep install-arch
 install-indep: build-indep