mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Fix K3D build
This commit is contained in:
parent
b3f09699ee
commit
347dd52019
@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./k3d_gtkmm224.patch
|
||||
./libpng-1.4.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
@ -28,7 +29,9 @@ stdenv.mkDerivation rec {
|
||||
gtkmm glibmm gtkglext pangox_compat libXmu
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
#doCheck = false;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "A 3D editor with support for procedural editing";
|
||||
|
53
pkgs/applications/graphics/k3d/libpng-1.4.patch
Normal file
53
pkgs/applications/graphics/k3d/libpng-1.4.patch
Normal file
@ -0,0 +1,53 @@
|
||||
--- k3d-source-0.8.0.1/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp 2010-04-18 13:49:33.000000000 +0800
|
||||
+++ k3d-source-0.8.0.1-patched/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp 2010-06-10 21:17:51.555920268 +0800
|
||||
@@ -148,12 +148,12 @@
|
||||
// allocate/initialize the image information data
|
||||
_info_ptr = png_create_info_struct(_png_ptr);
|
||||
if (_info_ptr == NULL) {
|
||||
- png_destroy_read_struct(&_png_ptr,png_infopp_NULL,png_infopp_NULL);
|
||||
+ png_destroy_read_struct(&_png_ptr,NULL,NULL);
|
||||
io_error("png_get_file_size: fail to call png_create_info_struct()");
|
||||
}
|
||||
if (setjmp(png_jmpbuf(_png_ptr))) {
|
||||
//free all of the memory associated with the png_ptr and info_ptr
|
||||
- png_destroy_read_struct(&_png_ptr, &_info_ptr, png_infopp_NULL);
|
||||
+ png_destroy_read_struct(&_png_ptr, &_info_ptr, NULL);
|
||||
io_error("png_get_file_size: fail to call setjmp()");
|
||||
}
|
||||
png_init_io(_png_ptr, get());
|
||||
@@ -165,7 +165,7 @@
|
||||
png_reader(const char* filename) : file_mgr(filename, "rb") { init(); }
|
||||
|
||||
~png_reader() {
|
||||
- png_destroy_read_struct(&_png_ptr,&_info_ptr,png_infopp_NULL);
|
||||
+ png_destroy_read_struct(&_png_ptr,&_info_ptr,NULL);
|
||||
}
|
||||
point2<std::ptrdiff_t> get_dimensions() {
|
||||
return point2<std::ptrdiff_t>(png_get_image_width(_png_ptr,_info_ptr),
|
||||
@@ -177,7 +177,7 @@
|
||||
int bit_depth, color_type, interlace_type;
|
||||
png_get_IHDR(_png_ptr, _info_ptr,
|
||||
&width, &height,&bit_depth,&color_type,&interlace_type,
|
||||
- int_p_NULL, int_p_NULL);
|
||||
+ (int *) NULL, (int *) NULL);
|
||||
io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height),
|
||||
"png_read_view: input view size does not match PNG file size");
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
int bit_depth, color_type, interlace_type;
|
||||
png_get_IHDR(_png_ptr, _info_ptr,
|
||||
&width, &height,&bit_depth,&color_type,&interlace_type,
|
||||
- int_p_NULL, int_p_NULL);
|
||||
+ (int *) NULL, (int *) NULL);
|
||||
io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height),
|
||||
"png_reader_color_convert::apply(): input view size does not match PNG file size");
|
||||
switch (color_type) {
|
||||
@@ -308,7 +308,7 @@
|
||||
io_error_if(!_png_ptr,"png_write_initialize: fail to call png_create_write_struct()");
|
||||
_info_ptr = png_create_info_struct(_png_ptr);
|
||||
if (!_info_ptr) {
|
||||
- png_destroy_write_struct(&_png_ptr,png_infopp_NULL);
|
||||
+ png_destroy_write_struct(&_png_ptr,NULL);
|
||||
io_error("png_write_initialize: fail to call png_create_info_struct()");
|
||||
}
|
||||
if (setjmp(png_jmpbuf(_png_ptr))) {
|
Loading…
Reference in New Issue
Block a user