From a94953ebabefd6cce7590c5d3479549e35dfc62f Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 23 Apr 2021 13:19:21 +0300 Subject: [PATCH] games/gnurobots: fix build, simplify and modernize - Fix build by depending on correct guile port - Simplify and modernize the port - Switch to USES=localbase --- games/gnurobots/Makefile | 37 +++++++++------------ games/gnurobots/files/patch-configure.ac | 11 ++++++ games/gnurobots/files/patch-src_ui-cmdwin.c | 16 +++++++++ games/gnurobots/pkg-plist | 2 +- 4 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 games/gnurobots/files/patch-configure.ac create mode 100644 games/gnurobots/files/patch-src_ui-cmdwin.c diff --git a/games/gnurobots/Makefile b/games/gnurobots/Makefile index 1c9b1aa5304f..a59dfa7b1a21 100644 --- a/games/gnurobots/Makefile +++ b/games/gnurobots/Makefile @@ -2,13 +2,9 @@ PORTNAME= gnurobots PORTVERSION= 1.2.0 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= games -MASTER_SITES= GNU \ - SF/nemysisfreebsdp/${CATEGORIES}/:icons -DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \ - ${PORTNAME}.png:icons -EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} +MASTER_SITES= GNU MAINTAINER= ports@FreeBSD.org COMMENT= GNU diversion wherein Scheme-coded robots explore a world @@ -16,33 +12,32 @@ COMMENT= GNU diversion wherein Scheme-coded robots explore a world LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= libguile.so:lang/guile +LIB_DEPENDS= libguile.so:lang/guile1 -USES= gnome pkgconfig readline +USES= autoreconf gnome localbase:ldflags pkgconfig readline USE_GNOME= vte GNU_CONFIGURE= yes -CFLAGS+= -O0 -CPPFLAGS+= -I${LOCALBASE}/include -w -LDFLAGS+= -L${LOCALBASE}/lib -pthread - PORTDOCS= * -OPTIONS_DEFINE= DOCS +CFLAGS+= -O0 SUB_FILES= pkg-install pkg-message -DESKTOP_ENTRIES="GNU Robots" "" "${PORTNAME}" \ - "${PORTNAME}" "Game;ArcadeGame;" "" +DESKTOP_ENTRIES="GNU Robots" \ + "" \ + "${PORTNAME}" \ + "${PORTNAME}" \ + "Game;ArcadeGame;" \ + "" -post-patch: - @${REINPLACE_CMD} -e 's|^CFLAGS=|#CFLAGS=|g' ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|#include ||g' ${WRKSRC}/src/ui-cmdwin.c - @${REINPLACE_CMD} -E 's,(readline.h|history.h),readline/\1,' ${WRKSRC}/src/ui-cmdwin.c +OPTIONS_DEFINE= DOCS post-install: - ${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \ - ${STAGEDIR}${PREFIX}/share/pixmaps/ + ${INSTALL_DATA} ${WRKSRC}/xpm/robot.xpm \ + ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.xpm + +post-install-DOCS-on: cd ${WRKSRC} && ${COPYTREE_SHARE} "AUTHORS ChangeLog NEWS README THANKS \ doc/Robots-HOWTO doc/contrib" ${STAGEDIR}${DOCSDIR} diff --git a/games/gnurobots/files/patch-configure.ac b/games/gnurobots/files/patch-configure.ac new file mode 100644 index 000000000000..4461820cfa5b --- /dev/null +++ b/games/gnurobots/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2008-08-03 19:48:45 UTC ++++ configure.ac +@@ -91,8 +91,6 @@ You need guile 1.8 to build this program. + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + +-CFLAGS="-pedantic-errors -Werror -Wall -g" +- + dnl Done. + AC_CONFIG_FILES([Makefile + contrib/Makefile diff --git a/games/gnurobots/files/patch-src_ui-cmdwin.c b/games/gnurobots/files/patch-src_ui-cmdwin.c new file mode 100644 index 000000000000..463cc8545652 --- /dev/null +++ b/games/gnurobots/files/patch-src_ui-cmdwin.c @@ -0,0 +1,16 @@ +--- src/ui-cmdwin.c.orig 2008-08-03 14:44:53 UTC ++++ src/ui-cmdwin.c +@@ -19,11 +19,10 @@ + #include "ui-cmdwin.h" + + #include +-#include + + #include +-#include +-#include ++#include ++#include + + struct _UICmdWinPrivate + { diff --git a/games/gnurobots/pkg-plist b/games/gnurobots/pkg-plist index ed2ea074eb8a..028b3343e924 100644 --- a/games/gnurobots/pkg-plist +++ b/games/gnurobots/pkg-plist @@ -8,4 +8,4 @@ bin/gnurobots %%DATADIR%%/scheme/simple.scm %%DATADIR%%/scheme/stop.scm %%DATADIR%%/scheme/zap.scm -share/pixmaps/gnurobots.png +share/pixmaps/gnurobots.xpm