[vlc-devel] [PATCH 2/3] aribb25: use PCSC.framework on MacOS X
Sean McGovern
gseanmcg at gmail.com
Mon Nov 3 23:58:09 CET 2014
---
contrib/src/aribb25/aribb25-pcsc_framework.patch | 55 ++++++++++++++++++++++++
contrib/src/aribb25/rules.mak | 2 +
2 files changed, 57 insertions(+)
create mode 100644 contrib/src/aribb25/aribb25-pcsc_framework.patch
diff --git a/contrib/src/aribb25/aribb25-pcsc_framework.patch b/contrib/src/aribb25/aribb25-pcsc_framework.patch
new file mode 100644
index 0000000..5fbe75b
--- /dev/null
+++ b/contrib/src/aribb25/aribb25-pcsc_framework.patch
@@ -0,0 +1,55 @@
+--- aribb25/Makefile.am.orig 2014-10-21 15:08:42.000000000 -0400
++++ aribb25/Makefile.am 2014-11-03 17:46:24.000000000 -0500
+@@ -6,7 +6,7 @@
+ src/b_cas_card_error_code.h src/multi2_error_code.h src/td.c \
+ src/ts_section_parser_error_code.h src/arib_std_b25.h src/b_cas_card.h \
+ src/multi2.h src/ts_common_types.h src/ts_section_parser.h src/aribb25api.h
+-libaribb25_la_LIBADD = $(AM_LIBS) $(pcsclite_CFLAGS)
++libaribb25_la_LIBADD = $(AM_LIBS) $(pcsclite_CFLAGS) $(PCSC_LIBS)
+ libaribb25_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -fvisibility=hidden $(pcsclite_CFLAGS)
+
+ pkginclude_HEADERS = src/arib_std_b25_error_code.h src/b_cas_card_error_code.h \
+--- aribb25/configure.ac.orig 2014-10-21 16:58:53.000000000 -0400
++++ aribb25/configure.ac 2014-11-03 17:46:24.000000000 -0500
+@@ -20,12 +20,25 @@
+ *mingw32* | *cygwin*)
+ SYS=mingw32
+ ;;
++ darwin*)
++ SYS=macosx
++ ;;
+ esac
+
+ # Checks for libraries.
+ AS_IF([test "$SYS" = mingw32],[
+ LDFLAGS="-no-undefined -lwinscard"
+ AC_SUBST(PC_LIBS, "-lwinscard")
++],[test "$SYS" = macosx],[
++ AC_MSG_CHECKING([for PCSC.framework])
++ gt_save_LIBS=$LIBS
++ LIBS="$LIBS -Wl,-framework -Wl,PCSC"
++ AC_TRY_LINK([#include <PCSC/winscard.h>],
++ [SCardUnload()],
++ AC_MSG_RESULT([yes]),
++ AC_MSG_RESULT([no]))
++ LIBS="$gt_save_LIBS"
++ AC_SUBST(PCSC_LIBS, ["-Wl,-framework -Wl,PCSC"])
+ ],[
+ PKG_CHECK_MODULES(pcsclite, "libpcsclite", [
+ AC_DEFINE(HAVE_PCSC, 1, "have libpcsclite")
+--- aribb25/src/b_cas_card.c.orig 2014-10-17 19:49:10.000000000 -0400
++++ aribb25/src/b_cas_card.c 2014-11-03 17:46:24.000000000 -0500
+@@ -7,7 +7,13 @@
+
+ #include <math.h>
+
++#ifdef __APPLE__
++#include <PCSC/winscard.h>
++#include <PCSC/wintypes.h>
++#else
+ #include <winscard.h>
++#endif
++
+
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ inner structures
diff --git a/contrib/src/aribb25/rules.mak b/contrib/src/aribb25/rules.mak
index c5665bb..cda15cb 100644
--- a/contrib/src/aribb25/rules.mak
+++ b/contrib/src/aribb25/rules.mak
@@ -18,9 +18,11 @@ $(TARBALLS)/aribb25-$(ARIBB25_VERSION).tar.gz:
aribb25: aribb25-$(ARIBB25_VERSION).tar.gz .sum-aribb25
$(UNPACK)
$(APPLY) $(SRC)/aribb25/aribb25-header_guard.patch
+ $(APPLY) $(SRC)/aribb25/aribb25-pcsc_framework.patch
$(MOVE)
.aribb25: aribb25
+ $(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
cd $< && $(MAKE) && $(MAKE) install
touch $@
--
1.9.3 (Apple Git-50)
More information about the vlc-devel
mailing list