svn commit: r375457 - in head/games/wargus: . files
Antoine Brodin
antoine at FreeBSD.org
Wed Dec 24 13:24:03 UTC 2014
Author: antoine
Date: Wed Dec 24 13:24:01 2014
New Revision: 375457
URL: https://svnweb.freebsd.org/changeset/ports/375457
QAT: https://qat.redports.org/buildarchive/r375457/
Log:
Properly support png 1.5
Obtained from: Gentoo
Modified:
head/games/wargus/Makefile
head/games/wargus/files/patch-wartool.c
Modified: head/games/wargus/Makefile
==============================================================================
--- head/games/wargus/Makefile Wed Dec 24 13:23:32 2014 (r375456)
+++ head/games/wargus/Makefile Wed Dec 24 13:24:01 2014 (r375457)
@@ -15,7 +15,7 @@ COMMENT= Warcraft 2 mod that allows you
LICENSE= GPLv2 # or later
LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png
+LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
RUN_DEPENDS= stratagus:${PORTSDIR}/games/stratagus
NOT_FOR_ARCHS= sparc64
@@ -24,7 +24,7 @@ USE_GNOME= gtk20
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
SUB_FILES= ${PORTNAME} pkg-message
-CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng15
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
post-patch:
Modified: head/games/wargus/files/patch-wartool.c
==============================================================================
--- head/games/wargus/files/patch-wartool.c Wed Dec 24 13:23:32 2014 (r375456)
+++ head/games/wargus/files/patch-wartool.c Wed Dec 24 13:24:01 2014 (r375457)
@@ -1,15 +1,14 @@
---- wartool.c.orig 2010-11-22 22:44:24.000000000 +0100
-+++ wartool.c 2012-05-05 12:37:53.000000000 +0200
-@@ -62,6 +62,8 @@
+--- wartool.orig.c
++++ wartool.c
+@@ -61,6 +61,7 @@
+ #include <unistd.h>
#endif
#include <ctype.h>
- #include <png.h>
+#include <zlib.h>
-+#include <pngpriv.h>
+ #include <png.h>
#include "endian.h"
- #include "xmi2mid.h"
-@@ -1876,7 +1878,7 @@
+@@ -1876,7 +1877,7 @@
return 1;
}
@@ -18,3 +17,20 @@
// FIXME: must free buffers!!
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(fp);
+@@ -1888,14 +1889,8 @@
+ png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
+
+ // prepare the file information
+- info_ptr->width = w;
+- info_ptr->height = h;
+- info_ptr->bit_depth = 8;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+- info_ptr->interlace_type = 0;
+- info_ptr->valid |= PNG_INFO_PLTE;
+- info_ptr->palette = (png_colorp)pal;
+- info_ptr->num_palette = 256;
++ png_set_IHDR(png_ptr, info_ptr, w, h, 8, PNG_COLOR_TYPE_PALETTE, 0, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
++ png_set_PLTE(png_ptr, info_ptr, (png_colorp)pal, 256);
+
+ if (transparent) {
+ unsigned char* p;
More information about the svn-ports-head
mailing list