diff options
author | tobik <tobik@FreeBSD.org> | 2018-08-20 22:18:03 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2018-08-20 22:18:03 +0800 |
commit | 706471d926b62d7812cbd5305fb1d681006b3463 (patch) | |
tree | f8a02d7ab06c8314a7eb1010e16beef63072a1f6 /games | |
parent | 4e35825335b119e44b2dee2b372365bf24a4cb89 (diff) | |
download | freebsd-ports-gnome-706471d926b62d7812cbd5305fb1d681006b3463.tar.gz freebsd-ports-gnome-706471d926b62d7812cbd5305fb1d681006b3463.tar.zst freebsd-ports-gnome-706471d926b62d7812cbd5305fb1d681006b3463.zip |
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
Diffstat (limited to 'games')
-rw-r--r-- | games/legend-of-edgar/Makefile | 56 | ||||
-rw-r--r-- | games/legend-of-edgar/distinfo | 6 | ||||
-rw-r--r-- | games/legend-of-edgar/files/patch-makefile | 100 | ||||
-rw-r--r-- | games/legend-of-edgar/files/patch-src_headers.h | 19 | ||||
-rw-r--r-- | games/legend-of-edgar/pkg-descr | 2 | ||||
-rw-r--r-- | games/legend-of-edgar/pkg-plist | 2 |
6 files changed, 140 insertions, 45 deletions
diff --git a/games/legend-of-edgar/Makefile b/games/legend-of-edgar/Makefile index a67065a37ac3..1dbc81be6fc4 100644 --- a/games/legend-of-edgar/Makefile +++ b/games/legend-of-edgar/Makefile @@ -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 - -USE_GITHUB= yes -GH_ACCOUNT= riksweeney - -PORTDOCS= * - -INSTALLS_ICONS= yes +MAKE_ARGS= BIN_DIR=${PREFIX}/bin/ \ + DATA_DIR=${DATADIR}/ \ + MAN_DIR=${PREFIX}/man/man6/ \ + PREFIX=${PREFIX} OPTIONS_DEFINE= DOCS NLS - OPTIONS_SUB= yes -NLS_USES= gettext +PORTDOCS= * -.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> diff --git a/games/legend-of-edgar/distinfo b/games/legend-of-edgar/distinfo index 67a998e7a60e..a63e0ed2716d 100644 --- a/games/legend-of-edgar/distinfo +++ b/games/legend-of-edgar/distinfo @@ -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 diff --git a/games/legend-of-edgar/files/patch-makefile b/games/legend-of-edgar/files/patch-makefile new file mode 100644 index 000000000000..92fbce24bc53 --- /dev/null +++ b/games/legend-of-edgar/files/patch-makefile @@ -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 + diff --git a/games/legend-of-edgar/files/patch-src_headers.h b/games/legend-of-edgar/files/patch-src_headers.h new file mode 100644 index 000000000000..6108dfe71e45 --- /dev/null +++ b/games/legend-of-edgar/files/patch-src_headers.h @@ -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" diff --git a/games/legend-of-edgar/pkg-descr b/games/legend-of-edgar/pkg-descr index e66f81b06a04..f49a495dc8f6 100644 --- a/games/legend-of-edgar/pkg-descr +++ b/games/legend-of-edgar/pkg-descr @@ -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/ diff --git a/games/legend-of-edgar/pkg-plist b/games/legend-of-edgar/pkg-plist index 4ef3ca642cf7..fc8117fb0472 100644 --- a/games/legend-of-edgar/pkg-plist +++ b/games/legend-of-edgar/pkg-plist @@ -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 |