summary refs log tree commit diff
path: root/pkgs/development/libraries/libAfterImage
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/libraries/libAfterImage
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/libraries/libAfterImage')
-rw-r--r--pkgs/development/libraries/libAfterImage/default.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libAfterImage/default.nix b/pkgs/development/libraries/libAfterImage/default.nix
new file mode 100644
index 00000000000..de463cdf42c
--- /dev/null
+++ b/pkgs/development/libraries/libAfterImage/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib
+, static ? stdenv.hostPlatform.isStatic
+, withX ? !stdenv.isDarwin }:
+
+stdenv.mkDerivation {
+  pname = "libAfterImage";
+  version = "1.20";
+
+  src = fetchurl {
+    name = "libAfterImage-1.20.tar.bz2";
+    urls = [
+      "https://sourceforge.net/projects/afterstep/files/libAfterImage/1.20/libAfterImage-1.20.tar.bz2/download"
+      "ftp://ftp.afterstep.org/stable/libAfterImage/libAfterImage-1.20.tar.bz2"
+    ];
+    sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf";
+  };
+
+  patches = [
+    # add back --with-gif option
+    (fetchpatch {
+      name = "libafterimage-gif.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-gif.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "16pa94wlqpd7h6mzs4f0qm794yk1xczrwsgf93kdd3g0zbjq3rnr";
+    })
+
+    # fix build with newer giflib
+    (fetchpatch {
+      name = "libafterimage-giflib5-v2.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-giflib5-v2.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "0qwydqy9bm73cg5n3vm97aj4jfi70p7fxqmfbi54vi78z593brln";
+      stripLen = 1;
+    })
+
+    # fix build with newer libpng
+    (fetchpatch {
+      name = "libafterimage-libpng15.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-libpng15.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "1qyvf7786hayasfnnilfbri3p99cfz5wjpbli3gdqj2cvk6mpydv";
+    })
+
+    # fix an ldconfig problem
+    (fetchpatch {
+      name = "libafterimage-makefile.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-makefile.in.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "1n6fniz6dldms615046yhc4mlg9gb53y4yfia8wfz6szgq5zicj4";
+    })
+  ];
+  patchFlags = [ "-p0" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11;
+
+  preConfigure = ''
+    rm -rf {libjpeg,libpng,libungif,zlib}/
+    substituteInPlace Makefile.in \
+      --replace "include .depend" ""
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile.in \
+      --replace "-soname," "-install_name,$out/lib/"
+  '';
+
+  configureFlags = [
+    "--with-gif"
+    "--disable-mmx-optimization"
+    "--${if static then "enable" else "disable"}-staticlibs"
+    "--${if !static then "enable" else "disable"}-sharedlibs"
+  ] ++ lib.optional withX "--with-x";
+
+  meta = with lib; {
+    homepage = "http://www.afterstep.org/afterimage/";
+    description = "A generic image manipulation library";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.veprbl ];
+    license = licenses.lgpl21;
+  };
+}