Ticket #52372: opensc.patch

File opensc.patch, 4.5 KB (added by lbschenkel (Leonardo Brondani Schenkel), 8 years ago)

included libcrypto dependency

  • new file opensc/Portfile

    diff --git a/opensc/Portfile b/opensc/Portfile
    new file mode 100644
    - +  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
     2# $Id$
     3
     4PortSystem              1.0
     5PortGroup               github 1.0
     6
     7name                    opensc
     8github.setup            OpenSC OpenSC 0.16.0
     9categories              security
     10platforms               darwin
     11license                 LGPL-2.1
     12maintainers             schenkel.net:leonardo
     13
     14description             Tools and libraries for smart cards
     15long_description        OpenSC provides a set of libraries and utilities to \
     16                        work with smart cards. Its main focus is on cards that \
     17                        support cryptographic operations, and facilitate their \
     18                        use in security applications such as authentication, \
     19                        mail encryption and digital signatures. \
     20                        OpenSC implements the PKCS#11 API so applications \
     21                        supporting this API (such as Mozilla Firefox and \
     22                        Thunderbird) can use it. \
     23                        On the card OpenSC implements the PKCS#15 standard and \
     24                        aims to be compatible with every software/card that \
     25                        does so, too.
     26
     27github.tarball_from     releases
     28checksums               rmd160  f785df816560493baceb71e2197346c724fc0834 \
     29                        sha256  3ac8c29542bb48179e7086d35a1b8907a4e86aca3de3323c2f48bd74eaaf5729
     30
     31
     32depends_build           port:docbook-xsl port:libxslt port:pkgconfig
     33depends_lib             path:lib/libcrypto.dylib:openssl port:zlib
     34
     35default_variants        +readline
     36
     37patchfiles-append       patch-bash_completion.diff patch-libressl.diff
     38patch.pre_args          -p1
     39
     40use_autoreconf          yes
     41configure.args-append   --disable-doc
     42configure.args-append   --disable-readline
     43configure.args-append   --disable-static
     44configure.args-append   --enable-pcsc
     45configure.args-append   --enable-sm
     46configure.args-append   --with-pkcs11-provider=${prefix}/lib/opensc-pkcs11.so
     47
     48variant doc description "Build documentation" {
     49    configure.args-replace  --disable-doc --enable-doc
     50}
     51variant readline description "Enable readline support" {
     52    depends_lib-append      port:readline
     53    configure.args-replace  --disable-readline --enable-readline
     54}
     55
     56pre-configure {
     57    reinplace -W ${worksrcpath} \
     58        "s|No Git revision info available|OpenSC-${version} (MacPorts)|g" \
     59        configure.ac configure
     60}
     61post-destroot {
     62    system "${worksrcpath}/MacOSX/libtool-bundle ${destroot}${prefix}/lib/opensc-pkcs11.so ${destroot}${prefix}/lib"
     63}
     64
  • new file opensc/files/patch-bash_completion.diff

    diff --git a/opensc/files/patch-bash_completion.diff b/opensc/files/patch-bash_completion.diff
    new file mode 100644
    - +  
     1diff --git a/doc/tools/Makefile.am b/doc/tools/Makefile.am
     2--- a/doc/tools/Makefile.am
     3+++ b/doc/tools/Makefile.am
     4@@ -30,13 +30,13 @@
     5        @echo $< $@
     6        @cat $(srcdir)/completion-template \
     7                | sed "s,ALLOPTS,\
     8-                       $(shell sed -n 's,\s\s\s*<option>\([^<]*\)</option>.*,\1,pg' $< \
     9+                       $(shell sed -n 's,.*<option>\([^<]*\)</option>.*,\1,pg' $< \
     10                                | sort -u | grep -- '^\-' | tr '\n' ' ')," \
     11                | sed "s,OPTSWITHARGS,\
     12-                       $(shell sed -n 's,\s\s\s*<option>\([^<]*\)</option>.*<replaceable>.*,\1,pg' $< \
     13+                       $(shell sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*,\1,pg' $< \
     14                                | sort -u | grep -- '^\-' | tr '\n' '|' | sed 's,|$$,,')," \
     15                | sed "s,FILEOPTS,\
     16-                       $(shell sed -n 's,\s\s\s*<option>\([^<]*\)</option>.*<replaceable>.*filename.*,\1,pg' $< \
     17+                       $(shell sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*filename.*,\1,pg' $< \
     18                                | sort -u | grep -- '^\-' | tr '\n' '|')," \
     19                | sed "s,FUNCTION_NAME,$(shell echo $@ | sed s,-,_,g)," \
     20                | sed "s,PROGRAM_NAME,$@," \
  • new file opensc/files/patch-libressl.diff

    diff --git a/opensc/files/patch-libressl.diff b/opensc/files/patch-libressl.diff
    new file mode 100644
    - +  
     1diff --git a/src/pkcs11/openssl.c b/src/pkcs11/openssl.c
     2--- a/src/pkcs11/openssl.c
     3+++ b/src/pkcs11/openssl.c
     4@@ -180,7 +180,7 @@
     5        e = ENGINE_by_id("gost");
     6        if (!e)
     7        {
     8-#if !defined(OPENSSL_NO_STATIC_ENGINE) && !defined(OPENSSL_NO_GOST)
     9+#if !defined(OPENSSL_NO_STATIC_ENGINE) && !defined(OPENSSL_NO_GOST) && !defined(LIBRESSL_VERSION_NUMBER)
     10                ENGINE_load_gost();
     11                e = ENGINE_by_id("gost");
     12 #else