diff options
author | Vikraman Choudhury <vikraman@gentoo.org> | 2013-07-03 00:36:45 +0000 |
---|---|---|
committer | Vikraman Choudhury <vikraman@gentoo.org> | 2013-07-03 00:36:45 +0000 |
commit | 75493915df7c832e66973424e04514dcb3a92c60 (patch) | |
tree | 770f3af348b635967875711d78b7da9955e26cf7 /sys-block/rts_pstor | |
parent | Patch to fix build on linux 3.10 (diff) | |
download | gentoo-2-75493915df7c832e66973424e04514dcb3a92c60.tar.gz gentoo-2-75493915df7c832e66973424e04514dcb3a92c60.tar.bz2 gentoo-2-75493915df7c832e66973424e04514dcb3a92c60.zip |
Patch to fix build on linux 3.10
(Portage version: 2.2.0_alpha186/cvs/Linux x86_64, signed Manifest commit with key B0A72FD2)
Diffstat (limited to 'sys-block/rts_pstor')
-rw-r--r-- | sys-block/rts_pstor/ChangeLog | 8 | ||||
-rw-r--r-- | sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch | 53 | ||||
-rw-r--r-- | sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild | 4 | ||||
-rw-r--r-- | sys-block/rts_pstor/rts_pstor-1.10-r2.ebuild | 35 |
4 files changed, 97 insertions, 3 deletions
diff --git a/sys-block/rts_pstor/ChangeLog b/sys-block/rts_pstor/ChangeLog index 34421778f5c4..b1f425330f62 100644 --- a/sys-block/rts_pstor/ChangeLog +++ b/sys-block/rts_pstor/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-block/rts_pstor # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/rts_pstor/ChangeLog,v 1.2 2013/05/28 19:48:25 vikraman Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/rts_pstor/ChangeLog,v 1.3 2013/07/03 00:36:45 vikraman Exp $ + +*rts_pstor-1.10-r2 (03 Jul 2013) + + 03 Jul 2013; Vikraman <vikraman@gentoo.org> rts_pstor-1.10-r1.ebuild, + +rts_pstor-1.10-r2.ebuild, +files/rts_pstor-linux-3.10.patch: + Patch to fix build on linux 3.10 *rts_pstor-1.10-r1 (28 May 2013) diff --git a/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch b/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch new file mode 100644 index 000000000000..0070549b88d8 --- /dev/null +++ b/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch @@ -0,0 +1,53 @@ +--- rts_pstor.a/rtsx.c 2013-07-03 05:39:26.316723407 +0530 ++++ rts_pstor.b/rtsx.c 2013-07-03 05:28:28.584882761 +0530 +@@ -135,38 +135,18 @@ + + + #undef SPRINTF +-#define SPRINTF(args...) \ +- do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0) ++#define SPRINTF(args...) seq_printf(m, ##args) + +-static int proc_info (struct Scsi_Host *host, char *buffer, +- char **start, off_t offset, int length, int inout) ++static int show_info(struct seq_file *m, struct Scsi_Host *host) + { +- char *pos = buffer; +- +- +- if (inout) +- return length; +- + + SPRINTF(" Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME); +- + + SPRINTF(" Vendor: Realtek Corp.\n"); + SPRINTF(" Product: PCIE Card Reader\n"); + SPRINTF(" Version: %s\n", DRIVER_VERSION); + SPRINTF(" Build: %s\n", DRIVER_MAKE_TIME); +- +- /* +- * Calculate start of next buffer, and return value. +- */ +- *start = buffer + offset; +- +- if ((pos - buffer) < offset) +- return (0); +- else if ((pos - buffer - offset) < length) +- return (pos - buffer - offset); +- else +- return (length); ++ return 0; + } + + +@@ -272,7 +252,7 @@ + + .name = CR_DRIVER_NAME, + .proc_name = CR_DRIVER_NAME, +- .proc_info = proc_info, ++ .show_info = show_info, + .info = host_info, + + diff --git a/sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild b/sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild index 52847e49fe5d..7ec6d1c04dc6 100644 --- a/sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild +++ b/sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild,v 1.1 2013/05/28 19:48:25 vikraman Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/rts_pstor/rts_pstor-1.10-r1.ebuild,v 1.2 2013/07/03 00:36:45 vikraman Exp $ EAPI=4 @@ -25,7 +25,7 @@ BUILD_TARGETS="default" src_prepare() { sed -i -e 's/\/lib\/modules\/\$(shell uname -r)\/build\//\$(KERNELDIR)/g' Makefile || die "Sed failed!" - epatch "${FILESDIR}/${PN}-linux-3.8.patch" + [ ${KV_MAJOR} -ge 3 ] && [ ${KV_MINOR} -ge 8 ] && epatch "${FILESDIR}/${PN}-linux-3.8.patch" } pkg_setup() { diff --git a/sys-block/rts_pstor/rts_pstor-1.10-r2.ebuild b/sys-block/rts_pstor/rts_pstor-1.10-r2.ebuild new file mode 100644 index 000000000000..5bddc35754a9 --- /dev/null +++ b/sys-block/rts_pstor/rts_pstor-1.10-r2.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/rts_pstor/rts_pstor-1.10-r2.ebuild,v 1.1 2013/07/03 00:36:45 vikraman Exp $ + +EAPI=4 + +inherit linux-mod + +DESCRIPTION="PCIE RTS5209 card reader driver for Linux" +HOMEPAGE="http://www.realtek.com.tw/Downloads/downloadsView.aspx?PNid=15&PFid=25&Level=4&Conn=3&DownTypeID=3" +SRC_URI="http://dev.gentoo.org/~vikraman/distfiles/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}" + +MODULE_NAMES="rts_pstor(kernel/drivers/scsi)" +BUILD_TARGETS="default" + +src_prepare() { + sed -i -e 's/\/lib\/modules\/\$(shell uname -r)\/build\//\$(KERNELDIR)/g' Makefile || die "Sed failed!" + [ ${KV_MAJOR} -ge 3 ] && [ ${KV_MINOR} -ge 8 ] && epatch "${FILESDIR}/${PN}-linux-3.8.patch" + [ ${KV_MAJOR} -ge 3 ] && [ ${KV_MINOR} -ge 10 ] && epatch "${FILESDIR}/${PN}-linux-3.10.patch" +} + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}" +} |