Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
156 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,53 @@ | ||
# Created by: Dom Mitchell <dom@happygiraffe.net> | ||
|
||
PORTNAME= toppler | ||
PORTVERSION= 1.1.6 | ||
PORTVERSION= 1.3 | ||
CATEGORIES= games | ||
MASTER_SITES= SF | ||
|
||
MAINTAINER= amdmi3@FreeBSD.org | ||
COMMENT= Climb a tower and avoid monsters | ||
|
||
LICENSE= GPLv2+ | ||
LICENSE= GPLv3+ | ||
LICENSE_FILE= ${WRKSRC}/COPYING | ||
|
||
USES= gmake localbase sdl | ||
USE_SDL= mixer sdl | ||
GNU_CONFIGURE= yes | ||
CONFIGURE_ARGS= --localstatedir=/var/games | ||
LIB_DEPENDS= libpng.so:graphics/png | ||
BUILD_DEPENDS= gimp:graphics/gimp-app \ | ||
povray:graphics/povray-meta \ | ||
convert:graphics/ImageMagick7 | ||
|
||
SCOREFILE= /var/games/toppler/toppler.hsc | ||
USES= gmake sdl pkgconfig | ||
USE_GITLAB= yes | ||
GL_ACCOUNT= roever | ||
GL_COMMIT= 5e3e581bb7b58098f54df9b634c7bd4a23ba66b5 | ||
USE_SDL= sdl2 image2 mixer2 | ||
|
||
PORTDOCS= * | ||
PORTDATA= * | ||
|
||
OPTIONS_DEFINE= DOCS NLS | ||
OPTIONS_SUB= yes | ||
|
||
NLS_CONFIGURE_ENABLE= nls | ||
NLS_LIBS= -L${LOCALBASE}/lib -lintl | ||
NLS_USES= gettext | ||
NLS_USES_OFF= gettext-tools | ||
|
||
post-extract: | ||
@${MV} ${WRKSRC}/src/version ${WRKSRC} | ||
|
||
post-patch-NLS-off: | ||
@${REINPLACE_CMD} -e 's|ENABLE_NLS=1|ENABLE_NLS=0|' ${WRKSRC}/Makefile | ||
|
||
post-install: | ||
@${MV} ${STAGEDIR}${SCOREFILE} ${STAGEDIR}${SCOREFILE}.sample | ||
@${MKDIR} ${STAGEDIR}/var/games/toppler | ||
@${TOUCH} ${STAGEDIR}/var/games/toppler/toppler.hsc.sample | ||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/toppler | ||
${INSTALL_DATA} ${WRKSRC}/dist/toppler.xpm ${STAGEDIR}${PREFIX}/share/pixmaps | ||
@${SED} -e 's|@prefix@|${PREFIX}|' \ | ||
< ${WRKSRC}/dist/toppler.desktop.in \ | ||
> ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop | ||
|
||
post-install-DOCS-on: | ||
@${MKDIR} ${STAGEDIR}${DOCSDIR} | ||
${INSTALL_DATA} ${WRKSRC}/AUTHORS ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/ | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1485788372 | ||
SHA256 (toppler-1.1.6.tar.gz) = 7dbc2905389c2adba0f8c459f3319cf04045ba53ed407e273a50a3a67564cc45 | ||
SIZE (toppler-1.1.6.tar.gz) = 2117137 | ||
TIMESTAMP = 1644266275 | ||
SHA256 (roever-toppler-5e3e581bb7b58098f54df9b634c7bd4a23ba66b5_GL0.tar.gz) = 1e42d91af1f7a47b92532bc02da7d768dfcfe8cefa699ba4827356f198752c14 | ||
SIZE (roever-toppler-5e3e581bb7b58098f54df9b634c7bd4a23ba66b5_GL0.tar.gz) = 3600621 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- Makefile.orig 2022-02-06 08:35:59 UTC | ||
+++ Makefile | ||
@@ -18,10 +18,10 @@ | ||
# along with this program; if not, write to the Free Software | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA | ||
|
||
-PREFIX = /usr | ||
+PREFIX ?= /usr | ||
BINDIR = $(PREFIX)/bin | ||
DATADIR = $(PREFIX)/share | ||
-STATEDIR = /var/toppler | ||
+STATEDIR = /var/games/toppler | ||
LOCALEDIR = $(DATADIR)/locale | ||
MANDIR = $(DATADIR)/man | ||
PKGDATADIR = $(DATADIR)/toppler | ||
@@ -29,9 +29,9 @@ DESTDIR = | ||
CROSS = | ||
|
||
CONVERT = convert | ||
-CXX = $(CROSS)$(CXX_NATIVE) | ||
-CXX_NATIVE = g++ | ||
-CXXFLAGS = -Wall -Wextra -g -O2 -std=c++17 | ||
+CXX_NATIVE = $(CXX) | ||
+CXXFLAGS ?= -g -O2 | ||
+CXXFLAGS += -Wall -Wextra -std=c++17 | ||
EXEEXT = $(if $(filter %-w64-mingw32.static-,$(CROSS)),.exe,) | ||
INSTALL = install | ||
LDFLAGS = | ||
@@ -50,7 +50,7 @@ MSGID_BUGS_ADDRESS := roever@users.sf.net | ||
.PHONY: default | ||
default: all | ||
|
||
-VERSION := $(shell cat src/version) | ||
+VERSION := $(shell cat version) | ||
ALL_SOURCES := $(wildcard src/*) | ||
|
||
PKGS += SDL2_mixer | ||
@@ -63,7 +63,7 @@ PKGS_NATIVE += libpng | ||
PKGS_NATIVE += SDL2_image | ||
|
||
PKG_CFLAGS_NATIVE = $$($(PKG_CONFIG_NATIVE) --cflags $(PKGS_NATIVE)) | ||
-PKG_LIBS_NATIVE = $$($(PKG_CONFIG_NATIVE) --libs $(PKGS_NATIVE)) | ||
+PKG_LIBS_NATIVE = $$($(PKG_CONFIG_NATIVE) --libs $(PKGS_NATIVE)) -lintl | ||
|
||
DEFS += -DVERSION='"$(VERSION)"' | ||
DEFS += -DTOP_DATADIR='"$(PKGDATADIR)"' | ||
@@ -75,7 +75,7 @@ FILES_H := $(wildcard src/*.h) | ||
FILES_CPP := $(wildcard src/*.cc) | ||
FILES_O := $(patsubst src/%,_build/$(CROSS)/%.o,$(FILES_CPP)) | ||
.SECONDARY: $(FILES_O) | ||
-_build/$(CROSS)/%.o: src/% src/version $(FILES_H) | ||
+_build/$(CROSS)/%.o: src/% version $(FILES_H) | ||
@mkdir -p $(dir $@) | ||
$(CXX) $(CXXFLAGS) $$($(PKG_CONFIG) --cflags $(PKGS)) $(DEFS) -c -o $@ $< | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- dist/toppler.desktop.in.orig 2022-02-06 08:35:59 UTC | ||
+++ dist/toppler.desktop.in | ||
@@ -2,11 +2,11 @@ | ||
Encoding=UTF-8 | ||
Categories=Application;Game;ArcadeGame; | ||
X-Desktop-File-Install-Version=0.2 | ||
-Name=@FULLNAME@ | ||
+Name=Tower Toppler | ||
Comment=A clone of the 'Nebulus' game on old 8 and 16 bit machines. | ||
Comment[de]=Klon des alten Spiels 'Nebulus' | ||
Comment[cs]=Klon hry 'Nebulus' z dob 8 a 16 bitovÃœch poÄÃtaÄů. | ||
-Icon=@prefix@/pixmaps/@PACKAGE@.xpm | ||
+Icon=@prefix@/share/pixmaps/toppler.xpm | ||
Exec=@prefix@/bin/toppler | ||
Terminal=0 | ||
Type=Application |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- src/decl.cc.orig 2022-02-06 08:35:59 UTC | ||
+++ src/decl.cc | ||
@@ -119,9 +119,9 @@ static void checkdir(void) { | ||
|
||
if (!d) { | ||
mkdir(n.c_str(), S_IRWXU); | ||
+ } else { | ||
+ closedir(d); | ||
} | ||
- | ||
- closedir(d); | ||
#endif | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- src/highscore.cc.orig 2022-02-06 08:35:59 UTC | ||
+++ src/highscore.cc | ||
@@ -22,6 +22,7 @@ | ||
|
||
#include <cstdio> | ||
#include <unistd.h> | ||
+#include <sys/stat.h> | ||
|
||
#ifndef _WIN32 | ||
#include <fcntl.h> | ||
@@ -221,12 +222,12 @@ void hsc_init(void) { | ||
} | ||
else | ||
{ | ||
- debugprintf(2, "could not open create the lock file, no write access to global hiscore directory\n", fname); | ||
+ debugprintf(2, "could not open create the lock file, no write access to global hiscore directory\n", fname.c_str()); | ||
} | ||
} | ||
else | ||
{ | ||
- debugprintf(2, "could not open global highscore file %s\n", fname); | ||
+ debugprintf(2, "could not open global highscore file %s\n", fname.c_str()); | ||
} | ||
|
||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- src/main.cc.orig 2022-02-06 08:35:59 UTC | ||
+++ src/main.cc | ||
@@ -33,6 +33,8 @@ | ||
#include <dirent.h> | ||
#endif | ||
|
||
+#include <time.h> | ||
+ | ||
static void printhelp(void) { | ||
printf(_("\n\tOptions:\n\n -f\tEnable fullscreen mode\n -s\tSilence, disable all sound\n -dX\tSet debug level to X (default: %i)\n").c_str(), config.debug_level()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters