Add support to GTK2

PR:		87370
Submitted by:	No Name <arundel@h3c.de> (maintainer)
This commit is contained in:
Marcus Alves Grando 2005-10-13 22:53:59 +00:00
parent 93fdf98b47
commit 878c07d14b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=145319
8 changed files with 76 additions and 46 deletions

View file

@ -6,7 +6,7 @@
PORTNAME= vba
PORTVERSION= 1.7.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -19,12 +19,18 @@ BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
USE_X_PREFIX= yes
WANT_GNOME= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_SDL= sdl
CONFIGURE_ARGS= LDFLAGS="-L${LOCALBASE}/lib" CPPFLAGS="-I${LOCALBASE}/include" LIBS="-lintl"
WRKSRC= ${WRKDIR}/VisualBoyAdvance-${PORTVERSION}
TARGET_DIR= ${PREFIX}/bin/
PLIST_SUB= INSTALL_GTK2="@comment "
DATA_FILES= ${WRKSRC}/src/VisualBoyAdvance.cfg
PROG_FILES= ${WRKSRC}/src/sdl/VisualBoyAdvance
DOC_FILES= COPYING AUTHORS NEWS README ChangeLog INSTALL
.include <bsd.port.pre.mk>
@ -36,47 +42,43 @@ BROKEN= "Runaway cc1plus process"
CFLAGS+= -O0
.endif
.ifdef(WITH_GTK2)
PLIST_SUB= INSTALL_GTK2=""
USE_GCC= 3.4+
CONFIGURE_ARGS+= --enable-gtk=2.4
USE_GNOME= gnomelibs gtk20
LIB_DEPENDS+= gtkmm-2.4:${PORTSDIR}/x11-toolkits/gtkmm24 \
glademm-2.4:${PORTSDIR}/devel/libglademm24
PROG_FILES+= ${WRKSRC}/src/gtk/gvba
GTK2_DATA_FILES= ${WRKSRC}/src/gtk/vba.glade
.endif
.ifndef(PROFILING)
CONFIGURE_ARGS+= --without-profiling
.endif
PLIST_SUB= INSTALL_DEBUGGER=""
.ifndef(WITH_DEBUGGER)
CONFIGURE_ARGS+= --disable-dev
PLIST_SUB= INSTALL_DEBUGGER="@comment "
.endif
CONFIGURE_ARGS+= LIBS=-L${LOCALBASE}/lib
DATA_FILES= ${WRKSRC}/src/VisualBoyAdvance.cfg
PROG_FILES= ${WRKSRC}/src/sdl/VisualBoyAdvance
DEBUG_FILES= ${WRKSRC}/src/sdl/TestEmu
DOC_FILES= COPYING AUTHORS NEWS README ChangeLog INSTALL
pre-everything::
.ifndef(PROFILING)
@${ECHO_MSG} ""
@${ECHO_MSG} "You can enable profiling by defining PROFILING."
.endif
.ifndef(WITH_DEBUGGER)
.ifndef(WITH_GTK2)
@${ECHO_MSG} ""
@${ECHO_MSG} "You can install the ARM/THUMB debugger by defining WITH_DEBUGGER."
@${ECHO_MSG} "You can install the GTK2 based X version by defining WITH_GTK2."
.endif
@${ECHO_MSG} ""
@${ECHO_MSG} "Due to a bug in gcc2 optimizations other than -O0 will be ignored on"
@${ECHO_MSG} "FreeBSD releases that didn't ship with gcc3 (prior 500035)."
@${ECHO_MSG} ""
do-install:
${INSTALL} -d ${TARGET_DIR}
${INSTALL_PROGRAM} ${PROG_FILES} ${TARGET_DIR}
.ifdef(WITH_DEBUGGER)
${INSTALL_PROGRAM} ${DEBUG_FILES} ${TARGET_DIR}
${INSTALL_PROGRAM} ${PROG_FILES} ${PREFIX}/bin
.ifdef(WITH_GTK2)
${INSTALL} -d ${PREFIX}/share/VisualBoyAdvance
${INSTALL_DATA} ${GTK2_DATA_FILES} ${PREFIX}/share/VisualBoyAdvance
.endif
${SED} -e 's|filter=0|filter=1|' ${DATA_FILES} > ${DATA_FILES}-default
${INSTALL_DATA} ${DATA_FILES}-default ${TARGET_DIR}
${INSTALL_DATA} ${DATA_FILES}-default ${PREFIX}/bin
post-install:
.ifndef(NOPORTDOCS)

