Bug 232931

Summary: [PATCH] devel/sdl20: add options
Product: Ports & Packages Reporter: Ivan Rozhuk <rozhuk.im>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed Works As Intended    
Severity: Affects Many People CC: jbeich, rozhuk.im, val
Priority: --- Flags: bugzilla: maintainer-feedback? (amdmi3)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
add options
none
up rozhuk.im: maintainer-approval?

Description Ivan Rozhuk 2018-11-03 13:39:29 UTC
Created attachment 198912 [details]
add options

Set all available options for configure.
Add port options:
- DIRECTFB DirectFB display support
- VULKAN_DESC Vulkan support

Also fix build error then DLOPEN is unset: VULKAN enabled by defauilt, but requires DLOPEN.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-11-03 16:03:24 UTC
Comment on attachment 198912 [details]
add options

Sorry but most of the patch looks like a cargo cult.

(In reply to rozhuk.im from comment #0)
> Set all available options for configure.

Provide a good rationale why increasing maintenance burden is worth it.

> - DIRECTFB DirectFB display support

DirectFB appears to be dead and is of limited use on FreeBSD without being able to directly communicate with console framebuffer. Use KMSDRM or WAYLAND instead.

> - VULKAN_DESC Vulkan support

See bug 223018 comment 4. Only salvaging DLOPEN=off fix makes sense.

> +			--enable-libc

Already default.

> +			--enable-ime \
> +			--disable-ibus \
> +			--disable-fcitx \

IME without backends?

> +.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse4.2}
> +CONFIGURE_ARGS+=	--enable-ssemath

Adding -mfpmath=387 on CPUs before Nehalem? It'd be pessimization.

> +			--disable-video-x11-xdbe \

Already enabled by default unless --disable-video-x11 is passed.

> +			--enable-video-opengles1 \

Only misc/raspberrypi-userland provides OpenGL ES1 headers.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-11-03 17:42:43 UTC
A commit references this bug:

Author: jbeich
Date: Sat Nov  3 17:41:54 UTC 2018
New revision: 483903
URL: https://svnweb.freebsd.org/changeset/ports/483903

Log:
  devel/sdl20: unbreak DLOPEN=off after r450461

  src/video/x11/SDL_x11vulkan.c:82:28: error: use of undeclared identifier 'VK_KHR_XLIB_SURFACE_EXTENSION_NAME'
          else if(SDL_strcmp(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0)
                             ^
  src/video/x11/SDL_x11vulkan.c:82:64: error: use of undeclared identifier 'extensions'
          else if(SDL_strcmp(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0)
                                                                 ^
  src/video/x11/SDL_x11vulkan.c:85:14: error: use of undeclared identifier 'extensions'
      SDL_free(extensions);
               ^
  src/video/x11/SDL_x11vulkan.c:89:22: error: expected ')'
                       VK_KHR_SURFACE_EXTENSION_NAME " extension");
                       ^
  src/video/x11/SDL_x11vulkan.c:88:21: note: to match this '('
          SDL_SetError("Installed Vulkan doesn't implement the "
                      ^
  src/video/x11/SDL_x11vulkan.c:94:20: error: no member named 'vulkan_xlib_xcb_library' in 'struct SDL_VideoData'
          videoData->vulkan_xlib_xcb_library = NULL;
          ~~~~~~~~~  ^
  src/video/x11/SDL_x11vulkan.c:99:22: error: expected ')'
                       VK_KHR_XCB_SURFACE_EXTENSION_NAME "extension or the "
                       ^
  src/video/x11/SDL_x11vulkan.c:98:21: note: to match this '('
          SDL_SetError("Installed Vulkan doesn't implement either the "
                      ^
  src/video/x11/SDL_x11vulkan.c:108:20: error: no member named 'vulkan_xlib_xcb_library' in 'struct SDL_VideoData'
          videoData->vulkan_xlib_xcb_library = SDL_LoadObject(libX11XCBLibraryName);
          ~~~~~~~~~  ^
  src/video/x11/SDL_x11vulkan.c:109:24: error: no member named 'vulkan_xlib_xcb_library' in 'struct SDL_VideoData'
          if(!videoData->vulkan_xlib_xcb_library)
              ~~~~~~~~~  ^
  src/video/x11/SDL_x11vulkan.c:111:20: error: no member named 'vulkan_XGetXCBConnection' in 'struct SDL_VideoData'
          videoData->vulkan_XGetXCBConnection =
          ~~~~~~~~~  ^
  src/video/x11/SDL_x11vulkan.c:112:41: error: no member named 'vulkan_xlib_xcb_library' in 'struct SDL_VideoData'
              SDL_LoadFunction(videoData->vulkan_xlib_xcb_library, "XGetXCBConnection");
                               ~~~~~~~~~  ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]

  PR:		232931

Changes:
  head/devel/sdl20/Makefile
Comment 3 Ivan Rozhuk 2018-11-03 23:47:26 UTC
(In reply to Jan Beich from comment #1)

I m not sure about math options and agree with other parts of your comment.

If you think that better to configure detect options then close this, I leave updated patch that only pass default port options to configure, to be sure that it not link with some lib like DirectFB it they installed on system.
Comment 4 Ivan Rozhuk 2018-11-03 23:47:54 UTC
Created attachment 198924 [details]
up
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2019-02-22 16:32:45 UTC
I agree with Jan's comment. This could be trimmed to only options which make difference, not really useful in current state.