ports/157563: [patch] update graphics/grafx2 to 2.3, add options

Vitaly Magerya vmagerya at gmail.com
Fri Jun 3 13:00:26 UTC 2011


>Number:         157563
>Category:       ports
>Synopsis:       [patch] update graphics/grafx2 to 2.3, add options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 03 13:00:25 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Vitaly Magerya
>Release:        FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
>Description:
Update graphics/grafx2 from 2.00b98.0 to 2.3.1781.
The patch also adds OPTIONS (defaults match current behavior),
and updates COMMENT and pkg-descr to better match how GrafX2
advertises itself now.

Note that pkg-plist does not use %%DATADIR%%. This is because
paths to data are hardcoded in the sources and will break with
non-standard DATADIR (PREFIX is respected though).
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN grafx2.orig/Makefile grafx2/Makefile
--- grafx2.orig/Makefile	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/Makefile	2011-06-03 18:54:42.000000000 +0300
@@ -6,28 +6,54 @@
 #
 
 PORTNAME=	grafx2
-DISTVERSION=	2.00b98.0
-DISTVERSIONSUFFIX=	-svn482
-PORTREVISION=	5
+PORTVERSION=	2.3.1781
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
+DISTNAME=	${PORTNAME}-${PORTVERSION}-src
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	ehaupt at FreeBSD.org
-COMMENT=	Bitmap paint program that supports more than 60 video resolutions
+COMMENT=	A pixelart-oriented bitmap painting program
+
+OPTIONS=	TTF "Enable True Type font support" on \
+		LUA "Enable Lua scripting support" off
 
 USE_GMAKE=	yes
-USE_DOS2UNIX=	yes
-USE_SDL=	image ttf
+USE_SDL=	sdl image
 MAKE_JOBS_SAFE=	yes
 
