From 5f137cf5b70cae5b4bb2185b6439a020b1d47e63 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 14 May 2022 12:59:05 +0100 Subject: [PATCH] apacheHttpdPackages.mod_tile: pull upstream fix for -fno-common Without che change build on upstream gcc-10 fails as: ld: src/renderd-gen_tile.o:/build/source/includes/daemon.h:48: multiple definition of `render_request_queue'; src/daemon.o:/build/source/includes/daemon.h:48: first defined here --- .../servers/http/apache-modules/mod_tile/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/apache-modules/mod_tile/default.nix b/pkgs/servers/http/apache-modules/mod_tile/default.nix index 31ddd1863838..78c5749a616e 100644 --- a/pkgs/servers/http/apache-modules/mod_tile/default.nix +++ b/pkgs/servers/http/apache-modules/mod_tile/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, apacheHttpd, apr, cairo, iniparser, mapnik }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, apacheHttpd, apr, cairo, iniparser, mapnik }: stdenv.mkDerivation rec { pname = "mod_tile"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "12c96avka1dfb9wxqmjd57j30w9h8yx4y4w34kyq6xnf6lwnkcxp"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains: + # https://github.com/openstreetmap/mod_tile/pull/202 + (fetchpatch { + name = "fno-common"; + url = "https://github.com/openstreetmap/mod_tile/commit/a22065b8ae3c018820a5ca9bf8e2b2bb0a0bfeb4.patch"; + sha256 = "1ywfa14xn9aa96vx1adn1ndi29qpflca06x986bx9c5pqk761yz3"; + }) + ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ apacheHttpd apr cairo iniparser mapnik ];