- fix build for png-1.4.1
This commit is contained in:
20
games/adgali/files/patch-src-input-imageio-agl_pngio.c
Normal file
20
games/adgali/files/patch-src-input-imageio-agl_pngio.c
Normal file
@@ -0,0 +1,20 @@
|
||||
--- src/input/imageio/agl_pngio.c.orig 2003-06-24 01:58:47.000000000 +0200
|
||||
+++ src/input/imageio/agl_pngio.c 2010-03-30 11:23:50.000000000 +0200
|
||||
@@ -65,7 +65,7 @@
|
||||
unsigned char buf[8];
|
||||
|
||||
if (agl_ios_read(ops, buf, 1, 8, NULL) == 8)
|
||||
- return png_check_sig(buf, 8);
|
||||
+ return !png_sig_cmp(buf, 0, 8);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
/* see pnglib for these calls */
|
||||
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
|
||||
- png_set_gray_1_2_4_to_8(png_ptr);
|
||||
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||
|
||||
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
|
||||
png_set_tRNS_to_alpha(png_ptr);
|
||||
@@ -37,6 +37,11 @@ USE_GETTEXT= yes
|
||||
PLIST_SUB+= NLS=""
|
||||
#.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|png_infopp_NULL|NULL|g' \
|
||||
-e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
|
||||
${WRKSRC}/src/MOGL/MOGL_Image.cpp
|
||||
|
||||
pre-install:
|
||||
${MKDIR} ${PREFIX}/share/applications
|
||||
|
||||
|
||||
@@ -33,6 +33,6 @@ DATADIR= ${PREFIX}/share/gamediameter
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|; /^CFLAGS=.*march/ d; \
|
||||
/PKG_CONFIG/ s|libpng|libpng12|' ${WRKSRC}/configure
|
||||
/PKG_CONFIG/ s|libpng|libpng14|' ${WRKSRC}/configure
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -71,9 +71,10 @@ post-patch:
|
||||
${WRKSRC}/gl/gl_alias.c ${WRKSRC}/common/com_mesh.c
|
||||
@${REINPLACE_CMD} -e 's/__linux__/__unix__/' \
|
||||
${WRKSRC}/common/plugin.c ${WRKSRC}/server/svq3_game.c
|
||||
# Resolve name collision with jpeg-8
|
||||
# Resolve name collision with jpeg-8 and API png14
|
||||
${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
|
||||
-e 's|jpeg_mem_dest|local_jpeg_mem_dest|' \
|
||||
-e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
|
||||
${WRKSRC}/client/image.c
|
||||
|
||||
do-install:
|
||||
|
||||
11
games/gracer/files/patch-gr_texture.c
Normal file
11
games/gracer/files/patch-gr_texture.c
Normal file
@@ -0,0 +1,11 @@
|
||||
--- common/gr_texture.c.orig 2000-03-01 05:27:18.000000000 +0100
|
||||
+++ common/gr_texture.c 2010-03-30 11:19:05.000000000 +0200
|
||||
@@ -419,7 +419,7 @@
|
||||
if (fread (header, 1, PNG_BYTES_TO_CHECK, file) != PNG_BYTES_TO_CHECK) {
|
||||
goto ERROR;
|
||||
}
|
||||
- if (!png_check_sig (header, PNG_BYTES_TO_CHECK)) {
|
||||
+ if (png_sig_cmp (header, 0, PNG_BYTES_TO_CHECK)) {
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ DESKTOP_ENTRIES="Jigzo" \
|
||||
false
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "s|int_p_NULL|NULL|g" \
|
||||
${WRKSRC}/src/Loader.cxx
|
||||
.for i in font image puzzles sound
|
||||
@${REINPLACE_CMD} -e "s|${i}/|${DATADIR}/${i}/|g" \
|
||||
${WRKSRC}/src/main.cxx
|
||||
|
||||
Reference in New Issue
Block a user