Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 2014 19:42:36 +0000 (UTC)
From:      Max Brazhnikov <makc@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r341263 - in head/games/opensonic: . files
Message-ID:  <201401261942.s0QJgaoC099720@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: makc
Date: Sun Jan 26 19:42:36 2014
New Revision: 341263
URL: http://svnweb.freebsd.org/changeset/ports/341263
QAT: https://qat.redports.org/buildarchive/r341263/

Log:
  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)

Deleted:
  head/games/opensonic/files/patch-src__misc__opensonic
Modified:
  head/games/opensonic/Makefile
  head/games/opensonic/files/patch-CMakeLists.txt
  head/games/opensonic/pkg-plist

Modified: head/games/opensonic/Makefile
==============================================================================
--- head/games/opensonic/Makefile	Sun Jan 26 19:32:11 2014	(r341262)
+++ head/games/opensonic/Makefile	Sun Jan 26 19:42:36 2014	(r341263)
@@ -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>

Modified: head/games/opensonic/files/patch-CMakeLists.txt
==============================================================================
--- head/games/opensonic/files/patch-CMakeLists.txt	Sun Jan 26 19:32:11 2014	(r341262)
+++ head/games/opensonic/files/patch-CMakeLists.txt	Sun Jan 26 19:42:36 2014	(r341263)
@@ -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)

Modified: head/games/opensonic/pkg-plist
==============================================================================
--- head/games/opensonic/pkg-plist	Sun Jan 26 19:32:11 2014	(r341262)
+++ head/games/opensonic/pkg-plist	Sun Jan 26 19:42:36 2014	(r341263)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401261942.s0QJgaoC099720>