Your message dated Fri, 13 Dec 2019 01:50:31 +0000
with message-id <[email protected]>
and subject line Bug#946477: fixed in povray 1:3.7.0.8-4
has caused the Debian Bug report #946477,
regarding povray FTCBFS: uses AC_RUN_IFELSE
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
946477: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946477
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: povray
Version: 1:3.7.0.8-3
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

povray fails to cross build from source, because it uses AC_RUN_IFELSE
in a few places. Getting rid of these isn't obvious. It's used for
different things:
 * Checking whether boost thread works. -> AC_LINK_IFELSE suffices here.
 * Determining versions of libraries. -> AC_COMPUTE_INT often works.
 * Determining version of libtiff. -> We can opportunistically use
   PKG_CHECK_MODULES and fall back to the old check on failure.

Together these changes make povray cross buildable. We're not the first
ones attempting to do so. OpenEmbedded has tried earlier:
https://github.com/openembedded/openembedded/blob/master/recipes/povray/povray-3.6.1%2B3.7.0-beta25b/configure-cross-hack.patch
Their patch is not suitable for upstream inclusion, but I think this one
is. Please consider applying it. Doing so would help other distributions
as well.

Helmut
--- povray-3.7.0.8.orig/unix/configure.ac
+++ povray-3.7.0.8/unix/configure.ac
@@ -60,7 +60,6 @@
 m4_include([unix/config/ax_boost_base.m4])
 m4_include([unix/config/ax_boost_thread.m4])
 m4_include([unix/config/ax_test_compiler_flags.m4])
-m4_include([unix/config/ax_check_lib.m4])
 m4_include([unix/config/ax_check_libjpeg.m4])
 m4_include([unix/config/ax_check_libsdl.m4])
 m4_include([unix/config/ax_check_libtiff.m4])
@@ -314,7 +313,7 @@
 do
   LIBS=$SAVED_LIBS
   LIBS="$LIBS $extralib"
