| 1 | 
   | 
    
    # Copyright 2022-2024 Gentoo Authors 
   | 
  
   | 
  1 | 
    
    # Copyright 1999-2023 Gentoo Authors 
   | 
  
  | 2 | 
  2 | 
    
    # Distributed under the terms of the GNU General Public License v2 
   | 
  
  | 3 | 
  3 | 
    
    
   | 
  
  | 4 | 
  4 | 
    
    EAPI=7 
   | 
  
  | 5 | 
  5 | 
    
    
   | 
  
  | 6 | 
   | 
    
    inherit flag-o-matic toolchain-funcs vdr-plugin-2 
   | 
  
  | 7 | 
   | 
    
    
   | 
  
  | 8 | 
  6 | 
    
    GENTOO_VDR_CONDITIONAL=yes 
   | 
  
  | 9 | 
  7 | 
    
    
   | 
  
   | 
  8 | 
    
    inherit flag-o-matic git-r3 toolchain-funcs vdr-plugin-2 
   | 
  
   | 
  9 | 
    
    
   | 
  
  | 10 | 
  10 | 
    
    DESCRIPTION="VDR Plugin: Xinelib PlugIn" 
   | 
  
  | 11 | 
  11 | 
    
    HOMEPAGE="https://sourceforge.net/projects/xineliboutput/" 
   | 
  
  | 12 | 
   | 
    
    SRC_URI="https://downloads.sourceforge.net/${PN#vdr-}/${P}.tgz
   | 
  
  | 13 | 
   | 
    
    		http://vdr.websitec.de/download/${PN}/${P}_clang.patch.bz2"
   | 
  
   | 
  12 | 
    
    
   | 
  
   | 
  13 | 
    
    EGIT_REPO_URI="https://git.code.sf.net/p/xineliboutput/git" 
   | 
  
  | 14 | 
  14 | 
    
    
   | 
  
  | 15 | 
  15 | 
    
    LICENSE="GPL-2+" 
   | 
  
  | 16 | 
  16 | 
    
    SLOT="0" 
   | 
  
  | 17 | 
   | 
    
    KEYWORDS="~amd64 ~x86" 
   | 
  
  | 18 | 
   | 
    
    IUSE="bluray caps cec dbus fbcon jpeg nls opengl +vdr vaapi vdpau +X +xine xinerama" 
   | 
  
   | 
  17 | 
    
    KEYWORDS="" 
   | 
  
   | 
  18 | 
    
    IUSE="bluray caps cec dbus fbcon jpeg nls opengl +vdr vdpau +X +xine xinerama" 
   | 
  
  | 19 | 
  19 | 
    
    
   | 
  
  | 20 | 
  20 | 
    
    COMMON_DEPEND=" 
   | 
  
  | 21 | 
  21 | 
    
    	vdr? ( 
   | 
  
  | 22 | 
   | 
    
    		media-video/vdr 
   | 
  
   | 
  22 | 
    
    		>=media-video/vdr-1.6.0 
   | 
  
  | 23 | 
  23 | 
    
    		caps? ( sys-libs/libcap ) 
   | 
  
  | 24 | 
  24 | 
    
    	) 
   | 
  
  | 25 | 
  25 | 
    
    
   | 
  
| ... | ... |  | 
  | 31 | 
  31 | 
    
    			x11-libs/libX11 
   | 
  
  | 32 | 
  32 | 
    
    			x11-libs/libXext 
   | 
  
  | 33 | 
  33 | 
    
    			x11-libs/libXrender 
   | 
  
  | 34 | 
   | 
    
    			bluray? ( media-libs/libbluray ) 
   | 
  
   | 
  34 | 
    
    			xinerama? ( x11-libs/libXinerama ) 
   | 
  
  | 35 | 
  35 | 
    
    			dbus? ( dev-libs/dbus-glib dev-libs/glib:2 ) 
   | 
  
   | 
  36 | 
    
    			vdpau? ( x11-libs/libvdpau >=media-libs/xine-lib-1.2 ) 
   | 
  
  | 36 | 
  37 | 
    
    			jpeg? ( media-libs/libjpeg-turbo:= ) 
   | 
  
   | 
  38 | 
    
    			bluray? ( media-libs/libbluray ) 
   | 
  
  | 37 | 
  39 | 
    
    			opengl? ( virtual/opengl ) 
   | 
  
  | 38 | 
   | 
    
    			vaapi? ( media-libs/libva >=media-libs/xine-lib-1.2[vaapi] ) 
   | 
  
  | 39 | 
   | 
    
    			vdpau? ( x11-libs/libvdpau >=media-libs/xine-lib-1.2[vdpau] ) 
   | 
  
  | 40 | 
   | 
    
    			xinerama? ( x11-libs/libXinerama ) 
   | 
  
  | 41 | 
  40 | 
    
    		) 
   | 
  
  | 42 | 
   | 
    
    	)" 
   | 
  
   | 
  41 | 
    
    	) 
   | 
  
   | 
  42 | 
    
    
   | 
  
   | 
  43 | 
    
    	cec? ( dev-libs/libcec )" 
   | 
  
  | 43 | 
  44 | 
    
    
   | 
  
  | 44 | 
  45 | 
    
    DEPEND="${COMMON_DEPEND}
   | 
  
  | 45 | 
  46 | 
    
    	sys-kernel/linux-headers 
   | 
  
| ... | ... |  | 
  | 53 | 
  54 | 
    
    RDEPEND="${COMMON_DEPEND}"
   | 
  
  | 54 | 
  55 | 
    
    BDEPEND="virtual/pkgconfig" 
   | 
  
  | 55 | 
  56 | 
    
    
   | 
  
  | 56 | 
   | 
    
    REQUIRED_USE=" || ( vdr xine )" 
   | 
  
   | 
  57 | 
    
    S=${WORKDIR}/${P}
   | 
  
  | 57 | 
  58 | 
    
    
   | 
  
  | 58 | 
  59 | 
    
    VDR_CONFD_FILE="${FILESDIR}/confd-2.0.0"
   | 
  
  | 59 | 
  60 | 
    
    
   | 
  
  | 60 | 
  61 | 
    
    pkg_setup() {
   | 
  
   | 
  62 | 
    
    	if ! use vdr && ! use xine; then 
   | 
  
   | 
  63 | 
    
    		die "You either need at least one of these flags: vdr xine" 
   | 
  
   | 
  64 | 
    
    	fi 
   | 
  
   | 
  65 | 
    
    
   | 
  
  | 61 | 
  66 | 
    
    	vdr-plugin-2_pkg_setup 
   | 
  
  | 62 | 
  67 | 
    
    
   | 
  
  | 63 | 
  68 | 
    
    	if use xine; then 
   | 
  
| ... | ... |  | 
  | 67 | 
  72 | 
    
    } 
   | 
  
  | 68 | 
  73 | 
    
    
   | 
  
  | 69 | 
  74 | 
    
    src_prepare() {
   | 
  
  | 70 | 
   | 
    
    	vdr-plugin-2_src_prepare 
   | 
  
   | 
  75 | 
    
    	# Allow user patches to be applied without modifyfing the ebuild 
   | 
  
   | 
  76 | 
    
    	eapply_user 
   | 
  
  | 71 | 
  77 | 
    
    
   | 
  
  | 72 | 
   | 
    
    	# bug 711978 
   | 
  
  | 73 | 
   | 
    
    	sed -e "s:X11  opengl:X11  OpenGl:" -i configure || die 
   | 
  
   | 
  78 | 
    
    	vdr-plugin-2_src_prepare 
   | 
  
  | 74 | 
  79 | 
    
    
   | 
  
  | 75 | 
   | 
    
    	# bug 771036,780462 do not call cc directly 
   | 
  
  | 76 | 
   | 
    
    	eapply "${FILESDIR}/${P}_no-gcc.patch"
   | 
  
  | 77 | 
   | 
    
    	eapply "${WORKDIR}/${P}_clang.patch"
   | 
  
   | 
  80 | 
    
    	# UINT64_C is needed by ffmpeg headers 
   | 
  
   | 
  81 | 
    
    	append-cxxflags -D__STDC_CONSTANT_MACROS 
   | 
  
  | 78 | 
  82 | 
    
    } 
   | 
  
  | 79 | 
  83 | 
    
    
   | 
  
  | 80 | 
  84 | 
    
    src_configure() {
   | 
  
| ... | ... |  | 
  | 94 | 
  98 | 
    
    		$(use_enable X xshm) \ 
   | 
  
  | 95 | 
  99 | 
    
    		$(use_enable X xdpms) \ 
   | 
  
  | 96 | 
  100 | 
    
    		$(use_enable X xshape) \ 
   | 
  
  | 97 | 
   | 
    
    		$(use_enable X xrandr) \ 
   | 
  
  | 98 | 
  101 | 
    
    		$(use_enable X xrender) \ 
   | 
  
  | 99 | 
  102 | 
    
    		$(use_enable fbcon fb) \ 
   | 
  
  | 100 | 
  103 | 
    
    		$(use_enable vdr) \ 
   | 
  
  | 101 | 
  104 | 
    
    		$(use_enable xine libxine) \ 
   | 
  
  | 102 | 
  105 | 
    
    		--disable-libextractor \ 
   | 
  
  | 103 | 
  106 | 
    
    		$(use_enable caps libcap) \ 
   | 
  
  | 104 | 
   | 
    
    		$(use_enable cec libcec) \ 
   | 
  
  | 105 | 
  107 | 
    
    		$(use_enable jpeg libjpeg) \ 
   | 
  
  | 106 | 
  108 | 
    
    		$(use_enable xinerama) \ 
   | 
  
   | 
  109 | 
    
    		$(use_enable vdpau) \ 
   | 
  
  | 107 | 
  110 | 
    
    		$(use_enable dbus dbus-glib-1) \ 
   | 
  
  | 108 | 
  111 | 
    
    		$(use_enable nls i18n) \ 
   | 
  
  | 109 | 
  112 | 
    
    		$(use_enable bluray libbluray) \ 
   | 
  
  | 110 | 
  113 | 
    
    		$(use_enable opengl) \ 
   | 
  
   | 
  114 | 
    
    		$(use_enable cec libcec) \ 
   | 
  
  | 111 | 
  115 | 
    
    		${myconf} \
   | 
  
  | 112 | 
  116 | 
    
    		|| die 
   | 
  
  | 113 | 
   | 
    
    
   | 
  
  | 114 | 
   | 
    
    	# UINT64_C is needed by ffmpeg headers 
   | 
  
  | 115 | 
   | 
    
    	append-cxxflags -D__STDC_CONSTANT_MACROS 
   | 
  
  | 116 | 
  117 | 
    
    } 
   | 
  
  | 117 | 
  118 | 
    
    
   | 
  
  | 118 | 
  119 | 
    
    src_install() {
   |