Fix visualboyadvance compilation with libpng-1.5; patch from gentoo

svn path=/nixpkgs/branches/libpng15/; revision=29651

+14 -1
+1 -1
pkgs/misc/emulators/VisualBoyAdvance/default.nix
··· 6 6 url = mirror://sourceforge/vba/VisualBoyAdvance-src-1.7.2.tar.gz; 7 7 sha256 = "1dr9w5i296dyq2gbx7sijk6p375aqnwld2n6rwnbzm2g3a94y4gl"; 8 8 }; 9 - patches = [ ./fix.diff ]; # patch to shut up lost of precision errors 9 + patches = [ ./libpng15.patch ./fix.diff ]; # patch to shut up lost of precision errors 10 10 preConfigure = '' 11 11 # Fix errors with invalid conversion from 'const char*' to 'char*' 12 12 sed -i -e "s|char \* p = strrchr|const char * p = strrchr|g" src/GBA.cpp
+13
pkgs/misc/emulators/VisualBoyAdvance/libpng15.patch
··· 1 + From Gentoo. Fixes compilation with libpng-1.5 2 + 3 + --- a/src/Util.cpp 4 + +++ b/src/Util.cpp 5 + @@ -79,7 +79,7 @@ 6 + return false; 7 + } 8 + 9 + - if(setjmp(png_ptr->jmpbuf)) { 10 + + if(setjmp(png_jmpbuf(png_ptr))) { 11 + png_destroy_write_struct(&png_ptr,NULL); 12 + fclose(fp); 13 + return false;