diff --git a/graphics/grafx2/Makefile b/graphics/grafx2/Makefile index e953bfbb61dc..220dc2a2ab41 100644 --- a/graphics/grafx2/Makefile +++ b/graphics/grafx2/Makefile @@ -1,49 +1,50 @@ PORTNAME= grafx2 PORTVERSION= 2.8 DISTVERSIONSUFFIX= .3091-HEAD-src +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= http://pulkomandy.tk/projects/GrafX2/downloads/ \ LOCAL/ehaupt MAINTAINER= ehaupt@FreeBSD.org COMMENT= Pixelart-oriented bitmap painting program WWW= https://pulkomandy.tk/projects/GrafX2 LICENSE= GPLv2 LIB_DEPENDS= libpng.so:graphics/png \ libtiff.so:graphics/tiff \ libX11.so:x11/libX11 USES= desktop-file-utils gmake gnome iconv:wchar_t pkgconfig sdl \ tar:tgz USE_SDL= image2 sdl2 MAKE_ENV+= API=${GRAFX2_API} \ V=1 CFLAGS+= -DHAVE_SYS_PARAM_H -DHAVE_SYS_UCRED_H -DHAVE_SYS_MOUNT_H WRKSRC= ${WRKDIR}/grafx2 WRKSRC_SUBDIR= src OPTIONS_DEFINE= LUA TTF OPTIONS_DEFAULT= TTF OPTIONS_SUB= yes TTF_DESC= True Type font support LUA_USES= lua LUA_MAKE_ARGS_OFF= NOLUA=1 TTF_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig TTF_USE= SDL=ttf2 TTF_MAKE_ARGS_OFF= NOTTF=1 GRAFX2_API= sdl2 post-install: @${MV} ${STAGEDIR}${PREFIX}/bin/grafx2-${GRAFX2_API} \ ${STAGEDIR}${PREFIX}/bin/grafx2 @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/grafx2 .include diff --git a/graphics/grafx2/files/patch-sdlscreen.c b/graphics/grafx2/files/patch-sdlscreen.c new file mode 100644 index 000000000000..6f75258a549a --- /dev/null +++ b/graphics/grafx2/files/patch-sdlscreen.c @@ -0,0 +1,29 @@ +--- sdlscreen.c.orig 2023-04-11 14:41:38 UTC ++++ sdlscreen.c +@@ -373,17 +373,11 @@ byte * Surface_to_bytefield(SDL_Surface *source, byte + byte *src; + byte *dest_ptr; + int y; +- int remainder; + + // Support seulement des images 256 couleurs + if (source->format->BytesPerPixel != 1) + return NULL; + +- if (source->w & 3) +- remainder=4-(source->w&3); +- else +- remainder=0; +- + if (dest==NULL) + dest=(byte *)malloc(source->w*source->h); + +@@ -393,7 +387,7 @@ byte * Surface_to_bytefield(SDL_Surface *source, byte + { + memcpy(dest_ptr, src,source->w); + dest_ptr += source->w; +- src += source->w + remainder; ++ src += source->pitch; + } + return dest; +