diff --git a/repos/libports/lib/mk/ccid.mk b/repos/libports/lib/mk/ccid.mk
new file mode 100644
index 0000000000..8e339a39ee
--- /dev/null
+++ b/repos/libports/lib/mk/ccid.mk
@@ -0,0 +1,33 @@
+# we need pcsc-lite headers, but cannot add pcsc-lite to LIBS because of circular dependency
+include $(call select_from_repositories,lib/import/import-pcsc-lite.mk)
+
+LIBCCID_DIR := $(call select_from_ports,ccid)/src/lib/ccid
+LIBS += libusb libc
+
+# find 'config.h'
+INC_DIR += $(REP_DIR)/src/lib/ccid
+
+INC_DIR += $(LIBCCID_DIR)/src
+
+SRC_C = ccid.c \
+ commands.c \
+ ifdhandler.c \
+ utils.c \
+ ccid_usb.c \
+ tokenparser.c \
+ towitoko/atr.c \
+ towitoko/pps.c \
+ openct/buffer.c \
+ openct/checksum.c \
+ openct/proto-t1.c
+
+INFO_PLIST := $(BUILD_BASE_DIR)/bin/Info.plist
+
+HOST_TOOLS += $(INFO_PLIST)
+
+$(INFO_PLIST): $(LIBCCID_DIR)/src/Info.plist.src $(LIBCCID_DIR)/readers/supported_readers.txt
+ $(LIBCCID_DIR)/src/create_Info_plist.pl $(LIBCCID_DIR)/readers/supported_readers.txt $(LIBCCID_DIR)/src/Info.plist.src --target=dummy --version=dummy > $@
+
+vpath %.c $(LIBCCID_DIR)/src
+
+SHARED_LIB = yes
diff --git a/repos/libports/ports/ccid.hash b/repos/libports/ports/ccid.hash
new file mode 100644
index 0000000000..ad5aad094f
--- /dev/null
+++ b/repos/libports/ports/ccid.hash
@@ -0,0 +1 @@
+959827ad03a64dceb37fc8368dbc6346a75b9be9
diff --git a/repos/libports/ports/ccid.port b/repos/libports/ports/ccid.port
new file mode 100644
index 0000000000..09e2ca8ac4
--- /dev/null
+++ b/repos/libports/ports/ccid.port
@@ -0,0 +1,7 @@
+LICENSE := LGPL
+DOWNLOADS := ccid.archive
+VERSION := 1.4.24
+
+URL(ccid) := https://alioth.debian.org/frs/download.php/file/4171/ccid-$(VERSION).tar.bz2
+SHA(ccid) := b01e975fd49e277b392b4ec43936ab24d4838e99
+DIR(ccid) := src/lib/ccid
diff --git a/repos/libports/src/lib/ccid/README b/repos/libports/src/lib/ccid/README
new file mode 100644
index 0000000000..6254c5efba
--- /dev/null
+++ b/repos/libports/src/lib/ccid/README
@@ -0,0 +1,22 @@
+Configuration:
+
+The CCID library loads the '/ifd-ccid.bundle/Contents/Info.plist" file, which
+can be made available from a ROM module in the VFS of the application:
+
+When the CCID library is built, it creates a file 'Info.plist' in the 'bin'
+directory, which contains information about the supported card readers.
+This file is loaded by the library at runtime as
+'/ifd-ccid.bundle/Contents/Info.plist' and can be made accessible at this
+location in the VFS configuration of the application:
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/libports/src/lib/ccid/config.h b/repos/libports/src/lib/ccid/config.h
new file mode 100644
index 0000000000..ec72b8c89e
--- /dev/null
+++ b/repos/libports/src/lib/ccid/config.h
@@ -0,0 +1,142 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* bundle directory name */
+#define BUNDLE "ifd-ccid.bundle"
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_LIBUSB_H 1
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have POSIX threads libraries and header files. */
+/* #undef HAVE_PTHREAD */
+
+/* Have PTHREAD_PRIO_INHERIT. */
+/* #undef HAVE_PTHREAD_PRIO_INHERIT */
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+/* #undef HAVE_STRLCAT */
+
+/* Define to 1 if you have the `strlcpy' function. */
+/* #undef HAVE_STRLCPY */
+
+/* Define to 1 if you have the `strncpy' function. */
+#define HAVE_STRNCPY 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* Disable logging support */
+/* #undef NO_LOG */
+
+/* Name of package */
+#define PACKAGE "ccid"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "ccid"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "ccid 1.4.24"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "ccid"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.4.24"
+
+/* directory containing USB drivers */
+#define PCSCLITE_HP_DROPDIR ""
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both and . */
+#define TIME_WITH_SYS_TIME 1
+
+/* composite device are seen as multi-slots */
+/* #undef USE_COMPOSITE_AS_MULTISLOT */
+
+/* Use syslog(3) for debug */
+/* #undef USE_SYSLOG */
+
+/* Version number of package */
+#define VERSION "1.4.24"
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#define YYTEXT_POINTER 1
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `unsigned int' if does not define. */
+/* #undef size_t */