Bug 181413 - [patch] emulators/visualboyadvance-m: unbreak build
Summary: [patch] emulators/visualboyadvance-m: unbreak build
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: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-20 00:50 UTC by David Demelier
Modified: 2013-10-05 11:50 UTC (History)
0 users

See Also:


Attachments
vbam.diff (1.91 KB, patch)
2013-08-20 00:50 UTC, David Demelier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Demelier 2013-08-20 00:50:01 UTC
emulators/visualboyadvance-m is broken for months (even years maybe). This little patch add some casts needed.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-20 00:50:08 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-20 00:50:08 UTC
Maintainer of emulators/visualboyadvance-m,

Please note that PR ports/181413 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/181413

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Alex Kozlov freebsd_committer freebsd_triage 2013-09-27 22:01:30 UTC
State Changed
From-To: feedback->open

Maintainer timeout.
Comment 4 William Grzybowski freebsd_committer freebsd_triage 2013-09-28 02:04:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 5 William Grzybowski 2013-10-01 17:08:39 UTC
Hello,

The patch does not apply cleanly due to space/tab issues. GNATS
probably messed it up, can you host it somewhere or personally attach
them to me?

Thanks

-- 
William Grzybowski
------------------------------------------
Curitiba/PR - Brasil
Comment 6 David Demelier 2013-10-05 09:46:55 UTC
On 01.10.2013 18:08, William Grzybowski wrote:
> Hello,
> 
> The patch does not apply cleanly due to space/tab issues. GNATS
> probably messed it up, can you host it somewhere or personally attach
> them to me?
> 
> Thanks
> 

Have you tried downloading the file from GNATS instead of copying /
paste ? It worked for me.

Anyway, you can find it here if needed:
http://www.demelierdavid.fr/files/vbam.diff

Regards
Comment 7 William Grzybowski freebsd_committer freebsd_triage 2013-10-05 11:49:22 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 8 dfilter service freebsd_committer freebsd_triage 2013-10-05 11:49:26 UTC
Author: wg
Date: Sat Oct  5 10:49:12 2013
New Revision: 329437
URL: http://svnweb.freebsd.org/changeset/ports/329437

Log:
  emulators/visualboyadvance-m: fix build
  
  - Fix build [1]
  - Convert lib depends to new format
  - Allow staging
  
  PR:		ports/181413 [1]
  Submitted by:	David Demelier <demelier.david gmail.com> (maintainer) [1]

Added:
  head/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp   (contents, props changed)
  head/emulators/visualboyadvance-m/files/patch-src-Util.cpp   (contents, props changed)
Modified:
  head/emulators/visualboyadvance-m/Makefile
  head/emulators/visualboyadvance-m/pkg-plist

Modified: head/emulators/visualboyadvance-m/Makefile
==============================================================================
--- head/emulators/visualboyadvance-m/Makefile	Sat Oct  5 10:26:30 2013	(r329436)
+++ head/emulators/visualboyadvance-m/Makefile	Sat Oct  5 10:49:12 2013	(r329437)
@@ -10,15 +10,18 @@ MASTER_SITES=	http://update.cooltrainer.
 MAINTAINER=	root@cooltrainer.org
 COMMENT=	Game Boy Advance emulator with GTK frontend
 
-LIB_DEPENDS=	png15:${PORTSDIR}/graphics/png \
-		cairomm-1.0.1:${PORTSDIR}/graphics/cairomm \
-		sfml-system.1:${PORTSDIR}/devel/sfml
+LIB_DEPENDS=	libpng15.so:${PORTSDIR}/graphics/png \
+		libcairomm-1.0.so:${PORTSDIR}/graphics/cairomm \
+		libsfml-system.so:${PORTSDIR}/devel/sfml
 
 OPTIONS_DEFINE=	GVBAM NLS
 OPTIONS_DEFAULT=	GVBAM
 OPTIONS_DEFINE_i386=	ASM
+OPTIONS_SUB=	yes
 GVBAM_DESC=	Build gvbam (GTK2 frontend)
 
+NLS_USES=	gettext
+
 USE_BZIP2=	yes
 WANT_GNOME=	yes
 USE_DOS2UNIX=	yes
@@ -26,11 +29,10 @@ DOS2UNIX_REGEX=	.*\.(c|cpp|h)
 USE_XORG=	x11 xext
 USE_GL=		gl glu
 USE_SDL=	sdl
-USES=		cmake pkgconfig
+USES=		cmake desktop-file-utils pkgconfig
 CMAKE_ARGS+=	-DVERSION:STRING="${PORTVERSION}" -DSYSCONFDIR:STRING="${PREFIX}/etc"
 SVN_REV=	1001
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MASM}
@@ -39,36 +41,25 @@ CMAKE_ARGS+=	-DENABLE_ASM_CORE:BOOL=yes 
 .endif
 
 .if ${PORT_OPTIONS:MGVBAM}
-PLIST_SUB+=	GVBAM=""
 USE_GNOME=	gtk20
