Bug 190469 - [UPD] games/frogatto
Summary: [UPD] games/frogatto
Status: Closed DUPLICATE of bug 190513
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
: 178324 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-02 00:02 UTC by fiziologus
Modified: 2014-06-16 07:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fiziologus 2014-06-02 00:02:52 UTC
[games/frogatto] Update to 1.3.1
Staging

This commit replace PR178324

Fix:
Patch attached with submission follows:

diff -ruN frogatto.orig/Makefile frogatto/Makefile
--- frogatto.orig/Makefile	2014-06-01 06:54:25.000000000 +0400
+++ frogatto/Makefile	2014-06-01 06:58:04.000000000 +0400
@@ -1,68 +1,69 @@
 # Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
-# $FreeBSD: head/games/frogatto/Makefile 355704 2014-05-29 14:35:01Z miwi $
+# $FreeBSD: ports/games/frogatto/Makefile,v 1.13 2013/01/31 14:01:28 svnexp Exp $
 
 PORTNAME=	frogatto
-PORTVERSION=	1.2
-PORTREVISION=	2
+PORTVERSION=	1.3.1
 CATEGORIES=	games
 MASTER_SITES=	GH
 
 MAINTAINER=	fiziologus@gmail.com
 COMMENT=	An old-school 2D classic adventure platformer game
 
-LIB_DEPENDS=	libboost_thread.so:${PORTSDIR}/devel/boost-libs \
-		libpng15.so:${PORTSDIR}/graphics/png
+LIB_DEPENDS=	boost_thread:${PORTSDIR}/devel/boost-libs \
+		png15:${PORTSDIR}/graphics/png \
+		X11:${PORTSDIR}/x11/libX11
 
-NO_PACKAGE=	Package will be 144M, set FORCE_PACKAGE if you really want it
+#NO_PACKAGE=	Package will be 144M, set FORCE_PACKAGE if you really want it
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	frogatto
 GH_PROGECT=	frogatto
 GH_TAGNAME=	${PORTVERSION}
-GH_COMMIT=	64c84bf
+GH_COMMIT=	58bd7c6
+
+USES=		pkgconfig:build gmake
 
-USES=		gmake
 ALL_TARGET=	game server
-USE_GL=		glew
-USE_SDL=	image mixer ttf
+USE_GL=		glew glu
+USE_SDL=	sdl image mixer ttf
 
 PLIST_FILES=	bin/${PORTNAME} bin/${PORTNAME}-server
 
-NO_STAGE=	yes
+.if ${CXX:M*clang*}
+CXXFLAGS+=	-Wignored-qualifiers
+.endif
+
 post-patch:
-# Sanitize Makefile: honor CC/CXX and C[XX]FLAGS, trim `-mt' suffix from boost
-# libraries, remove superfluous libraries when linking server executable (add
+# Sanitize Makefile: trim `-mt' suffix from boost libraries,
+# remove superfluous libraries when linking server executable (add
 # missing -pthread instead), etc.
-	@${REINPLACE_CMD} -E -e 's,= (ccache )?gcc,:= $$(CC) $$(CFLAGS),' \
-		-e 's,= (ccache )?g\+\+,:= $$(CXX) $$(CXXFLAGS),' \
-		-e 's, -O2,, ; s, -g,, ; s, -L/usr/lib,, ; s, -L/sw/lib,,' \
-		-e '/server/s,`.*mixer,-L${LOCALBASE}/lib ${PTHREAD_LIBS},' \
-		-e 's,-mt,,g' -e 's,-lpng,-lpng15,g' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -E -e 's, -g,,' -e 's,-mt,,g' \
+		-e 's|zlib||g' -e 's|-lpthread|${PTHREAD_LIBS}|g' \
+		-e 's|-Wignored-qualifiers ||' \
+		-e 's|-Werror||' \
+		 ${WRKSRC}/Makefile
 # Point to the right location where to look for resources on FreeBSD
 	@${REINPLACE_CMD} -e 's,HAVE_CONFIG_H,__FreeBSD__,' \
 		-e 's,DATADIR,"${DATADIR}",' ${WRKSRC}/src/filesystem.cpp
