Bug 190513 - [update, Stage] games/frogatto
Summary: [update, Stage] games/frogatto
Status: Closed FIXED
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:
: 190469 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-02 15:41 UTC by fiziologus
Modified: 2014-07-20 15:27 UTC (History)
4 users (show)

See Also:


Attachments
patch (8.29 KB, text/plain)
2014-06-13 05:21 UTC, fiziologus
no flags Details
new patch (8.53 KB, text/plain)
2014-06-22 15:30 UTC, fiziologus
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fiziologus 2014-06-02 15:41:55 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 Martin Wilke freebsd_committer 2014-06-03 01:16:04 UTC
please attache a patch.
Comment 2 fiziologus 2014-06-13 05:21:44 UTC
Created attachment 143732 [details]
patch
Comment 3 fiziologus 2014-06-13 05:22:21 UTC
done. see attachment.
Comment 4 John Marino freebsd_committer 2014-06-16 07:27:50 UTC
*** Bug 190469 has been marked as a duplicate of this bug. ***
Comment 5 William Grzybowski freebsd_committer 2014-06-21 18:34:53 UTC
The port doesnt build with the patch, please generate it again with a clean environment.
Comment 6 fiziologus 2014-06-21 18:53:47 UTC
Error log.
Comment 7 William Grzybowski freebsd_committer 2014-06-21 20:56:30 UTC
I was not clear enough, one of the patches fail to apply.
Comment 8 William Grzybowski freebsd_committer 2014-06-21 20:57:04 UTC
Its easier if you use "svn diff" to generate the patch.
Comment 9 William Grzybowski freebsd_committer 2014-06-21 21:24:18 UTC
The patch does not apply cleanly, there is no log to send!
Comment 10 William Grzybowski freebsd_committer 2014-06-21 21:49:26 UTC
Port back to the pool
Comment 11 fiziologus 2014-06-22 15:30:02 UTC
Created attachment 144028 [details]
new patch

content (and head) in Makefile little changed. This confused some guys.
Comment 12 Thomas Zander freebsd_committer 2014-07-05 05:48:56 UTC
New patch also does not apply cleanly.
Comment 13 fiziologus 2014-07-05 15:41:46 UTC
sed -i.bak -e 's|/usr/ports/games/frogatto|frogatto.orig|g; s|redports/fiziologus/games/||g' patchfile.

New patch is diff between local redports's repositari and port tree (send as is).
Comment 14 commit-hook freebsd_committer 2014-07-15 17:19:13 UTC
A commit references this bug:

Author: danfe
Date: Tue Jul 15 17:18:19 UTC 2014
New revision: 361983
URL: http://svnweb.freebsd.org/changeset/ports/361983

Log:
  Update to version 1.3.1 and stagify (slightly less intrusive patch committed
  compared to the one in the PR).

  PR:	190513

Changes:
  head/games/frogatto/Makefile
  head/games/frogatto/distinfo
  head/games/frogatto/files/patch-Makefile
  head/games/frogatto/files/patch-data-objects-enemies-milgramen-milgram_pod_launcher.cfg
  head/games/frogatto/files/patch-src-custom_object.cpp