Skip to content

Commit

Permalink
cinepaint: updating, and making it build
Browse files Browse the repository at this point in the history
I wrote a little patch for the cmake files, or it
didn't install.

I also used the NIX_LDFLAGS trick; they are not doing proper linking somehow.
  • Loading branch information
viric committed Jul 2, 2012
1 parent f0e4e77 commit dcdea9d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
12 changes: 8 additions & 4 deletions pkgs/applications/graphics/cinepaint/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
flex, libtiff, libjpeg, libpng, libexif, zlib, perl, libX11,
perlXMLParser, python, pygtk, gettext, intltool, babl, gegl,
glib, makedepend, xf86vidmodeproto, xineramaproto, libXmu, openexr,
mesa, libXext, libXpm, libXxf86vm, pixman, libpthreadstubs } :
mesa, libXext, libXpm, libXau, libXxf86vm, pixman, libpthreadstubs, fltk } :

stdenv.mkDerivation rec {
name = "cinepaint-1.0";
Expand All @@ -12,15 +12,19 @@ stdenv.mkDerivation rec {
sha256 = "02mbpsykd7sfr9h6c6gxld6i3bdwnsgvm70b5yff01gwi69w2wi7";
};

buildInputs = [ gtk freetype fontconfig lcms flex libtiff libjpeg libpng
buildInputs = [ libpng gtk freetype fontconfig lcms flex libtiff libjpeg
libexif zlib perl libX11 perlXMLParser python pygtk gettext intltool babl
gegl glib makedepend xf86vidmodeproto xineramaproto libXmu openexr mesa
libXext libXpm libXxf86vm pixman libpthreadstubs
libXext libXpm libXau libXxf86vm pixman libpthreadstubs fltk
];

patches = [ ./install.patch ];

buildNativeInputs = [ cmake pkgconfig ];

NIX_CFLAGS_COMPILE = "-I.";
NIX_LDFLAGS = "-llcms -ljpeg";

# NIX_CFLAGS_COMPILE = "-I.";

meta = {
homepage = http://www.cinepaint.org/;
Expand Down
24 changes: 24 additions & 0 deletions pkgs/applications/graphics/cinepaint/install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dfb182f..5adaaa5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,7 +138,7 @@ STRING(REPLACE "/" "\\/" ESCAPEDPREFIX ${PREFIX})
# Note that for MacOS this needs to be revised
# for the @OSX_ICC...@ variables
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/gimprc
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gimprc
COMMAND sed -e s/\@platform\@//g
-e s/\@prefix\@/${ESCAPEDPREFIX}/g
-e s/\@exec_prefix\@/\${prefix}/g
@@ -155,8 +155,8 @@ ADD_CUSTOM_COMMAND(

ADD_CUSTOM_TARGET(RCFile ALL echo
""
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/user_install
- ${CMAKE_CURRENT_SOURCE_DIR}/gimprc
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user_install
+ ${CMAKE_CURRENT_BINARY_DIR}/gimprc
)


5 changes: 4 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6402,7 +6402,10 @@ let

compiz_plugins_extra = callPackage ../applications/window-managers/compiz/plugins-extra.nix { };

cinepaint = callPackage ../applications/graphics/cinepaint { };
cinepaint = callPackage ../applications/graphics/cinepaint {
fltk = fltk13;
libpng = libpng12;
};

codeville = builderDefsPackage (import ../applications/version-management/codeville/0.8.0.nix) {
inherit makeWrapper;
Expand Down

0 comments on commit dcdea9d

Please sign in to comment.