diff --git a/_service b/_service
new file mode 100644
index 0000000..07fe890
--- /dev/null
+++ b/_service
@@ -0,0 +1,18 @@
+
+
+
+ https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware.git
+ git
+ 50ab008c
+ @PARENT_TAG@+@TAG_OFFSET@
+ xf86-video-vmware-(.*)
+ enable
+
+
+
+ *.tar
+ xz
+
+
+
+
diff --git a/_servicedata b/_servicedata
new file mode 100644
index 0000000..22cf8ec
--- /dev/null
+++ b/_servicedata
@@ -0,0 +1,4 @@
+
+
+ https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware.git
+ 50ab008cb965dc9e47e0a84a1950e2485bbd3c44
\ No newline at end of file
diff --git a/u_Fix-build-gcc-12.patch b/u_Fix-build-gcc-12.patch
new file mode 100644
index 0000000..8e65aac
--- /dev/null
+++ b/u_Fix-build-gcc-12.patch
@@ -0,0 +1,12 @@
+diff -Nur xf86-video-vmware/vmwgfx/vmwgfx_tex_video.c patched-xf86-video-vmware/vmwgfx/vmwgfx_tex_video.c
+--- xf86-video-vmware/vmwgfx/vmwgfx_tex_video.c 2022-02-23 10:26:07.678383367 +0100
++++ patched-xf86-video-vmware/vmwgfx/vmwgfx_tex_video.c 2022-02-23 11:03:54.104420733 +0100
+@@ -237,7 +237,7 @@
+
+ for (i=0; i<3; ++i) {
+ for (j=0; j<2; ++j) {
+- if (priv->yuv[i]) {
++ if (priv->yuv[j][i]) {
+ xa_surface_destroy(priv->yuv[j][i]);
+ priv->yuv[j][i] = NULL;
+ }
diff --git a/xf86-video-vmware-13.3.0+12.obscpio b/xf86-video-vmware-13.3.0+12.obscpio
new file mode 100644
index 0000000..0061656
--- /dev/null
+++ b/xf86-video-vmware-13.3.0+12.obscpio
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:41dced8a6932ef9f99d233da491ecc0522cc777505d09e65bc9d69af4f615b57
+size 793612
diff --git a/xf86-video-vmware-13.3.0.tar.bz2 b/xf86-video-vmware-13.3.0.tar.bz2
deleted file mode 100644
index 8115383..0000000
--- a/xf86-video-vmware-13.3.0.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:47971924659e51666a757269ad941a059ef5afe7a47b5101c174a6022ac4066c
-size 473527
diff --git a/xf86-video-vmware.changes b/xf86-video-vmware.changes
index b020886..0dbc639 100644
--- a/xf86-video-vmware.changes
+++ b/xf86-video-vmware.changes
@@ -1,3 +1,28 @@
+-------------------------------------------------------------------
+Wed Feb 23 09:26:07 UTC 2022 - bjorn.lie@gmail.com
+
+- Update to version 13.3.0+12:
+ * vmwgfx:
+ - Change header inclusion order to avoid xorg headers catching
+ stdbool.h
+ - Unify style in scanout_update and present functions
+ - Limit the number of cliprects in a drm present_readback
+ command v3
+ - Limit the number of cliprects in a drm present command v3
+ - Limit the number of cliprects in a drm dirtyfb command v3
+ - Don't exceed the device command size limit v3
+ - Fix invalid memory accesses in CloseScreen
+ - Use libdrm to obtain the drm device node name v2
+ - Fix a memory leak
+ - Fix XVideo memory leaks
+ * saa: Make sure damage destruction happens at the correct
+ location
+ * Remove obsolete B16 & B32 tags in struct definitions
+- Switch to git checkout via source service.
+- Add u_Fix-build-gcc-12.patch: Still needs a patch to build with
+ gcc 12.
+- Modernize spec, add libtool BuildRequires and bootstrap build.
+
-------------------------------------------------------------------
Sat May 19 15:15:28 UTC 2018 - sndirsch@suse.com
diff --git a/xf86-video-vmware.obsinfo b/xf86-video-vmware.obsinfo
new file mode 100644
index 0000000..44d97fd
--- /dev/null
+++ b/xf86-video-vmware.obsinfo
@@ -0,0 +1,4 @@
+name: xf86-video-vmware
+version: 13.3.0+12
+mtime: 1638305298
+commit: 50ab008cb965dc9e47e0a84a1950e2485bbd3c44
diff --git a/xf86-video-vmware.spec b/xf86-video-vmware.spec
index 68b68b3..ca0026e 100644
--- a/xf86-video-vmware.spec
+++ b/xf86-video-vmware.spec
@@ -1,7 +1,7 @@
#
# spec file for package xf86-video-vmware
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,21 +12,25 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: xf86-video-vmware
-Version: 13.3.0
+Version: 13.3.0+12
Release: 0
Summary: VMware SVGA video driver for the Xorg X server
License: MIT
Group: System/X11/Servers/XF86_4
-Url: http://xorg.freedesktop.org/
+URL: http://xorg.freedesktop.org/
#http://xorg.freedesktop.org/releases/individual/driver/
-Source0: http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2
+# Source url disabled, we are using a git checkout via source service
+#Source0: http://xorg.freedesktop.org/releases/individual/driver/%%{name}-%%{version}.tar.bz2
+Source0: %{name}-%{version}.tar.xz
+Patch0: u_Fix-build-gcc-12.patch
ExclusiveArch: %ix86 x86_64
-BuildRequires: pkg-config
+BuildRequires: libtool
+BuildRequires: pkgconfig
BuildRequires: pkgconfig(fontsproto)
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
BuildRequires: pkgconfig(randrproto)
@@ -41,26 +45,26 @@ BuildRequires: pkgconfig(xproto)
Supplements: modalias(xorg-x11-server:pci:v000015ADd*sv*sd*bc03sc*i*)
# This was part of the xorg-x11-driver-video package up to version 7.6
Conflicts: xorg-x11-driver-video <= 7.6
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
%x11_abi_videodrv_req
%description
vmware is an Xorg driver for VMware virtual video cards.
%prep
-%setup -q
+%autosetup -p1
%build
+NOCONFIGURE=1 ./autogen.sh
%configure
-make %{?_smp_mflags}
+%make_build
%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%files
-%defattr(-,root,root)
-%doc ChangeLog COPYING README
+%license COPYING
+%doc README
%dir %{_libdir}/xorg/modules/drivers
%{_libdir}/xorg/modules/drivers/vmware_drv.so
%{_datadir}/man/man4/vmware.4%{?ext_man}