-WRKSRC=		${WRKDIR}
-MAKE_ENV+=	DATADIR="${DATADIR}"
-CFLAGS+=	-DHAVE_SYS_PARAM_H -DHAVE_SYS_UCRED_H -DHAVE_SYS_MOUNT_H \
-		-DHAVE_STRUCT_STATFS_F_FSTYPENAME
+WRKSRC=		${WRKDIR}/${PORTNAME}/src
+CFLAGS+=	-DHAVE_SYS_PARAM_H -DHAVE_SYS_UCRED_H -DHAVE_SYS_MOUNT_H
+
+LIB_DEPENDS=	X11:${PORTSDIR}/x11/libX11 \
+		png:${PORTSDIR}/graphics/png
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_TTF)
+MAKE_ARGS+=	NOTTF=1
+.else
+USE_SDL+=	ttf
+.endif
+
+.if defined(WITH_LUA)
+BUILD_DEPENDS=	pkg-config:${PORTSDIR}/devel/pkg-config
+USE_LUA=	5.1
+.else
+MAKE_ARGS+=	NOLUA=1
+.endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|macosx|FreeBSD|g' \
-		${WRKSRC}/divers.c ${WRKSRC}/mountlist.c ${WRKSRC}/aide.c ${WRKSRC}/init.c
+	@${REINPLACE_CMD} \
+		-e 's|^  prefix = .*$$|  prefix = ${PREFIX}|' \
+		-e '/scripts\/libs/d' \
+		-e 's/CC = gcc/CC ?= gcc/' \
+		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} \
+		-e 's|macosx|FreeBSD|g' \
+		${WRKSRC}/mountlist.c ${WRKSRC}/init.c
+	@${REINPLACE_CMD} \
+		-e 's|Extract_path(program_dir, argv0);|strcpy(program_dir,"${PREFIX}/bin/");|' \
+		${WRKSRC}/setup.c
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN grafx2.orig/distinfo grafx2/distinfo
--- grafx2.orig/distinfo	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/distinfo	2011-06-03 17:53:06.000000000 +0300
@@ -1,3 +1,2 @@
-MD5 (grafx2-2.00b98.0-svn482.tgz) = 4eeab264b8abf3fdbaf225795ee6d63a
-SHA256 (grafx2-2.00b98.0-svn482.tgz) = 3f7abd1e41f37a4e7ec006752e276efaf0466f7d5bc5c09c76eda78e90dbd251
-SIZE (grafx2-2.00b98.0-svn482.tgz) = 362391
+SHA256 (grafx2-2.3.1781-src.tgz) = b43fa837e30abfb0830f9a1b793a78ed690fbafdcd378e51197f01998bbf392e
+SIZE (grafx2-2.3.1781-src.tgz) = 683951
diff -ruN grafx2.orig/files/patch-Makefile grafx2/files/patch-Makefile
--- grafx2.orig/files/patch-Makefile	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/files/patch-Makefile	1970-01-01 03:00:00.000000000 +0300
@@ -1,14 +0,0 @@
---- ./Makefile.orig	2009-02-23 14:20:42.000000000 +0100
-+++ ./Makefile	2009-02-23 14:20:42.000000000 +0100
-@@ -169,9 +169,9 @@
-         # Compiles a regular linux exectutable for the native platform
-         BIN = grafx2
-         CFGBIN = gfxcfg
--        COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT)
-+        COPT = $(CFLAGS) -pedantic -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT)
-         LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT)
--        CC = gcc
-+        CC ?= gcc
-         OBJDIR = obj/unix
-         X11LOPT = -lX11
-       endif
diff -ruN grafx2.orig/files/patch-files.c grafx2/files/patch-files.c
--- grafx2.orig/files/patch-files.c	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/files/patch-files.c	1970-01-01 03:00:00.000000000 +0300
@@ -1,15 +0,0 @@
---- ./files.c.orig	2009-02-23 14:20:42.000000000 +0100
-+++ ./files.c	2009-02-23 14:21:14.000000000 +0100
-@@ -318,11 +318,10 @@
-   // This should be made dynamic because in the multitask world, user can mount new drives, 
-   // connect to network ones, and so on, while Grafx2 is running.
-   #else
--    #warning "Your platform is missing some specific code here ! please check and correct ! :)"
-     for (Indice=0; Indice<Nb_drives; Indice++)
-     {
-       // Add the drive's name ("c:\\", "/" etc.) to the list
--      Ajouter_element_a_la_liste(Drive[Indice].Chemin, 2);
-+      Ajouter_element_a_la_liste("/", 2);
-       Liste_Nb_repertoires++;
-     }
-   #endif
diff -ruN grafx2.orig/files/patch-main.c grafx2/files/patch-main.c
--- grafx2.orig/files/patch-main.c	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/files/patch-main.c	1970-01-01 03:00:00.000000000 +0300
@@ -1,12 +0,0 @@
---- ./main.c.orig	2009-01-14 17:33:21.000000000 +0100
-+++ ./main.c	2009-02-27 18:18:23.000000000 +0100
-@@ -290,7 +290,8 @@
-   // Determine the executable directory
-   Set_Program_Directory(argv[0],Repertoire_du_programme);
-   // Choose directory for data (read only)
--  Set_Data_Directory(Repertoire_du_programme,Repertoire_des_donnees);
-+  //Set_Data_Directory(Repertoire_du_programme,Repertoire_des_donnees);
-+  Set_Data_Directory("/usr/local/share/grafx2/",Repertoire_des_donnees);
-   // Choose directory for settings (read/write)
-   Set_Config_Directory(Repertoire_du_programme,Repertoire_de_configuration);
- 
diff -ruN grafx2.orig/pkg-descr grafx2/pkg-descr
--- grafx2.orig/pkg-descr	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/pkg-descr	2011-06-03 18:09:09.000000000 +0300
@@ -1,5 +1,7 @@
-A bitmap paint program that allows you to draw in more than 60 video
-resolutions. It was written to run under DOS, but the code you'll find here was
-modified to use SDL and modern operating systems. 
+GrafX2 is a bitmap paint program inspired by the Amiga programs
+Deluxe Paint and Brilliance. Specialized in 256-color drawing, it
+includes a very large number of tools and effects that make it
+particularly suitable for pixel art, game graphics, and generally
+any detailed graphics painted with a mouse.
 
 WWW: http://code.google.com/p/grafx2/
diff -ruN grafx2.orig/pkg-plist grafx2/pkg-plist
--- grafx2.orig/pkg-plist	2011-06-03 17:46:33.000000000 +0300
+++ grafx2/pkg-plist	2011-06-03 18:08:31.000000000 +0300
@@ -1,11 +1,84 @@
 bin/grafx2
