svn commit: r375449 - in head/games/xbubble: . files
Antoine Brodin
antoine at FreeBSD.org
Wed Dec 24 12:26:47 UTC 2014
Author: antoine
Date: Wed Dec 24 12:26:45 2014
New Revision: 375449
URL: https://svnweb.freebsd.org/changeset/ports/375449
QAT: https://qat.redports.org/buildarchive/r375449/
Log:
Properly support png 1.5
Obtained from: OpenBSD ports
Modified:
head/games/xbubble/Makefile
head/games/xbubble/files/patch-src-loadpng.c
Modified: head/games/xbubble/Makefile
==============================================================================
--- head/games/xbubble/Makefile Wed Dec 24 12:26:38 2014 (r375448)
+++ head/games/xbubble/Makefile Wed Dec 24 12:26:45 2014 (r375449)
@@ -13,13 +13,13 @@ COMMENT= Puzzle Bobble clone for Unix/X1
LICENSE= GPLv2 # or later
LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png
+LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
USE_XORG= x11 xmu
GNU_CONFIGURE= yes
USES= gmake
-CPPFLAGS+= -I${LOCALBASE}/include/libpng15
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= NLS
Modified: head/games/xbubble/files/patch-src-loadpng.c
==============================================================================
--- head/games/xbubble/files/patch-src-loadpng.c Wed Dec 24 12:26:38 2014 (r375448)
+++ head/games/xbubble/files/patch-src-loadpng.c Wed Dec 24 12:26:45 2014 (r375449)
@@ -1,28 +1,24 @@
---- src/loadpng.c.orig 2003-09-30 14:55:20.000000000 +0200
-+++ src/loadpng.c 2012-04-29 13:39:04.000000000 +0200
-@@ -21,6 +21,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <png.h>
-+#include <pngpriv.h>
-
- #include "gettext.h"
-
-@@ -55,7 +56,7 @@
- }
- /* ensure that we opened a PNG file */
- fread( header, 1, 8, fd );
-- if ( ! png_check_sig( header, 8 ) ) {
-+ if ( png_sig_cmp( header, 0, 8 ) ) {
- fclose(fd);
- fprintf(stderr,_("File %s does not have a valid PNG signature.\n"), file);
- return NULL;
-@@ -73,7 +74,7 @@
+$OpenBSD: patch-src_loadpng_c,v 1.1 2011/07/08 20:38:01 naddy Exp $
+
+Fix build with png-1.5.
+
+--- src/loadpng.c.orig Wed Jul 6 15:26:00 2011
++++ src/loadpng.c Wed Jul 6 15:28:42 2011
+@@ -73,7 +73,7 @@ unsigned char * load_png_file( const char *file,
return NULL;
}
/* libpng does a longjmp here when it encounters an error */
- if ( setjmp( png_ptr->jmpbuf ) ) {
-+ if ( setjmp( png_jmpbuf(png_ptr) ) ) {
++ if ( setjmp( png_jmpbuf( png_ptr ) ) ) {
png_destroy_read_struct( &png_ptr, &info_ptr, NULL);
fclose(fd);
return NULL;
+@@ -95,7 +95,7 @@ unsigned char * load_png_file( const char *file,
+ png_set_gray_to_rgb(png_ptr);
+
+ /* detect alpha layer */
+- if (( info_ptr->color_type & PNG_COLOR_MASK_ALPHA )||
++ if (( png_get_color_type ( png_ptr, info_ptr ) & PNG_COLOR_MASK_ALPHA )||
+ ( png_get_valid( png_ptr, info_ptr, PNG_INFO_tRNS )))
+ *has_alpha = 1;
+ else
More information about the svn-ports-all
mailing list