[packages/linux-gpib] - upstream: disable driver that does not build on kernel 5.10 - rel 2

baggins baggins at pld-linux.org
Thu Dec 24 22:36:16 CET 2020


commit 403be2a0e78af8c07027761f2c8ae84fc1253f5c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Dec 24 22:35:23 2020 +0100

    - upstream: disable driver that does not build on kernel 5.10
    - rel 2

 kernel-5.10.patch | 30 ++++++++++++++++++++++++++++++
 linux-gpib.spec   | 13 ++++++++++---
 2 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/linux-gpib.spec b/linux-gpib.spec
index 026c374..605ee45 100644
--- a/linux-gpib.spec
+++ b/linux-gpib.spec
@@ -34,7 +34,7 @@ exit 1
 
 %define		php_name	php%{?php_suffix}
 
-%define		rel	1
+%define		rel	2
 %define		pname	linux-gpib
 Summary:	GPIB (IEEE 488) Linux support
 Summary(pl.UTF-8):	Obsługa GPIB (IEEE 488) dla Linuksa
@@ -51,6 +51,7 @@ Patch4:		%{pname}-firmwaredir.patch
 Patch5:		%{pname}-guile2.patch
 Patch6:		%{pname}-php7.patch
 Patch8:		kernel-5.2.patch
+Patch9:		kernel-5.10.patch
 URL:		http://linux-gpib.sourceforge.net/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -253,10 +254,15 @@ Ten pakiet zawiera sterowniki dla Linuksa do urządzeń GPIB (IEEE 488).\
 %define build_kernel_pkg()\
 %{__make} VERBOSE=1 LINUX_SRCDIR=%{_kernelsrcdir}\
 cd drivers/gpib\
+%if %{_kernel_version_code} < %{_kernel_version_magic 5 10 0}\
+%if %{with drivers_usb}\
+%install_kernel_modules -D installed -m lpvo_usb_gpib/lpvo_usb_gpib -d kernel/gpib\
+%endif\
+%endif\
 %ifarch %{ix86}\
-%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,lpvo_usb_gpib/lpvo_usb_gpib,ni_usb/ni_usb_gpib} -d kernel/gpib\
+%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,ni_usb/ni_usb_gpib} -d kernel/gpib\
 %else\
-%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,hp_82341/hp_82341,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,lpvo_usb_gpib/lpvo_usb_gpib,ni_usb/ni_usb_gpib} -d kernel/gpib\
+%install_kernel_modules -D installed -m agilent_82350b/agilent_82350b,cb7210/cb7210,cec/cec_gpib,hp_82335/hp82335,hp_82341/hp_82341,ines/ines_gpib,nec7210/nec7210,sys/gpib_common,tms9914/tms9914,tnt4882/tnt4882%{?with_drivers_isa:,pc2/pc2_gpib}%{?with_drivers_usb:,agilent_82357a/agilent_82357a,ni_usb/ni_usb_gpib} -d kernel/gpib\
 %endif\
 cd ../..\
 %{nil}
@@ -285,6 +291,7 @@ cd linux-gpib-kernel-%{version}
 %ifarch %{ix86}
 %patch8 -p1
 %endif
+%patch9 -p1
 %endif
 
 %build
diff --git a/kernel-5.10.patch b/kernel-5.10.patch
new file mode 100644
index 0000000..3141c67
--- /dev/null
+++ b/kernel-5.10.patch
@@ -0,0 +1,30 @@
+------------------------------------------------------------------------
+r1927 | dpenkler | 2020-11-23 12:54:12 +0100 (Mon, 23 Nov 2020) | 1 line
+
+Exclude compilation of lpvo for KERNEL >= 5.10
+
+Index: linux-gpib-kernel/drivers/gpib/Makefile
+===================================================================
+--- linux-gpib-kernel/drivers/gpib/Makefile	(revision 1926)
++++ linux-gpib-kernel/drivers/gpib/Makefile	(revision 1927)
+@@ -2,6 +2,9 @@
+ 	LINUXINCLUDE := -I$(GPIB_TOP_DIR)/compat/include $(LINUXINCLUDE)
+ endif
+ 
++KERNEL_GE_5_10 = $(shell expr \( $(VERSION) '>' "5" \) \| \
++ \( \( $(VERSION) '=' "5" \) \& \( $(PATCHLEVEL) '>=' 10 \) \) )
++
+ subdir-ccflags-y := -I$(src)/include \
+ 			-DHAVE_DEV_OF_NODE=$(HAVE_DEV_OF_NODE) \
+ 			-DGPIB_CONFIG_PCMCIA=$(GPIB_CONFIG_PCMCIA) \
+@@ -17,7 +20,9 @@
+ obj-y += hp_82335/
+ obj-y += hp_82341/
+ obj-y += ines/
+-obj-$(CONFIG_USB) += lpvo_usb_gpib/
++ifeq (${KERNEL_GE_5_10},0)
++	obj-$(CONFIG_USB) += lpvo_usb_gpib/
++endif
+ obj-y += nec7210/
+ obj-$(CONFIG_USB) += ni_usb/
+ ifeq ($(CONFIG_GPIB_ISA),yes)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/linux-gpib.git/commitdiff/403be2a0e78af8c07027761f2c8ae84fc1253f5c



More information about the pld-cvs-commit mailing list