diff --git a/pkgs/development/libraries/libtiger/default.nix b/pkgs/development/libraries/libtiger/default.nix index 60dee56e6a2..7876c23bcc1 100644 --- a/pkgs/development/libraries/libtiger/default.nix +++ b/pkgs/development/libraries/libtiger/default.nix @@ -1,4 +1,6 @@ -{ stdenv, lib, fetchurl, libkate, pango, cairo, pkg-config, darwin }: +{ stdenv, lib, fetchurl, autoreconfHook, pkg-config +, libkate, pango, cairo, darwin +}: stdenv.mkDerivation rec { pname = "libtiger"; @@ -9,7 +11,15 @@ stdenv.mkDerivation rec { sha256 = "0rj1bmr9kngrgbxrjbn4f4f9pww0wmf6viflinq7ava7zdav4hkk"; }; - nativeBuildInputs = [ pkg-config ]; + patches = [ + ./pkg-config.patch + ]; + + postPatch = '' + substituteInPlace configure.ac --replace "-Werror" "-Wno-error" + ''; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libkate pango cairo ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.ApplicationServices; diff --git a/pkgs/development/libraries/libtiger/pkg-config.patch b/pkgs/development/libraries/libtiger/pkg-config.patch new file mode 100644 index 00000000000..68c89254461 --- /dev/null +++ b/pkgs/development/libraries/libtiger/pkg-config.patch @@ -0,0 +1,37 @@ +From 3ebeb0932edc01b7768216dc7d3b3c5aac21fba0 Mon Sep 17 00:00:00 2001 +From: Alyssa Ross +Date: Sun, 26 Feb 2023 17:21:48 +0000 +Subject: [PATCH] configure.ac: detect pkg-config properly + +When cross compiling, the relevant pkg-config program might be prefixed +with the name of the host platform, so the previous check was not +correct. Detect pkg-config properly, using the appropriate macro. +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2f63684..bf2faf7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,7 +46,7 @@ AC_CHECK_FUNCS([select nanosleep usleep]) + + AC_TYPE_SIZE_T + +-AC_CHECK_PROG(HAVE_PKG_CONFIG,pkg-config,yes) ++PKG_PROG_PKG_CONFIG + + AC_ARG_ENABLE(doc, [ --disable-doc Disable building documentation (default enabled)]) + if test "x$enable_doc" != "xno" +@@ -57,7 +57,7 @@ else + fi + AM_CONDITIONAL(HAVE_DOXYGEN,test "${HAVE_DOXYGEN}" = "yes") + +-if test "x$HAVE_PKG_CONFIG" = "xyes" ++if test "x$PKG_CONFIG" != "x" + then + PKG_CHECK_MODULES(KATE,kate >= 0.2.0) + PKG_CHECK_MODULES(PANGOCAIRO,pangocairo >= 1.16) +-- +2.37.1 +