]> git.pld-linux.org Git - packages/qemu.git/blob - qemu-system-libcacard.patch
- merged system-libcacard patch from qemu-kvm
[packages/qemu.git] / qemu-system-libcacard.patch
1 diff -ur qemu-kvm-1.2.0/configure qemu-kvm-1.2.0-system-libcacard/configure
2 --- qemu-kvm-1.2.0/configure    2012-11-09 08:07:04.559211692 +0100
3 +++ qemu-kvm-1.2.0-system-libcacard/configure   2012-11-09 07:56:31.483388690 +0100
4 @@ -2725,9 +2725,10 @@
5  #include <pk11pub.h>
6  int main(void) { PK11_FreeSlot(0); return 0; }
7  EOF
8 -        smartcard_includes="-I\$(SRC_PATH)/libcacard"
9 -        libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs"
10 -        libcacard_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags"
11 +        libcacard_libs="$($pkg_config --libs libcacard 2>/dev/null)"
12 +        libcacard_cflags="$($pkg_config --cflags libcacard 2>/dev/null)"
13 +        nss_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs"
14 +        nss_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags"
15          test_cflags="$libcacard_cflags"
16          # The header files in nss < 3.13.3 have a bug which causes them to
17          # emit a warning. If we're going to compile QEMU with -Werror, then
18 @@ -2737,11 +2738,10 @@
19              test_cflags="-Werror $test_cflags"
20          fi
21          if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
22 -          compile_prog "$test_cflags" "$libcacard_libs"; then
23 +          compile_prog "$test_cflags" "$nss_libs"; then
24              smartcard_nss="yes"
25 -            QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags"
26 -            QEMU_INCLUDES="$QEMU_INCLUDES $smartcard_includes"
27 -            libs_softmmu="$libcacard_libs $libs_softmmu"
28 +            QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags $nss_cflags"
29 +            libs_softmmu="$libcacard_libs $nss_libs $libs_softmmu"
30          else
31              if test "$smartcard_nss" = "yes"; then
32                  feature_not_found "nss"
33 @@ -3069,9 +3069,6 @@
34      fi
35    fi
36  fi
37 -if test "$smartcard_nss" = "yes" ; then
38 -  tools="vscclient\$(EXESUF) $tools"
39 -fi
40  
41  # Mac OS X ships with a broken assembler
42  roms=
43 @@ -3454,6 +3451,8 @@
44    echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak
45    echo "libcacard_libs=$libcacard_libs" >> $config_host_mak
46    echo "libcacard_cflags=$libcacard_cflags" >> $config_host_mak
47 +  echo "nss_libs=$nss_libs" >> $config_host_mak
48 +  echo "nss_cflags=$nss_cflags" >> $config_host_mak
49  fi
50  
51  if test "$usb_redir" = "yes" ; then
52 @@ -3909,9 +3908,6 @@
53    echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak
54    echo "HWDIR=../libhw$target_phys_bits" >> $config_target_mak
55    echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak
56 -  if test "$smartcard_nss" = "yes" ; then
57 -    echo "subdir-$target: subdir-libcacard" >> $config_host_mak
58 -  fi
59    case "$target_arch2" in
60      i386|x86_64)
61        echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
62 @@ -4118,10 +4114,9 @@
63  DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
64  DIRS="$DIRS roms/seabios roms/vgabios"
65  DIRS="$DIRS qapi-generated"
66 -DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
67  FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
68  FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
69 -FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
70 +FILES="$FILES tests/tcg/lm32/Makefile"
71  FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
72  FILES="$FILES pc-bios/spapr-rtas/Makefile"
73  FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
74 diff -ur qemu-kvm-1.2.0/hw/ccid-card-passthru.c qemu-kvm-1.2.0-system-libcacard/hw/ccid-card-passthru.c
75 --- qemu-kvm-1.2.0/hw/ccid-card-passthru.c      2012-09-06 10:31:27.000000000 +0200
76 +++ qemu-kvm-1.2.0-system-libcacard/hw/ccid-card-passthru.c     2012-11-09 07:44:11.286748135 +0100
77 @@ -12,7 +12,7 @@
78  #include "qemu_socket.h"
79  #include "monitor.h"
80  #include "hw/ccid.h"
81 -#include "libcacard/vscard_common.h"
82 +#include <cacard/vscard_common.h>
83  
84  #define DPRINTF(card, lvl, fmt, ...)                    \
85  do {                                                    \
86 diff -ur qemu-kvm-1.2.0/Makefile qemu-kvm-1.2.0-system-libcacard/Makefile
87 --- qemu-kvm-1.2.0/Makefile     2012-09-06 10:31:27.000000000 +0200
88 +++ qemu-kvm-1.2.0-system-libcacard/Makefile    2012-11-09 07:42:39.346751378 +0100
89 @@ -98,8 +98,6 @@
90  include $(SRC_PATH)/Makefile.objs
91  endif
92  
93 -subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
94 -
95  $(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis
96  
97  $(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
98 @@ -130,25 +128,6 @@
99         $(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
100  
101  version-obj-$(CONFIG_WIN32) += version.o
102 -######################################################################
103 -# Support building shared library libcacard
104 -
105 -.PHONY: libcacard.la install-libcacard
106 -ifeq ($(LIBTOOL),)
107 -libcacard.la:
108 -       @echo "libtool is missing, please install and rerun configure"; exit 1
109 -
110 -install-libcacard:
111 -       @echo "libtool is missing, please install and rerun configure"; exit 1
112 -else
113 -libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
114 -       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,)
115 -
116 -install-libcacard: libcacard.la
117 -       $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,)
118 -endif
119 -
120 -######################################################################
121  
122  qemu-img.o: qemu-img-cmds.h
123  
124 @@ -163,9 +142,6 @@
125  
126  qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
127  
128 -vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) $(tools-obj-y) qemu-timer-common.o libcacard/vscclient.o
129 -       $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS),"  LINK  $@")
130 -
131  fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
132  fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
133  
134 @@ -226,7 +202,7 @@
135         rm -rf qapi-generated
136         rm -rf qga/qapi-generated
137         $(MAKE) -C tests/tcg clean
138 -       for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \
139 +       for d in $(ALL_SUBDIRS) $(QEMULIBS); do \
140         if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
141         rm -f $$d/qemu-options.def; \
142          done
143 diff -ur qemu-kvm-1.2.0/Makefile.objs qemu-kvm-1.2.0-system-libcacard/Makefile.objs
144 --- qemu-kvm-1.2.0/Makefile.objs        2012-09-06 10:31:27.000000000 +0200
145 +++ qemu-kvm-1.2.0-system-libcacard/Makefile.objs       2012-11-09 07:45:10.880079366 +0100
146 @@ -204,17 +204,6 @@
147  $(trace-obj-y): $(GENERATED_HEADERS)
148  
149  ######################################################################
150 -# smartcard
151 -
152 -libcacard-y += libcacard/cac.o libcacard/event.o
153 -libcacard-y += libcacard/vcard.o libcacard/vreader.o
154 -libcacard-y += libcacard/vcard_emul_nss.o
155 -libcacard-y += libcacard/vcard_emul_type.o
156 -libcacard-y += libcacard/card_7816.o
157 -
158 -common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
159 -
160 -######################################################################
161  # qapi
162  
163  qapi-obj-y = qapi/
This page took 0.040277 seconds and 3 git commands to generate.