From 0f558761aa2dee1017b4751e4017205e015a9560 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Jun 2022 12:04:12 +0100 Subject: gentoo resync : 29.12.2022 --- x11-apps/mesa-progs/Manifest | 6 +- .../files/8.5.0-Disable-things-we-don-t-want.patch | 254 +++++++++++++++++++++ .../files/9999-Disable-things-we-don-t-want.patch | 254 +++++++++++++++++++++ x11-apps/mesa-progs/mesa-progs-8.5.0.ebuild | 78 +++++++ x11-apps/mesa-progs/mesa-progs-9999.ebuild | 91 ++++---- 5 files changed, 641 insertions(+), 42 deletions(-) create mode 100644 x11-apps/mesa-progs/files/8.5.0-Disable-things-we-don-t-want.patch create mode 100644 x11-apps/mesa-progs/files/9999-Disable-things-we-don-t-want.patch create mode 100644 x11-apps/mesa-progs/mesa-progs-8.5.0.ebuild (limited to 'x11-apps/mesa-progs') diff --git a/x11-apps/mesa-progs/Manifest b/x11-apps/mesa-progs/Manifest index cb3d3d5773a7..e9e33e908912 100644 --- a/x11-apps/mesa-progs/Manifest +++ b/x11-apps/mesa-progs/Manifest @@ -1,5 +1,9 @@ +AUX 8.5.0-Disable-things-we-don-t-want.patch 5868 BLAKE2B ed8b2e78ce7e05076a74f7ec415afa315db6d6e197936f03a2cb2a322d9ea33e2cdbb15431cc67d26c40ae07045d941fcad357a61eee56e1c26b6b21d1ad0e59 SHA512 8546b12244339fecbf49ce6d1e32701eefaf915d482adecc58c1190cdcf9a918ea7a135988381173c4742bb3b1ba78fcb96285ce6056744f0ed0cb4395855945 +AUX 9999-Disable-things-we-don-t-want.patch 5920 BLAKE2B 91a2a1e986d351d1224c28cc03af4128cce698609a0544e28559539ffc166787010a18423ce47e8cf574ddbfedf755e833d32cbe1f76f7d72bac504882f079fc SHA512 1b7a0ed30b2deb472c47408cc51a5733404c655653dfd7e25c15fc17e0f4da04012506c4b1de3fead689fe7315ad202ed55fb5b4ec884a4d0946c5c895377564 AUX mesa-progs-8.4.0-improve-printing.patch 11963 BLAKE2B ad2dd57bf0959da6253d0e5c19523e701d03b9d4465564ff3f7e1462e2f36db0ef6eca46ad847f8f92f44fb91c46e87425d430c47c13f7efc130540071fa3ac8 SHA512 31048947ba19b03277d5dabff8bf3209274e9c95da3b33d9e27c3c1cdf71c3027cc0591ee27bdc0e8dff506da2f0601911cdf5899594674d2dd178204db3085f DIST mesa-demos-8.4.0.tar.bz2 10073259 BLAKE2B d251e705c6e3d2fe959161d736401fd06ba267a9c389341098373670b6f44ca7cdb451d96e94e3b22f006b696a9b19e38096423f6438544539f46beda91c03f4 SHA512 b72d03cad36e0535ff18dcfb222ec4200064b9264f6da51a6e5f03b0dd912abe188bc1d600b6698de3ce6f63b28d2ce01565886ca8e7079edc4967fbf2fb0957 +DIST mesa-demos-8.5.0.tar.bz2 10367517 BLAKE2B 60e9edfcfe6d28f73964b81ae4e016fdbeb45d9d6d91de71bf736c86fa6181749f2e12729c8c716f6e6f5d4e39075de131877d1f09c3e511a4338b0f44ddb6a6 SHA512 df6a7f09638ca389d6e8bc569e599dcc59c9aa280bcfb95976d83e5cd3edfe74bb3a31f0953956dc16faa540ee5b09990e3377e1341d836fc527e50ace6e60b8 EBUILD mesa-progs-8.4.0-r1.ebuild 1913 BLAKE2B 835635568c965741f3ad48e4921011ac4aabd0b5032a05ee7e53894942dccac78f9bdb5767b9ce09182b0f7819899f4163c55b6d91b1a69c15d2bdb700462584 SHA512 0bba7f77b310f3a0511acb711aeec47b69ffe29b35bc35e374dc918247820121ba17dd2bc3d7ede88cc2cb0c744a653284aa9e3d0a691157326a46b8ba051aa7 -EBUILD mesa-progs-9999.ebuild 1876 BLAKE2B a9072b8eb308a99945813384d671f87f06a2d61dc6bf0795fb8c54230856bab5ca545a454fdb16334c0fe19a9e5c4b3ce0dfce225d256bb23588d9328d55bacc SHA512 92a4f6e7e976c0a99ad1870a44659c2aff9f20bdf70d48dded22bf2b28343814d11fbd60cfbfae95c651bfdd1dc2f07cd4d6da517aba90fb97e74a2c3ab15500 +EBUILD mesa-progs-8.5.0.ebuild 1803 BLAKE2B c543e47eed51edabec98ce14490901003738fc853a8ef83d85023cf3e95b76ff698cae0b677b271f8a47ac3ed1aaced2bb33d887d87ee3a3cd5907bfbf703d91 SHA512 a48d3c9a8ee6b0efab638120b447df5b35eae83336c132347fa1439a1fd0a1fab2e7914a112809b83ad83f7b867a11ddb0a4bb51fe067d71e93a65d170b0531d +EBUILD mesa-progs-9999.ebuild 1802 BLAKE2B e000a568251ea02ac0abdbdc8102f05b7eee49633699c07dde71d6783d29b656fbda85b80aa60456692dbdb262a077636cc2d95ac80457c14f5ddb60844ed4b4 SHA512 4ce30ae2375e523dcf5ce89340bbd6ed7dd440d590ea8608b4bf5692e2108bda2afbe2730edffebe2a7c33c9befa995d53294ddbf1e5268fbc2a42b131f59a03 MISC metadata.xml 476 BLAKE2B 2f40a2161f77a5ac55a486f6570c4fca5b85f6c28189f22c8e8a373ffb0fe69329a83babb777a53d4f73c87e3ae1ba54cd3e0fcac25b62ce19e55505ce6d602d SHA512 f6c0f2910974cfb42cf748287bed94281cc7753c2632dd4fa4dc6baa0c261d1c408f792c259c4d66251a6449698aa9dcae8690b9f5aea687f73868571d9a48a6 diff --git a/x11-apps/mesa-progs/files/8.5.0-Disable-things-we-don-t-want.patch b/x11-apps/mesa-progs/files/8.5.0-Disable-things-we-don-t-want.patch new file mode 100644 index 000000000000..666f568e461f --- /dev/null +++ b/x11-apps/mesa-progs/files/8.5.0-Disable-things-we-don-t-want.patch @@ -0,0 +1,254 @@ +From caa6f31f1032f21756ab327429702feb4381045e Mon Sep 17 00:00:00 2001 +From: Matt Turner +Date: Mon, 30 May 2022 12:16:24 -0400 +Subject: [PATCH] Disable things we don't want + +--- + meson.build | 11 +++-------- + src/egl/opengl/meson.build | 29 ---------------------------- + src/egl/opengles2/meson.build | 5 ----- + src/glad/meson.build | 17 ----------------- + src/meson.build | 2 -- + src/util/gl_wrap.h | 2 -- + src/util/meson.build | 20 ------------------- + src/xdemos/meson.build | 36 ----------------------------------- + 8 files changed, 3 insertions(+), 119 deletions(-) + +diff --git a/meson.build b/meson.build +index e1968fab..9d59c1ec 100644 +--- a/meson.build ++++ b/meson.build +@@ -75,14 +75,7 @@ endif + + dep_threads = dependency('threads') + +-dep_glu = dependency('glu', required : dep_x11.found()) +-if not dep_glu.found() +- _glu_name = 'GLU' +- if host_machine.system() == 'windows' +- _glu_name = 'glu32' +- endif +- dep_glu = cc.find_library(_glu_name, has_headers: 'GL/glu.h') +-endif ++dep_glu = disabler() + + # GBM is needed for EGL on KMS + dep_gbm = dependency('gbm', required : false, disabler : true) +@@ -117,6 +110,8 @@ else + ) + endif + ++dep_glut = disabler() ++ + if dep_glut.found() and cc.has_function('glutInitContextProfile', + include_directories: glut_incdir, + prefix : '#include ') +diff --git a/src/egl/opengl/meson.build b/src/egl/opengl/meson.build +index ba7cadc3..789b25a5 100644 +--- a/src/egl/opengl/meson.build ++++ b/src/egl/opengl/meson.build +@@ -4,41 +4,12 @@ executable( + 'eglgears_x11', files('eglgears.c'), + dependencies: [_deps, idep_eglut_x11] + ) +-executable( +- 'egltri_x11', files('egltri.c'), +- dependencies: [_deps, idep_eglut_x11] +-) +-executable( +- 'xeglgears', files('xeglgears.c'), +- dependencies: [_deps, dep_egl, dep_x11] +-) +-executable( +- 'xeglthreads', files('xeglthreads.c'), +- dependencies: [_deps, dep_x11] +-) +- + executable( + 'eglgears_wayland', files('eglgears.c'), + dependencies: [_deps, idep_eglut_wayland] + ) +-executable( +- 'egltri_wayland', files('egltri.c'), +- dependencies: [_deps, idep_eglut_wayland] +-) +- +-executable( +- 'eglkms', 'eglkms.c', +- dependencies: [_deps, dep_drm, dep_gbm, dep_egl] +-) +- + executable( + 'eglinfo', 'eglinfo.c', + dependencies: [dep_egl], + install: true + ) +- +-executable( +- 'peglgears', 'peglgears.c', +- dependencies: [dep_gl, dep_egl, dep_m, idep_util] +-) +- +diff --git a/src/egl/opengles2/meson.build b/src/egl/opengles2/meson.build +index 59f69ed7..7137a961 100644 +--- a/src/egl/opengles2/meson.build ++++ b/src/egl/opengles2/meson.build +@@ -9,11 +9,6 @@ executable( + dependencies: [dep_gles2, idep_eglut_x11, dep_m], + install: true + ) +-executable( +- 'es2tri', files('es2tri.c'), +- dependencies: [_deps_x11, dep_m], +- install: true +-) + executable( + 'es2gears_wayland', files('es2gears.c'), + dependencies: [dep_gles2, idep_eglut_wayland, dep_m], +diff --git a/src/glad/meson.build b/src/glad/meson.build +index 2d107609..23dacd45 100644 +--- a/src/glad/meson.build ++++ b/src/glad/meson.build +@@ -19,20 +19,3 @@ + # SOFTWARE. + + inc_glad = include_directories('include') +- +-_libglad_files = files('src/glad.c') +-if host_machine.system() == 'windows' +- _libglad_files += files('src/glad_wgl.c') +-endif +- +-_libglad = static_library( +- 'glad', +- _libglad_files, +- include_directories: inc_glad +-) +- +-idep_glad = declare_dependency( +- link_with: _libglad, +- dependencies: dep_dl, +- include_directories: inc_glad, +-) +diff --git a/src/meson.build b/src/meson.build +index 39cac78d..4d4abbf8 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -55,5 +55,3 @@ endif + if host_machine.system() == 'windows' + subdir('wgl') + endif +- +-subdir('data') +diff --git a/src/util/gl_wrap.h b/src/util/gl_wrap.h +index b2ff9c8f..f482df5e 100644 +--- a/src/util/gl_wrap.h ++++ b/src/util/gl_wrap.h +@@ -7,10 +7,8 @@ + + #ifdef __APPLE__ + # include +-# include + #else + # include +-# include + #endif + + #ifndef GLAPIENTRY +diff --git a/src/util/meson.build b/src/util/meson.build +index 9168aecf..066073cc 100644 +--- a/src/util/meson.build ++++ b/src/util/meson.build +@@ -20,26 +20,6 @@ + + inc_util = include_directories('.') + +-files_libutil = files( +- 'readtex.c', +- 'showbuffer.c', +- 'trackball.c', +-) +- +-_deps = [] +-if dep_glut.found() +- files_libutil += files('shaderutil.c') +- _deps += dep_glut +-endif +- +-_libutil = static_library( +- 'util', +- files_libutil, +- include_directories: inc_glad, +- dependencies: _deps, +-) +- + idep_util = declare_dependency( +- link_with: _libutil, + include_directories: inc_util, + ) +diff --git a/src/xdemos/meson.build b/src/xdemos/meson.build +index d6d5d5d5..ce26699f 100644 +--- a/src/xdemos/meson.build ++++ b/src/xdemos/meson.build +@@ -21,25 +21,7 @@ + glx_deps = [dep_gl, dep_x11, dep_m] + + progs = [ +- 'glsync', +- 'glxdemo', + 'glxgears', +- 'glxgears_pixmap', +- 'glxcontexts', +- 'glxheads', +- 'glxpixmap', +- 'glxpbdemo', +- 'glxsnoop', +- 'glxswapcontrol', +- 'manywin', +- 'multictx', +- 'offset', +- 'overlay', +- 'shape', +- 'sharedtex', +- 'texture_from_pixmap', +- 'wincopy', +- 'xfont', + ] + foreach p : progs + executable( +@@ -56,23 +38,7 @@ executable( + install: true + ) + +-executable( +- 'xrotfontdemo', +- files('xrotfontdemo.c', 'xuserotfont.c'), +- dependencies: glx_deps, +- install: true +-) +- +-_libpbutil = static_library( +- 'pbutil', +- files('pbutil.c'), +- dependencies: glx_deps +-) +- + pbutil_progs = [ +- 'glxgears_fbconfig', +- 'pbinfo', +- 'pbdemo', + ] + foreach p : pbutil_progs + executable( +@@ -84,8 +50,6 @@ foreach p : pbutil_progs + endforeach + + thread_progs = [ +- 'glthreads', +- 'sharedtex_mt', + ] + foreach p : thread_progs + executable( +-- +2.35.1 + diff --git a/x11-apps/mesa-progs/files/9999-Disable-things-we-don-t-want.patch b/x11-apps/mesa-progs/files/9999-Disable-things-we-don-t-want.patch new file mode 100644 index 000000000000..9d923a9cbc5c --- /dev/null +++ b/x11-apps/mesa-progs/files/9999-Disable-things-we-don-t-want.patch @@ -0,0 +1,254 @@ +From caa6f31f1032f21756ab327429702feb4381045e Mon Sep 17 00:00:00 2001 +From: Matt Turner +Date: Mon, 30 May 2022 12:16:24 -0400 +Subject: [PATCH] Disable things we don't want + +--- + meson.build | 11 +++-------- + src/egl/opengl/meson.build | 29 ---------------------------- + src/egl/opengles2/meson.build | 5 ----- + src/glad/meson.build | 17 ----------------- + src/meson.build | 2 -- + src/util/gl_wrap.h | 2 -- + src/util/meson.build | 20 ------------------- + src/xdemos/meson.build | 36 ----------------------------------- + 8 files changed, 3 insertions(+), 119 deletions(-) + +diff --git a/meson.build b/meson.build +index e1968fab..9d59c1ec 100644 +--- a/meson.build ++++ b/meson.build +@@ -75,14 +75,7 @@ endif + + dep_threads = dependency('threads') + +-dep_glu = dependency('glu', required : dep_x11.found()) +-if not dep_glu.found() +- _glu_name = 'GLU' +- if host_machine.system() == 'windows' +- _glu_name = 'glu32' +- endif +- dep_glu = cc.find_library(_glu_name, has_headers: 'GL/glu.h') +-endif ++dep_glu = disabler() + + # GBM is needed for EGL on KMS + dep_gbm = dependency('gbm', required : false, disabler : true) +@@ -117,6 +110,8 @@ else + ) + endif + ++dep_glut = disabler() ++ + if dep_glut.found() and cc.has_function('glutInitContextProfile', + include_directories: glut_incdir, + prefix : '#include ') +diff --git a/src/egl/opengl/meson.build b/src/egl/opengl/meson.build +index ba7cadc3..789b25a5 100644 +--- a/src/egl/opengl/meson.build ++++ b/src/egl/opengl/meson.build +@@ -4,41 +4,12 @@ executable( + 'eglgears_x11', files('eglgears.c'), + dependencies: [_deps, idep_eglut_x11] + ) +-executable( +- 'egltri_x11', files('egltri.c'), +- dependencies: [_deps, dep_glu, idep_eglut_x11] +-) +-executable( +- 'xeglgears', files('xeglgears.c'), +- dependencies: [_deps, dep_glu, dep_egl, dep_x11] +-) +-executable( +- 'xeglthreads', files('xeglthreads.c'), +- dependencies: [_deps, dep_x11] +-) +- + executable( + 'eglgears_wayland', files('eglgears.c'), + dependencies: [_deps, dep_glu, idep_eglut_wayland] + ) +-executable( +- 'egltri_wayland', files('egltri.c'), +- dependencies: [_deps, dep_glu, idep_eglut_wayland] +-) +- +-executable( +- 'eglkms', 'eglkms.c', +- dependencies: [_deps, dep_drm, dep_gbm, dep_egl] +-) +- + executable( + 'eglinfo', 'eglinfo.c', + dependencies: [dep_egl], + install: true + ) +- +-executable( +- 'peglgears', 'peglgears.c', +- dependencies: [dep_gl, dep_glu, dep_egl, dep_m, idep_util] +-) +- +diff --git a/src/egl/opengles2/meson.build b/src/egl/opengles2/meson.build +index 59f69ed7..7137a961 100644 +--- a/src/egl/opengles2/meson.build ++++ b/src/egl/opengles2/meson.build +@@ -9,11 +9,6 @@ executable( + dependencies: [dep_gles2, idep_eglut_x11, dep_m], + install: true + ) +-executable( +- 'es2tri', files('es2tri.c'), +- dependencies: [_deps_x11, dep_m], +- install: true +-) + executable( + 'es2gears_wayland', files('es2gears.c'), + dependencies: [dep_gles2, idep_eglut_wayland, dep_m], +diff --git a/src/glad/meson.build b/src/glad/meson.build +index 2d107609..23dacd45 100644 +--- a/src/glad/meson.build ++++ b/src/glad/meson.build +@@ -19,20 +19,3 @@ + # SOFTWARE. + + inc_glad = include_directories('include') +- +-_libglad_files = files('src/glad.c') +-if host_machine.system() == 'windows' +- _libglad_files += files('src/glad_wgl.c') +-endif +- +-_libglad = static_library( +- 'glad', +- _libglad_files, +- include_directories: inc_glad +-) +- +-idep_glad = declare_dependency( +- link_with: _libglad, +- dependencies: dep_dl, +- include_directories: inc_glad, +-) +diff --git a/src/meson.build b/src/meson.build +index 39cac78d..4d4abbf8 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -55,5 +55,3 @@ endif + if host_machine.system() == 'windows' + subdir('wgl') + endif +- +-subdir('data') +diff --git a/src/util/gl_wrap.h b/src/util/gl_wrap.h +index b2ff9c8f..f482df5e 100644 +--- a/src/util/gl_wrap.h ++++ b/src/util/gl_wrap.h +@@ -7,10 +7,8 @@ + + #ifdef __APPLE__ + # include +-# include + #else + # include +-# include + #endif + + #ifndef GLAPIENTRY +diff --git a/src/util/meson.build b/src/util/meson.build +index 9168aecf..066073cc 100644 +--- a/src/util/meson.build ++++ b/src/util/meson.build +@@ -20,26 +20,6 @@ + + inc_util = include_directories('.') + +-files_libutil = files( +- 'readtex.c', +- 'showbuffer.c', +- 'trackball.c', +-) +- +-_deps = [dep_glu] +-if dep_glut.found() +- files_libutil += files('shaderutil.c') +- _deps += dep_glut +-endif +- +-_libutil = static_library( +- 'util', +- files_libutil, +- include_directories: inc_glad, +- dependencies: _deps, +-) +- + idep_util = declare_dependency( +- link_with: _libutil, + include_directories: inc_util, + ) +diff --git a/src/xdemos/meson.build b/src/xdemos/meson.build +index d6d5d5d5..ce26699f 100644 +--- a/src/xdemos/meson.build ++++ b/src/xdemos/meson.build +@@ -21,25 +21,7 @@ + glx_deps = [dep_gl, dep_x11, dep_m] + + progs = [ +- 'glsync', +- 'glxdemo', + 'glxgears', +- 'glxgears_pixmap', +- 'glxcontexts', +- 'glxheads', +- 'glxpixmap', +- 'glxpbdemo', +- 'glxsnoop', +- 'glxswapcontrol', +- 'manywin', +- 'multictx', +- 'offset', +- 'overlay', +- 'shape', +- 'sharedtex', +- 'texture_from_pixmap', +- 'wincopy', +- 'xfont', + ] + foreach p : progs + executable( +@@ -56,23 +38,7 @@ executable( + install: true + ) + +-executable( +- 'xrotfontdemo', +- files('xrotfontdemo.c', 'xuserotfont.c'), +- dependencies: glx_deps, +- install: true +-) +- +-_libpbutil = static_library( +- 'pbutil', +- files('pbutil.c'), +- dependencies: glx_deps +-) +- + pbutil_progs = [ +- 'glxgears_fbconfig', +- 'pbinfo', +- 'pbdemo', + ] + foreach p : pbutil_progs + executable( +@@ -84,8 +50,6 @@ foreach p : pbutil_progs + endforeach + + thread_progs = [ +- 'glthreads', +- 'sharedtex_mt', + ] + foreach p : thread_progs + executable( +-- +2.35.1 + diff --git a/x11-apps/mesa-progs/mesa-progs-8.5.0.ebuild b/x11-apps/mesa-progs/mesa-progs-8.5.0.ebuild new file mode 100644 index 000000000000..0de99d7b802b --- /dev/null +++ b/x11-apps/mesa-progs/mesa-progs-8.5.0.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson-multilib + +MY_PN="${PN/progs/demos}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Mesa's OpenGL utility and demo programs (glxgears and glxinfo)" +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/ https://gitlab.freedesktop.org/mesa/demos" +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/demos.git" +else + SRC_URI="https://mesa.freedesktop.org/archive/demos/${MY_P}.tar.bz2 + https://mesa.freedesktop.org/archive/demos/${PV}/${MY_P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" + S="${WORKDIR}/${MY_P}" +fi +LICENSE="LGPL-2" +SLOT="0" +IUSE="gles2 wayland X" + +RDEPEND=" + media-libs/mesa[${MULTILIB_USEDEP},egl(+),gles2?,wayland?,X?] + wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] ) + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + ) +" +DEPEND="${RDEPEND} + wayland? ( >=dev-libs/wayland-protocols-1.12 ) + X? ( x11-base/xorg-proto ) +" +BDEPEND=" + virtual/pkgconfig + wayland? ( dev-util/wayland-scanner ) +" + +PATCHES=( + "${FILESDIR}"/8.5.0-Disable-things-we-don-t-want.patch +) + +pkg_setup() { + MULTILIB_CHOST_TOOLS+=( + /usr/bin/eglinfo + ) + + use X && MULTILIB_CHOST_TOOLS+=( + /usr/bin/glxgears + /usr/bin/glxinfo + ) + + use gles2 && use X && MULTILIB_CHOST_TOOLS+=( + /usr/bin/es2_info + /usr/bin/es2gears_x11 + ) + + use gles2 && use wayland && MULTILIB_CHOST_TOOLS+=( + /usr/bin/es2gears_wayland + ) +} + +multilib_src_configure() { + local emesonargs=( + -Dlibdrm=disabled + -Degl=enabled + -Dgles1=disabled + $(meson_feature gles2) + -Dosmesa=disabled + $(meson_feature wayland) + $(meson_feature X x11) + ) + meson_src_configure +} diff --git a/x11-apps/mesa-progs/mesa-progs-9999.ebuild b/x11-apps/mesa-progs/mesa-progs-9999.ebuild index ac2f9b7db41f..cc49098d3e76 100644 --- a/x11-apps/mesa-progs/mesa-progs-9999.ebuild +++ b/x11-apps/mesa-progs/mesa-progs-9999.ebuild @@ -1,7 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + +inherit meson-multilib MY_PN="${PN/progs/demos}" MY_P="${MY_PN}-${PV}" @@ -9,10 +11,8 @@ MY_P="${MY_PN}-${PV}" DESCRIPTION="Mesa's OpenGL utility and demo programs (glxgears and glxinfo)" HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/ https://gitlab.freedesktop.org/mesa/demos" if [[ ${PV} = 9999* ]]; then - inherit autotools git-r3 + inherit git-r3 EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/demos.git" - EGIT_CHECKOUT_DIR="${S}" - EXPERIMENTAL="true" else SRC_URI="https://mesa.freedesktop.org/archive/demos/${MY_P}.tar.bz2 https://mesa.freedesktop.org/archive/demos/${PV}/${MY_P}.tar.bz2" @@ -21,49 +21,58 @@ else fi LICENSE="LGPL-2" SLOT="0" -IUSE="egl gles2" +IUSE="gles2 wayland X" RDEPEND=" - media-libs/mesa[egl(+)?,gles2?] - virtual/opengl - x11-libs/libX11" + media-libs/mesa[${MULTILIB_USEDEP},egl(+),gles2?,wayland?,X?] + wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] ) + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + ) +" DEPEND="${RDEPEND} - virtual/glu - x11-base/xorg-proto" -BDEPEND="sys-apps/grep - sys-apps/file" + wayland? ( >=dev-libs/wayland-protocols-1.12 ) + X? ( x11-base/xorg-proto ) +" +BDEPEND=" + virtual/pkgconfig + wayland? ( dev-util/wayland-scanner ) +" -src_prepare() { - default - [[ ${PV} = 9999* ]] && eautoreconf -} +PATCHES=( + "${FILESDIR}"/9999-Disable-things-we-don-t-want.patch +) -src_compile() { - emake -C src/glad libglad.la - emake -C src/xdemos glxgears glxinfo +pkg_setup() { + MULTILIB_CHOST_TOOLS+=( + /usr/bin/eglinfo + ) - if use egl; then - emake LDLIBS="-lEGL" -C src/egl/opengl/ eglinfo - emake -C src/egl/eglut/ libeglut_x11.la - emake LDLIBS="-lGL -lEGL -lX11 -lm" -C src/egl/opengl/ eglgears_x11 + use X && MULTILIB_CHOST_TOOLS+=( + /usr/bin/glxgears + /usr/bin/glxinfo + ) - if use gles2; then - emake LDLIBS="-lGLESv2 -lEGL -lX11" -C src/egl/opengles2/ es2_info - emake LDLIBS="-lGLESv2 -lEGL -lX11 -lm" -C src/egl/opengles2/ es2gears_x11 - fi - fi -} + use gles2 && use X && MULTILIB_CHOST_TOOLS+=( + /usr/bin/es2_info + /usr/bin/es2gears_x11 + ) -src_install() { - local demo='src/xdemos' - if use egl; then - demo="${demo} src/egl/opengl" - - use gles2 && demo="${demo} src/egl/opengles2" - fi + use gles2 && use wayland && MULTILIB_CHOST_TOOLS+=( + /usr/bin/es2gears_wayland + ) +} - # Ensure only the binaries are installed and not a similarly named wrapper script - find ${demo} -type f -print0 | - xargs -0 file | grep executable | grep ELF | cut -f 1 -d : | - xargs -I '{}' dobin '{}' || die +multilib_src_configure() { + local emesonargs=( + -Dlibdrm=disabled + -Degl=enabled + -Dgles1=disabled + $(meson_feature gles2) + -Dosmesa=disabled + $(meson_feature wayland) + $(meson_feature X x11) + ) + meson_src_configure } -- cgit v1.2.3