View | Details | Raw Unified | Return to bug 211855 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-38 / +28 lines)
Lines 2-38 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	higan
4
PORTNAME=	higan
5
PORTVERSION=	0.94
5
PORTVERSION=	101
6
PORTREVISION=	4
7
CATEGORIES=	emulators
6
CATEGORIES=	emulators
8
MASTER_SITES=	http://byuu.org/files/ \
7
MASTER_SITES=	http://download.byuu.org/ \
9
		http://www.cyberbotx.com/higan/
8
		http://www.cyberbotx.com/higan/
10
DISTNAME=	${PORTNAME}_v${PORTVERSION:S/.//}-source
9
DISTNAME=	${PORTNAME}_v${PORTVERSION}-source
11
10
12
MAINTAINER=	cyberbotx@cyberbotx.com
11
MAINTAINER=	cyberbotx@cyberbotx.com
13
COMMENT=	Nintendo multi-system emulator
12
COMMENT=	Nintendo multi-system emulator
14
13
15
USES=		compiler:c++11-lib gmake pkgconfig tar:xz
14
USES=		7z:p7zip compiler:c++14-lang gmake pkgconfig
16
USE_LDCONFIG=	yes
15
USE_LDCONFIG=	yes
16
USE_XORG=	x11 xext
17
17
18
BROKEN_FreeBSD_9=	no C++14 support
18
ONLY_FOR_ARCHS=	i386 amd64
19
ONLY_FOR_ARCHS=	i386 amd64
19
MAKE_ENV+=	compiler="${CXX}" cflags="-x c -std=c99 ${CFLAGS}" \
20
MAKE_ENV+=	compiler="${CXX}" cflags="-x c -std=c99 ${CFLAGS}" \
20
		cppflags="-x c++ -std=c++11 ${CXXFLAGS}"
21
		cppflags="-x c++ -std=c++14 ${CXXFLAGS}"
21
22
22
OPTIONS_DEFINE=		DEBUG
23
OPTIONS_DEFINE=		DEBUG
23
OPTIONS_SINGLE=		PROFILE GUI
24
OPTIONS_SINGLE=		GUI
24
OPTIONS_SINGLE_PROFILE=	ACCURACY BALANCED PERFORMANCE
25
OPTIONS_SINGLE_GUI=	GTK2 QT4
25
OPTIONS_SINGLE_GUI=	GTK2 QT4
26
OPTIONS_MULTI=		VIDEO SOUND INPUT
26
OPTIONS_MULTI=		VIDEO SOUND INPUT
27
OPTIONS_MULTI_VIDEO=	GLX SDL XSHM XV
27
OPTIONS_MULTI_VIDEO=	GLX SDL XSHM XV
28
OPTIONS_MULTI_SOUND=	AO OPENAL OSS PULSEAUDIO
28
OPTIONS_MULTI_SOUND=	AO OPENAL OSS PULSEAUDIO
29
OPTIONS_MULTI_INPUT=	INPUT_SDL INPUT_X
29
OPTIONS_MULTI_INPUT=	INPUT_SDL INPUT_X
30
OPTIONS_DEFAULT=	BALANCED GTK2 GLX XSHM XV SDL \
30
OPTIONS_DEFAULT=	GTK2 GLX XSHM XV SDL \
31
			OSS INPUT_SDL INPUT_X
31
			OSS INPUT_SDL INPUT_X
32
32
33
ACCURACY_DESC=		Use accuracy profile
34
BALANCED_DESC=		Use balanced profile
35
PERFORMANCE_DESC=	Use performance profile
36
GTK2_DESC=		Build with GTK+2 GUI
33
GTK2_DESC=		Build with GTK+2 GUI
37
QT4_DESC=		Build with QT4 GUI
34
QT4_DESC=		Build with QT4 GUI
38
GLX_DESC=		Build GLX video driver
35
GLX_DESC=		Build GLX video driver
Lines 46-61 Link Here
46
INPUT_SDL_DESC=		Build SDL input driver
43
INPUT_SDL_DESC=		Build SDL input driver
47
INPUT_X_DESC=		Build X input driver
44
INPUT_X_DESC=		Build X input driver
48
45
49
ACCURACY_MAKE_ENV=	profile="accuracy"
46
GTK2_USE=	GNOME=cairo,gdkpixbuf2,gtk20,gtksourceview2
50
BALANCED_MAKE_ENV=	profile="balanced"
47
GTK2_USES=	gettext
51
PERFORMANCE_MAKE_ENV=	profile="performance"
48
GTK2_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
49
			libfreetype.so:print/freetype2
50
GTK2_MAKE_ENV=	hiro="gtk"
52
51
53
GTK2_USE=	GNOME=gtk20
52
QT4_USE=	QT4=corelib,gui,moc_build
54
GTK2_MAKE_ENV=	phoenix="gtk"
53
QT4_MAKE_ENV=	hiro="qt"
55
54
56
QT4_USE=	QT4=gui,moc_build
57
QT4_MAKE_ENV=	phoenix="qt"
58
59
GLX_USE=	GL=gl
55
GLX_USE=	GL=gl
60
GLX_VARS=	VIDEO_DRIVER+=video.glx
56
GLX_VARS=	VIDEO_DRIVER+=video.glx
61
57
Lines 89-121 Link Here
89
		-e 's|%%VIDEO%%|${VIDEO_DRIVER}|' \
85
		-e 's|%%VIDEO%%|${VIDEO_DRIVER}|' \
90
		-e 's|%%AUDIO%%|${AUDIO_DRIVER}|' \
86
		-e 's|%%AUDIO%%|${AUDIO_DRIVER}|' \
91
		-e 's|%%INPUT%%|${INPUT_DRIVER}|' \
87
		-e 's|%%INPUT%%|${INPUT_DRIVER}|' \
92
		${WRKSRC}/target-ethos/Makefile
88
		${WRKSRC}/higan/target-tomoko/GNUmakefile
93
	${REINPLACE_CMD} -e 's|/usr/share/|${PREFIX}/share/|' \
89
	${REINPLACE_CMD} -e 's|/usr/share/|${PREFIX}/share/|' \
94
		${WRKSRC}/nall/string/platform.hpp
90
		${WRKSRC}/nall/path.hpp
95
91
96
post-patch-DEBUG-on:
92
post-patch-DEBUG-on:
97
	${REINPLACE_CMD} -e 's|-O3|-g|g' \
93
	${REINPLACE_CMD} -e 's|-O3|-g|g' \
98
		${WRKSRC}/ananke/Makefile \
94
		${WRKSRC}/higan/GNUmakefile \
99
		${WRKSRC}/Makefile
95
		${WRKSRC}/icarus/GNUmakefile
100
	${REINPLACE_CMD} -e 's|:= -s|:= #|g' \
101
		${WRKSRC}/Makefile
102
96
103
pre-build-QT4-on:
104
	(cd ${WRKSRC}/phoenix/qt && ${MOC} -i -o platform.moc platform.moc.hpp)
105
106
do-build:
97
do-build:
107
.for d in . ananke
98
.for d in higan icarus
108
	(cd ${WRKSRC}/${d} && ${MAKE_CMD} ${MAKE_ENV})
99
	(cd ${WRKSRC}/${d} && ${MAKE_CMD} ${MAKE_ENV})
109
.endfor
100
.endfor
110
101
111
do-install:
102
do-install:
112
	${INSTALL_LIB} ${WRKSRC}/ananke/libananke.so ${STAGEDIR}${PREFIX}/lib/libananke.so.1
103
	${INSTALL_PROGRAM} ${WRKSRC}/higan/out/higan ${STAGEDIR}${PREFIX}/bin/
113
	${LN} -sf libananke.so.1 ${STAGEDIR}${PREFIX}/lib/libananke.so
104
	${INSTALL_PROGRAM} ${WRKSRC}/icarus/out/icarus ${STAGEDIR}${PREFIX}/bin/
114
	${INSTALL_PROGRAM} ${WRKSRC}/out/higan ${STAGEDIR}${PREFIX}/bin/
105
	${INSTALL_DATA} ${WRKSRC}/higan/data/higan.png ${STAGEDIR}${PREFIX}/share/pixmaps/
115
	${INSTALL_DATA} ${WRKSRC}/data/higan.png ${STAGEDIR}${PREFIX}/share/pixmaps/
106
	${INSTALL_DATA} ${WRKSRC}/higan/data/higan.desktop ${STAGEDIR}${PREFIX}/share/applications/
116
	${INSTALL_DATA} ${WRKSRC}/data/higan.desktop ${STAGEDIR}${PREFIX}/share/applications/
107
	${MKDIR} ${STAGEDIR}${DATADIR}
117
	${MKDIR} ${STAGEDIR}${DATADIR}/shaders
108
	${INSTALL_DATA} ${WRKSRC}/higan/data/cheats.bml ${STAGEDIR}${DATADIR}/
118
	(cd ${WRKSRC}/profile && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/)
109
	(cd ${WRKSRC}/higan/systems && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/)
119
	(cd ${WRKSRC}/shaders && ${COPYTREE_SHARE} \*.shader ${STAGEDIR}${DATADIR}/shaders/)
120
110
121
.include <bsd.port.mk>
111
.include <bsd.port.mk>
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (higan_v094-source.tar.xz) = 5e149df9d50c1066eb97c0d66665428d75304da782bba5a87078b87fc311151b
1
TIMESTAMP = 1471534845
2
SIZE (higan_v094-source.tar.xz) = 882732
2
SHA256 (higan_v101-source.7z) = c82f2128eb8c6f4728e4c1e2579666f723b02b0666a786f0c19c8d05ae1b7913
3
SIZE (higan_v101-source.7z) = 1198228
(-)files/patch-higan_audio_audio.cpp (+14 lines)
Line 0 Link Here
1
--- higan/audio/audio.cpp.orig	2016-07-08 05:29:02 UTC
2
+++ higan/audio/audio.cpp
3
@@ -54,7 +54,10 @@ auto Audio::process() -> void {
4
       if(!stream->pending()) return;
5
     }
6
 
7
-    double samples[channels] = {0.0};
8
+    double samples[channels];
9
+    for(auto c : range(channels)) {
10
+      samples[c] = 0.0;
11
+    }
12
     for(auto& stream : streams) {
13
       double buffer[16];
14
       uint length = stream->read(buffer), offset = 0;
(-)files/patch-higan_target-tomoko_GNUmakefile (+15 lines)
Line 0 Link Here
1
--- higan/target-tomoko/GNUmakefile.orig	2016-01-14 03:20:56 UTC
2
+++ higan/target-tomoko/GNUmakefile
3
@@ -27,9 +27,9 @@ else ifeq ($(platform),linux)
4
   ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
5
   ruby += input.udev input.sdl input.xlib
6
 else ifeq ($(platform),bsd)
7
-  ruby += video.glx video.xv video.xshm video.sdl
8
-  ruby += audio.openal audio.oss
9
-  ruby += input.sdl input.xlib
10
+  ruby += %%VIDEO%%
11
+  ruby += %%AUDIO%%
12
+  ruby += %%INPUT%%
13
 endif
14
 
15
 # ruby
(-)files/patch-higan_target-tomoko_presentation_presentation.cpp (+11 lines)
Line 0 Link Here
1
--- higan/target-tomoko/presentation/presentation.cpp.orig	2016-05-25 07:47:23 UTC
2
+++ higan/target-tomoko/presentation/presentation.cpp
3
@@ -273,7 +273,7 @@ auto Presentation::drawSplashScreen() ->
4
 }
5
 
6
 auto Presentation::loadShaders() -> void {
7
-  auto pathname = locate("Video Shaders/");
8
+  auto pathname = locate("shaders/");
9
 
10
   if(settings["Video/Driver"].text() == "OpenGL") {
11
     for(auto shader : directory::folders(pathname, "*.shader")) {
(-)files/patch-higan_target-tomoko_tomoko.cpp (+12 lines)
Line 0 Link Here
1
--- higan/target-tomoko/tomoko.cpp.orig	2016-07-01 08:21:27 UTC
2
+++ higan/target-tomoko/tomoko.cpp
3
@@ -8,6 +8,9 @@ auto locate(string name) -> string {
4
   string location = {Path::program(), name};
5
   if(inode::exists(location)) return location;
6
 
7
+  location = {Path::shared(), "higan/", name};
8
+  if(inode::exists(location)) return location;
9
+
10
   location = {Path::config(), "higan/", name};
11
   if(inode::exists(location)) return location;
12
 
(-)files/patch-hiro_GNUmakefile (+16 lines)
Line 0 Link Here
1
--- hiro/GNUmakefile.orig	2016-01-04 00:16:08 UTC
2
+++ hiro/GNUmakefile
3
@@ -37,11 +37,11 @@ ifneq ($(filter $(platform),linux bsd),)
4
 
5
   ifeq ($(hiro),gtk)
6
     hiroflags = $(cppflags) $(flags) -DHIRO_GTK $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0)
7
-    hirolink = -lX11 $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0)
8
+    hirolink = $(shell pkg-config --libs x11 gtk+-2.0 gtksourceview-2.0)
9
   endif
10
 
11
   ifeq ($(hiro),qt)
12
     hiroflags = $(cppflags) $(flags) -DHIRO_QT $(shell pkg-config --cflags QtCore QtGui)
13
-    hirolink = -lX11 $(shell pkg-config --libs QtCore QtGui)
14
+    hirolink = $(shell pkg-config --libs x11 QtCore QtGui)
15
   endif
16
 endif
(-)files/patch-nall-platform.hpp (-11 lines)
Lines 1-11 Link Here
1
--- nall/platform.hpp.orig	2014-01-20 06:37:12 UTC
2
+++ nall/platform.hpp
3
@@ -41,7 +41,7 @@ namespace Math {
4
   #undef interface
5
   #define dllexport __declspec(dllexport)
6
 #else
7
-  #include <endian.h>
8
+  #include <sys/endian.h>
9
   #include <unistd.h>
10
   #include <pwd.h>
11
   #define dllexport
(-)files/patch-ruby__video__glx.cpp (-31 lines)
Lines 1-31 Link Here
1
--- ruby/video/glx.cpp.orig	2014-01-20 06:37:14 UTC
2
+++ ruby/video/glx.cpp
3
@@ -128,6 +128,28 @@ struct pVideoGLX : OpenGL {
4
     //require GLX 1.2+ API
5
     if(glx.version_major < 1 || (glx.version_major == 1 && glx.version_minor < 2)) return false;
6
 
7
+    int major, minor;
8
+    const char *version = (const char *) glGetString (GL_VERSION);
9
+    const char *dot = version == NULL ? NULL : strchr (version, '.');
10
+    const char *major_start = dot;
11
+
12
+    /* Sanity check */
13
+    if (dot == NULL || dot == version || *(dot + 1) == '\0') {
14
+        major = 0;
15
+        minor = 0;
16
+    } else {
17
+    /* Find the start of the major version in the string */
18
+    while (major_start > version && *major_start != ' ')
19
+           --major_start;
20
+        major = strtol (major_start, NULL, 10);
21
+        minor = strtol (dot + 1, NULL, 0);
22
+    }
23
+
24
+    if(major < 3 || (major == 3 && minor < 2)) {
25
+        printf("Error: OpenGL 3.2 is not available. Select another video driver on the Advanced Configuration tab and restart higan.\n");
26
+        return false;
27
+    }
28
+
29
     XWindowAttributes window_attributes;
30
     XGetWindowAttributes(display, settings.handle, &window_attributes);
31
 
(-)files/patch-target-ethos-Makefile (-15 lines)
Lines 1-15 Link Here
1
--- target-ethos/Makefile.orig	2014-01-13 05:26:29 UTC
2
+++ target-ethos/Makefile
3
@@ -27,9 +27,9 @@ else ifeq ($(platform),linux)
4
   ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
5
   ruby += input.udev input.sdl input.x
6
 else ifeq ($(platform),bsd)
7
-  ruby := video.glx
8
-  ruby += audio.openal audio.oss
9
-  ruby += input.x
10
+  ruby := %%VIDEO%%
11
+  ruby += %%AUDIO%%
12
+  ruby += %%INPUT%%
13
 endif
14
 
15
 # phoenix
(-)files/patch-target-ethos_general_presentation.cpp (-11 lines)
Lines 1-11 Link Here
1
--- target-ethos/general/presentation.cpp.orig	2013-12-06 20:19:40 UTC
2
+++ target-ethos/general/presentation.cpp
3
@@ -235,7 +235,7 @@ void Presentation::bootstrap() {
4
 void Presentation::loadShaders() {
5
   //only the OpenGL driver has video shader support
6
   if(config->video.driver == "OpenGL") {
7
-    string pathname = program->path("Video Shaders/");
8
+    string pathname = program->path("shaders/");
9
     lstring shaders = directory::folders(pathname, "*.shader");
10
     for(auto& name : shaders) {
11
       auto shader = new RadioItem;
(-)files/patch-target-ethos_utility_utility.cpp (-11 lines)
Lines 1-11 Link Here
1
--- target-ethos/utility/utility.cpp.orig	2013-12-21 07:00:03 UTC
2
+++ target-ethos/utility/utility.cpp
3
@@ -203,7 +203,7 @@ void Utility::updateShader() {
4
     video.set(Video::Filter, Video::FilterLinear);
5
   } else if(config->video.shader == "Display Emulation") {
6
     if(program->active) {
7
-      string pathname = program->path("Video Shaders/");
8
+      string pathname = program->path("shaders/");
9
       pathname.append("Display Emulation/");
10
       pathname.append(presentation->systemName, ".shader/");
11
       if(directory::exists(pathname)) {
(-)pkg-plist (-8 / +4 lines)
Lines 1-6 Link Here
1
bin/icarus
1
bin/higan
2
bin/higan
2
lib/libananke.so.1
3
lib/libananke.so
4
share/applications/higan.desktop
3
share/applications/higan.desktop
5
%%DATADIR%%/Famicom.sys/manifest.bml
4
%%DATADIR%%/Famicom.sys/manifest.bml
6
%%DATADIR%%/Game Boy Advance.sys/manifest.bml
5
%%DATADIR%%/Game Boy Advance.sys/manifest.bml
Lines 10-19 Link Here
10
%%DATADIR%%/Game Boy.sys/manifest.bml
9
%%DATADIR%%/Game Boy.sys/manifest.bml
11
%%DATADIR%%/Super Famicom.sys/ipl.rom
10
%%DATADIR%%/Super Famicom.sys/ipl.rom
12
%%DATADIR%%/Super Famicom.sys/manifest.bml
11
%%DATADIR%%/Super Famicom.sys/manifest.bml
13
%%DATADIR%%/shaders/Curvature.shader/curvature.fs
12
%%DATADIR%%/WonderSwan Color.sys/manifest.bml
14
%%DATADIR%%/shaders/Curvature.shader/manifest.bml
13
%%DATADIR%%/WonderSwan.sys/manifest.bml
15
%%DATADIR%%/shaders/Edge Detection.shader/edge-detection.fs
14
%%DATADIR%%/cheats.bml
16
%%DATADIR%%/shaders/Edge Detection.shader/manifest.bml
17
%%DATADIR%%/shaders/Scanline.shader/manifest.bml
18
%%DATADIR%%/shaders/Scanline.shader/scanline.fs
19
share/pixmaps/higan.png
15
share/pixmaps/higan.png

Return to bug 211855