From 69124829d98dd0e8821058c49e44c52e22e68bfa43accbc27183182f60fa17f4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 18 Nov 2023 11:07:07 +0000 Subject: [PATCH] add shlib versioning so upgrades work on SUSE OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/cuarzo-srm?expand=0&rev=2 --- 0001-build-heed-results-from-pkg-config.patch | 1 + 0001-build-import-gl-dependency.patch | 1 + 0001-versioning.patch | 24 +++++++++++++++++++ cuarzo-srm.spec | 20 +++++++++------- 4 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 0001-versioning.patch diff --git a/0001-build-heed-results-from-pkg-config.patch b/0001-build-heed-results-from-pkg-config.patch index 37af671..1e4babf 100644 --- a/0001-build-heed-results-from-pkg-config.patch +++ b/0001-build-heed-results-from-pkg-config.patch @@ -2,6 +2,7 @@ From 6e684612c648275c532b374e917c60388513c35c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 18 Nov 2023 10:51:11 +0100 Subject: [PATCH] build: heed results from pkg-config +References: https://github.com/CuarzoSoftware/SRM/pull/7 The .pc files can have extra required flags or locations (e.g. if libraries are installed outside the standard search paths). diff --git a/0001-build-import-gl-dependency.patch b/0001-build-import-gl-dependency.patch index 49f6e64..b97d5ed 100644 --- a/0001-build-import-gl-dependency.patch +++ b/0001-build-import-gl-dependency.patch @@ -2,6 +2,7 @@ From 093d56c4894e447609dc93d100a0b61a48f178e3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 18 Nov 2023 11:03:08 +0100 Subject: [PATCH] build: import "gl" dependency +References: https://github.com/CuarzoSoftware/SRM/pull/8 [ 3s] ../lib/SRMBuffer.c:1:10: fatal error: GL/gl.h: No such file or directory diff --git a/0001-versioning.patch b/0001-versioning.patch new file mode 100644 index 0000000..9a77b93 --- /dev/null +++ b/0001-versioning.patch @@ -0,0 +1,24 @@ +From f4bdb3557fa382e13eb396f4e7a766325cf53544 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Sat, 18 Nov 2023 12:04:08 +0100 + +Unversioned libraries suck. +--- + src/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/meson.build b/src/meson.build +index e710f12..427b423 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -75,6 +75,7 @@ SRM = library( + 'SRM', + sources : sources, + include_directories : include_paths, ++ soversion: 'suse0', + dependencies : [ + display_info_dep, + egl_dep, +-- +2.42.1 + diff --git a/cuarzo-srm.spec b/cuarzo-srm.spec index b21e49f..c1b9ae8 100644 --- a/cuarzo-srm.spec +++ b/cuarzo-srm.spec @@ -19,7 +19,7 @@ Name: cuarzo-srm Version: 0.3.2.1 %define sillyver 0.3.2-1 -%define lname libSRM +%define lname libSRM-suse0 Release: 0 Summary: Rendering manager for the Louvre library License: GPL-3.0-only @@ -28,6 +28,7 @@ URL: https://github.com/CuarzoSoftware/SRM/ Source: https://github.com/CuarzoSoftware/SRM/archive/refs/tags/v%sillyver.tar.gz Patch1: 0001-build-heed-results-from-pkg-config.patch Patch2: 0001-build-import-gl-dependency.patch +Patch3: 0001-versioning.patch BuildRequires: c_compiler BuildRequires: meson BuildRequires: pkgconfig(egl) @@ -42,9 +43,6 @@ BuildRequires: pkgconfig(libudev) %description A C library to aid in the development of Linux DRM/KMS applications. -SRM allows for using multiple GPUs simultaneously. It offers -functions for creating OpenGL textures which are automatically shared -among GPUs. %package -n %lname Summary: Rendering Manager for the Louvre library @@ -62,6 +60,12 @@ Group: Development/Libraries/C and C++ Requires: %lname = %version %description devel +A C library to aid in the development of Linux DRM/KMS applications. +SRM allows for using multiple GPUs simultaneously. It offers +functions for creating OpenGL textures which are automatically shared +among GPUs. + +This package contains headers and development utilities for libSRM. %prep %autosetup -p1 -n SRM-%sillyver @@ -81,13 +85,13 @@ popd %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig -%files -%_bindir/srm-* - %files -n %lname -%_libdir/libSRM.so +%_libdir/libSRM.so.suse0 %files devel +%license LICENSE +%_bindir/srm-* %_includedir/SRM/ +%_libdir/libSRM.so %changelog