pkgsrc-Bugs archive

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

Re: pkg/52021 (graphics/MesaLib fails to install on NetBSD 7.0.1/amd64 with dri disabled)



The following reply was made to PR pkg/52021; it has been noted by GNATS.

From: Leonardo Taccari <leot%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/52021 (graphics/MesaLib fails to install on NetBSD 7.0.1/amd64 with dri disabled)
Date: Mon, 29 May 2017 11:31:13 +0200

 Hello Jörn,
 
 Jörn Clausen writes:
 >  Works as well, libdvpau is not used.
 >  
 >  But thinking a bit more about it, this is also puzzling:
 >  
 >  $ make show-options PKG_OPTIONS.ffmpeg2=-x11
 >  
 >  These options are enabled by default:
 >           ass fontconfig freetype lame libvpx openssl
 >           theora vaapi vdpau vorbis x11 x264 xvid
 >  
 >  These options are currently enabled:
 >           ass fontconfig freetype lame libvpx openssl
 >           theora vaapi vdpau vorbis x264 xvid
 >  
 >  
 >  "vdpau" is still shown in the list of enabled options, although the 
 >  package is built without support for it. "-vdpau" does what you (well, 
 >  at least I) expect, to achieve building without X11 as a side effect. 
 >  "-x11" does what you want, by not building "vdpau" as a side effect.
 >  
 >  The only solution I can think of are interdependent options, but that 
 >  would probably open a whole other can of worms.
 >  
 >  Maybe adjusting the text for vdpau and x11 is a reasonable solution:
 >  
 >           vdpau    Enable support for VDPAU (needs X11).
 >           x11      Enable X11 support (needs libvdpau).
 >  
 >  or something like that.
 
 You are right, unfortunately this is puzzling and a bit hackish!
 
 I would like to propose the following: have a conditional `x11'
 option that when disabled hides `vaapi' and `vdpau' options.
 A possible patch that implements that is attached in this email.
 I think/hope that it's a bit less puzzling but if anyone has a
 possible better ideas please let me know!
 
 Regarding custom options descriptions, after a quick skim of
 mk/bsd.options.mk it seems that all options descriptions are directly
 read from mk/defaults/options.description and so we do not have any way
 to overwrite the description as you proposed.
 
 However, we can introduce an `ffmpeg-x11' option (or something similar,
 please let me know if you have a better name!) with a clearer
 description about that, that explicitly "unblock" vaapi and vdpau
 options (similar to `x11' of the following patch).
 
 (if gnats will mess up the inline attached patch the same version is
 available at:
 http://netbsd.org/~leot/pkgsrc-patches/ffmpeg2-x11-vs-vaapi-vdpau.patch )
 
 -------------------8<-----------------8<-----------------8<-------------------
 
 Index: options.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/multimedia/ffmpeg2/options.mk,v
 retrieving revision 1.12
 diff -u -p -r1.12 options.mk
 --- options.mk	29 May 2017 08:38:16 -0000	1.12
 +++ options.mk	29 May 2017 09:21:41 -0000
 @@ -13,14 +13,14 @@ PLIST_VARS+=		doc
  
  # Add VDPAU if it is available
  .include "../../multimedia/libvdpau/available.mk"
 -.if ${VDPAU_AVAILABLE} == "yes"
 +.if ${VDPAU_AVAILABLE} == "yes" && !empty(PKG_OPTIONS:Mx11)
  PKG_SUPPORTED_OPTIONS+= vdpau
  PKG_SUGGESTED_OPTIONS+=	vdpau
  .endif
  
  # Add VAAPI if it is available
  .include "../../multimedia/libva/available.mk"
 -.if ${VAAPI_AVAILABLE} == "yes"
 +.if ${VAAPI_AVAILABLE} == "yes" && !empty(PKG_OPTIONS:Mx11)
  PKG_SUPPORTED_OPTIONS+= vaapi
  PKG_SUGGESTED_OPTIONS+=	vaapi
  .endif
 @@ -162,7 +162,7 @@ CONFIGURE_ARGS+=	--disable-libx265
  .endif
  
  # VDPAU support
 -.if !empty(PKG_OPTIONS:Mvdpau) && !empty(PKG_OPTIONS:Mx11)
 +.if !empty(PKG_OPTIONS:Mvdpau)
  CONFIGURE_ARGS+=	--enable-vdpau
  .include "../../multimedia/libvdpau/buildlink3.mk"
  .else
 @@ -170,7 +170,7 @@ CONFIGURE_ARGS+=	--disable-vdpau
  .endif
  
  # VAAPI support
 -.if !empty(PKG_OPTIONS:Mvaapi) && !empty(PKG_OPTIONS:Mx11)
 +.if !empty(PKG_OPTIONS:Mvaapi)
  CONFIGURE_ARGS+=	--enable-vaapi
  .include "../../multimedia/libva/buildlink3.mk"
  .else
 


Home | Main Index | Thread Index | Old Index