Add more missing libs
authorRISCi_ATOM <bob@bobcall.me>
Fri, 30 Mar 2018 19:53:55 +0000 (15:53 -0400)
committerRISCi_ATOM <bob@bobcall.me>
Fri, 30 Mar 2018 19:53:55 +0000 (15:53 -0400)
libs/cyrus-sasl/Makefile [new file with mode: 0644]
libs/libffi/Makefile [new file with mode: 0644]
libs/libffi/patches/002-fix-toolexeclibdir-path.patch [new file with mode: 0644]
libs/libffi/patches/100-fix_mips_softfloat.patch [new file with mode: 0644]
libs/libgpg-error/Makefile [new file with mode: 0644]
libs/libgpg-error/patches/001-gcc5.patch [new file with mode: 0644]
libs/libtasn1/Makefile [new file with mode: 0644]
libs/p11-kit/Makefile [new file with mode: 0644]
libs/p11-kit/files/opensc.module [new file with mode: 0644]

diff --git a/libs/cyrus-sasl/Makefile b/libs/cyrus-sasl/Makefile
new file mode 100644 (file)
index 0000000..dfc21d2
--- /dev/null
@@ -0,0 +1,112 @@
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cyrus-sasl
+PKG_VERSION:=2.1.26
+PKG_RELEASE:=3
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.cyrusimap.org/cyrus-sasl/
+PKG_MD5SUM:=a7f4e5e559a0e37b3ffc438c9456e425
+
+PKG_LICENSE:=BSD-4c BSD
+PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config
+PKG_AUTOMAKE_PATHS:=. saslauthd sasldb
+PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4 config/libtool.m4
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libsasl2
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A general purpose authentication library
+  URL:=http://asg.web.cmu.edu/sasl/
+  DEPENDS:=+libopenssl
+endef
+
+TARGET_CFLAGS += $(FPIC)
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --disable-sample \
+       --enable-staticdlopen \
+       --disable-java \
+       --disable-alwaystrue \
+       --disable-checkapop \
+       --enable-cram \
+       --enable-digest \
+       --without-auth-sasldb \
+       --disable-otp \
+       --disable-srp \
+       --disable-srp-setpass \
+       --disable-krb4 \
+       --disable-gssapi \
+       --disable-gss_mutexes \
+       --enable-plain \
+       --enable-anon \
+       --disable-login \
+       --disable-ntlm \
+       --disable-sql \
+       --disable-ldapdb \
+       --without-dblib \
+       --without-gdbm \
+       --with-devrandom="/dev/urandom" \
+       --without-pam \
+       --without-saslauthd \
+       --without-authdaemond \
+       --without-pwcheck \
+       --with-ipctype=unix \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --without-des \
+       --without-opie \
+       --without-ldap \
+       --without-mysql \
+       --without-pgsql \
+       --without-sqlite \
+       --without-rc4 \
+       --without-dmalloc \
+       --without-sfio \
+       --disable-sample
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/include \
+               CC="$(HOSTCC)" \
+               LINK="$(HOSTCC) -o makemd5 -lc" \
+               CFLAGS="" \
+               CPPFLAGS="" \
+               makemd5
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/
+       ln -sf libsasl2.a $(1)/usr/lib/libsasl.a
+       ln -sf libsasl2.so $(1)/usr/lib/libsasl.so
+       $(INSTALL_DIR) $(1)/usr/lib/sasl2
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/
+endef
+
+define Package/libsasl2/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/sasl2
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so* $(1)/usr/lib/sasl2/
+endef
+
+$(eval $(call BuildPackage,libsasl2))
diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile
new file mode 100644 (file)
index 0000000..a967d6a
--- /dev/null
@@ -0,0 +1,82 @@
+#
+# Copyright (C) 2009-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libffi
+PKG_VERSION:=3.2.1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/
+PKG_MD5SUM:=83b89587607e3eb65c70d361f13bab43
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/libffi
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Foreign Function Interface (FFI) library
+  URL:=http://sourceware.org/libffi/
+  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+endef
+
+define Package/libffi/description
+The libffi library provides a portable, high level programming interface to
+various calling conventions. This allows a programmer to call any function
+specified by a call interface description at run-time.
+
+FFI stands for Foreign Function Interface. A foreign function interface is the
+popular name for the interface that allows code written in one language to call
+code written in another language. The libffi library really only provides the
+lowest, machine dependent layer of a fully featured foreign function interface.
+A layer must exist above libffi that handles type conversions for values passed
+between the two languages.
+endef
+
+CONFIGURE_PATH = build
+CONFIGURE_CMD = ../configure
+MAKE_PATH = build
+
+define Build/Configure
+       mkdir -p $(PKG_BUILD_DIR)/build
+       $(Build/Configure/Default)
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
+               $(1)/usr/lib/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
+               $(1)/usr/lib/pkgconfig/
+       sed -i -e 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc
+
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION)/include/*.h \
+               $(1)/usr/include/
+endef
+
+define Package/libffi/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
+               $(1)/usr/lib/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libffi))
diff --git a/libs/libffi/patches/002-fix-toolexeclibdir-path.patch b/libs/libffi/patches/002-fix-toolexeclibdir-path.patch
new file mode 100644 (file)
index 0000000..f79c132
--- /dev/null
@@ -0,0 +1,31 @@
+diff -rupN libffi-3.2.1.orig/configure libffi-3.2.1/configure
+--- libffi-3.2.1.orig/configure        2014-11-12 12:59:57.000000000 +0100
++++ libffi-3.2.1/configure     2016-05-11 17:14:58.606625260 +0200
+@@ -18725,12 +18725,6 @@ if test "x$GCC" = "xyes"; then
+     toolexecdir="${libdir}"/gcc-lib/'$(target_alias)'
+     toolexeclibdir="${libdir}"
+   fi
+-  multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
+-  case $multi_os_directory in
+-    .) ;; # Avoid trailing /.
+-    ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+-  esac
+-
+ else
+   toolexeclibdir="${libdir}"
+ fi
+diff -rupN libffi-3.2.1.orig/configure.ac libffi-3.2.1/configure.ac
+--- libffi-3.2.1.orig/configure.ac     2014-11-12 12:56:51.000000000 +0100
++++ libffi-3.2.1/configure.ac  2016-05-11 17:15:19.694626266 +0200
+@@ -601,11 +601,6 @@ if test "x$GCC" = "xyes"; then
+     toolexecdir="${libdir}"/gcc-lib/'$(target_alias)'
+     toolexeclibdir="${libdir}"
+   fi
+-  multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
+-  case $multi_os_directory in
+-    .) ;; # Avoid trailing /.
+-    ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+-  esac
+   AC_SUBST(toolexecdir)
+ else
+   toolexeclibdir="${libdir}"
diff --git a/libs/libffi/patches/100-fix_mips_softfloat.patch b/libs/libffi/patches/100-fix_mips_softfloat.patch
new file mode 100644 (file)
index 0000000..09b91ef
--- /dev/null
@@ -0,0 +1,176 @@
+From bfeac1b2d18b12c1c3c64a41a09c90f93d0ed4ca Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 15 Aug 2016 15:00:13 +0800
+Subject: [PATCH] mips: fix MIPS softfloat build issue
+
+The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi:
+fix MIPS softfloat build issue with current binutils"
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ src/mips/n32.S | 17 +++++++++++++++++
+ src/mips/o32.S | 17 +++++++++++++++++
+ 2 files changed, 34 insertions(+)
+
+diff --git a/src/mips/n32.S b/src/mips/n32.S
+index c6985d3..8f25994 100644
+--- a/src/mips/n32.S
++++ b/src/mips/n32.S
+@@ -107,6 +107,16 @@ loadregs:
+       REG_L   t6, 3*FFI_SIZEOF_ARG($fp)  # load the flags word into t6.
++#ifdef __mips_soft_float
++      REG_L   a0, 0*FFI_SIZEOF_ARG(t9)
++      REG_L   a1, 1*FFI_SIZEOF_ARG(t9)
++      REG_L   a2, 2*FFI_SIZEOF_ARG(t9)
++      REG_L   a3, 3*FFI_SIZEOF_ARG(t9)
++      REG_L   a4, 4*FFI_SIZEOF_ARG(t9)
++      REG_L   a5, 5*FFI_SIZEOF_ARG(t9)
++      REG_L   a6, 6*FFI_SIZEOF_ARG(t9)
++      REG_L   a7, 7*FFI_SIZEOF_ARG(t9)
++#else
+       and     t4, t6, ((1<<FFI_FLAG_BITS)-1)
+       REG_L   a0, 0*FFI_SIZEOF_ARG(t9)
+       beqz    t4, arg1_next
+@@ -193,6 +203,7 @@ arg7_next:
+ arg8_doublep: 
+       l.d     $f19, 7*FFI_SIZEOF_ARG(t9)      
+ arg8_next:    
++#endif
+ callit:               
+       # Load the function pointer
+@@ -214,6 +225,7 @@ retint:
+       b       epilogue
+ retfloat:
++#ifndef __mips_soft_float
+       bne     t6, FFI_TYPE_FLOAT, retdouble
+       jal     t9
+       REG_L   t4, 4*FFI_SIZEOF_ARG($fp)
+@@ -272,6 +284,7 @@ retstruct_f_d:
+       s.s     $f0, 0(t4)
+       s.d     $f2, 8(t4)
+       b       epilogue
++#endif
+ retstruct_d_soft:
+       bne     t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
+@@ -429,6 +442,7 @@ ffi_closure_N32:
+       REG_S   a6, A6_OFF2($sp)
+       REG_S   a7, A7_OFF2($sp)
++#ifndef __mips_soft_float
+       # Store all possible float/double registers.
+       s.d     $f12, F12_OFF2($sp)
+       s.d     $f13, F13_OFF2($sp)
+@@ -438,6 +452,7 @@ ffi_closure_N32:
+       s.d     $f17, F17_OFF2($sp)
+       s.d     $f18, F18_OFF2($sp)
+       s.d     $f19, F19_OFF2($sp)
++#endif
+       # Call ffi_closure_mips_inner_N32 to do the real work.
+       LA      t9, ffi_closure_mips_inner_N32
+@@ -458,6 +473,7 @@ cls_retint:
+       b       cls_epilogue
+ cls_retfloat:
++#ifndef __mips_soft_float
+       bne     v0, FFI_TYPE_FLOAT, cls_retdouble
+       l.s     $f0, V0_OFF2($sp)
+       b       cls_epilogue
+@@ -500,6 +516,7 @@ cls_retstruct_f_d:
+       l.s     $f0, V0_OFF2($sp)
+       l.d     $f2, V1_OFF2($sp)
+       b       cls_epilogue
++#endif
+       
+ cls_retstruct_small2: 
+       REG_L   v0, V0_OFF2($sp)
+diff --git a/src/mips/o32.S b/src/mips/o32.S
+index eb27981..429dd0a 100644
+--- a/src/mips/o32.S
++++ b/src/mips/o32.S
+@@ -82,13 +82,16 @@ sixteen:
+               
+       ADDU    $sp, 4 * FFI_SIZEOF_ARG         # adjust $sp to new args
++#ifndef __mips_soft_float
+       bnez    t0, pass_d                      # make it quick for int
++#endif
+       REG_L   a0, 0*FFI_SIZEOF_ARG($sp)       # just go ahead and load the
+       REG_L   a1, 1*FFI_SIZEOF_ARG($sp)       # four regs.
+       REG_L   a2, 2*FFI_SIZEOF_ARG($sp)
+       REG_L   a3, 3*FFI_SIZEOF_ARG($sp)
+       b       call_it
++#ifndef __mips_soft_float
+ pass_d:
+       bne     t0, FFI_ARGS_D, pass_f
+       l.d     $f12, 0*FFI_SIZEOF_ARG($sp)     # load $fp regs from args
+@@ -130,6 +133,7 @@ pass_f_d:
+  #    bne     t0, FFI_ARGS_F_D, call_it
+       l.s     $f12, 0*FFI_SIZEOF_ARG($sp)     # load $fp regs from args
+       l.d     $f14, 2*FFI_SIZEOF_ARG($sp)     # passing double and float
++#endif
+ call_it:      
+       # Load the function pointer
+@@ -158,14 +162,23 @@ retfloat:
+       bne     t2, FFI_TYPE_FLOAT, retdouble
+       jalr    t9
+       REG_L   t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+       s.s     $f0, 0(t0)
++#else
++      REG_S   v0, 0(t0)
++#endif
+       b       epilogue
+ retdouble:    
+       bne     t2, FFI_TYPE_DOUBLE, noretval
+       jalr    t9
+       REG_L   t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+       s.d     $f0, 0(t0)
++#else
++      REG_S   v1, 4(t0)
++      REG_S   v0, 0(t0)
++#endif
+       b       epilogue
+       
+ noretval:     
+@@ -261,9 +274,11 @@ $LCFI7:
+       li      $13, 1          # FFI_O32
+       bne     $16, $13, 1f    # Skip fp save if FFI_O32_SOFT_FLOAT
+       
++#ifndef __mips_soft_float
+       # Store all possible float/double registers.
+       s.d     $f12, FA_0_0_OFF2($fp)
+       s.d     $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:    
+       # Call ffi_closure_mips_inner_O32 to do the work.
+       la      t9, ffi_closure_mips_inner_O32
+@@ -281,6 +296,7 @@ $LCFI7:
+       li      $13, 1          # FFI_O32
+       bne     $16, $13, 1f    # Skip fp restore if FFI_O32_SOFT_FLOAT
++#ifndef __mips_soft_float
+       li      $9, FFI_TYPE_FLOAT
+       l.s     $f0, V0_OFF2($fp)
+       beq     $8, $9, closure_done
+@@ -288,6 +304,7 @@ $LCFI7:
+       li      $9, FFI_TYPE_DOUBLE
+       l.d     $f0, V0_OFF2($fp)
+       beq     $8, $9, closure_done
++#endif
+ 1:    
+       REG_L   $3, V1_OFF2($fp)
+       REG_L   $2, V0_OFF2($fp)
+-- 
+2.6.4
+
diff --git a/libs/libgpg-error/Makefile b/libs/libgpg-error/Makefile
new file mode 100644 (file)
index 0000000..27e5e09
--- /dev/null
@@ -0,0 +1,79 @@
+#
+# Copyright (C) 2005-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libgpg-error
+PKG_VERSION:=1.12
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgpg-error
+PKG_MD5SUM:=8f0eb41a344d19ac2aa9bd101dfb9ce6
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libgpg-error
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=GnuPG error handling helper library
+  URL:=http://www.gnupg.org/related_software/libgpg-error/
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+endef
+
+define Package/libgpg-error/description
+       An helper library for common error codes and descriptions.
+       This is a library that defines common error values for all GnuPG
+       components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt,
+       Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the
+       future.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --disable-rpath
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(2)/bin $(1)/usr/bin
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config \
+               $(2)/bin/
+       $(SED) \
+               's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+               $(2)/bin/gpg-error-config
+       ln -sf $(STAGING_DIR)/host/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
+
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/include/gpg-error.h \
+               $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{la,a,so*} \
+               $(1)/usr/lib/
+
+       $(INSTALL_DIR) $(1)/usr/share/aclocal
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 \
+               $(1)/usr/share/aclocal/
+endef
+
+define Package/libgpg-error/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* \
+               $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libgpg-error))
diff --git a/libs/libgpg-error/patches/001-gcc5.patch b/libs/libgpg-error/patches/001-gcc5.patch
new file mode 100644 (file)
index 0000000..1d886ff
--- /dev/null
@@ -0,0 +1,54 @@
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Date: Mon, 16 Mar 2015 17:40:12 +0000 (-0400)
+Subject: Avoid breakage with gcc 5
+X-Git-Tag: libgpg-error-1.19~7
+X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff_plain;h=c01c8f0c4f55d76b037c7f6aa44ad25ede18d38a
+
+Avoid breakage with gcc 5
+
+* src/Makefile.am: Add -P to the C preprocessor when building
+mkerrcodes.h, to avoid a noisy intermediate pipeline.
+
+--
+
+With gcc 5 without this patch, we see many errors like the following:
+
+gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
+In file included from ./mkerrcodes.c:26:0:
+./mkerrcodes.h:9:5: error: expected expression before ‘,’ token
+   { , "GPG_ERR_E2BIG" },
+     ^
+./mkerrcodes.h:10:5: error: expected expression before ‘,’ token
+   { , "GPG_ERR_EACCES" },
+     ^
+
+This patch cleans up the generated mkerrcodes.h by making the
+intermediate stage clean for all the versions of gcc i tested (4.x and
+5).
+
+Debian-Bug-Id: 777374
+Signed-Off-By: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+---
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -140,7 +140,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
+ # It is correct to use $(CPP).  We want the host's idea of the error codes.
+ mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
+       $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
+-      $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
++      $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
+                $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
+       -rm _$@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -979,7 +979,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
+ # It is correct to use $(CPP).  We want the host's idea of the error codes.
+ mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
+       $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
+-      $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
++      $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
+                $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
+       -rm _$@
diff --git a/libs/libtasn1/Makefile b/libs/libtasn1/Makefile
new file mode 100644 (file)
index 0000000..b6cf945
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2005-2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libtasn1
+PKG_VERSION:=4.12
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_HASH:=6753da2e621257f33f5b051cc114d417e5206a0818fe0b1ecfd6153f70934753
+PKG_LICENSE:=LGPLv2.1+
+PKG_LICENSE_FILES:=COPYING.LIB
+
+#PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libtasn1
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=An ASN.1 and DER structures manipulation library
+  MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+  URL:=ftp://ftp.gnu.org/gnu/libtasn1/
+endef
+
+define Package/libtasn1/description
+ This is a library for Abstract Syntax Notation One (ASN.1) and
+ Distinguish Encoding Rules (DER) manipulation.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+               --enable-shared \
+               --disable-gcc-warnings \
+               --enable-static
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtasn1*.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libtasn1/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libtasn1))
diff --git a/libs/p11-kit/Makefile b/libs/p11-kit/Makefile
new file mode 100644 (file)
index 0000000..4642ff8
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2011-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=p11-kit
+PKG_VERSION:=0.23.1
+PKG_RELEASE:=2
+PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=96f073270c489c9a594e1c9413f42db8
+PKG_SOURCE_URL:=http://p11-glue.freedesktop.org/releases/
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/p11-kit
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A library that provides a way to load and enumerate PKCS11 modules.
+  URL:=http://p11-glue.freedesktop.org/p11-kit.html
+  DEPENDS:=+libtasn1 +libpthread
+endef
+
+define Package/p11-kit/description
+  Provides a way to load and enumerate PKCS11 modules. Provides a
+  standard configuration setup for installing PKCS11 modules in such a
+  way that they are discoverable.
+endef
+
+CONFIGURE_ARGS+= \
+       --without-libffi \
+       --disable-trust-module
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/p11-kit-1/p11-kit/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/p11-kit-1/p11-kit/* $(1)/usr/include/p11-kit-1/p11-kit/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11-kit.so $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11-kit.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/p11-kit-1.pc $(1)/usr/lib/pkgconfig/p11-kit-1.pc
+endef
+
+define Package/p11-kit/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11-kit.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc/p11-kit/modules/
+ifneq ($(CONFIG_PACKAGE_libopensc),)
+       $(CP) ./files/opensc.module $(1)/etc/p11-kit/modules/
+endif
+endef
+
+$(eval $(call BuildPackage,p11-kit))
diff --git a/libs/p11-kit/files/opensc.module b/libs/p11-kit/files/opensc.module
new file mode 100644 (file)
index 0000000..5f59814
--- /dev/null
@@ -0,0 +1 @@
+module: /usr/lib/opensc-pkcs11.so