aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/snes9x-gtk/Makefile
blob: 50dce9f74f40952b3a5c53e4e251072cb8b64409 (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
# Created by: okeeblow <root@cooltrainer.org>
# $FreeBSD$

PORTNAME=   snes9x
PORTVERSION=    1.53r81
PORTREVISION=   3
CATEGORIES= emulators
MASTER_SITES=   http://snes9x-gtk.googlecode.com/files/
PKGNAMESUFFIX=  -gtk
DISTNAME=   snes9x-1.53-src

MAINTAINER= root@cooltrainer.org
COMMENT=    Super Nintendo Entertainment System(SNES) Emulator

LIB_DEPENDS=    libpng.so:${PORTSDIR}/graphics/png

USE_XORG=   x11 sm ice xext
USES=       gettext gmake perl5 desktop-file-utils pkgconfig tar:bzip2
USE_GNOME=  gtk20 intltool libglade2 libxml2
GNU_CONFIGURE=  yes
USE_SDL=    sdl
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFIGURE_ARGS+=    --without-alsa

WRKSRC=     ${WRKDIR}/${DISTNAME}/gtk

OPTIONS_DEFINE= DEBUG OPENGL JMA NETPLAY XV XRANDR
OPTIONS_DEFAULT=    JMA NETPLAY XV XRANDR
JMA_DESC=   Enable JMA archive decompression support
NETPLAY_DESC=   Enable network support
XV_DESC=    Enable XVideo output on GTK
XRANDR_DESC=    Enable XRandR support on GTK

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+=    --with-debug
.else
CONFIGURE_ARGS+=    --without-debug
.endif

.if ${PORT_OPTIONS:MOPENGL}
CONFIGURE_ARGS+=    --with-opengl
USE_GL= glu
.else
CONFIGURE_ARGS+=    --without-opengl
.endif

.if ${PORT_OPTIONS:MJMA}
CONFIGURE_ARGS+=    --with-jma-decomp
.else
CONFIGURE_ARGS+=    --without-jma-decomp
.endif

.if ${PORT_OPTIONS:MNETPLAY}
CONFIGURE_ARGS+=    --with-netplay
.else
CONFIGURE_ARGS+=    --without-netplay
.endif

.if ${PORT_OPTIONS:MXV}
CONFIGURE_ARGS+=    --with-xv
USE_XORG+=  xv
.else
CONFIGURE_ARGS+=    --without-xv
.endif

.if ${PORT_OPTIONS:MXRANDR}
CONFIGURE_ARGS+=    --with-xrandr
USE_XORG+=  xrandr
.else
CONFIGURE_ARGS+=    --without-xrandr
.endif

.if exists(/usr/lib/libusbhid.a)
CONFIGURE_ARGS+=    --with-joystick
.else
CONFIGURE_ARGS+=    --without-joystick
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX} \
        ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}
    ${INSTALL_DATA} ${WRKSRC}/data/snes9x.svg \
        ${STAGEDIR}${PREFIX}/share/pixmaps
    ${INSTALL_DATA} ${WRKSRC}/data/snes9x.desktop \
        ${STAGEDIR}${PREFIX}/share/applications

post-install:
    -@update-desktop-database

.include <bsd.port.post.mk>