Hi ports@,
Here is an attempt to update yabause to 0.9.15, which is now using CMake
and SDL2.
I understand we want to avoid linking against graphics/freeglut, so I
added a patch for this, as it seems there is no option to disable it at
configure time.
It builds and launch fine, but I haven't been able to test the emulation
itself as I do not have any Saturn games.
Comments? OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/yabause/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 12 Jul 2019 20:46:10 -0000 1.12
+++ Makefile 11 Nov 2019 21:11:57 -0000
@@ -2,33 +2,32 @@
COMMENT = Sega Saturn emulator
-DISTNAME = yabause-0.9.10
-REVISION = 6
+V = 0.9.15
+DISTNAME = yabause-${V}
CATEGORIES = emulators games
-HOMEPAGE = http://yabause.org/
+HOMEPAGE = https://yabause.org/
# GPLv2
PERMIT_PACKAGE = Yes
-WANTLIB = GL GLU ICE SDL SM X11 Xau Xcomposite Xcursor Xdamage Xdmcp
-WANTLIB += Xext Xfixes Xi Xinerama Xmu Xrandr Xrender Xt Xxf86vm atk-1.0
-WANTLIB += c cairo drm expat fontconfig freetype gdk-x11-2.0
+WANTLIB += GL GLEW GLU SDL2 X11 Xrandr atk-1.0 c cairo gdk-x11-2.0
WANTLIB += gdk_pixbuf-2.0 gdkglext-x11-1.0 gio-2.0 glib-2.0 gmodule-2.0
-WANTLIB += gobject-2.0 gthread-2.0 gtk-x11-2.0 gtkglext-x11-1.0 iconv
-WANTLIB += intl m pango-1.0 pangocairo-1.0 pangoft2-1.0 pangox-1.0
-WANTLIB += pixman-1 png pthread xcb xcb-render xcb-shm z
+WANTLIB += gobject-2.0 gthread-2.0 gtk-x11-2.0 gtkglext-x11-1.0
+WANTLIB += m pango-1.0 pangocairo-1.0 pangoft2-1.0 pangoxft-1.0
+WANTLIB += pthread z
-MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=yabause/}
+MASTER_SITES = https://download.tuxfamily.org/yabause/releases/${V}/
-USE_GMAKE = Yes
+MODULES = devel/cmake
+CONFIGURE_ENV += PKGMANDIR="${PREFIX}/man"
+CONFIGURE_ARGS = -DYAB_WANT_OPENAL=OFF PKGMANDIR=man
-CONFIGURE_STYLE = gnu
-CONFIGURE_ARGS = --without-openal ac_cv_lib_glut_glutGetModifiers=no
-CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include"
+CFLAGS += -I${X11BASE}/include
-LIB_DEPENDS = devel/sdl \
+LIB_DEPENDS = devel/sdl2 \
+ graphics/glew \
x11/gtkglext
RUN_DEPENDS = devel/desktop-file-utils
Index: distinfo
===================================================================
RCS file: /cvs/ports/emulators/yabause/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo 18 Jan 2015 03:13:52 -0000 1.2
+++ distinfo 11 Nov 2019 21:11:57 -0000
@@ -1,2 +1,2 @@
-SHA256 (yabause-0.9.10.tar.gz) = LxXqMtTRIm/Rvr9rEHrp+qcf4jBgjwGlsBBcKy+qeL4=
-SIZE (yabause-0.9.10.tar.gz) = 1376089
+SHA256 (yabause-0.9.15.tar.gz) = QzTEP+Dz/yl7rI6R9OBZ/l/Sdikfr/JInje1s6TMwrI=
+SIZE (yabause-0.9.15.tar.gz) = 2481650
Index: patches/patch-src_CMakeLists_txt
===================================================================
RCS file: patches/patch-src_CMakeLists_txt
diff -N patches/patch-src_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_CMakeLists_txt 11 Nov 2019 21:11:57 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Avoid picking up graphics/freeglut if it is installed.
+
+Index: src/CMakeLists.txt
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -202,14 +202,6 @@ if (YAB_WANT_OPENGL AND (YAB_RGB STREQUAL ""))
+ add_definitions(-DHAVE_LIBGL=1)
+ set(YABAUSE_LIBRARIES ${YABAUSE_LIBRARIES} ${OPENGL_LIBRARIES})
+
+- include(FindGLUT)
+- if (GLUT_FOUND)
+- message (WARNING "Deprecated Glut found. Support will
be removed in the future. ")
+- include_directories(${GLUT_INCLUDE_DIR})
+- add_definitions(-DHAVE_LIBGLUT=1)
+- set(YABAUSE_LIBRARIES ${YABAUSE_LIBRARIES}
${GLUT_LIBRARIES})
+- endif()
+-
+ # glXGetProcAddress
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
${OPENGL_LIBRARIES})
+ check_function_exists(glXGetProcAddress GLXGETPROCADDRESS_OK)
Index: patches/patch-src_gtk_Makefile_in
===================================================================
RCS file: patches/patch-src_gtk_Makefile_in
diff -N patches/patch-src_gtk_Makefile_in
--- patches/patch-src_gtk_Makefile_in 5 Nov 2017 11:28:37 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-src_gtk_Makefile_in,v 1.2 2017/11/05 11:28:37 espie Exp $
-
-Remove unnecessary code that breaks fake.
-
-Index: src/gtk/Makefile.in
---- src/gtk/Makefile.in.orig
-+++ src/gtk/Makefile.in
-@@ -153,7 +153,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
- X_LIBS = @X_LIBS@
- X_PRE_LIBS = @X_PRE_LIBS@
- YAB_CFLAGS = @YAB_CFLAGS@
--YAB_LIBS = @YAB_LIBS@
-+YAB_LIBS = @YAB_LIBS@ -lm
- abs_builddir = @abs_builddir@
- abs_srcdir = @abs_srcdir@
- abs_top_builddir = @abs_top_builddir@
-@@ -900,7 +900,6 @@ info-am:
-
- install-data-am: install-ApplicationsDATA install-pixmapDATA
- @$(NORMAL_INSTALL)
-- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
-
- install-dvi: install-dvi-recursive
-
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/emulators/yabause/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 27 Jun 2018 21:03:43 -0000 1.2
+++ pkg/PLIST 11 Nov 2019 21:11:57 -0000
@@ -6,12 +6,23 @@ share/pixmaps/
share/pixmaps/yabause.png
share/yabause/
share/yabause/yts/
+share/yabause/yts/ar.yts
+share/yabause/yts/da.yts
share/yabause/yts/de.yts
+share/yabause/yts/el.yts
share/yabause/yts/es.yts
share/yabause/yts/fr.yts
share/yabause/yts/it.yts
+share/yabause/yts/ja.yts
+share/yabause/yts/ko.yts
share/yabause/yts/lt.yts
+share/yabause/yts/nl.yts
+share/yabause/yts/pl_PL.yts
share/yabause/yts/pt.yts
share/yabause/yts/pt_BR.yts
+share/yabause/yts/ru.yts
share/yabause/yts/sv.yts
@tag update-desktop-database
+share/yabause/yts/tr.yts
+share/yabause/yts/zh_CN.yts
+share/yabause/yts/zh_TW.yts