Merge pull request #7130 from spwhitt/gimp
Get GIMP to build on Darwin and misc. related fixes
This commit is contained in:
commit
d7382dc748
@ -28,12 +28,13 @@ stdenv.mkDerivation rec {
|
|||||||
#configureFlags = [ "--disable-print" ];
|
#configureFlags = [ "--disable-print" ];
|
||||||
|
|
||||||
# "screenshot" needs this.
|
# "screenshot" needs this.
|
||||||
NIX_LDFLAGS = "-rpath ${xlibs.libX11}/lib";
|
NIX_LDFLAGS = "-rpath ${xlibs.libX11}/lib"
|
||||||
|
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The GNU Image Manipulation Program";
|
description = "The GNU Image Manipulation Program";
|
||||||
homepage = http://www.gimp.org/;
|
homepage = http://www.gimp.org/;
|
||||||
license = stdenv.lib.licenses.gpl3Plus;
|
license = stdenv.lib.licenses.gpl3Plus;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
106
pkgs/development/libraries/aalib/darwin.patch
Normal file
106
pkgs/development/libraries/aalib/darwin.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
diff --git a/src/aaedit.c b/src/aaedit.c
|
||||||
|
index 09534d2..2ea52f9 100644
|
||||||
|
--- a/src/aaedit.c
|
||||||
|
+++ b/src/aaedit.c
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
-#include <malloc.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
static void aa_editdisplay(struct aa_edit *e)
|
||||||
|
|
||||||
|
diff --git a/src/aakbdreg.c b/src/aakbdreg.c
|
||||||
|
index def65fe..f4f8efb 100644
|
||||||
|
--- a/src/aakbdreg.c
|
||||||
|
+++ b/src/aakbdreg.c
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#include <malloc.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aalib.c b/src/aalib.c
|
||||||
|
index 11fecc8..e3063b4 100644
|
||||||
|
--- a/src/aalib.c
|
||||||
|
+++ b/src/aalib.c
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
-#include <malloc.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
|
||||||
|
diff --git a/src/aamoureg.c b/src/aamoureg.c
|
||||||
|
index 0380828..bb55fe3 100644
|
||||||
|
--- a/src/aamoureg.c
|
||||||
|
+++ b/src/aamoureg.c
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#include <malloc.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aarec.c b/src/aarec.c
|
||||||
|
index 70f4ebc..ee43e8a 100644
|
||||||
|
--- a/src/aarec.c
|
||||||
|
+++ b/src/aarec.c
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
#include <string.h>
|
||||||
|
-#include <malloc.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,
|
||||||
|
diff --git a/src/aaregist.c b/src/aaregist.c
|
||||||
|
index 54abec0..765155e 100644
|
||||||
|
--- a/src/aaregist.c
|
||||||
|
+++ b/src/aaregist.c
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#include <malloc.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "aalib.h"
|
||||||
|
#include "aaint.h"
|
||||||
|
diff --git a/src/aax.c b/src/aax.c
|
||||||
|
index adcbd82..36e3294 100644
|
||||||
|
--- a/src/aax.c
|
||||||
|
+++ b/src/aax.c
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-#include <malloc.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
diff --git a/src/aaxkbd.c b/src/aaxkbd.c
|
||||||
|
index 30d5903..da2248d 100644
|
||||||
|
--- a/src/aaxkbd.c
|
||||||
|
+++ b/src/aaxkbd.c
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-#include <malloc.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
diff --git a/src/aaxmouse.c b/src/aaxmouse.c
|
||||||
|
index 9935b03..7e725ad 100644
|
||||||
|
--- a/src/aaxmouse.c
|
||||||
|
+++ b/src/aaxmouse.c
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-#include <malloc.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
diff --git a/aalib.m4 b/aalib.m4
|
||||||
|
index c40b8db..991fbda 100644
|
||||||
|
--- a/aalib.m4
|
||||||
|
+++ b/aalib.m4
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
|
||||||
|
dnl
|
||||||
|
-AC_DEFUN(AM_PATH_AALIB,
|
||||||
|
+AC_DEFUN([AM_PATH_AALIB],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the aalib-config script
|
||||||
|
dnl
|
@ -17,6 +17,8 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
configureFlags = "--without-x --with-ncurses=${ncurses}";
|
configureFlags = "--without-x --with-ncurses=${ncurses}";
|
||||||
|
|
||||||
|
patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin.patch ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "ASCII art graphics library";
|
description = "ASCII art graphics library";
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "babl-0.1.10";
|
name = "babl-0.1.12";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://ftp.gtk.org/pub/babl/0.1/${name}.tar.bz2";
|
url = "http://ftp.gtk.org/pub/babl/0.1/${name}.tar.bz2";
|
||||||
sha256 = "943fc36ceac7dd25bc928256bc7b535a42989c6b971578146869eee5fe5955f4";
|
sha256 = "01x4an6zixrhn0vibkxpcb7gg348gadydq8gpw82rdqp39zjp01g";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
|
|||||||
# needs fonts otherwise don't know how to pass them
|
# needs fonts otherwise don't know how to pass them
|
||||||
configureFlags = "--disable-docs";
|
configureFlags = "--disable-docs";
|
||||||
|
|
||||||
|
NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
|
||||||
|
|
||||||
buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk bzip2 intltool ];
|
buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk bzip2 intltool ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, cmake, libiconv, libintlOrEmpty
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
|
||||||
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
|
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
|
||||||
, qt4Support ? false, qt4 ? null, qt5
|
, qt4Support ? false, qt4 ? null, qt5
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.28.1"; # even major numbers are stable
|
version = "0.32.0"; # even major numbers are stable
|
||||||
sha256 = "01pxjdbhvpxf00ncf8d9wxc8gkcqcxz59lwrpa151ah988inxkrc";
|
sha256 = "162vfbvbz0frvqyk00ldsbl49h4bj8i8wn0ngfl30xg1lldy6qs9";
|
||||||
|
|
||||||
# This is for Okular (and similar) to support subpixel rendering.
|
# This is for Okular (and similar) to support subpixel rendering.
|
||||||
# It's kept from upstream because of political reasons.
|
# It's kept from upstream because of political reasons.
|
||||||
@ -26,9 +26,13 @@ let
|
|||||||
|
|
||||||
propagatedBuildInputs = [ zlib cairo freetype fontconfig libjpeg lcms curl openjpeg ];
|
propagatedBuildInputs = [ zlib cairo freetype fontconfig libjpeg lcms curl openjpeg ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig cmake libiconv ] ++ libintlOrEmpty;
|
nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;
|
||||||
|
|
||||||
cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON";
|
configureFlags = [
|
||||||
|
"--enable-xpdf-headers"
|
||||||
|
"--enable-libcurl"
|
||||||
|
"--enable-zlib"
|
||||||
|
];
|
||||||
|
|
||||||
patches = [ ./datadir_env.patch ./poppler-glib.patch ];
|
patches = [ ./datadir_env.patch ./poppler-glib.patch ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user