blob: 2cf9571fee0113876d6eb4044658b3095792dae1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# Created by: Nicole Reid <root@cooltrainer.org>
# $FreeBSD$
PORTNAME= visualboyadvance-m
PORTVERSION= 2.0.0b2
CATEGORIES= emulators
MAINTAINER= root@cooltrainer.org
COMMENT= Game Boy Advance emulator with GTK frontend
LICENSE= GPLv2
LIB_DEPENDS= libpng.so:graphics/png
USE_GITHUB= yes
GH_TAGNAME= VBA-M_Beta_2
OPTIONS_DEFINE= NLS FFMPEG LINK LIRC DEBUGGER
OPTIONS_MULTI= INTERFACE
OPTIONS_MULTI_INTERFACE= GVBAM SDL
OPTIONS_DEFINE_i386= ASMCORE ASMSCALERS
OPTIONS_DEFAULT= DEBUGGER SDL
OPTIONS_SUB= yes
GVBAM_DESC= Enable GTK interface
SDL_DESC= Enable SDL interface
FFMPEG_DESC= Enable FFmpeg A/V recording
LINK_DESC= Enable GBA linking functionality
LIRC_DESC= Enable LIRC infrared support
DEBUGGER_DESC= Enable the debugger
ASMCORE_DESC= Enable x86 ASM CPU cores (i386 only)
ASMSCALERS_DESC= Enable x86 ASM graphic filters (i386 only)
NLS_USES= gettext
WANT_GNOME= yes
DOS2UNIX_REGEX= .*\.(c|cpp|h|ypp)
USE_XORG= x11 xext
USE_GL= gl glu
USE_SDL= sdl
USES= cmake dos2unix pkgconfig tar:bzip2
INSTALLS_ICONS= yes
CMAKE_ARGS+= -DVERSION:STRING="${PORTVERSION}" \
-DSYSCONFDIR:STRING="${PREFIX}/etc" \
-DENABLE_WX:BOOL=no
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MASMCORE} || ${PORT_OPTIONS:MASMSCALERS}
BUILD_DEPENDS+= as:devel/binutils
.if ${PORT_OPTIONS:MASMCORE}
CMAKE_ARGS+= -DENABLE_ASM_CORE:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_ASM_CORE:BOOL=no
.endif
.if ${PORT_OPTIONS:MASMSCALERS}
CMAKE_ARGS+= -DENABLE_ASM_SCALERS:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_ASM_SCALERS:BOOL=no
.endif
.endif
.if ${PORT_OPTIONS:MGVBAM}
USE_GNOME= gtk20
LIB_DEPENDS+= libgtkmm-2.4.so:x11-toolkits/gtkmm24 \
libglibmm-2.4.so:devel/glibmm \
libgiomm-2.4.so:devel/glibmm \
libcairomm-1.0.so:graphics/cairomm \
libglademm-2.4.so:devel/libglademm24 \
libgdkglextmm-x11-1.2.so:x11-toolkits/gtkglextmm
CMAKE_ARGS+= -DENABLE_GTK:BOOL=yes
USES+= desktop-file-utils
.else
CMAKE_ARGS+= -DENABLE_GTK:BOOL=no
.endif
.if ${PORT_OPTIONS:MSDL}
.if !${PORT_OPTIONS:MDEBUGGER}
BROKEN= SDL requires DEBUGGER
.endif
CMAKE_ARGS+= -DENABLE_SDL:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_SDL:BOOL=no
.endif
.if ${PORT_OPTIONS:MDEBUGGER}
CMAKE_ARGS+= -DENABLE_DEBUGGER:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_DEBUGGER:BOOL=no
.endif
.if ${PORT_OPTIONS:MFFMPEG}
LIB_DEPENDS+= libavcodec.so:multimedia/ffmpeg
CMAKE_ARGS+= -DENABLE_FFMPEG:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_FFMPEG:BOOL=no
.endif
.if ${PORT_OPTIONS:MNLS}
CMAKE_ARGS+= -DENABLE_NLS:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_NLS:BOOL=no
.endif
.if ${PORT_OPTIONS:MLINK}
CMAKE_ARGS+= -DENABLE_LINK:BOOL=yes
LIB_DEPENDS+= libsfml1-system.so:devel/sfml1
.else
CMAKE_ARGS+= -DENABLE_LINK:BOOL=no
.endif
.if ${PORT_OPTIONS:MLIRC}
LIB_DEPENDS+= liblirc_client.so:comms/lirc
RUN_DEPENDS+= lircd:comms/lirc
CMAKE_ARGS+= -DENABLE_LIRC:BOOL=yes
.else
CMAKE_ARGS+= -DENABLE_LIRC:BOOL=no
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; s|include/SFML|&1|; \
s|NAMES sfml-|NAMES sfml1-|' ${WRKSRC}/CMakeScripts/FindSFML.cmake
@${REINPLACE_CMD} -e '/#include/ s|SFML|&1|' \
${WRKSRC}/src/gba/GBASockClient.h \
${WRKSRC}/src/gba/GBALink.cpp \
${WRKSRC}/src/gba/GBALink.h
@${REINPLACE_CMD} -e '/SET.*LIRC_CLIENT_LIBRARY/ s|lirc_client|${LOCALBASE}/lib/lib&.so|' \
${WRKSRC}/CMakeLists.txt
maint-gen-distfile:
@if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
${ECHO_CMD} "ERROR: the distfile already exists."; \
${FALSE}; \
fi
svn export -r${SVN_REV} \
https://svn.code.sf.net/p/vbam/code/trunk/ ${DISTNAME}
${TAR} jcf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}
${RM} -r ${DISTNAME}
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/vbam
${MV} ${STAGEDIR}${PREFIX}/share/man/man1/vbam.1 ${STAGEDIR}${PREFIX}/man/man1/
.include <bsd.port.mk>
|