diff options
author | wg <wg@FreeBSD.org> | 2013-10-05 18:49:12 +0800 |
---|---|---|
committer | wg <wg@FreeBSD.org> | 2013-10-05 18:49:12 +0800 |
commit | fbf0347434242fa203bf304d49fe9d199e824345 (patch) | |
tree | 1150ca0592af4f4f3af2d5ecb8e9b8320527ae14 | |
parent | a123f2db05c7de962317c2bb6dd17085d7badb87 (diff) | |
download | freebsd-ports-gnome-fbf0347434242fa203bf304d49fe9d199e824345.tar.gz freebsd-ports-gnome-fbf0347434242fa203bf304d49fe9d199e824345.tar.zst freebsd-ports-gnome-fbf0347434242fa203bf304d49fe9d199e824345.zip |
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]
-rw-r--r-- | emulators/visualboyadvance-m/Makefile | 33 | ||||
-rw-r--r-- | emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp | 36 | ||||
-rw-r--r-- | emulators/visualboyadvance-m/files/patch-src-Util.cpp | 11 | ||||
-rw-r--r-- | emulators/visualboyadvance-m/pkg-plist | 2 |
4 files changed, 59 insertions, 23 deletions
diff --git a/emulators/visualboyadvance-m/Makefile b/emulators/visualboyadvance-m/Makefile index c1e40756b0c4..5bc5858b19ab 100644 --- a/emulators/visualboyadvance-m/Makefile +++ b/emulators/visualboyadvance-m/Makefile @@ -10,15 +10,18 @@ MASTER_SITES= http://update.cooltrainer.org/emulators/visualboyadvance-m/ 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 -DENABLE_ASM_SCALERS: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."; \ diff --git a/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp b/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp new file mode 100644 index 000000000000..fdd058ba90f3 --- /dev/null +++ b/emulators/visualboyadvance-m/files/patch-fex-fex-Data_Reader.cpp @@ -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; + } diff --git a/emulators/visualboyadvance-m/files/patch-src-Util.cpp b/emulators/visualboyadvance-m/files/patch-src-Util.cpp new file mode 100644 index 000000000000..fe736d30a080 --- /dev/null +++ b/emulators/visualboyadvance-m/files/patch-src-Util.cpp @@ -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; diff --git a/emulators/visualboyadvance-m/pkg-plist b/emulators/visualboyadvance-m/pkg-plist index 6e2f822e4b80..7f45b4fccf38 100644 --- a/emulators/visualboyadvance-m/pkg-plist +++ b/emulators/visualboyadvance-m/pkg-plist @@ -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 |