mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-31 10:46:16 +00:00
games/legend-of-edgar: Update to 1.29
- Use static tarball - Fix WWW - Drop some unnecessary variables - Fix bad absolute symlink - Pass paths through the environment and drop unused patches - Move remainaing patches to actual patch files - Take maintainership Changes: https://github.com/riksweeney/edgar/releases
This commit is contained in:
parent
be0147b969
commit
37550d43e3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=477655
@ -2,68 +2,42 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= edgar
|
||||
DISTVERSION= 1.26
|
||||
DISTVERSION= 1.29
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= https://github.com/riksweeney/edgar/releases/download/${DISTVERSION}/
|
||||
PKGNAMEPREFIX= legend-of-
|
||||
DISTFILES= edgar-${DISTVERSION}-1${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= tobik@FreeBSD.org
|
||||
COMMENT= 2D platform game with a persistent world
|
||||
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/doc/license
|
||||
|
||||
LIB_DEPENDS= libpng.so:graphics/png
|
||||
|
||||
USES= gmake
|
||||
USE_SDL= image mixer sdl ttf
|
||||
WITH_ZLIB= yes
|
||||
MAKEFILE= makefile
|
||||
MAKE_ARGS= BIN_DIR=${PREFIX}/bin/ \
|
||||
DATA_DIR=${DATADIR}/ \
|
||||
MAN_DIR=${PREFIX}/man/man6/ \
|
||||
PREFIX=${PREFIX}
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= riksweeney
|
||||
OPTIONS_DEFINE= DOCS NLS
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
PORTDOCS= *
|
||||
|
||||
INSTALLS_ICONS= yes
|
||||
|
||||
OPTIONS_DEFINE= DOCS NLS
|
||||
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
NLS_USES= gettext
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
NLS_MAKE_ARGS_OFF= LOCALE_MO=""
|
||||
NLS_USES= gettext-tools
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|CC = gcc|CC = ${CC}|; \
|
||||
s|$$(DESTDIR)/usr|$$(DESTDIR)/usr/local|; \
|
||||
s|$$(PREFIX)/games/|$$(PREFIX)/bin/|; \
|
||||
s|/share/games/edgar/|/share/edgar/|; \
|
||||
s|/share/man/|/man/|; \
|
||||
s|-Wall ||; \
|
||||
s|sdl-config|${SDL_CONFIG}|; \
|
||||
s|-s ||' \
|
||||
${WRKSRC}/makefile
|
||||
@${REINPLACE_CMD} -e 's|SDL/SDL|${LOCALBASE}/include/SDL/SDL|g' \
|
||||
${WRKSRC}/src/headers.h
|
||||
@${REINPLACE_CMD} -e 's|png.h|${LOCALBASE}/include/png.h|g' \
|
||||
${WRKSRC}/src/graphics/save_png.c
|
||||
@${REINPLACE_CMD} -e 's|self->dirY =- 13|self->dirY -= 13|g' \
|
||||
${WRKSRC}/src/boss/golem_boss.c
|
||||
@${REINPLACE_CMD} -e 's|Categories=Game|Categories=Game;ArcadeGame;|' \
|
||||
${WRKSRC}/icons/${PORTNAME}.desktop
|
||||
|
||||
.if ! ${PORT_OPTIONS:MDOCS}
|
||||
@${REINPLACE_CMD} -i '' -e '/mkdir -p $$(DOC_DIR)/d' \
|
||||
-i '' -e '/cp $$(DOCS) $$(DOC_DIR)/d' \
|
||||
${WRKSRC}/makefile
|
||||
.endif
|
||||
|
||||
.if ! ${PORT_OPTIONS:MNLS}
|
||||
@${REINPLACE_CMD} -e 's|^LOCALE_MO =.*|LOCALE_MO =|' \
|
||||
${WRKSRC}/makefile
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
||||
${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
|
||||
${RLN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/64x64/apps/${PORTNAME}.png \
|
||||
${STAGEDIR}${PREFIX}/share/pixmaps/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1483381806
|
||||
SHA256 (riksweeney-edgar-1.26_GH0.tar.gz) = 70dd52043ef1db04719d6e1dc8f982e5b3a21c3281db72374704acce79f4ba06
|
||||
SIZE (riksweeney-edgar-1.26_GH0.tar.gz) = 133639556
|
||||
TIMESTAMP = 1534768635
|
||||
SHA256 (edgar-1.29-1.tar.gz) = c163a0c2e3459e264ba507535934ebb1ab3915b77c210409abc306f27323779a
|
||||
SIZE (edgar-1.29-1.tar.gz) = 92971537
|
||||
|
100
games/legend-of-edgar/files/patch-makefile
Normal file
100
games/legend-of-edgar/files/patch-makefile
Normal file
@ -0,0 +1,100 @@
|
||||
- Make sure the build can find SDL's headers
|
||||
- Properly stage things to make sure the binary does not refer to
|
||||
the stage directory and that the game can actually find its assets
|
||||
at runtime
|
||||
|
||||
--- makefile.orig 2018-04-22 07:16:24 UTC
|
||||
+++ makefile
|
||||
@@ -22,7 +22,7 @@ PO_PROG = po_creator
|
||||
TILE_PROG = tile_creator
|
||||
endif
|
||||
|
||||
-PREFIX = $(DESTDIR)/usr
|
||||
+PREFIX = /usr
|
||||
BIN_DIR = $(PREFIX)/games/
|
||||
DOC_DIR = $(PREFIX)/share/doc/$(PROG)/
|
||||
ICON_DIR = $(PREFIX)/share/icons/hicolor/
|
||||
@@ -42,6 +42,7 @@ CFLAGS += -Wall -pedantic
|
||||
ifeq ($(DEV),1)
|
||||
CFLAGS += -Werror -g
|
||||
endif
|
||||
+CFLAGS += $(shell sdl-config --cflags)
|
||||
|
||||
DEFINES = -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DDEV=$(DEV) -DINSTALL_PATH=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -DUNIX=$(UNIX)
|
||||
ifndef NO_PAK
|
||||
@@ -103,11 +104,11 @@ endif
|
||||
all : $(PROG) makefile.dep $(ED_PROG) $(PAK_PROG) $(LOCALE_MO) $(PO_PROG)
|
||||
|
||||
makefile.dep : src/*/*.h src/*.h
|
||||
- for i in src/*.c src/*/*.c; do $(CC) -MM "$${i}"; done > $@
|
||||
+ for i in src/*.c src/*/*.c; do $(CC) $(CFLAGS) -MM "$${i}"; done > $@
|
||||
|
||||
# compiling other source files.
|
||||
$(MAIN_OBJS) $(CORE_OBJS) $(EDIT_OBJS) $(TITLE_OBJS) $(PAK_OBJS) $(PO_OBJS) $(TILE_OBJS):
|
||||
- $(CC) $(CFLAGS) $(DEFINES) -c -s $<
|
||||
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
@@ -148,37 +149,37 @@ ifeq ($(DEV),1)
|
||||
echo Cannot install if DEV is set to 1!
|
||||
else
|
||||
$(MAKE) buildpak
|
||||
- mkdir -p $(BIN_DIR)
|
||||
- mkdir -p $(DATA_DIR)
|
||||
- mkdir -p $(DOC_DIR)
|
||||
- mkdir -p $(ICON_DIR)16x16/apps
|
||||
- mkdir -p $(ICON_DIR)32x32/apps
|
||||
- mkdir -p $(ICON_DIR)48x48/apps
|
||||
- mkdir -p $(ICON_DIR)64x64/apps
|
||||
- mkdir -p $(DESKTOP_DIR)
|
||||
- mkdir -p $(APPDATA_DIR)
|
||||
- mkdir -p $(MAN_DIR)
|
||||
+ mkdir -p $(DESTDIR)$(BIN_DIR)
|
||||
+ mkdir -p $(DESTDIR)$(DATA_DIR)
|
||||
+ mkdir -p $(DESTDIR)$(DOC_DIR)
|
||||
+ mkdir -p $(DESTDIR)$(ICON_DIR)16x16/apps
|
||||
+ mkdir -p $(DESTDIR)$(ICON_DIR)32x32/apps
|
||||
+ mkdir -p $(DESTDIR)$(ICON_DIR)48x48/apps
|
||||
+ mkdir -p $(DESTDIR)$(ICON_DIR)64x64/apps
|
||||
+ mkdir -p $(DESTDIR)$(DESKTOP_DIR)
|
||||
+ mkdir -p $(DESTDIR)$(APPDATA_DIR)
|
||||
+ mkdir -p $(DESTDIR)$(MAN_DIR)
|
||||
|
||||
- cp $(PROG) $(BIN_DIR)$(PROG)
|
||||
+ $(BSD_INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BIN_DIR)$(PROG)
|
||||
ifndef NO_PAK
|
||||
- cp $(PAK_FILE) $(DATA_DIR)$(PAK_FILE)
|
||||
+ $(BSD_INSTALL_DATA) $(PAK_FILE) $(DESTDIR)$(DATA_DIR)$(PAK_FILE)
|
||||
else
|
||||
- cp -a data gfx music sound font $(DATA_DIR)
|
||||
+ cp -a data gfx music sound font $(DESTDIR)$(DATA_DIR)
|
||||
endif
|
||||
- cp $(DOCS) $(DOC_DIR)
|
||||
- cp $(ICONS)16x16.png $(ICON_DIR)16x16/apps/$(PROG).png
|
||||
- cp $(ICONS)32x32.png $(ICON_DIR)32x32/apps/$(PROG).png
|
||||
- cp $(ICONS)48x48.png $(ICON_DIR)48x48/apps/$(PROG).png
|
||||
- cp $(ICONS)64x64.png $(ICON_DIR)64x64/apps/$(PROG).png
|
||||
- cp $(ICONS)$(PROG).desktop $(DESKTOP_DIR)
|
||||
- cp $(ICONS)$(PROG).appdata.xml $(APPDATA_DIR)
|
||||
- install -m 0644 $(MAN)$(PROG).6 $(MAN_DIR)
|
||||
+ $(BSD_INSTALL_DATA) $(DOCS) $(DESTDIR)$(DOC_DIR)
|
||||
+ $(BSD_INSTALL_DATA) $(ICONS)16x16.png $(DESTDIR)$(ICON_DIR)16x16/apps/$(PROG).png
|
||||
+ $(BSD_INSTALL_DATA) $(ICONS)32x32.png $(DESTDIR)$(ICON_DIR)32x32/apps/$(PROG).png
|
||||
+ $(BSD_INSTALL_DATA) $(ICONS)48x48.png $(DESTDIR)$(ICON_DIR)48x48/apps/$(PROG).png
|
||||
+ $(BSD_INSTALL_DATA) $(ICONS)64x64.png $(DESTDIR)$(ICON_DIR)64x64/apps/$(PROG).png
|
||||
+ $(BSD_INSTALL_DATA) $(ICONS)$(PROG).desktop $(DESTDIR)$(DESKTOP_DIR)
|
||||
+ $(BSD_INSTALL_DATA) $(ICONS)$(PROG).appdata.xml $(DESTDIR)$(APPDATA_DIR)
|
||||
+ $(BSD_INSTALL_MAN) $(MAN)$(PROG).6 $(DESTDIR)$(MAN_DIR)
|
||||
|
||||
@for f in $(LOCALE_MO); do \
|
||||
lang=`echo $$f | sed -e 's/^locale\///;s/\.mo$$//'`; \
|
||||
- mkdir -p $(LOCALE_DIR)$$lang/LC_MESSAGES; \
|
||||
- echo "cp $$f $(LOCALE_DIR)$$lang/LC_MESSAGES/$(PROG).mo"; \
|
||||
- cp $$f $(LOCALE_DIR)$$lang/LC_MESSAGES/$(PROG).mo; \
|
||||
+ mkdir -p $(DESTDIR)$(LOCALE_DIR)$$lang/LC_MESSAGES; \
|
||||
+ echo "cp $$f $(DESTDIR)$(LOCALE_DIR)$$lang/LC_MESSAGES/$(PROG).mo"; \
|
||||
+ cp $$f $(DESTDIR)$(LOCALE_DIR)$$lang/LC_MESSAGES/$(PROG).mo; \
|
||||
done
|
||||
endif
|
||||
|
19
games/legend-of-edgar/files/patch-src_headers.h
Normal file
19
games/legend-of-edgar/files/patch-src_headers.h
Normal file
@ -0,0 +1,19 @@
|
||||
--- src/headers.h.orig 2018-08-20 12:55:03 UTC
|
||||
+++ src/headers.h
|
||||
@@ -43,11 +43,11 @@ Foundation, 51 Franklin Street, Suite 500, Boston, MA
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
-#include "SDL/SDL.h"
|
||||
-#include "SDL/SDL_endian.h"
|
||||
-#include "SDL/SDL_image.h"
|
||||
-#include "SDL/SDL_mixer.h"
|
||||
-#include "SDL/SDL_ttf.h"
|
||||
+#include <SDL/SDL.h>
|
||||
+#include <SDL/SDL_endian.h>
|
||||
+#include <SDL/SDL_image.h>
|
||||
+#include <SDL/SDL_mixer.h>
|
||||
+#include <SDL/SDL_ttf.h>
|
||||
|
||||
#include "structs.h"
|
||||
#include "i18n.h"
|
@ -10,4 +10,4 @@ lives in a fortress beyond the forbidden swamp.
|
||||
Donning his armour, Edgar sets off to rescue him, but his quest will not be
|
||||
easy...
|
||||
|
||||
WWW: http://www.parallelrealities.co.uk/p/legend-of-edgar.html
|
||||
WWW: https://www.parallelrealities.co.uk/games/edgar/
|
||||
|
@ -12,12 +12,14 @@ share/icons/hicolor/64x64/apps/edgar.png
|
||||
%%NLS%%share/locale/da/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/de/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/el/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/en_GB/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/en_US/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/eo/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/es/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/fa/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/fr/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/hi/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/id/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/it/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/ja/LC_MESSAGES/edgar.mo
|
||||
%%NLS%%share/locale/jv/LC_MESSAGES/edgar.mo
|
||||
|
Loading…
Reference in New Issue
Block a user