Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
graphics/mesa-dev: update, new libva-glx split
Browse files Browse the repository at this point in the history
  • Loading branch information
valpackett committed Dec 19, 2018
1 parent b6b73d6 commit 8d0f17e
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 62 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ This fork of the FreeBSD Ports Collection merges the [KDE](https://github.com/fr
### Graphics stack

- `graphics/drm-next-kmod`: hack workaround patch for ioctl auth issues [kms-drm#33](https://github.com/FreeBSDDesktop/kms-drm/issues/33)
- `graphics/mesa-dev`: alternative mesa port! Development version ([little fork](https://github.com/myfreeweb/mesa) with my BSD patches), everything built together, using Meson! Always includes GL, GLES, Vulkan (RADV, ANV), Gallium Nine, OpenCL (Clover), VDPAU.
- `graphics/mesa-dev`: alternative mesa port! Development version ([little fork](https://github.com/myfreeweb/mesa) with my BSD patches), everything built together, using Meson! Always includes GL, GLES, Vulkan (RADV, ANV), Gallium Nine, OpenCL (Clover), VDPAU, VAAPI.
- to install and keep pkg happy without rebuilding everything, just `pkg add -f` over existing `mesa-libs/dri`
- but if you want to do it properly, define `MESA_DRI_PORT=graphics/mesa-dev` and `MESA_LIBS_PORT=graphics/mesa-dev` in `make.conf` and rebuild dependent ports
- [synth](https://github.com/jrmarino/synth) is the recommended port upgrade tool, it does try to fetch binary packages when a rebuild is not necessary
- `multimedia/libva-mesa-dev-driver` is the VAAPI part (rebuilds some of the same gallium code as mesa-dev, ccache recommended for faster builds)
- `multimedia/libva` has the glx part split off into `multimedia/libva-glx` to avoid circular dependency with mesa

NOTE: ANV (Intel Vulkan) requires running the apps as root and might not work for complex applications.
RADV (Radeon Vulkan) with the `amdgpu` KMS/DRM driver works very well!
Expand Down
14 changes: 8 additions & 6 deletions graphics/mesa-dev/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= mesa-dev
DISTVERSION= 18.3.0-20181030
DISTVERSION= 18.3.2-20181216
CATEGORIES?= graphics

MAINTAINER= greg@unrelenting.technology
Expand All @@ -17,10 +17,11 @@ USE_LDCONFIG= yes
USE_XORG= xorgproto x11 xdamage xext \
xfixes xshmfence xv xvmc xxf86vm xcb

USE_GITHUB= yes
GH_ACCOUNT= myfreeweb
GH_PROJECT= mesa
GH_TAGNAME= bc26e3c29b
USE_GITLAB= yes
GL_SITE= https://gitlab.freedesktop.org
GL_ACCOUNT=myfreeweb
GL_PROJECT= mesa
GL_COMMIT= 6c7cbb71f8da7f17c6c634631c84743cc40148e9

MESA_LLVM_VER?= 70

Expand All @@ -34,6 +35,7 @@ BUILD_DEPENDS= llvm${MESA_LLVM_VER}>=5.0.0:devel/llvm${MESA_LLVM_VER} \
LIB_DEPENDS= libexpat.so:textproc/expat2 \
libdrm.so:graphics/libdrm \
libOpenCL.so:devel/ocl-icd \
libva.so:multimedia/libva \
libvdpau.so:multimedia/libvdpau \
libwayland-client.so:graphics/wayland \
libwayland-server.so:graphics/wayland
Expand Down Expand Up @@ -62,7 +64,7 @@ MESON_ARGS= -Dglx-tls="false"\
-Dgallium-opencl="icd" \
-Dgallium-omx="disabled" \
-Dgallium-nine="true" \
-Dgallium-va="false" \
-Dgallium-va="true" \
-Dosmesa="gallium"

.include <bsd.port.options.mk>
Expand Down
6 changes: 3 additions & 3 deletions graphics/mesa-dev/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1540921170
SHA256 (myfreeweb-mesa-18.3.0-20181030-bc26e3c29b_GH0.tar.gz) = 1acf2b52046785b6ddee8725dbfa39f6ced16a084c970f940f47466207e6126c
SIZE (myfreeweb-mesa-18.3.0-20181030-bc26e3c29b_GH0.tar.gz) = 15717337
TIMESTAMP = 1544988009
SHA256 (myfreeweb-mesa-6c7cbb71f8da7f17c6c634631c84743cc40148e9_GL0.tar.gz) = 1fa6586642ddd73f6667eb7d1e08031340acad20d42995e44e73c1d36e9c50c7
SIZE (myfreeweb-mesa-6c7cbb71f8da7f17c6c634631c84743cc40148e9_GL0.tar.gz) = 15725086
5 changes: 4 additions & 1 deletion graphics/mesa-dev/pkg-plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ lib/dri/i915_dri.so
lib/dri/i965_dri.so
lib/dri/kms_swrast_dri.so
lib/dri/nouveau_dri.so
lib/dri/nouveau_drv_video.so
lib/dri/nouveau_vieux_dri.so
lib/dri/r200_dri.so
lib/dri/r300_dri.so
lib/dri/r600_dri.so
lib/dri/r600_drv_video.so
lib/dri/radeon_dri.so
lib/dri/radeonsi_dri.so
lib/dri/radeonsi_drv_video.so
lib/dri/swrast_dri.so
lib/dri/virtio_gpu_dri.so
lib/dri/vmwgfx_dri.so
Expand Down Expand Up @@ -86,7 +89,7 @@ lib/libvulkan_intel.so
lib/libvulkan_radeon.so
lib/libxatracker.so
lib/libxatracker.so.2
lib/libxatracker.so.2.4.0
lib/libxatracker.so.2.5.0
lib/vdpau/libvdpau_nouveau.so
lib/vdpau/libvdpau_nouveau.so.1
lib/vdpau/libvdpau_nouveau.so.1.0
Expand Down
1 change: 1 addition & 0 deletions multimedia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
SUBDIR += libuvc
SUBDIR += libv4l
SUBDIR += libva
SUBDIR += libva-glx
SUBDIR += libva-intel-driver
SUBDIR += libva-intel-hybrid-driver
SUBDIR += libva-intel-media-driver
Expand Down
16 changes: 16 additions & 0 deletions multimedia/libva-glx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# $FreeBSD$

PKGNAMESUFFIX= -glx
COMMENT= VAAPI wrapper for GLX

OPTIONS_DEFINE= DEBUG

USE_XORG= xorgproto pciaccess x11 xext xfixes
USE_GL= gl

MASTERDIR= ${.CURDIR:H}/libva
PLIST= ${.CURDIR}/pkg-plist

LIBVA_SLAVE= glx

.include "${MASTERDIR}/Makefile"
6 changes: 6 additions & 0 deletions multimedia/libva-glx/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include/va/va_backend_glx.h
include/va/va_glx.h
lib/libva-glx.so
lib/libva-glx.so.2
lib/libva-glx.so.2.300.0
libdata/pkgconfig/libva-glx.pc
37 changes: 18 additions & 19 deletions multimedia/libva/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= libva
PORTVERSION= 2.3.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia

MAINTAINER= madpilot@FreeBSD.org
Expand All @@ -15,13 +15,8 @@ BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
RUN_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
LIB_DEPENDS= libdrm.so:graphics/libdrm

USES= autoreconf gmake libtool localbase pkgconfig tar:bzip2
USE_XORG= xorgproto pciaccess x11 xext xfixes
USE_GL= gl
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-prefix=va
USES= meson localbase pkgconfig
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip

USE_GITHUB= yes
GH_ACCOUNT= intel
Expand All @@ -30,22 +25,26 @@ LDFLAGS+= -lpthread
# prevent types conflict: videodev2.h vs. drm.h
CFLAGS+= -DHAVE_LINUX_INTEGER_TYPES

OPTIONS_DEFINE= DEBUG WAYLAND
OPTIONS_DEFAULT=WAYLAND
WAYLAND_DESC= Support wayland protocol
OPTIONS_DEFINE?= DEBUG X11 WAYLAND
OPTIONS_DEFAULT=X11 WAYLAND
WAYLAND_DESC= Support Wayland protocol
OPTIONS_SUB= yes

DEBUG_CFLAGS= -D_DEBUG
DEBUG_CFLAGS_OFF= -DNDEBUG
X11_MESON_YES= with_x11
X11_USE= xorg=xorgproto,pciaccess,x11,xext,xfixes

WAYLAND_CONFIGURE_ENABLE= wayland
WAYLAND_MESON_YES= with_wayland
WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland

post-patch: .SILENT
${REINPLACE_CMD} -e 's|$${libdir}/\(pkgconfig\)|${PREFIX}/libdata/\1|' \
${WRKSRC}/configure.ac
${REINPLACE_CMD} '/^export VA_HEADER_/d' \
${WRKSRC}/doc/Makefile.am
${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
.include <bsd.port.options.mk>

.if defined(LIBVA_SLAVE) && ${LIBVA_SLAVE} == "glx"
USES+= gl
LIB_DEPENDS+= libva-x11.so:multimedia/libva
MESON_ARGS+= -Dwith_wayland=no \
-Dwith_x11=yes
.else
MESON_ARGS+= -Dwith_glx=no
.endif

.include <bsd.port.mk>
20 changes: 0 additions & 20 deletions multimedia/libva/files/patch-va_wayland_Makefile.am

This file was deleted.

16 changes: 5 additions & 11 deletions multimedia/libva/pkg-plist
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include/va/va.h
include/va/va_backend.h
include/va/va_backend_glx.h
include/va/va_backend_vpp.h
%%WAYLAND%%include/va/va_backend_wayland.h
include/va/va_compat.h
Expand All @@ -22,30 +21,25 @@ include/va/va_enc_vp9.h
include/va/va_fei_h264.h
include/va/va_fei_hevc.h
include/va/va_fei.h
include/va/va_glx.h
include/va/va_str.h
include/va/va_tpi.h
include/va/va_version.h
include/va/va_vpp.h
%%WAYLAND%%include/va/va_wayland.h
include/va/va_x11.h
%%X11%%include/va/va_x11.h
lib/libva-drm.so
lib/libva-drm.so.2
lib/libva-drm.so.2.300.0
lib/libva-glx.so
lib/libva-glx.so.2
lib/libva-glx.so.2.300.0
%%WAYLAND%%lib/libva-wayland.so
%%WAYLAND%%lib/libva-wayland.so.2
%%WAYLAND%%lib/libva-wayland.so.2.300.0
lib/libva-x11.so
lib/libva-x11.so.2
lib/libva-x11.so.2.300.0
%%X11%%lib/libva-x11.so
%%X11%%lib/libva-x11.so.2
%%X11%%lib/libva-x11.so.2.300.0
lib/libva.so
lib/libva.so.2
lib/libva.so.2.300.0
libdata/pkgconfig/libva-drm.pc
libdata/pkgconfig/libva-glx.pc
%%WAYLAND%%libdata/pkgconfig/libva-wayland.pc
libdata/pkgconfig/libva-x11.pc
%%X11%%libdata/pkgconfig/libva-x11.pc
libdata/pkgconfig/libva.pc

0 comments on commit 8d0f17e

Please sign in to comment.