-bin/gfxcfg
-%%DATADIR%%/grafx2
-%%DATADIR%%/gfxcfg
-%%DATADIR%%/gfx2.dat
-%%DATADIR%%/gfx2.gif
-%%DATADIR%%/gfx2cfg.gif
-%%DATADIR%%/fonts/Tuffy.ttf
-%%DATADIR%%/fonts/8pxfont.png
- at dirrm %%DATADIR%%/fonts
- at dirrm %%DATADIR%%
+share/applications/grafx2.desktop
+share/grafx2/fonts/8pxfont.png
+share/grafx2/fonts/PF_Arma_5__.png
+share/grafx2/fonts/PF_Easta_7_.png
+share/grafx2/fonts/PF_Easta_7__.png
+share/grafx2/fonts/PF_Ronda_7__.png
+share/grafx2/fonts/PF_Tempesta_5.png
+share/grafx2/fonts/PF_Tempesta_5_.png
+share/grafx2/fonts/PF_Tempesta_5__.png
+share/grafx2/fonts/PF_Tempesta_5___.png
+share/grafx2/fonts/PF_Tempesta_7.png
+share/grafx2/fonts/PF_Tempesta_7_.png
+share/grafx2/fonts/PF_Tempesta_7__.png
+share/grafx2/fonts/PF_Tempesta_7___.png
+share/grafx2/fonts/PF_Westa_7_.png
+share/grafx2/fonts/PF_Westa_7__.png
+share/grafx2/fonts/Tuffy.ttf
+share/grafx2/gfx2.gif
+share/grafx2/gfx2def.ini
+share/grafx2/scripts/samples_2.3/brush/ApplyColor.lua
+share/grafx2/scripts/samples_2.3/brush/Fisheye.lua
+share/grafx2/scripts/samples_2.3/brush/GrayscaleAvg.lua
+share/grafx2/scripts/samples_2.3/brush/GrayscaleDesat.lua
+share/grafx2/scripts/samples_2.3/brush/Halfsmooth.lua
+share/grafx2/scripts/samples_2.3/brush/Waves.lua
+share/grafx2/scripts/samples_2.3/demo/3DPalette.lua
+share/grafx2/scripts/samples_2.3/demo/Ellipse.lua
+share/grafx2/scripts/samples_2.3/demo/FlipPicture.lua
+share/grafx2/scripts/samples_2.3/demo/SierpinskyCarpet.lua
+share/grafx2/scripts/samples_2.3/demo/SierpinskyTriangle.lua
+share/grafx2/scripts/samples_2.3/demo/Spritesheet.lua
+share/grafx2/scripts/samples_2.3/demo/brush/Amigaball.lua
+share/grafx2/scripts/samples_2.3/demo/brush/ColorSphere.lua
+share/grafx2/scripts/samples_2.3/demo/brush/FindAA.lua
+share/grafx2/scripts/samples_2.3/demo/brush/Mandelbrot.lua
+share/grafx2/scripts/samples_2.3/libs/dawnbringer_lib.lua
+share/grafx2/scripts/samples_2.3/libs/memory.lua
+share/grafx2/scripts/samples_2.3/palette/Desaturate.lua
+share/grafx2/scripts/samples_2.3/palette/ExpandColors.lua
+share/grafx2/scripts/samples_2.3/palette/FillColorCube.lua
+share/grafx2/scripts/samples_2.3/palette/InvertedRGB.lua
+share/grafx2/scripts/samples_2.3/palette/Set3bit.lua
+share/grafx2/scripts/samples_2.3/palette/Set6bit.lua
+share/grafx2/scripts/samples_2.3/palette/SetC64Palette.lua
+share/grafx2/scripts/samples_2.3/palette/ShiftHue.lua
+share/grafx2/scripts/samples_2.3/picture/CellColourReducer.lua
+share/grafx2/scripts/samples_2.3/picture/DrawGridIsometric.lua
+share/grafx2/scripts/samples_2.3/picture/DrawGridOrthogonal_RGB.lua
+share/grafx2/scripts/samples_2.3/picture/DrawgridOrthogonal_Index.lua
+share/grafx2/scripts/samples_2.3/picture/GlassGridFilter.lua
+share/grafx2/scripts/samples_2.3/picture/PaletteToPicture.lua
+share/grafx2/scripts/samples_2.3/picture/Pic2isometric.lua
+share/grafx2/scripts/samples_2.3/picture/Rainbow-Dark2Bright.lua
+share/grafx2/scripts/samples_2.3/picture/RemapImage2RGB.lua
+share/grafx2/scripts/samples_2.3/picture/RemapImage2RGB_ed.lua
+share/grafx2/scripts/samples_2.3/picture/RemapImageTo3bitPal.lua
+share/grafx2/scripts/samples_2.3/picture/XBitColourXpaceFromPalette.lua
+share/grafx2/skins/font_Classic.png
+share/grafx2/skins/font_DPaint.png
+share/grafx2/skins/font_Fairlight.png
+share/grafx2/skins/font_Fun.png
+share/grafx2/skins/font_Melon.png
+share/grafx2/skins/font_Seen.png
+share/grafx2/skins/skin_Aurora.png
+share/grafx2/skins/skin_DPaint.png
+share/grafx2/skins/skin_classic.png
+share/grafx2/skins/skin_modern.png
+share/grafx2/skins/skin_scenish.png
+share/icons/grafx2.svg
+share/icons/grafx2.xpm
+ at dirrm share/grafx2/skins
+ at dirrm share/grafx2/scripts/samples_2.3/picture
+ at dirrm share/grafx2/scripts/samples_2.3/palette
+ at dirrm share/grafx2/scripts/samples_2.3/libs
+ at dirrm share/grafx2/scripts/samples_2.3/demo/brush
+ at dirrm share/grafx2/scripts/samples_2.3/demo
+ at dirrm share/grafx2/scripts/samples_2.3/brush
+ at dirrm share/grafx2/scripts/samples_2.3
+ at dirrm share/grafx2/scripts
+ at dirrm share/grafx2/fonts
+ at dirrm share/grafx2
+ at dirrmtry share/icons
+ at dirrmtry share/applications


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list