aboutsummaryrefslogtreecommitdiffstats
path: root/main/libcrystalhd
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-05 09:42:10 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-12-05 09:42:10 +0200
commit467602b0a22fcc54d62c7c8c47ddeb50ce4ef181 (patch)
tree4fc23cfc94bec59ff3d5c26f2ef2765663d37499 /main/libcrystalhd
parentd32e71e2c863ff7b3c95f2acf96fd104ab85dc2b (diff)
downloadaports-467602b0a22fcc54d62c7c8c47ddeb50ce4ef181.tar.bz2
aports-467602b0a22fcc54d62c7c8c47ddeb50ce4ef181.tar.xz
main/libcrystalhd: fix build on non-x86 machines
also remove unused patches
Diffstat (limited to 'main/libcrystalhd')
-rw-r--r--main/libcrystalhd/0001-driver-remove-devinit-and-devexit-for-linux-3.8.patch106
-rw-r--r--main/libcrystalhd/APKBUILD12
-rw-r--r--main/libcrystalhd/crystalhd-use_8_DMA_buffers-0.1.patch11
-rw-r--r--main/libcrystalhd/gcc-opts-fix.patch17
4 files changed, 25 insertions, 121 deletions
diff --git a/main/libcrystalhd/0001-driver-remove-devinit-and-devexit-for-linux-3.8.patch b/main/libcrystalhd/0001-driver-remove-devinit-and-devexit-for-linux-3.8.patch
deleted file mode 100644
index a5b0eb2cda..0000000000
--- a/main/libcrystalhd/0001-driver-remove-devinit-and-devexit-for-linux-3.8.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 40aab27139c6e2291142fc8d93e4651effdeef90 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Tue, 12 Mar 2013 09:45:31 +0000
-Subject: [PATCH] driver: remove devinit and devexit for linux-3.8
-
-devinit and devexit were removed from kernel version 3.8 and using it
-causes compile problems.
-
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- driver/linux/crystalhd_cmds.c | 4 ++--
- driver/linux/crystalhd_lnx.c | 14 +++++++-------
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/driver/linux/crystalhd_cmds.c b/driver/linux/crystalhd_cmds.c
-index cecd710..f3d26e0 100644
---- a/driver/linux/crystalhd_cmds.c
-+++ b/driver/linux/crystalhd_cmds.c
-@@ -1093,7 +1093,7 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
- *
- * Called at the time of driver load.
- */
--BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
-+BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
- struct crystalhd_adp *adp)
- {
- struct device *dev = &adp->pdev->dev;
-@@ -1136,7 +1136,7 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
- *
- * Called at the time of driver un-load.
- */
--BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
-+BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
- {
- dev_dbg(chddev(), "Deleting Command context..\n");
-
-diff --git a/driver/linux/crystalhd_lnx.c b/driver/linux/crystalhd_lnx.c
-index 64e66ad..8608aea 100644
---- a/driver/linux/crystalhd_lnx.c
-+++ b/driver/linux/crystalhd_lnx.c
-@@ -431,7 +431,7 @@ static const struct file_operations chd_dec_fops = {
- .llseek = noop_llseek,
- };
-
--static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
-+static int chd_dec_init_chdev(struct crystalhd_adp *adp)
- {
- struct device *xdev = &adp->pdev->dev;
- struct device *dev;
-@@ -498,7 +498,7 @@ fail:
- return rc;
- }
-
--static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
-+static void chd_dec_release_chdev(struct crystalhd_adp *adp)
- {
- crystalhd_ioctl_data *temp = NULL;
- if (!adp)
-@@ -523,7 +523,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
- /*crystalhd_delete_elem_pool(adp); */
- }
-
--static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
-+static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
- {
- struct device *dev = &pinfo->pdev->dev;
- int rc;
-@@ -582,7 +582,7 @@ static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
- return 0;
- }
-
--static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
-+static void chd_pci_release_mem(struct crystalhd_adp *pinfo)
- {
- if (!pinfo)
- return;
-@@ -597,7 +597,7 @@ static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
- }
-
-
--static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
-+static void chd_dec_pci_remove(struct pci_dev *pdev)
- {
- struct crystalhd_adp *pinfo;
- BC_STATUS sts = BC_STS_SUCCESS;
-@@ -625,7 +625,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
- g_adp_info = NULL;
- }
-
--static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
-+static int chd_dec_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *entry)
- {
- struct device *dev = &pdev->dev;
-@@ -815,7 +815,7 @@ MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
- static struct pci_driver bc_chd_driver = {
- .name = "crystalhd",
- .probe = chd_dec_pci_probe,
-- .remove = __devexit_p(chd_dec_pci_remove),
-+ .remove = chd_dec_pci_remove,
- .id_table = chd_dec_pci_id_table,
- .suspend = chd_dec_pci_suspend,
- .resume = chd_dec_pci_resume
---
-1.8.1.5
-
diff --git a/main/libcrystalhd/APKBUILD b/main/libcrystalhd/APKBUILD
index 23a9819796..1301130bf7 100644
--- a/main/libcrystalhd/APKBUILD
+++ b/main/libcrystalhd/APKBUILD
@@ -4,7 +4,7 @@
pkgname=libcrystalhd
pkgver=20130708
_date=$pkgver
-pkgrel=0
+pkgrel=1
pkgdesc="Broadcom CrystalHD kernel driver library"
url="http://git.linuxtv.org/jarod/crystalhd.git"
arch="all"
@@ -15,6 +15,7 @@ makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-${_date}.tar.gz
+ gcc-opts-fix.patch
"
_giturl="git://linuxtv.org/jarod/crystalhd.git"
@@ -66,6 +67,9 @@ dev() {
default_dev
}
-md5sums="e184af8123997a429f029ffe40c14384 libcrystalhd-20130708.tar.gz"
-sha256sums="aa2d37789286d3c7c26e2274ef8f4b95cc54d68d7a0975723d7b145c829b8aa2 libcrystalhd-20130708.tar.gz"
-sha512sums="70a84f8102250a797b658153d7cd2ed2b05d00d801b52a0b6f877e0feecd55a83c32032c5b66dba8cb53863dabc5536dde6405087403d8fe730c27f6ea3ee1b2 libcrystalhd-20130708.tar.gz"
+md5sums="e184af8123997a429f029ffe40c14384 libcrystalhd-20130708.tar.gz
+813242fd499fcc535d32ccf8e28ea597 gcc-opts-fix.patch"
+sha256sums="aa2d37789286d3c7c26e2274ef8f4b95cc54d68d7a0975723d7b145c829b8aa2 libcrystalhd-20130708.tar.gz
+042f34ce979041fca9aeb10dee884777e9badbb04b7b533710468aaa2593c9c9 gcc-opts-fix.patch"
+sha512sums="70a84f8102250a797b658153d7cd2ed2b05d00d801b52a0b6f877e0feecd55a83c32032c5b66dba8cb53863dabc5536dde6405087403d8fe730c27f6ea3ee1b2 libcrystalhd-20130708.tar.gz
+7ef9034fd3ee8b4f94ac90d2c16a1c47ec856544924d4242ef93e9a73bd6487845f1a3dbc86b4cdadbad5a24a65495431a1961077d34d498386462a68a951359 gcc-opts-fix.patch"
diff --git a/main/libcrystalhd/crystalhd-use_8_DMA_buffers-0.1.patch b/main/libcrystalhd/crystalhd-use_8_DMA_buffers-0.1.patch
deleted file mode 100644
index 1b9150ea7b..0000000000
--- a/main/libcrystalhd/crystalhd-use_8_DMA_buffers-0.1.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/include/bc_dts_glob_lnx.h
-+++ b/include/bc_dts_glob_lnx.h
-@@ -76,7 +76,7 @@
- BC_LINK_MAX_OPENS = 3, /* Maximum simultaneous opens*/
- BC_LINK_MAX_SGLS = 1024, /* Maximum SG elements 4M/4K */
- BC_TX_LIST_CNT = 2, /* Max Tx DMA Rings */
-- BC_RX_LIST_CNT = 16, /* Max Rx DMA Rings*/
-+ BC_RX_LIST_CNT = 8, /* Max Rx DMA Rings*/
- BC_PROC_OUTPUT_TIMEOUT = 2000, /* Milliseconds */
- BC_INFIFO_THRESHOLD = 0x10000,
- };
diff --git a/main/libcrystalhd/gcc-opts-fix.patch b/main/libcrystalhd/gcc-opts-fix.patch
new file mode 100644
index 0000000000..c89c43d7fd
--- /dev/null
+++ b/main/libcrystalhd/gcc-opts-fix.patch
@@ -0,0 +1,17 @@
+Description: Patch to fix build failures on non x86 machines.
+Origin: Debian
+
+--- a/linux_lib/libcrystalhd/Makefile
++++ b/linux_lib/libcrystalhd/Makefile
+@@ -24,7 +24,10 @@
+ # -D_USE_SHMEM_
+
+ CPPFLAGS += ${INCLUDES}
+-CPPFLAGS += -O2 -Wall -fPIC -shared -fstrict-aliasing -msse2
++CPPFLAGS += -O2 -Wall -fPIC -shared -fstrict-aliasing
++MACHINE_OPTS = $(shell gcc -xc -c /dev/null -msse2 -o /dev/null \
++ >/dev/null 2>&1 && echo -msse2)
++CPPFLAGS += $(MACHINE_OPTS)
+ LDFLAGS = -Wl,-soname,${BCLIB_SL} -pthread
+
+ SRCFILES = libcrystalhd_if.cpp \