summaryrefslogtreecommitdiff
path: root/media-libs/mesa-amber
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /media-libs/mesa-amber
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'media-libs/mesa-amber')
-rw-r--r--media-libs/mesa-amber/Manifest3
-rw-r--r--media-libs/mesa-amber/mesa-amber-21.3.9.ebuild206
-rw-r--r--media-libs/mesa-amber/metadata.xml18
3 files changed, 227 insertions, 0 deletions
diff --git a/media-libs/mesa-amber/Manifest b/media-libs/mesa-amber/Manifest
new file mode 100644
index 000000000000..ea28ad045bfd
--- /dev/null
+++ b/media-libs/mesa-amber/Manifest
@@ -0,0 +1,3 @@
+DIST mesa-21.3.9.tar.xz 16607716 BLAKE2B 79669f9492c505b1729c526adf5a8261737b6088bdf01db654a0dca8ba22600ec985b574edfeee3a28c76e6e0f815782362973876e1d75b58f4417f45df70add SHA512 4cec6f4f50f444fcd327f7c40f8899c2f265e348e121455262b540b1f890a1468bbea59965af0876c548fa97aa0a05a1b23fa6ca7d308bd60328cfdeab757684
+EBUILD mesa-amber-21.3.9.ebuild 5065 BLAKE2B 87d399d883c134ef9c8092d026a2c33612458cf7c08b4dd62fd1c4591b6ea7c8b1de6e75b0657bbecfd3427e3bcac098ac620e301213efd3195102f0c2a155fe SHA512 f4496def2b22aaf9b60c43643ffd33e04e274bd55eff11a0a5f0028cf5376783f0c2b27e19586a31866ba5250c9d7978ab3922e28b7617d07d87d46ecfb255e7
+MISC metadata.xml 613 BLAKE2B ac069a22588af5a3fe4e3efdfd529f324b08632160b08b05696481639aaf0a927670a7b931c8d348c239ce9a7f185cda7d1c0e8f646989f482f64e1a2a3cb1f7 SHA512 f1d38903835b522f0fd40eeffee5f4eac783f25ce3f1f173baa5f3fd60f4104242753cfc63b54d3d27bb19bb952b83e7cf424b1a83c3085327fcade44b1848f9
diff --git a/media-libs/mesa-amber/mesa-amber-21.3.9.ebuild b/media-libs/mesa-amber/mesa-amber-21.3.9.ebuild
new file mode 100644
index 000000000000..4d776506cd8f
--- /dev/null
+++ b/media-libs/mesa-amber/mesa-amber-21.3.9.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit meson-multilib python-any-r1 linux-info
+
+MY_P="${P/-amber}"
+MY_P="${MY_P/_/-}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+ inherit git-r3
+else
+ SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="amber"
+RESTRICT="!test? ( test )"
+
+RADEON_CARDS="r100 r200 radeon"
+VIDEO_CARDS="${RADEON_CARDS} i915 i965 intel nouveau"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ cpu_flags_x86_sse2 debug gles1 +gles2 selinux test valgrind wayland +X
+ +zstd"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.107"
+RDEPEND="
+ !<=media-libs/mesa-21.3.8
+ !media-libs/mesa:amber
+ media-libs/mesa[${MULTILIB_USEDEP}]
+
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
+ selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.8
+ )
+ ${LIBDRM_DEPSTRING}[video_cards_nouveau?,${MULTILIB_USEDEP}]
+ video_cards_intel? (
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ )
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ X? (
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )
+ X? (
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+ wayland? ( dev-util/wayland-scanner )
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+ usr/lib/libGLX_amber.so.0.0.0
+)"
+
+python_check_deps() {
+ has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ if use video_cards_i965; then
+ if kernel_is -ge 5 11 3; then
+ CONFIG_CHECK="~KCMP"
+ elif kernel_is -ge 5 11; then
+ CONFIG_CHECK="~CHECKPOINT_RESTORE"
+ elif kernel_is -ge 5 10 20; then
+ CONFIG_CHECK="~KCMP"
+ else
+ CONFIG_CHECK="~CHECKPOINT_RESTORE"
+ fi
+ linux-info_pkg_setup
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local emesonargs=()
+
+ # Intel code
+ dri_driver_enable video_cards_i915 i915
+ dri_driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ dri_driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ dri_driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ dri_driver_enable video_cards_r100 r100
+ dri_driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ dri_driver_enable video_cards_radeon r100 r200
+ fi
+
+ local platforms
+ use X && platforms+="x11"
+ use wayland && platforms+=",wayland"
+ emesonargs+=(-Dplatforms=${platforms#,})
+
+ driver_list() {
+ local drivers="$(sort -u <<< "${1// /$'\n'}")"
+ echo "${drivers//$'\n'/,}"
+ }
+
+ emesonargs+=(
+ -Damber=true
+ $(meson_use test build-tests)
+ -Dglx=$(usex X dri disabled)
+ -Dshared-glapi=enabled
+ -Ddri3=enabled
+ -Degl=enabled
+ -Dgbm=enabled
+ $(meson_feature gles1)
+ $(meson_feature gles2)
+ -Dglvnd=true
+ -Dosmesa=false
+ -Dllvm=disabled
+ $(meson_use selinux)
+ $(meson_feature zstd)
+ $(meson_use cpu_flags_x86_sse2 sse2)
+ -Dvalgrind=$(usex valgrind auto disabled)
+ -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
+ -Dgallium-drivers=''
+ -Dvulkan-drivers=''
+ --buildtype $(usex debug debug plain)
+ -Db_ndebug=$(usex debug false true)
+ )
+ meson_src_configure
+}
+
+multilib_src_test() {
+ meson_src_test -t 100
+}
+
+multilib_src_install_all() {
+ # These are provided by media-libs/mesa:0
+ local files=(
+ "${ED}"/usr/lib*/libgbm.so*
+ "${ED}"/usr/lib*/libglapi.so*
+ "${ED}"/usr/include
+ "${ED}"/usr/lib*/pkgconfig
+ "${ED}"/usr/share/drirc.d/00-mesa-defaults.conf
+ )
+ rm -r "${files[@]}" || die
+
+ # Move i915_dri.so -> i915c_dri.so to not conflict with media-libs/mesa:0.
+ for dridir in "${ED}"/usr/lib*/dri; do
+ if [[ -e ${dridir}/i915_dri.so ]]; then
+ mv ${dridir}/i915{,c}_dri.so || die
+ fi
+ done
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+dri_driver_enable() {
+ if [[ $1 == -- ]] || use $1; then
+ shift
+ DRI_DRIVERS+=("$@")
+ fi
+}
diff --git a/media-libs/mesa-amber/metadata.xml b/media-libs/mesa-amber/metadata.xml
new file mode 100644
index 000000000000..5b198339dc3a
--- /dev/null
+++ b/media-libs/mesa-amber/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>x11@gentoo.org</email>
+ <name>X11</name>
+ </maintainer>
+ <use>
+ <flag name="gles1">Enable GLESv1 support.</flag>
+ <flag name="gles2">Enable GLESv2 support.</flag>
+ <flag name="valgrind">Compile in valgrind memory hints</flag>
+ <flag name="wayland">Enable support for dev-libs/wayland</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:mesa3d:mesa</remote-id>
+ <remote-id type="sourceforge">mesa3d</remote-id>
+ </upstream>
+</pkgmetadata>