summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThéo Le Calvar2020-08-17 14:37:36 +0200
committerThéo Le Calvar2020-08-17 15:36:17 +0200
commit4142716861fcc56ed75d1d88b371b4a3186e05d6 (patch)
tree26e78a7db76aeb39229a187f73cb84d6c5803eed
parent8506911bd1774c8dc4b90c4ae2df585233a5fcdc (diff)
downloadaur-4142716861fcc56ed75d1d88b371b4a3186e05d6.tar.gz
fix build errors for kernel 5.8.1
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD20
-rw-r--r--fix-makefile.patch24
-rw-r--r--fix-mmap-lock.patch28
4 files changed, 69 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1f9f51f2ed7a..1066237a16b4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = decklink
pkgdesc = Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video editing cards
pkgver = 11.6
- pkgrel = 1
+ pkgrel = 2
url = https://www.blackmagicdesign.com/support/family/capture-and-playback
arch = i686
arch = x86_64
@@ -10,7 +10,11 @@ pkgbase = decklink
options = !strip
options = staticlibs
source = decklink-11.6.tar.gz::https://www.blackmagicdesign.com/api/register/us/download/6b9e675965fc4c3b9ece9e040dff5358
+ source = fix-makefile.patch
+ source = fix-mmap-lock.patch
sha256sums = 008dcbaa019efd69c802e9caa497d719a2774ee6bccf1a57906702ffc60a9563
+ sha256sums = c5590e0d80a01cf1b232145f43ac7993e924d7552375f747d31169dd934265fd
+ sha256sums = 824c3fcfd79196301a4274e51b026945ed72db0d24b8ce272ccef3567b014493
pkgname = decklink
install = decklink.install
diff --git a/PKGBUILD b/PKGBUILD
index 86e59b5b2aa5..bee37fda188c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgbase=decklink
pkgname=(decklink mediaexpress)
_pkgname=decklink
pkgver=11.6
-pkgrel=1
+pkgrel=2
pkgdesc="Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video editing cards"
arch=('i686' 'x86_64')
url="https://www.blackmagicdesign.com/support/family/capture-and-playback"
@@ -29,8 +29,12 @@ DLAGENTS=("https::/usr/bin/curl \
)"
)
-source=("${_pkgsrc_file}"::"${_pkgsrc_url}")
-sha256sums=('008dcbaa019efd69c802e9caa497d719a2774ee6bccf1a57906702ffc60a9563')
+source=("${_pkgsrc_file}"::"${_pkgsrc_url}"
+ "fix-makefile.patch"
+ "fix-mmap-lock.patch")
+sha256sums=('008dcbaa019efd69c802e9caa497d719a2774ee6bccf1a57906702ffc60a9563'
+ 'c5590e0d80a01cf1b232145f43ac7993e924d7552375f747d31169dd934265fd'
+ '824c3fcfd79196301a4274e51b026945ed72db0d24b8ce272ccef3567b014493')
prepare() {
cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch}
@@ -39,11 +43,11 @@ prepare() {
cd desktopvideo-*/usr/src
-# for p in ${srcdir}/*.patch;
-# do
-# echo "Applying ${p}"
-# patch --forward --strip=1 --input="${p}"
-# done
+ for p in ${srcdir}/*.patch;
+ do
+ echo "Applying ${p}"
+ patch --forward --strip=1 --input="${p}"
+ done
}
package_decklink() {
diff --git a/fix-makefile.patch b/fix-makefile.patch
new file mode 100644
index 000000000000..8e5f7a8fb4a7
--- /dev/null
+++ b/fix-makefile.patch
@@ -0,0 +1,24 @@
+diff --git a/blackmagic-11.6a26/Makefile b/blackmagic-11.6a26/Makefile
+index a157ae9..91a9ee0 100644
+--- a/blackmagic-11.6a26/Makefile
++++ b/blackmagic-11.6a26/Makefile
+@@ -40,6 +40,7 @@ KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
+ PWD := $(shell pwd)
+
+ all:
++ touch .bmd-support.o.cmd
+ $(MAKE) -C $(KERNELDIR) M=$(PWD)
+
+ clean:
+diff --git a/blackmagic-io-11.6a26/Makefile b/blackmagic-io-11.6a26/Makefile
+index 7e4699a..9dc379c 100644
+--- a/blackmagic-io-11.6a26/Makefile
++++ b/blackmagic-io-11.6a26/Makefile
+@@ -43,6 +43,7 @@ KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
+ PWD := $(shell pwd)
+
+ all:
++ touch .blackmagic.o.cmd
+ $(MAKE) -C $(KERNELDIR) M=$(PWD)
+
+ clean:
diff --git a/fix-mmap-lock.patch b/fix-mmap-lock.patch
new file mode 100644
index 000000000000..3c1780da47da
--- /dev/null
+++ b/fix-mmap-lock.patch
@@ -0,0 +1,28 @@
+diff --git a/blackmagic-11.6a26/blackmagic_lib.c b/blackmagic-11.6a26/blackmagic_lib.c
+index 83fab89..95f7c44 100644
+--- a/blackmagic-11.6a26/blackmagic_lib.c
++++ b/blackmagic-11.6a26/blackmagic_lib.c
+@@ -671,7 +671,11 @@ dl_get_user_pages(void *task_ptr, void *ptr, unsigned long size, unsigned long *
+ else
+ write = 0;
+
++#if KERNEL_VERSION_OR_LATER(5, 8, 0)
++ down_read(&current_task->mm->mmap_lock);
++#else
+ down_read(&current_task->mm->mmap_sem);
++#endif
+ #if KERNEL_VERSION_OR_LATER(4, 10, 0)
+ if (current_task == current)
+ ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
+@@ -692,7 +696,11 @@ dl_get_user_pages(void *task_ptr, void *ptr, unsigned long size, unsigned long *
+ #else
+ ret = get_user_pages(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
+ #endif
++#if KERNEL_VERSION_OR_LATER(5, 8, 0)
++ up_read(&current_task->mm->mmap_lock);
++#else
+ up_read(&current_task->mm->mmap_sem);
++#endif
+
+ if (ret < (long)*nr_pages)
+ {