aboutsummaryrefslogtreecommitdiff
path: root/graphics/grafx2
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2020-02-03 08:59:53 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2020-02-03 08:59:53 +0000
commit04fe4c926c6ceb38f039bea4d5762c6aa28cbf01 (patch)
tree5e33f2cd1c59f9f6d65b2112dbf269f7f4cfc7aa /graphics/grafx2
parentdb7652420057be5848f5175826b75367cf22710e (diff)
downloadports-04fe4c926c6ceb38f039bea4d5762c6aa28cbf01.tar.gz
ports-04fe4c926c6ceb38f039bea4d5762c6aa28cbf01.zip
Notes
Diffstat (limited to 'graphics/grafx2')
-rw-r--r--graphics/grafx2/Makefile30
-rw-r--r--graphics/grafx2/distinfo8
-rw-r--r--graphics/grafx2/files/patch-Makefile42
-rw-r--r--graphics/grafx2/files/patch-setup.c51
-rw-r--r--graphics/grafx2/pkg-plist7
5 files changed, 69 insertions, 69 deletions
diff --git a/graphics/grafx2/Makefile b/graphics/grafx2/Makefile
index fde4c4fdefae..f452d3733b47 100644
--- a/graphics/grafx2/Makefile
+++ b/graphics/grafx2/Makefile
@@ -2,12 +2,11 @@
# $FreeBSD$
PORTNAME= grafx2
-PORTVERSION= 2.6
-DISTVERSIONPREFIX= v
-PORTREVISION= 1
+PORTVERSION= 2.7
+DISTVERSIONSUFFIX= .2945-src
CATEGORIES= graphics
-MASTER_SITES= SF/recoil/recoil/${RECOIL_VERSION}/:recoil
-DISTFILES= recoil-${RECOIL_VERSION}${EXTRACT_SUFX}:recoil
+MASTER_SITES= https://gitlab.com/GrafX2/grafX2/-/jobs/422881812/artifacts/raw/ \
+ LOCAL/ehaupt
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= Pixelart-oriented bitmap painting program
@@ -18,19 +17,15 @@ LIB_DEPENDS= libX11.so:x11/libX11 \
libpng.so:graphics/png \
libtiff.so:graphics/tiff
-USES= desktop-file-utils gmake gnome iconv:wchar_t pkgconfig sdl
+USES= desktop-file-utils gmake gnome iconv:wchar_t pkgconfig sdl \
+ tar:tgz
USE_SDL= sdl2 image2
-USE_GITLAB= yes
-
-GL_ACCOUNT= GrafX2
-GL_PROJECT= grafX2
-GL_COMMIT= 5d8c61e41011a8106359343243e1050af4e7fd1f
INSTALLS_ICONS= yes
GRAFX2_API= sdl2
-RECOIL_VERSION= 4.3.1
+WRKSRC= ${WRKDIR}/grafx2
WRKSRC_SUBDIR= src
CFLAGS+= -DHAVE_SYS_PARAM_H -DHAVE_SYS_UCRED_H -DHAVE_SYS_MOUNT_H
MAKE_ENV+= API=${GRAFX2_API}
@@ -47,17 +42,6 @@ TTF_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig
TTF_USE= SDL=ttf2
TTF_MAKE_ARGS_OFF= NOTTF=1
-post-extract:
- @${MV} ${WRKDIR}/recoil-${RECOIL_VERSION} ${WRKSRC}/../3rdparty/
-
-post-patch:
- @${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
-
post-install:
@${MV} ${STAGEDIR}${PREFIX}/bin/grafx2-${GRAFX2_API} \
${STAGEDIR}${PREFIX}/bin/grafx2
diff --git a/graphics/grafx2/distinfo b/graphics/grafx2/distinfo
index 1f8726c89879..96c9f74be209 100644
--- a/graphics/grafx2/distinfo
+++ b/graphics/grafx2/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1547548040
-SHA256 (recoil-4.3.1.tar.gz) = 8f64fd21bafa180e6cbac5853ef65453f080385b3c53600af8360e938668e574
-SIZE (recoil-4.3.1.tar.gz) = 448212
-SHA256 (GrafX2-grafX2-5d8c61e41011a8106359343243e1050af4e7fd1f_GL0.tar.gz) = a17d34c0093f73913c4fa5b721a357f3f883d27cb2a5f62d22c47fb96cf513f2
-SIZE (GrafX2-grafX2-5d8c61e41011a8106359343243e1050af4e7fd1f_GL0.tar.gz) = 1229636
+TIMESTAMP = 1580591941
+SHA256 (grafx2-2.7.2945-src.tgz) = b176fd051ec9256d4b3d06a4c93d7470f01ad78838983a2def7dddcd5340d4f4
+SIZE (grafx2-2.7.2945-src.tgz) = 1101545
diff --git a/graphics/grafx2/files/patch-Makefile b/graphics/grafx2/files/patch-Makefile
index 25faddb41218..bde192843c0a 100644
--- a/graphics/grafx2/files/patch-Makefile
+++ b/graphics/grafx2/files/patch-Makefile
@@ -1,32 +1,6 @@
---- Makefile.orig 2019-01-10 08:40:57 UTC
+--- Makefile.orig 2020-02-01 17:05:20 UTC
+++ Makefile
-@@ -33,25 +33,8 @@
- # Compile with OPTIM=0 to disable gcc optimizations, to enable debug.
- STRIP = strip
-
--# Detect GIT revision
--ifeq (true,$(shell git rev-parse --is-inside-work-tree))
-- GIT_REVISION = $(shell git rev-list --count 1af8c74f53110e349d8f0d19b14599281913f71f..)
-- ifneq (,$(CI_COMMIT_REF_NAME))
-- GIT_BRANCH = $(CI_COMMIT_REF_NAME)
-- else
-- ifneq (,$(TRAVIS_BRANCH))
-- GIT_BRANCH = $(TRAVIS_BRANCH)
-- else
-- GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
-- endif
-- endif
-- ifneq (master,$(GIT_BRANCH))
-- GIT_REVISION := $(GIT_REVISION)-$(GIT_BRANCH)
-- endif
--else
- # outside git repository : get version stored in version.c
- GIT_REVISION := $(shell cat version.c | cut -f 2 -d '"')
--endif
-
- REVISION_CACHE = .revision.cache
- RES := $(shell if [ ! -f $(REVISION_CACHE) ] || [ "`cat $(REVISION_CACHE)`" != "$(GIT_REVISION)" ] ; then echo "$(GIT_REVISION)" > $(REVISION_CACHE) ; fi )
-@@ -88,7 +71,7 @@ TARTRANSFORM = --strip=1 --transform 's,^,grafx2/,g'
+@@ -91,7 +91,7 @@ TARTRANSFORM = --strip=1 --transform 's,^,grafx2/,g'
# default to gcc compiler
ifeq (default,$(origin CC))
@@ -35,19 +9,13 @@
endif
PKG_CONFIG ?= pkg-config
-@@ -973,7 +956,6 @@ install : $(BIN)
+@@ -1224,7 +1224,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
++ #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
test -d $(DESTDIR)$(pixmapdir) || $(MKDIR) $(DESTDIR)$(pixmapdir)
-@@ -1012,7 +994,6 @@ uninstall :
- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/samples/demo),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples/demo,)
- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/samples/brush),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples/brush,)
- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/samples),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples,)
-- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts/libs),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts/libs,)
- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2/scripts),$(RMDIR) $(DESTDIR)$(datadir)/grafx2/scripts,)
- $(if $(wildcard $(DESTDIR)$(datadir)/grafx2),$(RMDIR) $(DESTDIR)$(datadir)/grafx2,)
- # Icon and desktop file for debian
diff --git a/graphics/grafx2/files/patch-setup.c b/graphics/grafx2/files/patch-setup.c
new file mode 100644
index 000000000000..8389a2b590de
--- /dev/null
+++ b/graphics/grafx2/files/patch-setup.c
@@ -0,0 +1,51 @@
+--- 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;
+ }
+
diff --git a/graphics/grafx2/pkg-plist b/graphics/grafx2/pkg-plist
index 85331c2d45d3..6e2c10d7dd65 100644
--- a/graphics/grafx2/pkg-plist
+++ b/graphics/grafx2/pkg-plist
@@ -1,9 +1,6 @@
bin/grafx2
share/applications/grafx2.desktop
-%%DATADIR%%/fonts/5pxtinyfont.png
%%DATADIR%%/fonts/8pxfont.png
-%%DATADIR%%/fonts/GrafX2_Black.gif
-%%DATADIR%%/fonts/GrafX2_Dark.gif
%%DATADIR%%/fonts/PF_Arma_5__.png
%%DATADIR%%/fonts/PF_Easta_7_.png
%%DATADIR%%/fonts/PF_Easta_7__.png
@@ -19,9 +16,11 @@ share/applications/grafx2.desktop
%%DATADIR%%/fonts/PF_Westa_7_.png
%%DATADIR%%/fonts/PF_Westa_7__.png
%%DATADIR%%/fonts/Tuffy.ttf
-%%DATADIR%%/fonts/colorfont.pcx
%%DATADIR%%/gfx2.gif
%%DATADIR%%/gfx2def.ini
+%%DATADIR%%/gfx2.png
+%%DATADIR%%/skins/unicode_0390-03C9.png
+%%DATADIR%%/skins/unicode_3040-309F.png
%%LUA%%%%DATADIR%%/scripts/samples/brush/ApplyColor.lua
%%LUA%%%%DATADIR%%/scripts/samples/brush/Fisheye.lua
%%LUA%%%%DATADIR%%/scripts/samples/brush/GrayscaleAvg.lua