aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emulators/higan/Makefile120
-rw-r--r--emulators/higan/distinfo4
-rw-r--r--emulators/higan/files/patch-Makefile11
-rw-r--r--emulators/higan/files/patch-nall-file.hpp70
-rw-r--r--emulators/higan/files/patch-nall-platform.hpp11
-rw-r--r--emulators/higan/files/patch-shaders22
-rw-r--r--emulators/higan/files/patch-target-ethos-AddSharePath30
-rw-r--r--emulators/higan/files/patch-target-ethos-Makefile24
-rw-r--r--emulators/higan/pkg-plist15
9 files changed, 117 insertions, 190 deletions
diff --git a/emulators/higan/Makefile b/emulators/higan/Makefile
index ec18391bdb50..f04fafd25600 100644
--- a/emulators/higan/Makefile
+++ b/emulators/higan/Makefile
@@ -2,42 +2,42 @@
# $FreeBSD$
PORTNAME= higan
-PORTVERSION= 0.92
-PORTREVISION= 3
+PORTVERSION= 0.94
CATEGORIES= emulators
-MASTER_SITES= GOOGLE_CODE
+MASTER_SITES= http://byuu.org/files/ \
+ http://www.cyberbotx.com/higan/
DISTNAME= ${PORTNAME}_v${PORTVERSION:S/.//}-source
MAINTAINER= cyberbotx@cyberbotx.com
COMMENT= Nintendo multi-system emulator
-USES= pkgconfig
-USE_XZ= yes
-USE_GMAKE= yes
-USE_GCC= yes
+USES= compiler:c++11-lib gmake pkgconfig tar:xz
USE_LDCONFIG= yes
ONLY_FOR_ARCHS= i386 amd64
-MAKE_ENV+= c="${CC} -std=gnu99" cpp="${CXX} -std=gnu++0x"
+#MAKE_ENV+= c="${CC} -std=gnu99" cpp="${CXX} -std=gnu++0x"
+MAKE_ENV+= compiler="${CXX}" cflags="-x c -std=c99 ${CFLAGS}" \
+ cppflags="-x c++ -std=c++11 ${CXXFLAGS}"
OPTIONS_DEFINE= DEBUG
OPTIONS_SINGLE= PROFILE GUI
OPTIONS_SINGLE_PROFILE= ACCURACY BALANCED PERFORMANCE
OPTIONS_SINGLE_GUI= GTK2 QT4
OPTIONS_MULTI= VIDEO SOUND INPUT
-OPTIONS_MULTI_VIDEO= GLX SDL XV
+OPTIONS_MULTI_VIDEO= GLX SDL XSHM XV
OPTIONS_MULTI_SOUND= AO OPENAL OSS PULSEAUDIO
OPTIONS_MULTI_INPUT= INPUT_SDL INPUT_X
-OPTIONS_DEFAULT= BALANCED GTK2 GLX XV SDL \
+OPTIONS_DEFAULT= BALANCED GTK2 GLX XSHM XV SDL \
OSS INPUT_SDL INPUT_X
ACCURACY_DESC= Use accuracy profile
-BALACNED_DESC= Use balanced profile
+BALANCED_DESC= Use balanced profile
PERFORMANCE_DESC= Use performance profile
GTK2_DESC= Build with GTK+2 GUI
QT4_DESC= Build with QT4 GUI
GLX_DESC= Build GLX video driver
SDL_DESC= Build SDL video driver
+XSHM_DESC= Build XShm video driver
XV_DESC= Build Xv video driver
AO_DESC= Build AO sound driver
OPENAL_DESC= Build OpenAL sound driver
@@ -46,45 +46,50 @@ PULSEAUDIO_DESC= Build Pulseaudio sound driver
INPUT_SDL_DESC= Build SDL input driver
INPUT_X_DESC= Build X input driver
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+ACCURACY_MAKE_ENV= profile="accuracy"
+BALANCED_MAKE_ENV= profile="balanced"
+PERFORMANCE_MAKE_ENV= profile="performance"
-.if ${PORT_OPTIONS:MACCURACY}
-MAKE_ENV+= profile="accuracy"
-.elif ${PORT_OPTIONS:MBALANCED}
-MAKE_ENV+= profile="balanced"
-.else
-MAKE_ENV+= profile="performance"
-.endif
+GTK2_USE= GNOME=gtk20
+GTK2_MAKE_ENV= phoenix="gtk"
-.if ${PORT_OPTIONS:MGTK2}
-USE_GNOME+= gtk20
-MAKE_ENV+= phoenix="gtk"
-.endif
+QT4_USE= QT4=gui,moc_build
+QT4_MAKE_ENV= phoenix="qt"
-.if ${PORT_OPTIONS:MQT4}
-USE_QT4+= gui moc_build
-MAKE_ENV+= phoenix="qt"
-.endif
+GLX_USE= GL=gl
+SDL_USE= XORG=xv SDL=sdl
+XSHM_USE= XORG=xext
+XV_USE= XORG=xv
+
+AO_LIB_DEPENDS= libao.so:${PORTSDIR}/audio/libao
+OPENAL_USES= openal:al
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
+
+INPUT_SDL_USE= SDL=sdl
+
+.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGLX}
-USE_GL+= gl
VIDEO_DRIVER+= video.glx
.endif
+.if ${PORT_OPTIONS:MSDL}
+VIDEO_DRIVER+= video.sdl
+.endif
+
+.if ${PORT_OPTIONS:MXSHM}
+VIDEO_DRIVER+= video.xshm
+.endif
+
.if ${PORT_OPTIONS:MXV}
-USE_XORG+= xv
VIDEO_DRIVER+= video.xv
.endif
-.if ${PORT_OPTIONS:MSDL}
-USE_XORG+= xv
-USE_SDL+= sdl
-VIDEO_DRIVER+= video.sdl
+.if ${PORT_OPTIONS:MAO}
+AUDIO_DRIVER+= audio.ao
.endif
.if ${PORT_OPTIONS:MOPENAL}
-USES+= openal:al
AUDIO_DRIVER+= audio.openal
.endif
@@ -93,22 +98,15 @@ AUDIO_DRIVER+= audio.oss
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
-LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio
AUDIO_DRIVER+= audio.pulseaudio
.endif
-.if ${PORT_OPTIONS:MAO}
-LIB_DEPENDS+= ao:${PORTSDIR}/audio/libao
-AUDIO_DRIVER+= audio.ao
+.if ${PORT_OPTIONS:MINPUT_SDL}
+INPUT_DRIVER+= input.sdl
.endif
.if ${PORT_OPTIONS:MINPUT_X}
-INPUT_DRIVER+= input.x
-.endif
-
-.if ${PORT_OPTIONS:MINPUT_SDL}
-USE_SDL+= sdl
-INPUT_DRIVER+= input.sdl
+INPUT_DRIVER+= input.xlib
.endif
post-patch:
@@ -116,32 +114,34 @@ post-patch:
-e 's|%%VIDEO%%|${VIDEO_DRIVER}|' \
-e 's|%%AUDIO%%|${AUDIO_DRIVER}|' \
-e 's|%%INPUT%%|${INPUT_DRIVER}|' \
- ${WRKSRC}/higan/target-ethos/Makefile
+ ${WRKSRC}/target-ethos/Makefile
+ ${REINPLACE_CMD} -e 's|/usr/share/|${PREFIX}/|' \
+ ${WRKSRC}/nall/string/platform.hpp
.if ${PORT_OPTIONS:MDEBUG}
${REINPLACE_CMD} -e 's|-O3|-g|g' \
${WRKSRC}/ananke/Makefile \
- ${WRKSRC}/higan/Makefile
+ ${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's|:= -s|:= #|g' \
- ${WRKSRC}/higan/Makefile
+ ${WRKSRC}/Makefile
.endif
- ${RM} ${WRKSRC}/shaders/Sepia.Direct3D.shader
+# ${RM} ${WRKSRC}/shaders/Sepia.Direct3D.shader
do-build:
-.for d in higan ananke
.if ${PORT_OPTIONS:MQT4}
- cd ${WRKSRC}/${d}/phoenix/qt && ${MOC} -i -o platform.moc platform.moc.hpp
+ (cd ${WRKSRC}/phoenix/qt && ${MOC} -i -o platform.moc platform.moc.hpp)
.endif
- cd ${WRKSRC}/${d} && ${GMAKE} ${MAKE_ENV}
+.for d in . ananke
+ (cd ${WRKSRC}/${d} && ${GMAKE} ${MAKE_ENV})
.endfor
do-install:
- ${INSTALL_LIB} ${WRKSRC}/ananke/libananke.so ${PREFIX}/lib/libananke.so.1
- ${LN} -sf ${PREFIX}/lib/libananke.so.1 ${PREFIX}/lib/libananke.so
- ${INSTALL_PROGRAM} ${WRKSRC}/higan/out/higan ${PREFIX}/bin/
- ${INSTALL_DATA} ${WRKSRC}/higan/data/higan.png ${PREFIX}/share/pixmaps/
- ${INSTALL_DATA} ${WRKSRC}/higan/data/higan.desktop ${PREFIX}/share/applications/
- ${MKDIR} ${DATADIR}/Video\ Shaders
- (cd ${WRKSRC}/higan/profile && ${COPYTREE_SHARE} \* ${DATADIR}/)
- ${INSTALL_DATA} ${WRKSRC}/shaders/* ${DATADIR}/Video\ Shaders/
+ ${INSTALL_LIB} ${WRKSRC}/ananke/libananke.so ${STAGEDIR}${PREFIX}/lib/libananke.so.1
+ ${LN} -sf libananke.so.1 ${STAGEDIR}${PREFIX}/lib/libananke.so
+ ${INSTALL_PROGRAM} ${WRKSRC}/out/higan ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKSRC}/data/higan.png ${STAGEDIR}${PREFIX}/share/pixmaps/
+ ${INSTALL_DATA} ${WRKSRC}/data/higan.desktop ${STAGEDIR}${PREFIX}/share/applications/
+ ${MKDIR} ${STAGEDIR}${DATADIR}/shaders
+ (cd ${WRKSRC}/profile && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/)
+ (cd ${WRKSRC}/shaders && ${COPYTREE_SHARE} \*.shader ${STAGEDIR}${DATADIR}/shaders/)
.include <bsd.port.mk>
diff --git a/emulators/higan/distinfo b/emulators/higan/distinfo
index 8d548d675605..aeb764aa8ce2 100644
--- a/emulators/higan/distinfo
+++ b/emulators/higan/distinfo
@@ -1,2 +1,2 @@
-SHA256 (higan_v092-source.tar.xz) = b73a740c6a8a82fe42a3f166df16806a6fbe8c140c82d7f6089ed984d7491168
-SIZE (higan_v092-source.tar.xz) = 790136
+SHA256 (higan_v094-source.tar.xz) = 5e149df9d50c1066eb97c0d66665428d75304da782bba5a87078b87fc311151b
+SIZE (higan_v094-source.tar.xz) = 882732
diff --git a/emulators/higan/files/patch-Makefile b/emulators/higan/files/patch-Makefile
deleted file mode 100644
index 5a80997fac43..000000000000
--- a/emulators/higan/files/patch-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- higan/Makefile.orig 2012-11-04 00:22:50.000000000 -0400
-+++ higan/Makefile 2013-02-21 13:58:56.000000000 -0500
-@@ -34,7 +34,7 @@
- # platform
- ifeq ($(platform),x)
- flags += -march=native
-- link += -Wl,-export-dynamic -ldl -lX11 -lXext
-+ link += -Wl,-export-dynamic -lX11 -lXext
- else ifeq ($(platform),win)
- ifeq ($(arch),win32)
- flags += -m32
diff --git a/emulators/higan/files/patch-nall-file.hpp b/emulators/higan/files/patch-nall-file.hpp
deleted file mode 100644
index 98afc8184a6a..000000000000
--- a/emulators/higan/files/patch-nall-file.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
---- higan/nall/file.hpp.orig 2013-01-14 13:27:28.000000000 -0500
-+++ higan/nall/file.hpp 2013-02-21 14:05:00.000000000 -0500
-@@ -218,8 +218,8 @@
-
- static bool exists(const string &filename) {
- #if !defined(_WIN32)
-- struct stat64 data;
-- return stat64(filename, &data) == 0;
-+ struct stat data;
-+ return stat(filename, &data) == 0;
- #else
- struct __stat64 data;
- return _wstat64(utf16_t(filename), &data) == 0;
-@@ -228,8 +228,8 @@
-
- static uintmax_t size(const string &filename) {
- #if !defined(_WIN32)
-- struct stat64 data;
-- stat64(filename, &data);
-+ struct stat data;
-+ stat(filename, &data);
- #else
- struct __stat64 data;
- _wstat64(utf16_t(filename), &data);
-@@ -239,8 +239,8 @@
-
- static time_t timestamp(const string &filename, file::time mode = file::time::create) {
- #if !defined(_WIN32)
-- struct stat64 data;
-- stat64(filename, &data);
-+ struct stat data;
-+ stat(filename, &data);
- #else
- struct __stat64 data;
- _wstat64(utf16_t(filename), &data);
---- ananke/nall/file.hpp.orig 2013-01-11 13:26:29.000000000 -0500
-+++ ananke/nall/file.hpp 2013-02-21 14:06:08.000000000 -0500
-@@ -218,8 +218,8 @@
-
- static bool exists(const string &filename) {
- #if !defined(_WIN32)
-- struct stat64 data;
-- return stat64(filename, &data) == 0;
-+ struct stat data;
-+ return stat(filename, &data) == 0;
- #else
- struct __stat64 data;
- return _wstat64(utf16_t(filename), &data) == 0;
-@@ -228,8 +228,8 @@
-
- static uintmax_t size(const string &filename) {
- #if !defined(_WIN32)
-- struct stat64 data;
-- stat64(filename, &data);
-+ struct stat data;
-+ stat(filename, &data);
- #else
- struct __stat64 data;
- _wstat64(utf16_t(filename), &data);
-@@ -239,8 +239,8 @@
-
- static time_t timestamp(const string &filename, file::time mode = file::time::create) {
- #if !defined(_WIN32)
-- struct stat64 data;
-- stat64(filename, &data);
-+ struct stat data;
-+ stat(filename, &data);
- #else
- struct __stat64 data;
- _wstat64(utf16_t(filename), &data);
diff --git a/emulators/higan/files/patch-nall-platform.hpp b/emulators/higan/files/patch-nall-platform.hpp
new file mode 100644
index 000000000000..c16fa0e80fa3
--- /dev/null
+++ b/emulators/higan/files/patch-nall-platform.hpp
@@ -0,0 +1,11 @@
+--- ./nall/platform.hpp.orig 2014-03-16 21:33:25.000000000 -0400
++++ ./nall/platform.hpp 2014-03-16 21:45:07.000000000 -0400
+@@ -41,7 +41,7 @@
+ #undef interface
+ #define dllexport __declspec(dllexport)
+ #else
+- #include <endian.h>
++ #include <sys/endian.h>
+ #include <unistd.h>
+ #include <pwd.h>
+ #define dllexport
diff --git a/emulators/higan/files/patch-shaders b/emulators/higan/files/patch-shaders
new file mode 100644
index 000000000000..e14b2cd4aad2
--- /dev/null
+++ b/emulators/higan/files/patch-shaders
@@ -0,0 +1,22 @@
+--- ./target-ethos/general/presentation.cpp.orig 2013-12-06 15:19:40.000000000 -0500
++++ ./target-ethos/general/presentation.cpp 2014-03-16 22:40:31.000000000 -0400
+@@ -235,7 +235,7 @@
+ void Presentation::loadShaders() {
+ //only the OpenGL driver has video shader support
+ if(config->video.driver == "OpenGL") {
+- string pathname = program->path("Video Shaders/");
++ string pathname = program->path("shaders/");
+ lstring shaders = directory::folders(pathname, "*.shader");
+ for(auto& name : shaders) {
+ auto shader = new RadioItem;
+--- ./target-ethos/utility/utility.cpp.orig 2013-12-21 02:00:03.000000000 -0500
++++ ./target-ethos/utility/utility.cpp 2014-03-16 22:41:03.000000000 -0400
+@@ -203,7 +203,7 @@
+ video.set(Video::Filter, Video::FilterLinear);
+ } else if(config->video.shader == "Display Emulation") {
+ if(program->active) {
+- string pathname = program->path("Video Shaders/");
++ string pathname = program->path("shaders/");
+ pathname.append("Display Emulation/");
+ pathname.append(presentation->systemName, ".shader/");
+ if(directory::exists(pathname)) {
diff --git a/emulators/higan/files/patch-target-ethos-AddSharePath b/emulators/higan/files/patch-target-ethos-AddSharePath
deleted file mode 100644
index 286474b9c734..000000000000
--- a/emulators/higan/files/patch-target-ethos-AddSharePath
+++ /dev/null
@@ -1,30 +0,0 @@
---- higan/target-ethos/ethos.hpp.orig 2012-11-04 00:39:15.000000000 -0400
-+++ higan/target-ethos/ethos.hpp 2013-04-30 23:07:49.000000000 -0400
-@@ -41,6 +41,7 @@
- unsigned depth;
-
- string basepath;
-+ string sharepath;
- string userpath;
-
- string normalFont;
---- higan/target-ethos/ethos.cpp.orig 2013-01-12 17:01:26.000000000 -0500
-+++ higan/target-ethos/ethos.cpp 2013-04-30 23:10:23.000000000 -0400
-@@ -18,6 +18,9 @@
- string path = {basepath, filename};
- if(file::exists(path)) return path;
- if(directory::exists(path)) return path;
-+ path = {sharepath, filename};
-+ if(file::exists(path)) return path;
-+ if(directory::exists(path)) return path;
- return {userpath, filename};
- }
-
-@@ -44,6 +47,7 @@
- autopause = false;
-
- basepath = dir(realpath(argv[0]));
-+ sharepath = {parentdir(basepath), "share/higan/"};
- userpath = {nall::configpath(), "higan/"};
- directory::create(userpath);
-
diff --git a/emulators/higan/files/patch-target-ethos-Makefile b/emulators/higan/files/patch-target-ethos-Makefile
index 5e07ebb988cd..ae089f537874 100644
--- a/emulators/higan/files/patch-target-ethos-Makefile
+++ b/emulators/higan/files/patch-target-ethos-Makefile
@@ -1,15 +1,15 @@
---- higan/target-ethos/Makefile.orig 2013-01-12 16:59:47.000000000 -0500
-+++ higan/target-ethos/Makefile 2013-02-21 14:00:38.000000000 -0500
-@@ -16,9 +16,9 @@
-
- # platform
- ifeq ($(platform),x)
-- ruby := video.glx video.xv video.sdl
-- ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
-- ruby += input.sdl input.x
+--- ./target-ethos/Makefile.orig 2014-01-13 00:26:29.000000000 -0500
++++ ./target-ethos/Makefile 2014-03-16 21:57:02.000000000 -0400
+@@ -27,9 +27,9 @@
+ ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
+ ruby += input.udev input.sdl input.x
+ else ifeq ($(platform),bsd)
+- ruby := video.glx
+- ruby += audio.openal audio.oss
+- ruby += input.x
+ ruby := %%VIDEO%%
+ ruby += %%AUDIO%%
+ ruby += %%INPUT%%
- else ifeq ($(platform),osx)
- ruby :=
- ruby += audio.openal
+ endif
+
+ # phoenix
diff --git a/emulators/higan/pkg-plist b/emulators/higan/pkg-plist
index 1e022517f72c..cd0aae5c1bed 100644
--- a/emulators/higan/pkg-plist
+++ b/emulators/higan/pkg-plist
@@ -10,13 +10,18 @@ share/applications/higan.desktop
%%DATADIR%%/Game Boy.sys/manifest.bml
%%DATADIR%%/Super Famicom.sys/ipl.rom
%%DATADIR%%/Super Famicom.sys/manifest.bml
-%%DATADIR%%/Video Shaders/Curvature.OpenGL.shader
-%%DATADIR%%/Video Shaders/HQ2x.OpenGL.shader
-%%DATADIR%%/Video Shaders/Pixellate.OpenGL.shader
-%%DATADIR%%/Video Shaders/Scale2x.OpenGL.shader
+%%DATADIR%%/shaders/Curvature.shader/curvature.fs
+%%DATADIR%%/shaders/Curvature.shader/manifest.bml
+%%DATADIR%%/shaders/Edge Detection.shader/edge-detection.fs
+%%DATADIR%%/shaders/Edge Detection.shader/manifest.bml
+%%DATADIR%%/shaders/Scanline.shader/manifest.bml
+%%DATADIR%%/shaders/Scanline.shader/scanline.fs
share/pixmaps/higan.png
@dirrmtry share/pixmaps
-@dirrm %%DATADIR%%/Video Shaders
+@dirrm %%DATADIR%%/shaders/Scanline.shader
+@dirrm %%DATADIR%%/shaders/Edge Detection.shader
+@dirrm %%DATADIR%%/shaders/Curvature.shader
+@dirrm %%DATADIR%%/shaders
@dirrm %%DATADIR%%/Super Famicom.sys
@dirrm %%DATADIR%%/Game Boy.sys
@dirrm %%DATADIR%%/Game Boy Color.sys