-	@${REINPLACE_CMD} -E 's,(music|sounds)/,${DATADIR}/&,' \
-		${WRKSRC}/src/sound.cpp
-	@${REINPLACE_CMD} -e '/\/locale\//s,\.,${PREFIX}/share,' \
-		${WRKSRC}/src/i18n.cpp
+	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}/|g' ${WRKSRC}/src/sound.cpp
+# Fix
+	@${REINPLACE_CMD} -e 's|%lu|%u|' ${WRKSRC}/src/server.cpp
+	@${REINPLACE_CMD} -e 's|__linux__|__FreeBSD__|g' ${WRKSRC}/src/clipboard.cpp
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/game ${PREFIX}/bin/${PORTNAME}
-	${INSTALL_PROGRAM} ${WRKSRC}/server ${PREFIX}/bin/${PORTNAME}-server
-	cd ${WRKSRC} && ${COPYTREE_SHARE} "data images music sounds" \
-		${DATADIR}
-	cd ${WRKSRC}/locale && ${MV} hu_HU hu && ${MV} ms_MY ms
-	cd ${WRKSRC} && ${COPYTREE_SHARE} "locale" ${PREFIX}/share
+	${INSTALL_PROGRAM} ${WRKSRC}/game ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_PROGRAM} ${WRKSRC}/server ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-server
+	cd ${WRKSRC}/modules/frogatto/locale && ${MV} hu_HU hu && ${MV} ms_MY ms
+	cd ${WRKSRC} && ${COPYTREE_SHARE} "data images music modules utils" \
+		${STAGEDIR}${DATADIR}
+	cd ${WRKSRC} && ${CP} *.ttf *.cfg ${STAGEDIR}${DATADIR} 
 # Fix permissions on DATADIR after COPYTREE_SHARE (cpio(1) defaults to 700
 # if target directory (${DATADIR}) does not exist)
