Bug 185616 - games/opensonic: clean up, support stage
Summary: games/opensonic: clean up, support stage
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Max Brazhnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 21:30 UTC by Max Brazhnikov
Modified: 2014-01-26 19:50 UTC (History)
0 users

See Also:


Attachments
file.diff (4.80 KB, patch)
2014-01-09 21:30 UTC, Max Brazhnikov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Brazhnikov freebsd_committer freebsd_triage 2014-01-09 21:30:00 UTC
- 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

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-09 21:30:15 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-09 21:30:15 UTC
Maintainer of games/opensonic,

Please note that PR ports/185616 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/185616

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Max Brazhnikov freebsd_committer freebsd_triage 2014-01-10 08:06:45 UTC
Responsible Changed
From-To: freebsd-ports-bugs->makc
Comment 4 dfilter service freebsd_committer freebsd_triage 2014-01-26 19:42:44 UTC
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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Max Brazhnikov freebsd_committer freebsd_triage 2014-01-26 19:43:51 UTC
State Changed
From-To: feedback->closed

Committed.