diff options
author | makc <makc@FreeBSD.org> | 2014-01-27 03:42:36 +0800 |
---|---|---|
committer | makc <makc@FreeBSD.org> | 2014-01-27 03:42:36 +0800 |
commit | 35da4707d7a76189cfaff17d9d4b33340bdb0a81 (patch) | |
tree | fc15e59268770ba73e31a4c3235e10b10f0e7179 /games | |
parent | 974358cb8bbf637fa09355e5d6356223c370ed3b (diff) | |
download | freebsd-ports-gnome-35da4707d7a76189cfaff17d9d4b33340bdb0a81.tar.gz freebsd-ports-gnome-35da4707d7a76189cfaff17d9d4b33340bdb0a81.tar.zst freebsd-ports-gnome-35da4707d7a76189cfaff17d9d4b33340bdb0a81.zip |
games/opensonic:
- Install icon and fix desktop entry
- Remove useless dependencies
- Bring stage support
- Fix misused PREFIX/LOCALBASE
- Don't install old wrapper script, patch sources to not copy binary,
and create a link for binary instead.
- Remove no longer useful patch
I only wanted nice icon...
PR: ports/185616
Approved by: maintainer timeout (16 days)
Diffstat (limited to 'games')
-rw-r--r-- | games/opensonic/Makefile | 40 | ||||
-rw-r--r-- | games/opensonic/files/patch-CMakeLists.txt | 16 | ||||
-rw-r--r-- | games/opensonic/files/patch-src__misc__opensonic | 14 | ||||
-rw-r--r-- | games/opensonic/pkg-plist | 1 |
4 files changed, 30 insertions, 41 deletions
diff --git a/games/opensonic/Makefile b/games/opensonic/Makefile index f15c4e23aff7..3746fae92399 100644 --- a/games/opensonic/Makefile +++ b/games/opensonic/Makefile @@ -3,6 +3,7 @@ PORTNAME= opensonic PORTVERSION= 0.1.4 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= SF/opensnc/Open%20Sonic/${PORTVERSION} DISTNAME= opensnc-src-${PORTVERSION} @@ -10,38 +11,31 @@ DISTNAME= opensnc-src-${PORTVERSION} MAINTAINER= devel@stasyan.com COMMENT= Game based on the "Sonic the Hedgehog" universe +BUILD_DEPENDS= alpng>=1.3:${PORTSDIR}/graphics/alpng +LIB_DEPENDS= liballeg.so:${PORTSDIR}/devel/allegro \ + libogg.so:${PORTSDIR}/audio/libogg \ + libvorbis.so:${PORTSDIR}/audio/libvorbis + DESKTOP_ENTRIES="${PORTNAME}" \ "Sonic the Hedgehog" \ - "${DATADIR}/images/icon.png" \ - "${PORTNAME}_launcher" \ - "Game;KidsGame;" \ - "false" + "${PREFIX}/share/pixmaps/opensonic.png" \ + "${PORTNAME}" \ + "Game;ArcadeGame;" \ + false USES= cmake -CMAKE_ENV+= _ALLEGRO_LIBS="`allegro-config --libs`" _ALLEGRO_VERSION="`allegro-config --version`" +CMAKE_ENV+= _ALLEGRO_LIBS="`allegro-config --libs`" \ + _ALLEGRO_VERSION="`allegro-config --version`" CFLAGS+= -I${LOCALBASE}/include -BUILD_DEPENDS+= ${LOCALBASE}/lib/libaldmb.a:${PORTSDIR}/audio/dumb-allegro \ - alpng>=1.3:${PORTSDIR}/graphics/alpng -RUN_DEPENDS+= ${LOCALBASE}/lib/libaldmb.a:${PORTSDIR}/audio/dumb-allegro \ - alpng>=1.3:${PORTSDIR}/graphics/alpng -LIB_DEPENDS+= liballeg.so:${PORTSDIR}/devel/allegro \ - libogg.so:${PORTSDIR}/audio/libogg \ - libvorbis.so:${PORTSDIR}/audio/libvorbis - -NO_STAGE= yes -.include <bsd.port.pre.mk> - post-patch: - @${REINPLACE_CMD} -e 's,/usr/bin,${LOCALBASE}/bin,g' \ - ${PATCH_WRKSRC}/CMakeLists.txt ${PATCH_WRKSRC}/src/core/global.h - @${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,g' \ + @${REINPLACE_CMD} -e 's,/usr/bin,${PREFIX}/bin,g' \ + -e 's,/usr/share,${PREFIX}/share,g' \ ${PATCH_WRKSRC}/src/core/global.h - @${REINPLACE_CMD} -e 's,%%GAME_DIR%%,${DATADIR},g' -e 's,opensonic_bin,opensonic,g' -e 's,/bin/bash,/bin/sh,g' \ - ${PATCH_WRKSRC}/src/misc/opensonic post-install: - @${INSTALL_SCRIPT} ${PATCH_WRKSRC}/src/misc/opensonic ${LOCALBASE}/bin/opensonic + ${INSTALL_DATA} ${WRKSRC}/icon.png ${STAGEDIR}${PREFIX}/share/pixmaps/opensonic.png + ${LN} -s ${DATADIR}/opensonic ${STAGEDIR}${PREFIX}/bin/opensonic -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/games/opensonic/files/patch-CMakeLists.txt b/games/opensonic/files/patch-CMakeLists.txt index c7a985838056..dde98b06b8c1 100644 --- a/games/opensonic/files/patch-CMakeLists.txt +++ b/games/opensonic/files/patch-CMakeLists.txt @@ -1,13 +1,21 @@ ---- CMakeLists.txt.orig 2010-12-15 10:31:17.000000000 +0600 -+++ CMakeLists.txt 2010-12-15 10:32:02.000000000 +0600 -@@ -410,8 +410,8 @@ +--- ./CMakeLists.txt.orig 2010-09-19 18:31:26.000000000 +0000 ++++ ./CMakeLists.txt 2014-01-09 19:17:45.443017601 +0000 +@@ -410,16 +410,11 @@ # Installing on *nix IF(UNIX) - SET(GAME_INSTALL_DIR "/usr/share/${GAME_UNIXNAME}") - SET(GAME_FINAL_DIR "/usr/bin") + SET(GAME_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/${GAME_UNIXNAME}") -+ SET(GAME_FINAL_DIR "{CMAKE_INSTALL_PREFIX}/bin") ++ SET(GAME_FINAL_DIR "${CMAKE_INSTALL_PREFIX}/bin") INSTALL(CODE "MESSAGE(\"Installing ${GAME_NAME} ${GAME_VERSION}... Make sure you have root privileges.\")") INSTALL(TARGETS ${GAME_UNIXNAME} RUNTIME DESTINATION ${GAME_INSTALL_DIR}) + INSTALL(FILES license.txt readme.html DESTINATION ${GAME_INSTALL_DIR}) + INSTALL(DIRECTORY objects sprites config images levels licenses musics quests samples screenshots themes languages DESTINATION ${GAME_INSTALL_DIR} PATTERN ".svn" EXCLUDE) +- +- INSTALL(CODE "MESSAGE(\"Creating files at ${GAME_FINAL_DIR}...\")") +- INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"cmake\" \"-E\" \"copy\" \"${GAME_INSTALL_DIR}/${GAME_UNIXNAME}\" \"${GAME_FINAL_DIR}/${GAME_UNIXNAME}\")") +- +- INSTALL(CODE "MESSAGE(\"Done! Please run ${GAME_UNIXNAME} to start ${GAME_NAME}.\")") + ENDIF(UNIX) diff --git a/games/opensonic/files/patch-src__misc__opensonic b/games/opensonic/files/patch-src__misc__opensonic deleted file mode 100644 index afaa68acc074..000000000000 --- a/games/opensonic/files/patch-src__misc__opensonic +++ /dev/null @@ -1,14 +0,0 @@ ---- src/misc/opensonic.orig 2009-06-01 02:34:38.000000000 +1100 -+++ src/misc/opensonic 2010-02-02 20:03:04.352042228 +1000 -@@ -1,9 +1,9 @@ --#!/bin/bash -+#!/bin/sh - # Game - - GAME_BIN="opensonic_bin" - PWD_DIR=`pwd` --GAME_DIR=`echo $0 | sed 's,^\(.*\)/\(.*\)$,\1,g'` -+GAME_DIR=%%GAME_DIR%% - GAME_PATH="${GAME_DIR}/${GAME_BIN}" - - # Set LD_LIBRARY_PATH diff --git a/games/opensonic/pkg-plist b/games/opensonic/pkg-plist index e545b606483a..36681ce04610 100644 --- a/games/opensonic/pkg-plist +++ b/games/opensonic/pkg-plist @@ -209,6 +209,7 @@ bin/opensonic %%DATADIR%%/themes/template.brk %%DATADIR%%/themes/template.grp %%DATADIR%%/themes/tutorial.bg +share/pixmaps/opensonic.png @dirrm %%DATADIR%%/themes @dirrm %%DATADIR%%/sprites @dirrm %%DATADIR%%/screenshots |