-LIB_DEPENDS+=	gtkmm-2.4:${PORTSDIR}/x11-toolkits/gtkmm24 \
-		glibmm-2.4:${PORTSDIR}/devel/glibmm \
-		giomm-2.4:${PORTSDIR}/devel/glibmm \
-		glademm-2.4:${PORTSDIR}/devel/libglademm24 \
-		gdkglextmm-x11-1.2:${PORTSDIR}/x11-toolkits/gtkglextmm
+LIB_DEPENDS+=	libgtkmm-2.4.so:${PORTSDIR}/x11-toolkits/gtkmm24 \
+		libglibmm-2.4.so:${PORTSDIR}/devel/glibmm \
+		libgiomm-2.4.so:${PORTSDIR}/devel/glibmm \
+		libglademm-2.4.so:${PORTSDIR}/devel/libglademm24 \
+		libgdkglextmm-x11-1.2.so:${PORTSDIR}/x11-toolkits/gtkglextmm
 .else
-PLIST_SUB+=	GVBAM="@comment "
 CMAKE_ARGS+=	-DENABLE_GTK:BOOL=no
 .endif
 
 .if ${PORT_OPTIONS:MNLS}
-USES+=	gettext
 CMAKE_ARGS+=	-DENABLE_NLS:BOOL=yes
-PLIST_SUB+=	NLS=""
 .else
 CMAKE_ARGS+=	-DENABLE_NLS:BOOL=no
-PLIST_SUB+=	NLS="@comment "
 .endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/CMakeScripts/FindSFML.cmake
 
-post-install:
-	-@update-desktop-database
-	@if [ ! -f ${PREFIX}/etc/vbam.cfg ]; then \
-		${CP} -p ${PREFIX}/etc/vbam.cfg-example ${PREFIX}/etc/vbam.cfg ; \
-	fi
-
 maint-gen-distfile:
 	@if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
 		${ECHO_CMD} "ERROR: the distfile already exists."; \

Added: head/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp	Sat Oct  5 10:49:12 2013	(r329437)
@@ -0,0 +1,36 @@
+--- fex/fex/Data_Reader.cpp.orig	2013-10-05 07:19:22.649937270 -0300
++++ fex/fex/Data_Reader.cpp	2013-10-05 07:20:36.384931508 -0300
+@@ -732,11 +732,11 @@
+ 
+ blargg_err_t Gzip_File_Reader::read_v( void* p, int s )
+ {
+-	int result = gzread( file_, p, s );
++	int result = gzread( static_cast<gzFile_s *>(file_), p, s );
+ 	if ( result != s )
+ 	{
+ 		if ( result < 0 )
+-			return convert_gz_error( file_ );
++			return convert_gz_error( static_cast<gzFile_s *>(file_) );
+ 		
+ 		return blargg_err_file_corrupt;
+ 	}
+@@ -746,8 +746,8 @@
+ 
+ blargg_err_t Gzip_File_Reader::seek_v( int n )
+ {
+-	if ( gzseek( file_, n, SEEK_SET ) < 0 )
+-		return convert_gz_error( file_ );
++	if ( gzseek( static_cast<gzFile_s *>(file_), n, SEEK_SET ) < 0 )
++		return convert_gz_error( static_cast<gzFile_s *>(file_) );
+ 
+ 	return blargg_ok;
+ }
+@@ -756,7 +756,7 @@
+ {
+ 	if ( file_ )
+ 	{
+-		if ( gzclose( file_ ) )
++		if ( gzclose( static_cast<gzFile_s *>(file_) ) )
+ 			check( false );
+ 		file_ = NULL;
+ 	}

Added: head/emulators/visualboyadvance-m/files/patch-src-Util.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/visualboyadvance-m/files/patch-src-Util.cpp	Sat Oct  5 10:49:12 2013	(r329437)
@@ -0,0 +1,11 @@
+--- src/Util.cpp.orig	2013-10-05 07:22:08.455933950 -0300
++++ src/Util.cpp	2013-10-05 07:22:40.675934470 -0300
+@@ -544,7 +544,7 @@
+ 
+ gzFile utilGzOpen(const char *file, const char *mode)
+ {
+-  utilGzWriteFunc = (int (ZEXPORT *)(void *,void * const, unsigned int))gzwrite;
++  utilGzWriteFunc = (int (ZEXPORT *)(gzFile_s *,void * const, unsigned int))gzwrite;
+   utilGzReadFunc = gzread;
+   utilGzCloseFunc = gzclose;
+   utilGzSeekFunc = gzseek;

Modified: head/emulators/visualboyadvance-m/pkg-plist
==============================================================================
--- head/emulators/visualboyadvance-m/pkg-plist	Sat Oct  5 10:26:30 2013	(r329436)
+++ head/emulators/visualboyadvance-m/pkg-plist	Sat Oct  5 10:49:12 2013	(r329437)
@@ -35,5 +35,3 @@ etc/vbam.cfg-example
 %%GVBAM%%@dirrm share/icons/hicolor
 %%GVBAM%%@dirrm share/icons
 %%GVBAM%%@dirrm share/applications
-%%GVBAM%%@exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
-%%GVBAM%%@unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
_______________________________________________
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"