Source: openjade
Version: 1.4devel1-22
Tags: patch
User: [email protected]
Usertags: ftcbfs

openjade fails to cross build from source. The immediate failure happens
when determining the sizeof wchar_t, because it uses a custom macro that
happens to not deal with cross compilation. In the mean time, autoconf
has gained capabilities to deal with custom includes, so we can just use
the cross-compatible autoconf macro instead. Then it performs stripping
via install. Doing so not only breaks cross compilation due to using the
wrong strip, it also breaks generation of -dbgsym packages (but the
packaging took care of not breaking DEB_BUILD_OPTIONS=nostrip). Given
that it uses dh_strip already, getting out of the stripping business is
the way forward. I'm attaching a patch for your convenience.

Helmut
diff -u openjade-1.4devel1/acinclude.m4 openjade-1.4devel1/acinclude.m4
--- openjade-1.4devel1/acinclude.m4
+++ openjade-1.4devel1/acinclude.m4
@@ -1,29 +1,3 @@
-dnl OJ_CHECK_SIZEOF(TYPE, HEADER [, CROSS-SIZE])
-AC_DEFUN([OJ_CHECK_SIZEOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[AC_TRY_RUN([#include <stdio.h>
-#include <$2>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof($1));
-  exit(0);
-}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3] , , 
AC_CV_NAME=$3))])dnl
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [Size of the $1 type])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
-
-
 dnl @synopsis AC_CXX_PLACEMENT_OPERATOR_DELETE
 dnl
 dnl If the compiler supports void delete(size_t,void*), define
diff -u openjade-1.4devel1/configure.in openjade-1.4devel1/configure.in
--- openjade-1.4devel1/configure.in
+++ openjade-1.4devel1/configure.in
@@ -67,7 +67,7 @@
 AC_CHECK_SIZEOF(size_t)
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(unsigned short)
-OJ_CHECK_SIZEOF(wchar_t, wchar.h)
+AC_CHECK_SIZEOF(wchar_t,,[#include <wchar.h>])
 AC_CXX_BOOL
 if test "$ac_cv_cxx_bool" = yes; then
   AC_CHECK_SIZEOF(bool)
diff -u openjade-1.4devel1/debian/changelog openjade-1.4devel1/debian/changelog
--- openjade-1.4devel1/debian/changelog
+++ openjade-1.4devel1/debian/changelog
@@ -1,3 +1,12 @@
+openjade (1.4devel1-22.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Use AC_CHECK_SIZEOF rather than OJ_CHECK_SIZEOF.
+    + Defer stripping to dh_strip.
+
+ -- Helmut Grohne <[email protected]>  Mon, 05 Dec 2022 10:20:44 +0100
+
 openjade (1.4devel1-22) unstable; urgency=medium
 
   * Updated Makefile.am, configure.in to resolve FTBFS (Closes: #978337)
diff -u openjade-1.4devel1/debian/rules openjade-1.4devel1/debian/rules
--- openjade-1.4devel1/debian/rules
+++ openjade-1.4devel1/debian/rules
@@ -12,9 +12,6 @@
 install_file   := install -o root -g root -m 644 -p
 install_script := install -o root -g root -m 755 -p
 install_program        := install -o root -g root -m 755 -p
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-  install_program += --strip
-endif
 make_directory := install -d -o root -g root -m 755
 compress       := gzip -9f
 
only in patch2:
unchanged:
--- openjade-1.4devel1.orig/aclocal.m4
+++ openjade-1.4devel1/aclocal.m4
@@ -10,32 +10,6 @@
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
-dnl OJ_CHECK_SIZEOF(TYPE, HEADER [, CROSS-SIZE])
-AC_DEFUN(OJ_CHECK_SIZEOF,
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[AC_TRY_RUN([#include <stdio.h>
-#include <$2>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof($1));
-  exit(0);
-}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3] , , 
AC_CV_NAME=$3))])dnl
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
-
-
 dnl @synopsis AC_CXX_PLACEMENT_OPERATOR_DELETE
 dnl
 dnl If the compiler supports void delete(size_t,void*), define

Reply via email to