From 00dad0402d76bb5a0f958667a6443f429c19013e79c525df73d6679069924293 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 30 Jan 2019 16:33:33 +0000 Subject: [PATCH] Accepting request 668427 from home:iznogood:branches:X11:XOrg Switch to meson buildsystem and other tweaks - Note that this will kill off the build for Leap 42.3, as it does not have the meson needed. But since 42.3 have ~5 months left to live, I find that a prize worth paying :-) OBS-URL: https://build.opensuse.org/request/show/668427 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libdrm?expand=0&rev=276 --- libdrm.changes | 14 ++++ libdrm.spec | 176 +++++++++++++++++++++++++++++++------------------ 2 files changed, 127 insertions(+), 63 deletions(-) diff --git a/libdrm.changes b/libdrm.changes index cb2778b..347fd4f 100644 --- a/libdrm.changes +++ b/libdrm.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Jan 24 18:58:02 UTC 2019 - bjorn.lie@gmail.com + +- Switch to meson buildsystem: + * Update Git-clone/web to new gitlab home. + * Add meson BuildRequires and macros. + * Add fdupes BuildRequires and macros, remove duplicate files. + * Rename libdrm-tools to drm-tools, follow openSUSE packaging + guidelines and silence a rpmlint warning. Add Obsoletes and + Provides to ensure smooth upgrades. + * Tweak descriptions for several sub-packages. + * Drop custom test install and run, run plain meson_test provided + by upstream. + ------------------------------------------------------------------- Tue Jan 22 19:17:58 UTC 2019 - sndirsch@suse.com diff --git a/libdrm.spec b/libdrm.spec index c517b02..01fcb88 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -12,7 +12,7 @@ # 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/ # @@ -23,42 +23,54 @@ Summary: Userspace Interface for Kernel DRM Services License: MIT Group: Development/Libraries/X11 Url: http://dri.freedesktop.org/ -#Git-Clone: git://anongit.freedesktop.org/git/mesa/drm -#Git-Web: http://cgit.freedesktop.org/mesa/drm/ -# Source URL: http://dri.freedesktop.org/libdrm/ -Source: http://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.bz2 +# Git-Clone: https://gitlab.freedesktop.org/mesa/drm.git +# Git-Web: https://gitlab.freedesktop.org/mesa/drm +# Source URL: https://dri.freedesktop.org/libdrm/ +Source: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.bz2 Source2: baselibs.conf -BuildRequires: pkgconfig -BuildRequires: pkgconfig(pciaccess) >= 0.10 + # Required for building manpages BuildRequires: docbook-xsl-stylesheets +BuildRequires: fdupes +BuildRequires: meson >= 0.43 +BuildRequires: pkgconfig BuildRequires: xsltproc -Provides: libdrm23 = %{version} -Obsoletes: libdrm23 < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -# bug437293 -%ifarch ppc64 -Obsoletes: libdrm-64bit < %{version} -Provides: libdrm-64bit = %{version} -%endif +BuildRequires: pkgconfig(pciaccess) >= 0.10 %if 0%{?with_valgrind_support:1} %ifarch %{ix86} x86_64 ppc ppc64 ppc64le s390x %{arm} BuildRequires: pkgconfig(valgrind) %endif %endif +Provides: libdrm23 = %{version} +Obsoletes: libdrm23 < %{version} +# bug437293 +%ifarch ppc64 +Obsoletes: libdrm-64bit < %{version} +Provides: libdrm-64bit = %{version} +%endif + %description The package contains the userspace interface to the kernel DRM services. -%package tools +%package -n drm-tools Summary: Diagnostic utilities for DRI and DRM Group: System/Base Obsoletes: libdrm < %{version}-%{release} Provides: libdrm = %{version}-%{release} +Obsoletes: libdrm-tools < %{version}-%{release} +Provides: libdrm-tools = %{version}-%{release} -%description tools -(Upstream has not provided a description) +%description -n drm-tools +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems that support the ioctl +interface, and for chipsets with DRM memory manager, support for +tracking relocations and buffers. libdrm is a low-level library, +typically used by graphics drivers such as the Mesa DRI and X +drivers. + +This package contains diagnostic utilities for DRI and DRM. %package devel Summary: Libraries, includes and more to develop libdrm applications @@ -113,28 +125,44 @@ Summary: Userspace interface for Kernel DRM services for Intel chips Group: System/Libraries %description -n libdrm_intel1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface for Kernel DRM services +for Intel chips. %package -n libdrm_nouveau2 Summary: Userspace interface for Kernel DRM services for NVIDIA chips Group: System/Libraries %description -n libdrm_nouveau2 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface for Kernel DRM services +for NVIDIA chips. %package -n libdrm_radeon1 Summary: Userspace interface for Kernel DRM services for AMD Radeon chips Group: System/Libraries %description -n libdrm_radeon1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface for Kernel DRM services +for AMD Radeon chips. %package -n libdrm_amdgpu1 Summary: Userspace interface for Kernel DRM services for AMD Radeon chips Group: System/Libraries %description -n libdrm_amdgpu1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface for Kernel DRM services +for AMD Radeon chips. %package -n libkms-devel Summary: Development files for the KMS MM abstraction library @@ -151,85 +179,100 @@ Group: System/Libraries %description -n libkms1 The KMS Memory Management abstraction library. +This package provides the userspace interface to kernel DRM buffer management %package -n libdrm_omap1 Summary: Userspace interface to kernel DRM services for omap chips Group: System/Libraries %description -n libdrm_omap1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface to kernel DRM services +for omap chips. %package -n libdrm_etnaviv1 Summary: Userspace interface to kernel DRM services for Vivante chips Group: System/Libraries %description -n libdrm_etnaviv1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface to kernel DRM services +for Vivante chips. %package -n libdrm_exynos1 Summary: Userspace interface to kernel DRM services for Samsung Exynos chips Group: System/Libraries %description -n libdrm_exynos1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface to kernel DRM services +for Samsung Exynos chips. %package -n libdrm_freedreno1 Summary: Userspace interface to kernel DRM services for Qualcomm Adreno chips Group: System/Libraries %description -n libdrm_freedreno1 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface to kernel DRM services +for Qualcomm Adreno chips. %package -n libdrm_tegra0 Summary: Userspace interface to kernel DRM services for Nvidia Tegra chips Group: System/Libraries %description -n libdrm_tegra0 -(Upstream has not provided a description) +libdrm is a library for accessing the Direct Rendering Manager on +Linux, BSD and other operating systems. + +This package provides userspace interface to kernel DRM services +for Nvidia Tegra chips. %prep -%setup -q +%autosetup -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" -%configure \ -%ifnarch %{ix86} x86_64 ppc ppc64 ppc64le s390x %{arm} - --disable-valgrind \ -%else -%if 0%{!?with_valgrind_support:1} - --disable-valgrind \ -%endif -%endif +%meson \ + --default-library=shared \ + -Dinstall-test-programs=true \ + -Dudev=true \ %ifarch %{arm} - --enable-omap-experimental-api \ + -Domap=true \ %endif %ifarch %{arm} aarch64 - --enable-etnaviv-experimental-api \ - --enable-exynos-experimental-api \ - --enable-freedreno \ - --enable-tegra-experimental-api \ + -Detnaviv=true \ + -Dexynos=true \ + -Dfreedreno=true \ + -Dtegra=true \ %endif - --enable-manpages \ - --enable-udev - -make %{?_smp_mflags} V=1 -make %{?_smp_mflags} -C tests +%ifnarch %{ix86} x86_64 ppc ppc64 ppc64le s390x %{arm} + -Dvalgrind=false \ +%else +%if 0%{!?with_valgrind_support:1} + -Dvalgrind=false \ +%endif +%endif + %{nil} +%meson_build %check -make %{?_smp_mflags} -C tests check-am +### FIXME ### Tests fail on arm, so lets not run them there for now. +%ifnarch %{arm} +%meson_test +%endif %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install -make -C tests/modeprint install DESTDIR=%{buildroot} -make -C tests/modetest install DESTDIR=%{buildroot} -find %{buildroot} -type f -name "*.la" -delete -print -mkdir -p %{buildroot}%{_prefix}/bin -install \ - tests/modeprint/.libs/modeprint \ - tests/modetest/.libs/modetest %{buildroot}%{_prefix}/bin -%ifarch %arm aarch64 -install tests/exynos/.libs/exynos_fimg2d_test %{buildroot}%{_prefix}/bin -%endif +%meson_install +%fdupes %{buildroot}/%{_prefix} %post -n libdrm2 -p /sbin/ldconfig %postun -n libdrm2 -p /sbin/ldconfig @@ -260,18 +303,25 @@ install tests/exynos/.libs/exynos_fimg2d_test %{buildroot}%{_prefix}/bin %postun -n libdrm_tegra0 -p /sbin/ldconfig %endif -%files tools +%files -n drm-tools %ifarch %arm aarch64 +%{_bindir}/etnaviv_2d_test +%{_bindir}/etnaviv_bo_cache_test +%{_bindir}/etnaviv_cmd_stream_test %{_bindir}/exynos_fimg2d_test +%{_bindir}/exynos_fimg2d_event +%{_bindir}/exynos_fimg2d_perf %endif +%{_bindir}/kms-steal-crtc +%{_bindir}/kms-universal-planes +%{_bindir}/kmstest %{_bindir}/modeprint %{_bindir}/modetest +%{_bindir}/proptest +%{_bindir}/vbltest %files devel -%dir %{_mandir}/man3 -%dir %{_mandir}/man7 -%{_mandir}/man3/* -%{_mandir}/man7/* +%{_mandir}/man?/drm*?%{ext_man} %{_includedir}/libdrm %ifarch %{arm} %{_includedir}/omap