diff --git a/graphics/igt-gpu-tools/Makefile b/graphics/igt-gpu-tools/Makefile --- a/graphics/igt-gpu-tools/Makefile +++ b/graphics/igt-gpu-tools/Makefile @@ -12,6 +12,8 @@ BUILD_DEPENDS= rst2man:textproc/py-docutils@${PY_FLAVOR} LIB_DEPENDS= libdrm.so:graphics/libdrm \ + libdrm_amdgpu.so:graphics/libdrm~amdgpu \ + libdrm_intel.so:graphics/libdrm~intel \ libdw.so:devel/elfutils \ libpciaccess.so:devel/libpciaccess \ libudev.so:devel/libudev-devd diff --git a/graphics/intel-backlight/Makefile b/graphics/intel-backlight/Makefile --- a/graphics/intel-backlight/Makefile +++ b/graphics/intel-backlight/Makefile @@ -14,6 +14,7 @@ ONLY_FOR_ARCHS_REASON= this hardware is only found on Intel x86 systems LIB_DEPENDS= libdrm.so:graphics/libdrm \ + libdrm_intel.so:graphics/libdrm~intel \ libpciaccess.so:devel/libpciaccess USE_GITHUB= yes diff --git a/graphics/libdrm/Makefile b/graphics/libdrm/Makefile --- a/graphics/libdrm/Makefile +++ b/graphics/libdrm/Makefile @@ -11,22 +11,23 @@ LICENSE= MIT +SUBPACKAGES?= amdgpu radeon tools + BUILD_DEPENDS= rst2man:textproc/py-docutils LIB_DEPENDS= libpciaccess.so:devel/libpciaccess +SELF_DEPENDS.amdgpu= main +SELF_DEPENDS.radeon= main +SELF_DEPENDS.intel= main +SELF_DEPENDS.vmwgfx= main +SELF_DEPENDS.tools= main + USES= gnome meson pkgconfig tar:xz USE_LDCONFIG= yes MESON_ARGS= -Dvalgrind=disabled -OPTIONS_DEFINE= TESTS -OPTIONS_SUB= yes - -TESTS_DESC= Build and install test programs - -TESTS_MESON_TRUE= install-test-programs - # avoid circular dependency in case cairo supports OpenGL (cairo->mesa-libs->libdrm->cairo) -CONFIGURE_ARGS+= -Dcairo-tests=disabled +MESON_ARGS+= -Dcairo-tests=disabled # Disable some targets known to not work on FreeBSD MESON_ARGS+= -Domap=disabled \ @@ -37,54 +38,19 @@ -Detnaviv=disabled \ -Dnouveau=disabled -MESON_ARGS+= -Dman-pages=enabled +MESON_ARGS+= -Dman-pages=enabled \ + -Dinstall-test-programs=true .include .if ${ARCH} == amd64 || ${ARCH} == i386 MESON_ARGS+= -Dvmwgfx=enabled \ -Dintel=enabled +SUBPACKAGES+= intel \ + vmwgfx .else MESON_ARGS+= -Dvmwgfx=disabled \ -Dintel=disabled .endif -.if ${ARCH} == amd64 || ${ARCH} == i386 -PLIST_SUB+= AMD_DRIVERS="" -PLIST_SUB+= ARM_DRIVERS="@comment " -PLIST_SUB+= INTEL_DRIVER="" -PLIST_SUB+= RADEON_DRIVERS="" -PLIST_SUB+= VMWGFX_DRIVERS="" -.elif ${ARCH:Mpowerpc*} -PLIST_SUB+= AMD_DRIVERS="" -PLIST_SUB+= ARM_DRIVERS="@comment " -PLIST_SUB+= INTEL_DRIVER="@comment " -PLIST_SUB+= RADEON_DRIVERS="" -PLIST_SUB+= VMWGFX_DRIVERS="@comment " -.elif ${ARCH} == aarch64 -PLIST_SUB+= AMD_DRIVERS="" -PLIST_SUB+= ARM_DRIVERS="" -PLIST_SUB+= INTEL_DRIVER="@comment " -PLIST_SUB+= RADEON_DRIVERS="" -PLIST_SUB+= VMWGFX_DRIVERS="@comment " -.elif ${ARCH:Marm*} -PLIST_SUB+= AMD_DRIVERS="" -PLIST_SUB+= ARM_DRIVERS="" -PLIST_SUB+= INTEL_DRIVER="@comment " -PLIST_SUB+= RADEON_DRIVERS="" -PLIST_SUB+= VMWGFX_DRIVERS="@comment " -.elif ${ARCH} == riscv64 -PLIST_SUB+= AMD_DRIVERS="" -PLIST_SUB+= ARM_DRIVERS="@comment " -PLIST_SUB+= INTEL_DRIVER="@comment " -PLIST_SUB+= RADEON_DRIVERS="" -PLIST_SUB+= VMWGFX_DRIVERS="@comment " -.else -PLIST_SUB+= AMD_DRIVERS="@comment " -PLIST_SUB+= ARM_DRIVERS="@comment " -PLIST_SUB+= INTEL_DRIVER="@comment " -PLIST_SUB+= RADEON_DRIVERS="@comment " -PLIST_SUB+= VMWGFX_DRIVERS="@comment " -.endif - .include diff --git a/graphics/libdrm/pkg-descr.amdgpu b/graphics/libdrm/pkg-descr.amdgpu new file mode 100644 --- /dev/null +++ b/graphics/libdrm/pkg-descr.amdgpu @@ -0,0 +1 @@ +Direct Rendering Manager library and headers amdgpu specific diff --git a/graphics/libdrm/pkg-descr.intel b/graphics/libdrm/pkg-descr.intel new file mode 100644 --- /dev/null +++ b/graphics/libdrm/pkg-descr.intel @@ -0,0 +1 @@ +Direct Rendering Manager library and headers i915kms specific diff --git a/graphics/libdrm/pkg-descr.radeon b/graphics/libdrm/pkg-descr.radeon new file mode 100644 --- /dev/null +++ b/graphics/libdrm/pkg-descr.radeon @@ -0,0 +1 @@ +Direct Rendering Manager library and headers radeon specific diff --git a/graphics/libdrm/pkg-descr.tools b/graphics/libdrm/pkg-descr.tools new file mode 100644 --- /dev/null +++ b/graphics/libdrm/pkg-descr.tools @@ -0,0 +1 @@ +Direct Rendering Manager tools diff --git a/graphics/libdrm/pkg-descr.vmwgfx b/graphics/libdrm/pkg-descr.vmwgfx new file mode 100644 --- /dev/null +++ b/graphics/libdrm/pkg-descr.vmwgfx @@ -0,0 +1 @@ +Direct Rendering Manager library and headers vmware specific diff --git a/graphics/libdrm/pkg-plist b/graphics/libdrm/pkg-plist --- a/graphics/libdrm/pkg-plist +++ b/graphics/libdrm/pkg-plist @@ -1,64 +1,64 @@ -%%TESTS%%bin/amdgpu_stress -%%TESTS%%bin/drmdevice -%%TESTS%%bin/modeprint -%%TESTS%%bin/modetest -%%TESTS%%bin/proptest -%%TESTS%%bin/vbltest -%%AMD_DRIVERS%%include/libdrm/amdgpu.h -%%AMD_DRIVERS%%include/libdrm/amdgpu_drm.h +@@tools@@bin/amdgpu_stress +@@tools@@bin/drmdevice +@@tools@@bin/modeprint +@@tools@@bin/modetest +@@tools@@bin/proptest +@@tools@@bin/vbltest +@@amdgpu@@include/libdrm/amdgpu.h +@@amdgpu@@include/libdrm/amdgpu_drm.h include/libdrm/drm.h include/libdrm/drm_fourcc.h include/libdrm/drm_mode.h include/libdrm/drm_sarea.h include/libdrm/i915_drm.h -%%INTEL_DRIVER%%include/libdrm/intel_aub.h -%%INTEL_DRIVER%%include/libdrm/intel_bufmgr.h -%%INTEL_DRIVER%%include/libdrm/intel_debug.h +@@intel@@include/libdrm/intel_aub.h +@@intel@@include/libdrm/intel_bufmgr.h +@@intel@@include/libdrm/intel_debug.h include/libdrm/mach64_drm.h include/libdrm/mga_drm.h include/libdrm/msm_drm.h include/libdrm/nouveau_drm.h include/libdrm/qxl_drm.h include/libdrm/r128_drm.h -%%RADEON_DRIVERS%%include/libdrm/r600_pci_ids.h -%%RADEON_DRIVERS%%include/libdrm/radeon_bo.h -%%RADEON_DRIVERS%%include/libdrm/radeon_bo_gem.h -%%RADEON_DRIVERS%%include/libdrm/radeon_bo_int.h -%%RADEON_DRIVERS%%include/libdrm/radeon_cs.h -%%RADEON_DRIVERS%%include/libdrm/radeon_cs_gem.h -%%RADEON_DRIVERS%%include/libdrm/radeon_cs_int.h +@@radeon@@include/libdrm/r600_pci_ids.h +@@radeon@@include/libdrm/radeon_bo.h +@@radeon@@include/libdrm/radeon_bo_gem.h +@@radeon@@include/libdrm/radeon_bo_int.h +@@radeon@@include/libdrm/radeon_cs.h +@@radeon@@include/libdrm/radeon_cs_gem.h +@@radeon@@include/libdrm/radeon_cs_int.h include/libdrm/radeon_drm.h -%%RADEON_DRIVERS%%include/libdrm/radeon_surface.h +@@radeon@@include/libdrm/radeon_surface.h include/libdrm/savage_drm.h include/libdrm/sis_drm.h include/libdrm/tegra_drm.h include/libdrm/vc4_drm.h include/libdrm/via_drm.h include/libdrm/virtgpu_drm.h -%%VMWGFX_DRIVERS%%include/libdrm/vmwgfx_drm.h +@@vmwgfx@@include/libdrm/vmwgfx_drm.h include/libsync.h include/xf86drm.h include/xf86drmMode.h lib/libdrm.so lib/libdrm.so.2 lib/libdrm.so.2.4.0 -%%AMD_DRIVERS%%lib/libdrm_amdgpu.so -%%AMD_DRIVERS%%lib/libdrm_amdgpu.so.1 -%%AMD_DRIVERS%%lib/libdrm_amdgpu.so.1.0.0 -%%INTEL_DRIVER%%lib/libdrm_intel.so -%%INTEL_DRIVER%%lib/libdrm_intel.so.1 -%%INTEL_DRIVER%%lib/libdrm_intel.so.1.0.0 -%%RADEON_DRIVERS%%lib/libdrm_radeon.so -%%RADEON_DRIVERS%%lib/libdrm_radeon.so.1 -%%RADEON_DRIVERS%%lib/libdrm_radeon.so.1.0.1 +@@amdgpu@@lib/libdrm_amdgpu.so +@@amdgpu@@lib/libdrm_amdgpu.so.1 +@@amdgpu@@lib/libdrm_amdgpu.so.1.0.0 +@@intel@@lib/libdrm_intel.so +@@intel@@lib/libdrm_intel.so.1 +@@intel@@lib/libdrm_intel.so.1.0.0 +@@radeon@@lib/libdrm_radeon.so +@@radeon@@lib/libdrm_radeon.so.1 +@@radeon@@lib/libdrm_radeon.so.1.0.1 libdata/pkgconfig/libdrm.pc -%%AMD_DRIVERS%%libdata/pkgconfig/libdrm_amdgpu.pc -%%INTEL_DRIVER%%libdata/pkgconfig/libdrm_intel.pc -%%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc +@@amdgpu@@libdata/pkgconfig/libdrm_amdgpu.pc +@@intel@@libdata/pkgconfig/libdrm_intel.pc +@@radeon@@libdata/pkgconfig/libdrm_radeon.pc share/man/man3/drmAvailable.3.gz share/man/man3/drmHandleEvent.3.gz share/man/man3/drmModeGetResources.3.gz share/man/man7/drm-kms.7.gz share/man/man7/drm-memory.7.gz share/man/man7/drm.7.gz -%%AMD_DRIVERS%%%%DATADIR%%/amdgpu.ids +@@amdgpu@@%%DATADIR%%/amdgpu.ids diff --git a/graphics/mesa-devel/Makefile b/graphics/mesa-devel/Makefile --- a/graphics/mesa-devel/Makefile +++ b/graphics/mesa-devel/Makefile @@ -75,13 +75,17 @@ iris_DESC= Broadwell and newer panfrost_DESC= Midgard, Bifrost r600_DESC= R600, R700, Evergreen, Northern Islands (implies LLVM) +r600_LIB_DEPENDS= libdrm_radeon.so:graphics/libdrm~radeon radeonsi_DESC= Southern Islands and newer (implies LLVM) +radeonsi_LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm~amdgpu \ + libdrm_radeon.so:graphics/libdrm~radeon VULKAN_DESC= Vulkan drivers anv_DESC= Skylake and newer hasvk_DESC= Ivy Bridge, Haswell, Broadwell radv_DESC= Southern Islands and newer (implies LLVM) radv_BUILD_DEPENDS= glslangValidator:graphics/glslang +radv_LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm~amdgpu COINST_DESC= Allow co-installation with another Mesa port COINST_MESON_ON= -Degl-lib-suffix=${PKGNAMESUFFIX} diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common --- a/graphics/mesa-dri/Makefile.common +++ b/graphics/mesa-dri/Makefile.common @@ -43,6 +43,11 @@ .endif .if ${COMPONENT} != osmesa LIB_DEPENDS+= libdrm.so:graphics/libdrm +LIB_DEPENDS+= libdrm_amdgpu.so:graphics/libdrm~amdgpu +LIB_DEPENDS+= libdrm_radeon.so:graphics/libdrm~radeon +.if ${ARCH} == amd64 || ${ARCH} == i386 +LIB_DEPENDS+= libdrm_intel.so:graphics/libdrm~intel +.endif .endif USES+= compiler:c++11-lib bison meson pathfix pkgconfig \ diff --git a/graphics/piglit/Makefile b/graphics/piglit/Makefile --- a/graphics/piglit/Makefile +++ b/graphics/piglit/Makefile @@ -17,6 +17,7 @@ vulkan-headers>0:graphics/vulkan-headers \ wayland-protocols>=0:graphics/wayland-protocols LIB_DEPENDS= libdrm.so:graphics/libdrm \ + libdrm_intel.so:graphics/libdrm~intel \ libpng.so:graphics/png \ libvulkan.so:graphics/vulkan-loader \ libwaffle-1.so:graphics/waffle \ diff --git a/multimedia/cmrt/Makefile b/multimedia/cmrt/Makefile --- a/multimedia/cmrt/Makefile +++ b/multimedia/cmrt/Makefile @@ -13,7 +13,7 @@ ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= only Intel GPUs on x86 are supported -LIB_DEPENDS= libdrm_intel.so:graphics/libdrm \ +LIB_DEPENDS= libdrm_intel.so:graphics/libdrm~intel \ libva.so:multimedia/libva USES= autoreconf compiler:c11 libtool pkgconfig diff --git a/multimedia/intel-media-sdk/Makefile b/multimedia/intel-media-sdk/Makefile --- a/multimedia/intel-media-sdk/Makefile +++ b/multimedia/intel-media-sdk/Makefile @@ -40,7 +40,7 @@ X11_LIB_DEPENDS= libva-x11.so:multimedia/libva X11_CMAKE_BOOL= ENABLE_X11 ENABLE_X11_DRI3 -WAYLAND_LIB_DEPENDS= libdrm_intel.so:graphics/libdrm \ +WAYLAND_LIB_DEPENDS= libdrm_intel.so:graphics/libdrm~intel \ libwayland-client.so:graphics/wayland WAYLAND_CMAKE_BOOL= ENABLE_WAYLAND diff --git a/multimedia/libva-intel-driver/Makefile b/multimedia/libva-intel-driver/Makefile --- a/multimedia/libva-intel-driver/Makefile +++ b/multimedia/libva-intel-driver/Makefile @@ -14,7 +14,7 @@ ONLY_FOR_ARCHS_REASON= only Intel GPUs on x86 are supported BUILD_DEPENDS= libva>=2.4.0:multimedia/libva -LIB_DEPENDS= libdrm_intel.so:graphics/libdrm \ +LIB_DEPENDS= libdrm_intel.so:graphics/libdrm~intel \ libva.so:multimedia/libva USES= compiler:c11 meson pkgconfig diff --git a/multimedia/libva-intel-hybrid-driver/Makefile b/multimedia/libva-intel-hybrid-driver/Makefile --- a/multimedia/libva-intel-hybrid-driver/Makefile +++ b/multimedia/libva-intel-hybrid-driver/Makefile @@ -20,7 +20,7 @@ ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= only Intel GPUs on x86 are supported -LIB_DEPENDS= libdrm_intel.so:graphics/libdrm \ +LIB_DEPENDS= libdrm_intel.so:graphics/libdrm~intel \ libcmrt.so:multimedia/cmrt \ libva.so:multimedia/libva diff --git a/multimedia/onevpl/Makefile b/multimedia/onevpl/Makefile --- a/multimedia/onevpl/Makefile +++ b/multimedia/onevpl/Makefile @@ -15,6 +15,7 @@ BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols LIB_DEPENDS= libdrm.so:graphics/libdrm \ + libdrm_intel.so:graphics/libdrm~intel \ libva.so:multimedia/libva \ libwayland-client.so:graphics/wayland diff --git a/sysutils/radeontop/Makefile b/sysutils/radeontop/Makefile --- a/sysutils/radeontop/Makefile +++ b/sysutils/radeontop/Makefile @@ -14,7 +14,8 @@ NOT_FOR_ARCHS_REASON= fails to compile: fatal error: amdgpu_drm.h file not found LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \ - libdrm.so:graphics/libdrm + libdrm.so:graphics/libdrm \ + libdrm_amdgpu.so:graphics/libdrm~amdgpu USE_GITHUB= yes GH_ACCOUNT= clbr diff --git a/x11-drivers/xf86-video-amdgpu/Makefile b/x11-drivers/xf86-video-amdgpu/Makefile --- a/x11-drivers/xf86-video-amdgpu/Makefile +++ b/x11-drivers/xf86-video-amdgpu/Makefile @@ -19,7 +19,7 @@ ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64le ONLY_FOR_ARCHS_REASON= KMS is required and currently only available on x86/arm64/powerpc64le -LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm +LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm~amdgpu EXTRACT_SUFX= .tar.xz USES= gl xorg-cat:driver tar:xz diff --git a/x11-drivers/xf86-video-ati/Makefile b/x11-drivers/xf86-video-ati/Makefile --- a/x11-drivers/xf86-video-ati/Makefile +++ b/x11-drivers/xf86-video-ati/Makefile @@ -24,7 +24,7 @@ ONLY_FOR_ARCHS_REASON= KMS is required and currently only available on x86/arm64/powerpc64 LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \ - libdrm_radeon.so:graphics/libdrm + libdrm_radeon.so:graphics/libdrm~radeon USES= gl xorg xorg-cat:driver USE_GL= gl diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile --- a/x11-drivers/xf86-video-intel/Makefile +++ b/x11-drivers/xf86-video-intel/Makefile @@ -14,7 +14,7 @@ ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= only Intel integrated GPUs on x86 are supported -LIB_DEPENDS= libdrm_intel.so:graphics/libdrm +LIB_DEPENDS= libdrm_intel.so:graphics/libdrm~intel USES= cpe localbase xorg xorg-cat:driver CPE_VENDOR= x