libAfterImage: compile against libX11

This is needed to not have X_DISPLAY_MISSING for asimage2pixmap function
to be implemented:
https://root-forum.cern.ch/t/root-xpm-error-on-ubuntu-revisited/4552/10
This commit is contained in:
Dmitry Kalinkin 2021-05-19 05:12:55 -04:00
parent 0b6dcc02cd
commit bfaeb1bdd7

View file

@ -1,5 +1,6 @@
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, zlib { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib
, static ? stdenv.hostPlatform.isStatic }: , static ? stdenv.hostPlatform.isStatic
, withX ? !stdenv.isDarwin }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "libAfterImage"; pname = "libAfterImage";
@ -47,7 +48,7 @@ stdenv.mkDerivation {
patchFlags = [ "-p0" ]; patchFlags = [ "-p0" ];
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ giflib libjpeg libpng zlib ]; buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11;
preConfigure = '' preConfigure = ''
rm -rf {libjpeg,libpng,libungif,zlib}/ rm -rf {libjpeg,libpng,libungif,zlib}/
@ -63,7 +64,7 @@ stdenv.mkDerivation {
"--disable-mmx-optimization" "--disable-mmx-optimization"
"--${if static then "enable" else "disable"}-staticlibs" "--${if static then "enable" else "disable"}-staticlibs"
"--${if !static then "enable" else "disable"}-sharedlibs" "--${if !static then "enable" else "disable"}-sharedlibs"
]; ] ++ lib.optional withX "--with-x";
meta = with lib; { meta = with lib; {
homepage = "http://www.afterstep.org/afterimage/"; homepage = "http://www.afterstep.org/afterimage/";