View file

@ -0,0 +1,11 @@
--- Makefile.in.orig Thu Oct 13 13:38:04 2005
+++ Makefile.in Thu Oct 13 13:38:12 2005
@@ -46,7 +46,7 @@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
+CFLAGS += @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@

View file

@ -1,11 +0,0 @@
--- src/sdl/SDL.cpp.orig Sun Feb 8 14:45:01 2004
+++ src/sdl/SDL.cpp Tue Feb 10 14:45:09 2004
@@ -621,7 +621,7 @@
}
#else
#define SDL_CALL_STRETCHER \
- asm volatile("call *%%eax"::"a" (stretcher),"S" (src),"D" (dest))
+ asm volatile("call *%%eax" : "=a" (stretcher),"=S" (src),"=D" (dest))
#endif
#else
#define SDL_CALL_STRETCHER \

View file

@ -0,0 +1,11 @@
--- src/getopt.h.orig Sun Oct 9 23:31:12 2005
+++ src/getopt.h Sun Oct 9 23:31:25 2005
@@ -112,7 +112,7 @@
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
# if !defined (HAVE_DECL_GETOPT)
-extern int getopt ();
+//extern int getopt ();
# endif
#endif /* __GNU_LIBRARY__ */
extern int getopt_long (int argc, char *const *argv, const char *shortopts,

View file

@ -0,0 +1,10 @@
--- src/remote.cpp.old Thu May 20 19:24:47 2004
+++ src/remote.cpp Thu Aug 19 18:16:57 2004
@@ -22,6 +22,7 @@
#ifndef WIN32
# include <unistd.h>
+# undef _BSD_SOCKLEN_T_
# include <sys/socket.h>
# include <netdb.h>
# ifdef HAVE_NETINET_IN_H

View file

@ -1,10 +1,11 @@
--- src/remote.cpp.old Thu May 20 19:24:47 2004
+++ src/remote.cpp Thu Aug 19 18:16:57 2004
@@ -22,6 +22,7 @@
#ifndef WIN32
# include <unistd.h>
+# undef _BSD_SOCKLEN_T_
# include <sys/socket.h>
# include <netdb.h>
# ifdef HAVE_NETINET_IN_H
--- src/sdl/SDL.cpp.orig Sun Feb 8 14:45:01 2004
+++ src/sdl/SDL.cpp Tue Feb 10 14:45:09 2004
@@ -621,7 +621,7 @@
}
#else
#define SDL_CALL_STRETCHER \
- asm volatile("call *%%eax"::"a" (stretcher),"S" (src),"D" (dest))
+ asm volatile("call *%%eax" : "=a" (stretcher),"=S" (src),"=D" (dest))
#endif
#else
#define SDL_CALL_STRETCHER \

View file

@ -16,4 +16,8 @@ Some of the main features are:
- AGBPrint support for development
- RTC support
NOTICE: Thx go out to Wouter Groeneveld for helping me to test the port.
WWW: http://vba.ngemu.com/
arundel@h3c.de

View file

@ -1,10 +1,12 @@
bin/VisualBoyAdvance
bin/VisualBoyAdvance.cfg-default
%%INSTALL_DEBUGGER%%bin/TestEmu
%%INSTALL_GTK2%%bin/gvba
%%INSTALL_GTK2%%share/VisualBoyAdvance/vba.glade
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%INSTALL_GTK2%%@dirrm share/VisualBoyAdvance
%%PORTDOCS%%@dirrm %%DOCSDIR%%