git: 7b5bb5efdad1 - main - devel/rgbds: Update to 0.9.0

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Thu, 26 Dec 2024 08:27:06 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7b5bb5efdad1ca269649861a3b8e38a778c67e54

commit 7b5bb5efdad1ca269649861a3b8e38a778c67e54
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-12-26 08:26:19 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-12-26 08:26:55 +0000

    devel/rgbds: Update to 0.9.0
    
    - Switch to cmake build
    - Add tests
    
    ChangeLog: https://github.com/gbdev/rgbds/releases/tag/v0.9.0
---
 devel/rgbds/Makefile                              | 16 +++++++---------
 devel/rgbds/distinfo                              |  6 +++---
 devel/rgbds/files/patch-test_gfx_rgbgfx__test.cpp | 10 ++++++++++
 devel/rgbds/pkg-plist                             |  1 +
 4 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/devel/rgbds/Makefile b/devel/rgbds/Makefile
index 9412a6de039a..4a6d71637c9b 100644
--- a/devel/rgbds/Makefile
+++ b/devel/rgbds/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	rgbds
-DISTVERSION=	0.8.0
+DISTVERSION=	0.9.0
 CATEGORIES=	devel games
 MASTER_SITES=	https://github.com/gbdev/rgbds/releases/download/v${DISTVERSION}/
 
@@ -12,17 +12,15 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 BUILD_DEPENDS=	bash>0:shells/bash
 LIB_DEPENDS=	libpng16.so:graphics/png
+TEST_DEPENDS=	bash>0:shells/bash \
+		git>0:devel/git \
+		xxd>0:sysutils/xxd
 
-USES=		bison compiler:c11 dos2unix pkgconfig shebangfix
+USES=		bison cmake:testing dos2unix pkgconfig shebangfix
 
-SHEBANG_FILES=	src/bison.sh
-MAKE_ARGS=	Q= # verbose builds
+SHEBANG_FILES=	contrib/view_palettes.sh src/bison.sh test/*.sh test/*/*.sh
 WRKSRC=		${WRKDIR}/rgbds
 
-do-configure:
-# yank _POSIX_C_SOURCE because it breaks the build, see also:
-# https://github.com/gbdev/rgbds/issues/1091
-# https://github.com/gbdev/rgbds/issues/1111
-	${REINPLACE_CMD} 's,-D_POSIX_C_SOURCE=200809L,,' ${WRKSRC}/Makefile
+TESTING_UNSAFE=	https://github.com/gbdev/rgbds/issues/1580
 
 .include <bsd.port.mk>
diff --git a/devel/rgbds/distinfo b/devel/rgbds/distinfo
index 8ead19a236b4..e586ec480f5b 100644
--- a/devel/rgbds/distinfo
+++ b/devel/rgbds/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1719606529
-SHA256 (rgbds-0.8.0.tar.gz) = cc9340534f24b6b1ce8a6d8c4d4d92b2ef6c5dcf1c3e3709ea362626a3435a96
-SIZE (rgbds-0.8.0.tar.gz) = 8050853
+TIMESTAMP = 1735171701
+SHA256 (rgbds-0.9.0.tar.gz) = e15721fe11a943a9fc6d11958abe1951d65fd285ade5af75c968d1bd1774caf6
+SIZE (rgbds-0.9.0.tar.gz) = 8091041
diff --git a/devel/rgbds/files/patch-test_gfx_rgbgfx__test.cpp b/devel/rgbds/files/patch-test_gfx_rgbgfx__test.cpp
new file mode 100644
index 000000000000..e3f42d092f5f
--- /dev/null
+++ b/devel/rgbds/files/patch-test_gfx_rgbgfx__test.cpp
@@ -0,0 +1,10 @@
+--- test/gfx/rgbgfx_test.cpp.orig	2024-12-25 20:36:32 UTC
++++ test/gfx/rgbgfx_test.cpp
+@@ -23,6 +23,7 @@
+ #include <fstream>
+ #include <limits>
+ #include <png.h>
++#include <signal.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/devel/rgbds/pkg-plist b/devel/rgbds/pkg-plist
index 314168bdc8aa..858b6ad32472 100644
--- a/devel/rgbds/pkg-plist
+++ b/devel/rgbds/pkg-plist
@@ -6,6 +6,7 @@ share/man/man1/rgbasm.1.gz
 share/man/man1/rgbfix.1.gz
 share/man/man1/rgbgfx.1.gz
 share/man/man1/rgblink.1.gz
+share/man/man5/rgbasm-old.5.gz
 share/man/man5/rgbasm.5.gz
 share/man/man5/rgbds.5.gz
 share/man/man5/rgblink.5.gz