aboutsummaryrefslogtreecommitdiff
path: root/emulators/vba/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/vba/Makefile')
-rw-r--r--emulators/vba/Makefile76
1 files changed, 33 insertions, 43 deletions
diff --git a/emulators/vba/Makefile b/emulators/vba/Makefile
index 8b38a18b601b..b98531627271 100644
--- a/emulators/vba/Makefile
+++ b/emulators/vba/Makefile
@@ -1,7 +1,4 @@
-# New ports collection makefile for: vba
-# Date Created: 02 September 2003
-# Whom: <arundel@gmx.net>
-#
+# Created by: Alexander Best <arundel@gmx.net>
# $FreeBSD$
PORTNAME= vba
@@ -12,74 +9,67 @@ MASTER_SITES= SF/${PORTNAME}/VisualBoyAdvance/${PORTVERSION}
DISTNAME= VisualBoyAdvance-src-${PORTVERSION}
MAINTAINER= arundel@h3c.de
-COMMENT= Open Source Gameboy Advance emulator
+COMMENT= Open source Gameboy Advance emulator
+
+LICENSE= GPLv2
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
LIB_DEPENDS= png15:${PORTSDIR}/graphics/png
-WANT_GNOME= yes
-USE_GMAKE= yes
+USES= gettext gmake
GNU_CONFIGURE= yes
USE_SDL= sdl
-USES= gettext
-LDFLAGS+= -L${LOCALBASE}/lib
-CPPFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS= LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" LIBS="-lintl"
-WRKSRC= ${WRKDIR}/VisualBoyAdvance-${PORTVERSION}
-PLIST_SUB= INSTALL_GTK2="@comment "
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+WRKSRC= ${WRKDIR}/VisualBoyAdvance-${PORTVERSION}
+SUB_FILES= pkg-message
DATA_FILES= ${WRKSRC}/src/VisualBoyAdvance.cfg
PROG_FILES= ${WRKSRC}/src/sdl/VisualBoyAdvance
-DOC_FILES= COPYING AUTHORS NEWS README ChangeLog INSTALL
+PORTDOCS= AUTHORS NEWS README ChangeLog
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= GTK2 PROFILING DOCS
+OPTIONS_SUB= yes
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN= Runaway cc1plus process
-.endif
+GTK2_CONFIGURE_ON= --enable-gtk=2.4
+PROFILING_CONFIGURE_ENABLE= profiling
-.ifdef(WITH_GTK2)
-PLIST_SUB= INSTALL_GTK2=""
-CONFIGURE_ARGS+= --enable-gtk=2.4
-USE_GNOME= gnomelibs gtk20
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MGTK2}
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+= --disable-profiling
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN= Runaway cc1plus process
.endif
-pre-everything::
-.ifndef(PROFILING)
- @${ECHO_MSG} ""
- @${ECHO_MSG} "You can enable profiling by defining PROFILING."
-.endif
-.ifndef(WITH_GTK2)
- @${ECHO_MSG} ""
- @${ECHO_MSG} "You can install the GTK2 based X version by defining WITH_GTK2."
-.endif
- @${ECHO_MSG} ""
+post-patch:
+ @${REINPLACE_CMD} -e '/for(int i = 0; i < 16; i++/s| i|&_|g' \
+ ${WRKSRC}/src/sdl/debugger.cpp
+ @${REINPLACE_CMD} -e '/^namespace std/ { x; \
+ s|^|#include <sys/types.h>|; H; x; }' ${WRKSRC}/src/expr.cpp
do-install:
${INSTALL_PROGRAM} ${PROG_FILES} ${PREFIX}/bin
-.ifdef(WITH_GTK2)
- ${INSTALL} -d ${PREFIX}/share/VisualBoyAdvance
+.if ${PORT_OPTIONS:MGTK2}
+ @${MKDIR} ${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 ${PREFIX}/bin
-
-post-install:
-.ifndef(NOPORTDOCS)
- ${INSTALL} -d ${DOCSDIR}
-.for filename in ${DOC_FILES}
- ${INSTALL_MAN} ${WRKSRC}/${filename} ${DOCSDIR}
-.endfor
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
- ${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
.include <bsd.port.post.mk>