From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 3 13:00:26 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C8DF106567B for ; Fri, 3 Jun 2011 13:00:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 045838FC1B for ; Fri, 3 Jun 2011 13:00:26 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p53D0POm082655 for ; Fri, 3 Jun 2011 13:00:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p53D0Ph8082653; Fri, 3 Jun 2011 13:00:25 GMT (envelope-from gnats) Resent-Date: Fri, 3 Jun 2011 13:00:25 GMT Resent-Message-Id: <201106031300.p53D0Ph8082653@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vitaly Magerya Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBE6C1065675 for ; Fri, 3 Jun 2011 12:55:50 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id D0D9E8FC1D for ; Fri, 3 Jun 2011 12:55:50 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p53CtoB8088943 for ; Fri, 3 Jun 2011 12:55:50 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p53CtoMY088942; Fri, 3 Jun 2011 12:55:50 GMT (envelope-from nobody) Message-Id: <201106031255.p53CtoMY088942@red.freebsd.org> Date: Fri, 3 Jun 2011 12:55:50 GMT From: Vitaly Magerya To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/157563: [patch] update graphics/grafx2 to 2.3, add options X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 13:00:26 -0000 >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@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 + +.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 +.include 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; IndiceRelease-Note: >Audit-Trail: >Unformatted: