Created attachment 520816 [details, diff] Add egl USE flag to libepoxy-1.4.3 Hello. The following patch just adds egl USE flag to media-libs/libepoxy-1.4.3 ebuild. It will make possible, for example, to build things like webkit-gtk without the need of hardcoded dependency for mesa.
With your patch, and without Mesa installed, I get /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3/test/headerguards.c:50:10: fatal error: GL/gl.h: No such file or directory #include <GL/gl.h> ^~~~~~~~~ compilation terminated. when compiling libepoxy. I suspect you have some other libGL installed.
No, I tested that with absolutely clean 64-bit fresh chrooted gentoo environment with no mesa package installed and made sure beforehand that n libGL* in /usr/lib64/ I could pass both USE="X -egl" and USE="X egl" compilations without any trouble. Even that test case, test/headerguards.c passed for me successfully but for some reason giving USE="test" did not trigger the testing phase for me so I had to do it the hard way: USE="X egl" ebuild /usr/portage/media-libs/libepoxy/libepoxy-1.4.3.ebuild test I made also sure that egl/-egl will tricker the --enable-egl/--disable-egl configure switch like below: USE="X egl" emerge -a libepoxy [ebuild N ] app-eselect/eselect-opengl-1.3.1-r4 [ebuild N ] x11-proto/xf86vidmodeproto-2.3.1-r1 [ebuild N ] x11-libs/libdrm-2.4.88 USE="static-libs -libkms -valgrind" VIDEO_CARDS="-amdgpu (-exynos) (-freedreno) -intel -nouveau (-omap) -radeon (-tegra) (-vc4) (-vivante) -vmware" [ebuild N ] x11-libs/libxshmfence-1.2 USE="static-libs" [ebuild N ] x11-proto/xf86driproto-2.1.1-r1 [ebuild N ] x11-proto/dri2proto-2.8-r1 [ebuild N ] x11-proto/glproto-1.4.17-r1 [ebuild N ] x11-libs/libXxf86vm-1.1.4 USE="static-libs" [ebuild N ] media-libs/mesa-17.2.8 USE="bindist egl nptl -classic -d3d9 -debug -dri3 -gallium -gbm -gles1 -gles2 -llvm -opencl -openmax -osmesa -pax_kernel -pic (-selinux) -unwind -vaapi -valgrind -vdpau -vulkan -wayland -xa -xvmc" VIDEO_CARDS="(-freedreno) -i915 -i965 (-imx) -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware" [ebuild R ~] media-libs/libepoxy-1.4.3 USE="egl*" Would you like to merge these packages? [Yes/No] <...SNIP...> libepoxy-1.4.3.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking libepoxy-1.4.3.tar.gz to /var/tmp/portage/media-libs/libepoxy-1.4.3/work >>> Source unpacked in /var/tmp/portage/media-libs/libepoxy-1.4.3/work >>> Preparing source in /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3 ... * Running eautoreconf in '/var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3' ... * Running libtoolize --install --copy --force --automake ... [ ok ] * Running aclocal -I m4 ... [ ok ] * Running autoconf --force ... [ ok ] * Running autoheader ... [ ok ] * Running automake --add-missing --copy --foreign --force-missing ... [ ok ] * Running elibtoolize in: libepoxy-1.4.3/ * Applying portage/1.2.0 patch ... * Applying sed/1.5.6 patch ... * Applying as-needed/2.4.3 patch ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3 ... * abi_x86_64.amd64: running multilib-minimal_abi_src_configure * econf: updating libepoxy-1.4.3/config.guess with /usr/share/gnuconfig/config.guess * econf: updating libepoxy-1.4.3/config.sub with /usr/share/gnuconfig/config.sub /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/libepoxy-1.4.3 --htmldir=/usr/share/doc/libepoxy-1.4.3/html --libdir=/usr/lib64 --enable-glx --enable-egl <...SNIP...> checking for x11... yes checking for gl... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating epoxy.pc config.status: creating Makefile config.status: creating include/epoxy/Makefile config.status: creating src/Makefile config.status: creating test/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands EGL: yes GLX: yes WGL: no PYTHON: /usr/bin/python3.5 ************************************************************ Without egl, no mesa pulled in and passes --disable-egl correctly USE="X -egl" emerge -a libepoxy USE="X -egl" ebuild /usr/portage/media-libs/libepoxy/libepoxy-1.4.3.ebuild configure * libepoxy-1.4.3.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] openpty failed: 'out of pty devices' >>> Unpacking source... >>> Unpacking libepoxy-1.4.3.tar.gz to /var/tmp/portage/media-libs/libepoxy-1.4.3/work >>> Source unpacked in /var/tmp/portage/media-libs/libepoxy-1.4.3/work >>> Preparing source in /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3 ... * Running eautoreconf in '/var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3' ... * Running libtoolize --install --copy --force --automake ... [ ok ] * Running aclocal -I m4 ... [ ok ] * Running autoconf --force ... [ ok ] * Running autoheader ... [ ok ] * Running automake --add-missing --copy --foreign --force-missing ... [ ok ] * Running elibtoolize in: libepoxy-1.4.3/ * Applying portage/1.2.0 patch ... * Applying sed/1.5.6 patch ... * Applying as-needed/2.4.3 patch ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3 ... * abi_x86_64.amd64: running multilib-minimal_abi_src_configure * econf: updating libepoxy-1.4.3/config.guess with /usr/share/gnuconfig/config.guess * econf: updating libepoxy-1.4.3/config.sub with /usr/share/gnuconfig/config.sub /var/tmp/portage/media-libs/libepoxy-1.4.3/work/libepoxy-1.4.3/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/libepoxy-1.4.3 --htmldir=/usr/share/doc/libepoxy-1.4.3/html --libdir=/usr/lib64 --enable-glx --disable-egl <...SNIP...> checking for x11... yes checking for gl... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating epoxy.pc config.status: creating Makefile config.status: creating include/epoxy/Makefile config.status: creating src/Makefile config.status: creating test/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands EGL: no GLX: yes WGL: no PYTHON: /usr/bin/python3.5 >>> Source configured.
That test/headerguards.c looks funny BTW, why does it list several duplicates like these and more ? #ifdef BUILD_EGL #include <epoxy/egl.h> #include <epoxy/egl.h> #endif #ifdef BUILD_GLX #include <epoxy/glx.h> #include <epoxy/glx.h> #endif
I just fixed bug 610608 (adding Mesa as an RDEPEND of libepoxy). I tried again to make libepoxy compile without Mesa, but couldn't. I've never been able to do that successfully, so I'm not sure how you're doing it. libepoxy doesn't just depend on Mesa for EGL, so I can't see how disabling EGL support could help. And if libepoxy depends on Mesa anyway, there's no point in making EGL optional. Marking as CANTFIX. If I'm wrong, please feel free to try to explain.