pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/SDL2 devel/SDL2: Use the GLESv2+EGL video driver...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ffa4e7f303c5
branches:  trunk
changeset: 316978:ffa4e7f303c5
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Dec 23 14:27:15 2018 +0000

description:
devel/SDL2: Use the GLESv2+EGL video driver instead of the RPI video driver
on Raspberry Pi.

This allows RetroArch to be used on ARM NetBSD again (seemingly, when the
rgui menu driver is used). Previously, SDL2 would fail to produce shared
libraries when linked against the Broadcom libraries, which would cause
problems when linking against certain applications (notably RetroArch).

While here, disable options properly.

diffstat:

 devel/SDL2/Makefile   |   8 +-------
 devel/SDL2/options.mk |  25 ++++++++++++++++++++++---
 2 files changed, 23 insertions(+), 10 deletions(-)

diffs (92 lines):

diff -r 2e82cd9f8669 -r ffa4e7f303c5 devel/SDL2/Makefile
--- a/devel/SDL2/Makefile       Sun Dec 23 12:27:34 2018 +0000
+++ b/devel/SDL2/Makefile       Sun Dec 23 14:27:15 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2018/12/05 10:46:15 bsiegert Exp $
+# $NetBSD: Makefile,v 1.33 2018/12/23 14:27:15 nia Exp $
 
 DISTNAME=      SDL2-2.0.9
 PKGREVISION=   1
@@ -25,12 +25,6 @@
 BUILDLINK_TRANSFORM+=  rm:-ldl
 .endif
 
-SUBST_CLASSES+=                vc
-SUBST_STAGE.vc=                pre-configure
-SUBST_MESSAGE.vc=      Fixing path to VideoCore libraries.
-SUBST_FILES.vc=                configure
-SUBST_SED.vc+=         -e 's;/opt/vc;${PREFIX};g'
-
 CFLAGS+=       -DPREFIX=\"${PREFIX}\"
 
 .include "options.mk"
diff -r 2e82cd9f8669 -r ffa4e7f303c5 devel/SDL2/options.mk
--- a/devel/SDL2/options.mk     Sun Dec 23 12:27:34 2018 +0000
+++ b/devel/SDL2/options.mk     Sun Dec 23 14:27:15 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.7 2018/11/01 21:08:28 adam Exp $
+# $NetBSD: options.mk,v 1.8 2018/12/23 14:27:15 nia Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.SDL2
 PKG_OPTIONS_REQUIRED_GROUPS=   gl
@@ -13,7 +13,7 @@
 .include "../../mk/bsd.fast.prefs.mk"
 
 .if !empty(MACHINE_ARCH:M*arm*)
-PKG_OPTIONS_GROUP.gl+= rpi
+PKG_OPTIONS_GROUP.gl+= rpi
 PKG_SUGGESTED_OPTIONS+=        rpi
 .else
 PKG_SUGGESTED_OPTIONS+=        opengl
@@ -23,10 +23,14 @@
 
 .if !empty(PKG_OPTIONS:Malsa)
 .include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --disable-alsa
 .endif
 
 .if !empty(PKG_OPTIONS:Mdbus)
 .include "../../sysutils/dbus/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --disable-dbus
 .endif
 
 .if !empty(PKG_OPTIONS:Mesound)
@@ -35,6 +39,8 @@
 
 .if !empty(PKG_OPTIONS:Mnas)
 .include "../../audio/nas/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --disable-nas
 .endif
 
 .if !empty(PKG_OPTIONS:Mopengl)
@@ -53,6 +59,8 @@
 
 .if !empty(PKG_OPTIONS:Mpulseaudio)
 .include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --disable-pulseaudio
 .endif
 
 .if !empty(PKG_OPTIONS:Mx11)
@@ -67,6 +75,17 @@
 .endif
 
 .if !empty(PKG_OPTIONS:Mrpi)
-LOWER_VENDOR=  raspberry
+LOWER_VENDOR=          raspberry
+# fails to produce shared libraries
+# try standard GLES instead
+CONFIGURE_ARGS+=       --disable-video-rpi
+CONFIGURE_ARGS+=       --enable-video-opengles
+CONFIGURE_ARGS+=       --enable-video-opengles1
+CONFIGURE_ARGS+=       --enable-video-opengles2
+SUBST_CLASSES+=                gles
+SUBST_STAGE.gles=      pre-configure
+SUBST_MESSAGE.gles=    Fixing name of GLES library.
+SUBST_FILES.gles=      src/video/SDL_egl.c
+SUBST_SED.gles+=       -e 's/libGLESv2.so.2/libGLESv2.so/g'
 .include "../../misc/raspberrypi-userland/buildlink3.mk"
 .endif



Home | Main Index | Thread Index | Old Index