libtiff: fix cross by switching back to autoconf

The CMake implementation seems to be very in flux, and the latest
release broke cross-compilation for us.  Autotools seems to be
upstream's recommended build system -- it's the one mentioned in the
README.
This commit is contained in:
Alyssa Ross 2021-07-09 10:27:28 +00:00
parent 666c01d977
commit 5df9305b60
2 changed files with 20 additions and 21 deletions

View file

@ -1,8 +1,8 @@
{ lib, stdenv
, fetchurl
, autoreconfHook
, pkg-config
, cmake
, libdeflate
, libjpeg
@ -19,10 +19,6 @@ stdenv.mkDerivation rec {
sha256 = "1j3snghqjbhwmnm5vz3dr1zm68dj15mgbx1wqld7vkl7n2nfaihf";
};
cmakeFlags = if stdenv.isDarwin then [
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
] else null;
# FreeImage needs this patch
patches = [ ./headers.patch ];
@ -34,7 +30,9 @@ stdenv.mkDerivation rec {
moveToOutput include/tiffiop.h $dev_private
'';
nativeBuildInputs = [ cmake pkg-config ];
# If you want to change to a different build system, please make
# sure cross-compilation works first!
nativeBuildInputs = [ autoreconfHook pkg-config ];
propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection)
@ -42,8 +40,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doInstallCheck = true;
installCheckTarget = "test";
doCheck = true;
meta = with lib; {
description = "Library and utilities for working with the TIFF image file format";

View file

@ -1,14 +1,16 @@
diff --git i/libtiff/CMakeLists.txt w/libtiff/CMakeLists.txt
index 90105b28..340c75cf 100755
--- i/libtiff/CMakeLists.txt
+++ w/libtiff/CMakeLists.txt
@@ -31,6 +31,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in
@ONLY)
diff --git i/libtiff/Makefile.am w/libtiff/Makefile.am
index 44522b62..d66e5948 100644
--- i/libtiff/Makefile.am
+++ w/libtiff/Makefile.am
@@ -36,8 +36,11 @@ EXTRA_DIST = \
tiffconf.h.cmake.in
set(tiff_public_HEADERS
+ tiffiop.h
+ ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h
+ tif_dir.h
tiff.h
tiffio.h
tiffvers.h
libtiffinclude_HEADERS = \
+ tif_config.h \
+ tif_dir.h \
tiff.h \
tiffio.h \
+ tiffiop.h \
tiffvers.h
if HAVE_CXX