forked from ports/contrib
mtpaint: fixed dl url, and added patch fixing png linking breakage
This commit is contained in:
parent
26864cb318
commit
5884699c0a
@ -1 +1,2 @@
|
||||
fbe34eb25f96b6092403115f1f6ab387 mtpaint-3.31.tar.bz2
|
||||
22c696ba5b99d84b4e741d77649407be png_c.diff
|
||||
|
@ -8,10 +8,11 @@
|
||||
name=mtpaint
|
||||
version=3.31
|
||||
release=1
|
||||
source=(http://dfn.download.sourceforge.net/project/$name/$name/$version/$name-$version.tar.bz2)
|
||||
source=(http://dl.sourceforge.net/project/$name/$name/$version/$name-$version.tar.bz2 png_c.diff)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
patch -p1 -i ../png_c.diff
|
||||
./configure --prefix=/usr gtk2 cflags man
|
||||
|
||||
make
|
||||
|
27
mtpaint/png_c.diff
Normal file
27
mtpaint/png_c.diff
Normal file
@ -0,0 +1,27 @@
|
||||
diff -pruN mtpaint-3.31.old//src/png.c mtpaint-3.31/src/png.c
|
||||
--- mtpaint-3.31.old//src/png.c 2010-11-18 12:03:43.000000000 +0100
|
||||
+++ mtpaint-3.31/src/png.c 2010-11-18 12:07:38.000000000 +0100
|
||||
@@ -539,7 +539,11 @@ static int load_png(char *file_name, ls_
|
||||
if (settings->bpp == 3)
|
||||
{
|
||||
png_set_strip_16(png_ptr);
|
||||
+#if PNG_LIBPNG_VER < 10400
|
||||
png_set_gray_1_2_4_to_8(png_ptr);
|
||||
+#else
|
||||
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||
+#endif
|
||||
png_set_palette_to_rgb(png_ptr);
|
||||
png_set_gray_to_rgb(png_ptr);
|
||||
|
||||
@@ -644,7 +648,11 @@ static int load_png(char *file_name, ls_
|
||||
png_set_strip_alpha(png_ptr);
|
||||
png_set_packing(png_ptr);
|
||||
if ((color_type == PNG_COLOR_TYPE_GRAY) && (bit_depth < 8))
|
||||
+#if PNG_LIBPNG_VER < 10400
|
||||
png_set_gray_1_2_4_to_8(png_ptr);
|
||||
+#else
|
||||
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||
+#endif
|
||||
for (i = 0; i < height; i++)
|
||||
{
|
||||
row_pointers[i] = settings->img[CHN_IMAGE] + i * width;
|
Loading…
x
Reference in New Issue
Block a user