-	@${CHMOD} 755 ${DATADIR}
-# Dynamically generate part of the PLIST for NLS files and game resources
-# (lots of them)
-	@${FIND} ${PREFIX}/share/locale -name ${PORTNAME}.mo | \
-		${SED} 's,^${PREFIX}/,,' | ${SORT} >> ${TMPPLIST}
-	@${FIND} ${DATADIR} -not -type d | \
-		${SED} 's,^${PREFIX}/,,' | ${SORT} >> ${TMPPLIST}
-	@${FIND} ${DATADIR} -type d | \
-		${SED} 's,^${PREFIX}/,@dirrm ,' | ${SORT} -r >> ${TMPPLIST}
+	@${CHMOD} 755 ${STAGEDIR}${DATADIR}
+# Build dynamic plist
+	@${FIND} ${STAGEDIR}${DATADIR} -not -type d | \
+		${SED} 's,^${STAGEDIR}${PREFIX}/,,' | ${SORT} >> ${TMPPLIST}
+	@${FIND} ${STAGEDIR}${DATADIR} -type d | \
+		${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' | ${SORT} -r >> ${TMPPLIST}
 
 .include <bsd.port.mk>
diff -ruN frogatto.orig/distinfo frogatto/distinfo
--- frogatto.orig/distinfo	2014-06-01 06:54:25.000000000 +0400
+++ frogatto/distinfo	2014-05-26 21:47:09.000000000 +0400
@@ -1,2 +1,2 @@
-SHA256 (frogatto-1.2.tar.gz) = b735bda8d409612eecc79e84d218b3bd460470f8bccca3472d08c893d91d1232
-SIZE (frogatto-1.2.tar.gz) = 261545835
+SHA256 (frogatto-1.3.1.tar.gz) = 071059b99ea9b947bed42f99d885770455b72e584da8516443ef316cf187256a
+SIZE (frogatto-1.3.1.tar.gz) = 500362508
diff -ruN frogatto.orig/files/patch-data-objects-enemies-milgramen-milgram_pod_launcher.cfg frogatto/files/patch-data-objects-enemies-milgramen-milgram_pod_launcher.cfg
--- frogatto.orig/files/patch-data-objects-enemies-milgramen-milgram_pod_launcher.cfg	2014-06-01 06:54:25.000000000 +0400
+++ frogatto/files/patch-data-objects-enemies-milgramen-milgram_pod_launcher.cfg	1970-01-01 03:00:00.000000000 +0300
@@ -1,11 +0,0 @@
---- data/objects/enemies/milgramen/milgram_pod_launcher.cfg.orig	2012-11-10 21:52:46.000000000 +0400
-+++ data/objects/enemies/milgramen/milgram_pod_launcher.cfg	2012-11-10 21:54:05.000000000 +0400
-@@ -74,7 +74,7 @@
- 	
- 	on_die="spawn('explosion_big_recurring',  midpoint_x, midpoint_y, facing)"
- 	
--	solid_area=10,20,38,50
-+	solid_area=14,20,34,50
- 
- 		[base:animation]
- 		image=enemies/milgram-pod-launcher.png
diff -ruN frogatto.orig/files/patch-src-custom_object.cpp frogatto/files/patch-src-custom_object.cpp
--- frogatto.orig/files/patch-src-custom_object.cpp	2014-06-01 06:54:25.000000000 +0400
+++ frogatto/files/patch-src-custom_object.cpp	1970-01-01 03:00:00.000000000 +0300
@@ -1,11 +0,0 @@
---- src/custom_object.cpp.orig	2011-11-30 09:31:31.000000000 +0400
-+++ src/custom_object.cpp	2012-11-10 21:39:11.000000000 +0400
-@@ -1394,7 +1394,7 @@
- 	set_driver_position();
- 
- 	if(blur_) {
--		blur_->next_frame(start_x, start_y, x(), y(), frame_, time_in_frame_, face_right(), upside_down(), rotate_.value());
-+		blur_->next_frame(start_x, start_y, x(), y(), frame_, time_in_frame_, face_right(), upside_down(), rotate_.as_float());
- 		if(blur_->destroyed()) {
- 			blur_.reset();
- 		}
diff -ruN frogatto.orig/files/patch-src__sound.cpp frogatto/files/patch-src__sound.cpp
--- frogatto.orig/files/patch-src__sound.cpp	1970-01-01 03:00:00.000000000 +0300
+++ frogatto/files/patch-src__sound.cpp	2014-05-26 21:47:09.000000000 +0400
@@ -0,0 +1,47 @@
+--- src/sound.cpp.orig	2012-12-09 02:36:13.000000000 +0400
++++ src/sound.cpp	2013-05-02 00:20:26.000000000 +0400
+@@ -20,6 +20,8 @@
+ 
+ #include "variant_utils.hpp"
+ 
++#define DATA_DIR  "%%DATADIR%%"
++
+ namespace sound {
+ 
+ namespace {
+@@ -532,7 +534,7 @@
+ void stop_looped_sounds(const void* object)
+ {
+ 	for(int n = 0; n != channels_to_sounds_playing.size(); ++n) {
+-		if((object == NULL && channels_to_sounds_playing[n].object != NULL
++		if(( ( object == NULL && channels_to_sounds_playing[n].object != NULL )
+ 		   || channels_to_sounds_playing[n].object == object) &&
+ 		   (channels_to_sounds_playing[n].loops != 0)) {
+ #if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE
+@@ -550,7 +552,7 @@
+ 	}
+ 
+ 	for(int n = 0; n != queued_sounds.size(); ++n) {
+-		if((object == NULL && queued_sounds[n].object != NULL
++		if(( ( object == NULL && queued_sounds[n].object != NULL )
+ 		   || queued_sounds[n].object == object) &&
+ 		   (queued_sounds[n].loops != 0)) {
+ 			queued_sounds.erase(queued_sounds.begin() + n);
+@@ -683,7 +685,7 @@
+ 		std::cerr << "FILE NOT FOUND: " << song_file << std::endl;
+ 		return;
+ 	}
+-	const std::string& path = itor->second;
++	const std::string& path = DATA_DIR + itor->second;
+ 
+ #if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE
+ 	if(current_mix_music) {
+@@ -760,7 +762,7 @@
+ 		std::cerr << "FILE NOT FOUND: " << song_file << std::endl;
+ 		return;
+ 	}
+-	const std::string& path = itor->second;
++	const std::string& path = DATA_DIR + itor->second;
+ 
+ #if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE
+ 	//note that calling HaltMusic will result in on_music_finished being
Comment 1 John Marino freebsd_committer freebsd_triage 2014-06-11 15:04:30 UTC
*** Bug 178324 has been marked as a duplicate of this bug. ***
Comment 2 John Marino freebsd_committer freebsd_triage 2014-06-11 15:07:03 UTC
I seriously double anyone is going to touch this in this form.
The patch should be an attachment, not pasted into a comment.

If you want to increase your chances that somebody look at this, I highly recommend you submit the patch as an attachment.

(Was some kind of auto-tool used?)
Comment 3 fiziologus 2014-06-13 05:19:49 UTC
This result use send-pr (web form).

Closed this. This and 190513 is same (migrate to bugzilla some confused me).

PS: 178324 no duplicate with this, but this is replace it.
Comment 4 John Marino freebsd_committer freebsd_triage 2014-06-16 07:27:50 UTC
Latest patch is on #190513

*** This bug has been marked as a duplicate of bug 190513 ***