mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
graphics/grafx2: Update to 2.8
While here, pacify portlint, portclippy, portfmt
This commit is contained in:
parent
2ac5869c06
commit
230693839e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=569325
@ -2,10 +2,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= grafx2
|
||||
PORTVERSION= 2.7
|
||||
DISTVERSIONSUFFIX= .2945-src
|
||||
PORTVERSION= 2.8
|
||||
DISTVERSIONSUFFIX= .3091-HEAD-src
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= https://gitlab.com/GrafX2/grafX2/-/jobs/422881812/artifacts/raw/ \
|
||||
MASTER_SITES= http://pulkomandy.tk/projects/GrafX2/downloads/ \
|
||||
LOCAL/ehaupt
|
||||
|
||||
MAINTAINER= ehaupt@FreeBSD.org
|
||||
@ -13,35 +13,37 @@ COMMENT= Pixelart-oriented bitmap painting program
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
LIB_DEPENDS= libX11.so:x11/libX11 \
|
||||
libpng.so:graphics/png \
|
||||
libtiff.so:graphics/tiff
|
||||
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= sdl2 image2
|
||||
|
||||
INSTALLS_ICONS= yes
|
||||
USE_SDL= image2 sdl2
|
||||
|
||||
GRAFX2_API= 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
|
||||
CFLAGS+= -DHAVE_SYS_PARAM_H -DHAVE_SYS_UCRED_H -DHAVE_SYS_MOUNT_H
|
||||
MAKE_ENV+= API=${GRAFX2_API}
|
||||
|
||||
OPTIONS_DEFINE= LUA TTF
|
||||
OPTIONS_DEFAULT=TTF
|
||||
OPTIONS_SUB= yes
|
||||
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
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1580591941
|
||||
SHA256 (grafx2-2.7.2945-src.tgz) = b176fd051ec9256d4b3d06a4c93d7470f01ad78838983a2def7dddcd5340d4f4
|
||||
SIZE (grafx2-2.7.2945-src.tgz) = 1101545
|
||||
TIMESTAMP = 1616843664
|
||||
SHA256 (grafx2-2.8.3091-HEAD-src.tgz) = 29d63b194850a7f43bb7f92d2cf1b123ae991f2da00c07df9f6c81e6999c2423
|
||||
SIZE (grafx2-2.8.3091-HEAD-src.tgz) = 1127842
|
||||
|
@ -1,20 +1,11 @@
|
||||
--- Makefile.orig 2020-02-01 17:05:20 UTC
|
||||
--- Makefile.orig 2021-03-24 19:59:20 UTC
|
||||
+++ Makefile
|
||||
@@ -91,7 +91,7 @@ TARTRANSFORM = --strip=1 --transform 's,^,grafx2/,g'
|
||||
|
||||
# default to gcc compiler
|
||||
ifeq (default,$(origin CC))
|
||||
- CC = gcc
|
||||
+ CC ?= gcc
|
||||
endif
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
@@ -1224,7 +1224,8 @@ install : $(BIN)
|
||||
@@ -1242,7 +1242,8 @@ install : $(BIN)
|
||||
test -d $(DESTDIR)$(datadir)/grafx2/fonts || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/fonts
|
||||
test -d $(DESTDIR)$(datadir)/grafx2/skins || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/skins
|
||||
test -d $(DESTDIR)$(datadir)/grafx2/scripts || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts
|
||||
- test -d $(DESTDIR)$(datadir)/grafx2/scripts/libs || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts/libs
|
||||
+ # seems to be empty
|
||||
+ # this is an empty directory on FreeBSD, we don't need it
|
||||
+ #test -d $(DESTDIR)$(datadir)/grafx2/scripts/libs || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts/libs
|
||||
test -d $(DESTDIR)$(datadir)/applications || $(MKDIR) $(DESTDIR)$(datadir)/applications
|
||||
test -d $(DESTDIR)$(datadir)/metainfo || $(MKDIR) $(DESTDIR)$(datadir)/metainfo
|
||||
|
@ -1,51 +0,0 @@
|
||||
--- setup.c.orig 2020-02-01 17:05:20 UTC
|
||||
+++ setup.c
|
||||
@@ -43,6 +43,7 @@
|
||||
#import <sys/param.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
+ #include <unistd.h>
|
||||
#elif defined(__MINT__)
|
||||
#include <mint/osbind.h>
|
||||
#include <mint/sysbind.h>
|
||||
@@ -114,12 +115,17 @@ char * Get_program_directory(const char * argv0)
|
||||
getcwd(program_dir, MAX_PATH_CHARACTERS);
|
||||
strcat(program_dir, "/");
|
||||
// Linux: argv[0] unreliable
|
||||
- #elif defined(__linux__)
|
||||
+ #elif defined(__linux__) || defined(__FreeBSD__)
|
||||
+ #if defined(__linux__)
|
||||
+ #define SELF_PATH "/proc/self/exe"
|
||||
+ #elif defined(__FreeBSD__)
|
||||
+ #define SELF_PATH "/proc/curproc/file"
|
||||
+ #endif
|
||||
if (argv0[0]!='/')
|
||||
{
|
||||
ssize_t path_len;
|
||||
char path[PATH_MAX];
|
||||
- path_len = readlink("/proc/self/exe", path, sizeof(path));
|
||||
+ path_len = readlink(SELF_PATH, path, sizeof(path));
|
||||
if (path_len >= 0)
|
||||
{
|
||||
path[path_len] = '\0'; // add null terminating char
|
||||
@@ -132,7 +138,7 @@ char * Get_program_directory(const char * argv0)
|
||||
size_t len;
|
||||
|
||||
program_dir = NULL;
|
||||
- GFX2_Log(GFX2_WARNING, "readlink(%s) failed : %s\n", "/proc/self/exe", strerror(errno));
|
||||
+ GFX2_Log(GFX2_WARNING, "readlink(%s) failed : %s\n", SELF_PATH, strerror(errno));
|
||||
current_dir = Get_current_directory(NULL, NULL, 0);
|
||||
if (current_dir != NULL)
|
||||
{
|
||||
@@ -157,6 +163,11 @@ char * Get_program_directory(const char * argv0)
|
||||
#else
|
||||
program_dir = Extract_path(NULL, argv0);
|
||||
#endif
|
||||
+ if (program_dir == NULL)
|
||||
+ {
|
||||
+ GFX2_Log(GFX2_WARNING, "Failed to detect program directory, using current directory\n");
|
||||
+ program_dir = strdup("." PATH_SEPARATOR);
|
||||
+ }
|
||||
return program_dir;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ share/applications/grafx2.desktop
|
||||
%%DATADIR%%/gfx2.gif
|
||||
%%DATADIR%%/gfx2def.ini
|
||||
%%DATADIR%%/gfx2.png
|
||||
%%DATADIR%%/skins/skin_chrisfx.png
|
||||
%%DATADIR%%/skins/unicode_0390-03C9.png
|
||||
%%DATADIR%%/skins/unicode_3040-309F.png
|
||||
%%LUA%%%%DATADIR%%/scripts/samples/brush/ApplyColor.lua
|
||||
|
Loading…
Reference in New Issue
Block a user