diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2016-06-17 19:05:09 +0300 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2016-06-17 19:05:40 +0300 |
commit | d8885d5e1b824691f554644cb086dabd8883b916 (patch) | |
tree | 2e938ce66a98f4defa7fde24b974226c6f66c027 /sys-apps/pcsc-slb-rf72-drv | |
parent | app-i18n/sunpinyin: Update HOMEPAGE. (diff) | |
download | gentoo-d8885d5e1b824691f554644cb086dabd8883b916.tar.gz gentoo-d8885d5e1b824691f554644cb086dabd8883b916.tar.bz2 gentoo-d8885d5e1b824691f554644cb086dabd8883b916.zip |
sys-apps/pcsc-slb-rf72-drv: fixups
EAP-6, fix src_uri, rework patch
Bug: 530668
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-apps/pcsc-slb-rf72-drv')
4 files changed, 54 insertions, 62 deletions
diff --git a/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-build-new.patch b/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-build-new.patch deleted file mode 100644 index dd386b686bc8..000000000000 --- a/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-build-new.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urNp slb_rf72.org/ifdhandler.c slb_rf72/ifdhandler.c ---- slb_rf72.org/ifdhandler.c 2001-08-23 17:19:22.000000000 +0300 -+++ slb_rf72/ifdhandler.c 2006-10-07 12:57:43.000000000 +0200 -@@ -37,6 +37,7 @@ - #ifdef HAVE_PTHREAD_H - #include <pthread.h> - #endif -+#include <openct/ctapi.h> - - /* - * Not exported constants definition -diff -urNp slb_rf72.org/Makefile slb_rf72/Makefile ---- slb_rf72.org/Makefile 2001-09-05 18:22:00.000000000 +0300 -+++ slb_rf72/Makefile 2006-10-07 13:05:20.000000000 +0200 -@@ -16,7 +16,7 @@ clean: - rm -f test *.o *.lo *.so - - lib: $(OBJ) -- $(LD) -G ifdhandler.o lib/libctapi.a -o libslb_rf72.so -+ $(CC) $(LDFLAGS) -shared `pkg-config --libs-only-L libopenct` -lopenctapi ifdhandler.o -o libslb_rf72.so - - ifdhandler.o: ifdhandler.h ifdhandler.c -- $(CC) $(CFLAGS) -c ifdhandler.c $(INCLUDES) -+ $(CC) $(CFLAGS) `pkg-config --cflags libopenct` -fPIC -DHAVE_PTHREAD_H -c ifdhandler.c $(INCLUDES) diff --git a/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-build.patch b/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-build.patch deleted file mode 100644 index 0e6a7db2baf0..000000000000 --- a/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-build.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urNp slb_rf72.org/ifdhandler.c slb_rf72/ifdhandler.c ---- slb_rf72.org/ifdhandler.c 2001-08-23 17:19:22.000000000 +0300 -+++ slb_rf72/ifdhandler.c 2006-10-07 12:57:43.000000000 +0200 -@@ -37,6 +37,7 @@ - #ifdef HAVE_PTHREAD_H - #include <pthread.h> - #endif -+#include <openct/ctapi.h> - - /* - * Not exported constants definition -diff -urNp slb_rf72.org/Makefile slb_rf72/Makefile ---- slb_rf72.org/Makefile 2001-09-05 18:22:00.000000000 +0300 -+++ slb_rf72/Makefile 2006-10-07 13:05:20.000000000 +0200 -@@ -16,7 +16,7 @@ clean: - rm -f test *.o *.lo *.so - - lib: $(OBJ) -- $(LD) -G ifdhandler.o lib/libctapi.a -o libslb_rf72.so -+ $(CC) -shared `pkg-config --libs-only-L libopenct` -lopenctapi ifdhandler.o -o libslb_rf72.so - - ifdhandler.o: ifdhandler.h ifdhandler.c -- $(CC) $(CFLAGS) -c ifdhandler.c $(INCLUDES) -+ $(CC) $(CFLAGS) `pkg-config --cflags libopenct` -fPIC -DHAVE_PTHREAD_H -c ifdhandler.c $(INCLUDES) diff --git a/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch b/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch new file mode 100644 index 000000000000..c7ddb87a5a7f --- /dev/null +++ b/sys-apps/pcsc-slb-rf72-drv/files/pcsc-slb-rf72-drv-1.1.0-openct.patch @@ -0,0 +1,41 @@ +From a0822b820d59a53b0aab87cc12c4d1eae2228561 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Fri, 17 Jun 2016 18:58:05 +0300 +Subject: [PATCH] build: use openct instead of embedded binary ctapi + +Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> +--- + Makefile | 4 ++-- + ifdhandler.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index cdba2b6..319449a 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,7 +16,7 @@ clean: + rm -f test *.o *.lo *.so + + lib: $(OBJ) +- $(LD) -G ifdhandler.o lib/libctapi.a -o libslb_rf72.so ++ $(CC) $(LDFLAGS) -shared `pkg-config --libs-only-L libopenct` -lopenctapi ifdhandler.o -o libslb_rf72.so + + ifdhandler.o: ifdhandler.h ifdhandler.c +- $(CC) $(CFLAGS) -c ifdhandler.c $(INCLUDES) ++ $(CC) $(CFLAGS) `pkg-config --cflags libopenct` -fPIC -DHAVE_PTHREAD_H -c ifdhandler.c $(INCLUDES) +diff --git a/ifdhandler.c b/ifdhandler.c +index cbb3a65..256605e 100644 +--- a/ifdhandler.c ++++ b/ifdhandler.c +@@ -29,7 +29,7 @@ + #include "pcscdefines.h" + #include "ifdhandler.h" + #include <ctapidefines.h> +-#include <ctapi.h> ++#include <openct/ctapi.h> + #include <ctbcs.h> + #include <stdio.h> + #include <string.h> +-- +2.7.3 + diff --git a/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild b/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild index 7af68a538a39..777ba41cce3e 100644 --- a/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild +++ b/sys-apps/pcsc-slb-rf72-drv/pcsc-slb-rf72-drv-1.1.0-r2.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="2" +EAPI="6" inherit eutils toolchain-funcs @@ -14,37 +14,36 @@ LICENSE="all-rights-reserved BSD LGPL-2.1+" KEYWORDS="~amd64 ~x86" IUSE="" SLOT="0" -SRC_URI="http://www.linuxnet.com/drivers/readers/files/slb_rf72-drv-1.1.0.tar.gz" -RESTRICT="mirror bindist" +SRC_URI="mirror://gentoo/${MY_P}-drv-${PV}.tar.gz" RDEPEND="sys-apps/pcsc-lite dev-libs/openct" DEPEND="${RDEPEND} virtual/pkgconfig" -src_prepare() { - epatch "${FILESDIR}/${P}-build-new.patch" -} +PATCHES=( + "${FILESDIR}/${P}-openct.patch" +) src_compile() { - emake CC="$(tc-getCC)" LD="$(tc-getLD)" || die + emake CC="$(tc-getCC)" LD="$(tc-getLD)" } src_install () { local pcscdir="$(pkg-config --variable=usbdropdir libpcsclite)" local conf="/etc/reader.conf.d/${PN}.conf" - dodoc ERRATA README || die + dodoc ERRATA README - dodir "${pcscdir}/serial" || die + dodir "${pcscdir}/serial" insinto "${pcscdir}/serial" insopts -m755 - doins libslb_rf72.so || die + doins libslb_rf72.so - dodir "$(dirname "${conf}")" || die + dodir "$(dirname "${conf}")" insinto "$(dirname "${conf}")" - newins "${FILESDIR}/reader.conf" "$(basename "${conf}")" || die - sed -i "s#%PCSC_DRIVERS_DIR%#${pcscdir}#g" "${D}/${conf}" || die + newins "${FILESDIR}/reader.conf" "$(basename "${conf}")" + sed -i "s#%PCSC_DRIVERS_DIR%#${pcscdir}#g" "${D}/${conf}" einfo "NOTICE:" einfo "1. modify ${conf}" |