-  AC_RUN_IFELSE([
+  AC_LINK_IFELSE([
     AC_LANG_PROGRAM([[
       #include <boost/thread/thread.hpp>
     ]],[[
@@ -326,9 +325,7 @@
     AC_MSG_RESULT([yes])
     BOOST_THREAD_LIB="$BOOST_THREAD_LIB $extralib"
     boost_thread_links=1
-  ],,[
-    AC_MSG_RESULT([cross-compiling])  # FIXME
-  ])
+  ],)
   if test $boost_thread_links = '1'; then
     break
   fi
@@ -363,7 +360,20 @@
     AC_MSG_ERROR([disabling support for ZLIB requires NON_REDISTRIBUTABLE_BUILD=yes])
   fi
   AC_MSG_RESULT([yes])
-  AX_CHECK_LIB([z], [$required_libz_version], [z], [zlibVersion], [zlib.h], [zlibVersion()], [$with_zlib])
+  if test x"$with_zlib" != x; then
+    CPPFLAGS="-I$with_zlib/../include $CPPFLAGS"
+    LDFLAGS="-L$with_zlib $LDFLAGS"
+  fi
+  AC_SEARCH_LIBS([deflate],[z],[
+    AC_CHECK_HEADER([zlib.h],[
+      AC_MSG_CHECKING([for libz version >= $required_libz_version])
+      AC_COMPUTE_INT([ZLIB_VER_MAJOR],[ZLIB_VER_MAJOR],[#include <zlib.h>])
+      AC_COMPUTE_INT([ZLIB_VER_MINOR],[ZLIB_VER_MINOR],[#include <zlib.h>])
+      AC_COMPUTE_INT([ZLIB_VER_REVISION],[ZLIB_VER_REVISION],[#include <zlib.h>])
+      AX_COMPARE_VERSION([$ZLIB_VER_MAJOR.$ZLIB_VER_MINOR.$ZLIB_VER_REVISION],[ge],[$required_libz_version],[ax_check_lib=ok],[ax_check_lib=bad])
+      AC_MSG_RESULT([$ZLIB_VER_MAJOR.$ZLIB_VER_MINOR.$ZLIB_VER_REVISION, $ax_check_lib])
+    ],[ax_check_lib="no headers"])
+  ],[ax_check_lib="not found"])
   if test x"$ax_check_lib" != x"ok"; then
     AC_MSG_ERROR([cannot find a suitable ZLIB library])
   else
@@ -382,7 +392,20 @@
     AC_MSG_ERROR([disabling support for PNG requires NON_REDISTRIBUTABLE_BUILD=yes])
   fi
   AC_MSG_RESULT([yes])
-  AX_CHECK_LIB([png], [$required_libpng_version], [png14 png png12 png], [png_get_libpng_ver], [png.h], [png_get_libpng_ver(NULL)], [$with_libpng])
+  if test x"$with_libpng" != x; then
+    CPPFLAGS="-I$with_libpng/../include $CPPFLAGS"
+    LDFLAGS="-L$with_libpng $LDFLAGS"
+  fi
+  AC_SEARCH_LIBS([png_get_libpng_ver],[png14 png png12 png],[
+    AC_CHECK_HEADER([png.h],[
+      AC_MSG_CHECKING([for libpng version >= $required_libpng_version])
+      AC_COMPUTE_INT([PNG_LIBPNG_VER_MAJOR],[PNG_LIBPNG_VER_MAJOR],[#include <png.h>])
+      AC_COMPUTE_INT([PNG_LIBPNG_VER_MINOR],[PNG_LIBPNG_VER_MINOR],[#include <png.h>])
+      AC_COMPUTE_INT([PNG_LIBPNG_VER_RELEASE],[PNG_LIBPNG_VER_RELEASE],[#include <png.h>])
+      AX_COMPARE_VERSION([$PNG_LIBPNG_VER_MAJOR.$PNG_LIBPNG_VER_MINOR.$PNG_LIBPNG_VER_RELEASE],[ge],[$required_libpng_version],[ax_check_lib=ok],[$ax_check_lib=bad])
+      AC_MSG_RESULT([$PNG_LIBPNG_VER_MAJOR.$PNG_LIBPNG_VER_MINOR.$PNG_LIBPNG_VER_RELEASE, $ax_check_lib])
+    ],[ax_check_lib="no headers"])
+  ],[ax_check_lib="not found"])
   ### FIXME: do not allow for 1.4.x
 	# This doesn't appear to be needed now that we're allowing 1.4 (jh)
   # AC_MSG_CHECKING([for libpng version < 1.4 (not supported at the moment!)])
--- povray-3.7.0.8.orig/unix/config/ax_check_lib.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-# SYNOPSIS
-#
-#   AX_CHECK_LIB(lib, required_version, search_libs, check_function, header, version_function, lib_dir)
-#
-# DESCRIPTION
-#
-#   Check whether a function is found in a set of libraries and compare
-#   the library version to the required one.
-#
-# LAST MODIFICATION
-#
-#   2007-11-08
-#
-# COPYLEFT
-#
-#   Copyright (c) 2006 Nicolas Calimet
-#
-#   Copying and distribution of this file, with or without
-#   modification, are permitted in any medium without royalty provided
-#   the copyright notice and this notice are preserved.
-
-AC_DEFUN([AX_CHECK_LIB],
-[
-  ax_check_lib_save_cppflags="$CPPFLAGS"
-  ax_check_lib_save_ldflags="$LDFLAGS"
-  if test x"$7" != x""; then
-    CPPFLAGS="-I$7/../include $CPPFLAGS"
-    LDFLAGS="-L$7 $LDFLAGS"
-  fi
-
-  # check the library
-  AC_SEARCH_LIBS(
-    [$4],
-    [$3],
-    [
-      # check include file
-      AC_CHECK_HEADER(
-        [$5],
-        [
-          # check library version, update LIBS
-          AC_MSG_CHECKING([for lib$1 version >= $2])
-          AC_RUN_IFELSE(
-            [
-              AC_LANG_SOURCE(
-[#include <stdio.h>
-#include <string.h>
-#include "$5"
-int main (void)
-{
-  const char *version = $6;
-  fprintf (stderr, "%s\n", version);
-  return 0;
-}]
-              )
-            ],
-            [
-              ax_check_lib_version=`eval $ac_try 2>&1`
-              AX_COMPARE_VERSION([$ax_check_lib_version], [ge], [$2], [ax_check_lib="ok"], [ax_check_lib="bad"])
-              AC_MSG_RESULT([$ax_check_lib_version, $ax_check_lib])
-            ],
-            [
-              ax_check_lib="unknown"
-              AC_MSG_RESULT([$ax_check_lib])
-            ],
-            [AC_MSG_RESULT([cross-compiling, forced])]
-          )  # AC_RUN_IFELSE
-        ],
-        [ax_check_lib="no headers"]
-      )  # AC_CHECK_HEADER
-    ],
-    [ax_check_lib="not found"],
-    []
-  )  # AC_SEARCH_LIBS
-
-  if test x"$ax_check_lib" != x"ok"; then
-    CPPFLAGS="$ax_check_lib_save_cppflags"
-    LDFLAGS="$ax_check_lib_save_ldflags"
-  fi
-])
--- povray-3.7.0.8.orig/unix/config/ax_check_libjpeg.m4
+++ povray-3.7.0.8/unix/config/ax_check_libjpeg.m4
@@ -45,29 +45,9 @@
           else
             AC_MSG_CHECKING([for libjpeg version >= $1])
           fi
-          AC_RUN_IFELSE(
-            [
-              AC_LANG_SOURCE(
-[#include <stdio.h>
-#include "jpeglib.h"
-int main (void)
-{
-  fprintf (stderr, "%d\n", JPEG_LIB_VERSION);
-  return 0;
-}]
-              )
-            ],
-            [
-              ax_check_libjpeg_version=`eval $ac_try 2>&1`
-              AX_COMPARE_VERSION([$ax_check_libjpeg_version], [ge], [$ax_check_libjpeg_version_num], [ax_check_libjpeg="ok"], [ax_check_libjpeg="bad"])
-              AC_MSG_RESULT([$ax_check_libjpeg_version, $ax_check_libjpeg])
-            ],
-            [
-              ax_check_libjpeg="unknown"
-              AC_MSG_RESULT([$ax_check_libjpeg])
-            ],
-            [AC_MSG_RESULT([cross-compiling, forced])]
-          )  # AC_RUN_IFELSE
+          AC_COMPUTE_INT([JPEG_LIB_VERSION],[JPEG_LIB_VERSION],[#include "jpeglib.h"])
+          AX_COMPARE_VERSION([$ax_check_libjpeg_version], [ge], [$JPEG_LIB_VERSION], [ax_check_libjpeg="ok"], [ax_check_libjpeg="bad"])
+          AC_MSG_RESULT([$JPEG_LIB_VERSION, $ax_check_libjpeg])
         ],
         [ax_check_libjpeg="no headers"]
       )  # AC_CHECK_HEADER
--- povray-3.7.0.8.orig/unix/config/ax_check_libtiff.m4
+++ povray-3.7.0.8/unix/config/ax_check_libtiff.m4
@@ -20,6 +20,11 @@
 
 AC_DEFUN([AX_CHECK_LIBTIFF],
 [
+  PKG_CHECK_MODULES([LIBTIFF],[libtiff-4 >= $1],[
+    CPPFLAGS="$LIBTIFF_CFLAGS $CPPFLAGS"
+    LIBS="$LIBTIFF_LIBS $LIBS"
+    ax_check_libtiff=ok
+  ],[
   ax_check_libtiff_save_cppflags="$CPPFLAGS"
   ax_check_libtiff_save_ldflags="$LDFLAGS"
   if test x"$2" != x""; then
@@ -84,4 +89,5 @@
     CPPFLAGS="$ax_check_libtiff_save_cppflags"
     LDFLAGS="$ax_check_libtiff_save_ldflags"
   fi
+  ])
 ])

--- End Message ---
--- Begin Message ---
Source: povray
Source-Version: 1:3.7.0.8-4

We believe that the bug you reported is fixed in the latest version of
povray, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Beckmann <[email protected]> (supplier of updated povray package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 13 Dec 2019 02:14:52 +0100
Source: povray
Architecture: source
Version: 1:3.7.0.8-4
Distribution: unstable
Urgency: medium
Maintainer: Andreas Beckmann <[email protected]>
Changed-By: Andreas Beckmann <[email protected]>
Closes: 946477
Changes:
 povray (1:3.7.0.8-4) unstable; urgency=medium
 .
   [ Helmut Grohne ]
   * Remove usage of AC_RUN_IFELSE to fix cross-building.  (Closes: #946477)
Checksums-Sha1:
 5fea743ca525504a4eaaf35838961b7175c46028 2257 povray_3.7.0.8-4.dsc
 951cfbd0768c9ea7f37254a153b94cb682b2967e 43204 povray_3.7.0.8-4.debian.tar.xz
 1966795ac54917394aa04aae3d073aad7c306655 10536 
povray_3.7.0.8-4_source.buildinfo
Checksums-Sha256:
 41b607a76deadfa94b363b2b216fb11a81f80a274f8c7beb3ca0a831a4d79ce5 2257 
povray_3.7.0.8-4.dsc
 f116c9ca38460434a0a6aab71cb1b187bc0a25c3549a5d53c1f10c75706f75cb 43204 
povray_3.7.0.8-4.debian.tar.xz
 8c61ccb54c5783f8e3b0f7fe51231f212470f9ab5df1c86eb4f0cadb249dbe92 10536 
povray_3.7.0.8-4_source.buildinfo
Files:
 98cbb8ace441383f53be45d75f147c52 2257 graphics optional povray_3.7.0.8-4.dsc
 c12812dec6596ce0a26222b7b1301ef7 43204 graphics optional 
povray_3.7.0.8-4.debian.tar.xz
 fa82e01ee263682162d409d7a0424072 10536 graphics optional 
povray_3.7.0.8-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE6/MKMKjZxjvaRMaUX7M/k1np7QgFAl3y6ecQHGFuYmVAZGVi
aWFuLm9yZwAKCRBfsz+TWentCGw4EACpkH+t+9apuITTncHoJSqs3HAlWsbedsCm
ED2mOm7mbhyLgFbORPrx6X4jcBxttxBXn3KaT2H64TZHwM20GpQdcuP1RoPV8YON
LdYt5N2CtDsnxpooC8CECbhA41xJIZR4XZEvBqj3pYuXEYk/rcXGegvV2fTYNCw0
r6/zYfayuGlZy1uNFDOJxGsLy/OvOpoejGNcdefylz9EibKjdtphR9z7YMTfnxc1
08CbE2XGtZmkLVP4/iDTItfSOrlmYMX6feKRvcckPX+6UxLsLtWv0YmDrH31pDm4
JxmOz5ovYOtSvnqB3fG90APpJLb9ykYcVLlCvLRSER0W0DwnGsq5ZHaC44CQsIzm
hT8yJNo/zzPOAPChgzLlwstO3JZSB4C5SrHIHlUWWC06i4HqG0IRyy+tVlYOv/vO
+RbTlGTT/eVc+daMkZVfCAmfmIvfkbd/y1G7y49O7ZF2q6aOv+uiRu/BxIWL9ejb
RzqtdcFqmabOR0gGxmueNIt1Bfs/8Vvz+qf8fn+zUrw2H/F6RkLkVh9h0JVOI5Fb
T8m/6rJ8tzNMp3bNBCsK+SkHyqqoJGN5HMZ/A1pPjXIqpPnLVNHJhC91YUEhkjXQ
nWPCJWLFad0Xof7uVDl+AlZjn6olosBrYaDmkkv9eK0aDFUKdBWPOYDWX3BeS6Yr
1C7DidEG0Q==
=6q3C
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to