public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alon Bar-Lev" <alonbl@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/opensc/, dev-libs/opensc/files/
Date: Sat, 15 Sep 2018 14:52:23 +0000 (UTC)	[thread overview]
Message-ID: <1537000129.1ea198753e1e74d6627ef6412abb2990a851426b.alonbl@gentoo> (raw)

commit:     1ea198753e1e74d6627ef6412abb2990a851426b
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 15 08:28:04 2018 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sat Sep 15 08:28:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ea19875

dev-libs/opensc: fix implicit invocation

fix implicit test, add missing upstream include.

add notify USE.

Closes: https://bugs.gentoo.org/show_bug.cgi?id=666268
Thanks: Toralf Förster
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../files/opensc-0.19.0-p11test_common.h.patch     | 108 +++++++++++++++++++++
 dev-libs/opensc/metadata.xml                       |   3 +-
 ...pensc-0.19.0.ebuild => opensc-0.19.0-r1.ebuild} |  25 +++--
 3 files changed, 127 insertions(+), 9 deletions(-)

diff --git a/dev-libs/opensc/files/opensc-0.19.0-p11test_common.h.patch b/dev-libs/opensc/files/opensc-0.19.0-p11test_common.h.patch
new file mode 100644
index 00000000000..ca27c70245d
--- /dev/null
+++ b/dev-libs/opensc/files/opensc-0.19.0-p11test_common.h.patch
@@ -0,0 +1,108 @@
+From d1e4f4879b8d0a7423afc1c9a3632da4763ee31c Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 15 Sep 2018 11:04:13 +0300
+Subject: [PATCH] missing include
+
+---
+ src/tests/p11test/p11test_common.h | 89 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 89 insertions(+)
+ create mode 100644 src/tests/p11test/p11test_common.h
+
+diff --git a/src/tests/p11test/p11test_common.h b/src/tests/p11test/p11test_common.h
+new file mode 100644
+index 0000000..d3ca304
+--- /dev/null
++++ b/src/tests/p11test/p11test_common.h
+@@ -0,0 +1,89 @@
++/*
++ * p11test_common.h: Test suite shared declarations for PKCS#11 API
++ *
++ * Copyright (C) 2016 Martin Strhársky <strharsky.martin@gmail.com>
++ * Copyright (C) 2016, 2017 Red Hat, Inc.
++ *
++ * Author: Jakub Jelen <jjelen@redhat.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#ifndef P11TEST_COMMON_H
++#define P11TEST_COMMON_H
++#include "config.h"
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <setjmp.h>
++#include <cmocka.h>
++#include "pkcs11/pkcs11.h"
++#include "libopensc/sc-ossl-compat.h"
++
++#define MAX_MECHS 200
++
++#ifndef NDEBUG
++	#define debug_print(fmt, ...) \
++		{ fprintf(stderr, fmt "\n", ##__VA_ARGS__); } while (0)
++#else
++	#define debug_print(fmt, ...)
++#endif
++
++#define FLAGS_SIGN		0x01
++#define FLAGS_SIGN_OPENSSL	0x02
++#define FLAGS_SIGN_ANY		( FLAGS_SIGN | FLAGS_SIGN_OPENSSL )
++#define FLAGS_DECRYPT		0x04
++#define FLAGS_DECRYPT_OPENSSL	0x08
++#define FLAGS_DECRYPT_ANY	( FLAGS_DECRYPT | FLAGS_DECRYPT_OPENSSL )
++
++typedef struct {
++	char *outfile;
++	FILE *fd;
++	int in_test;
++	int first;
++	int in_data;
++	int first_data;
++} log_context_t;
++
++typedef struct {
++	CK_MECHANISM_TYPE mech;
++	CK_MECHANISM_TYPE hash;
++	CK_RSA_PKCS_MGF_TYPE mgf;
++	int salt;
++	int usage_flags;
++	int result_flags;
++} test_mech_t;
++
++typedef struct {
++	CK_FUNCTION_LIST_PTR function_pointer;
++	CK_SLOT_ID slot_id;
++	CK_SESSION_HANDLE session_handle;
++	CK_UTF8CHAR* pin;
++	size_t pin_length;
++	char *library_path;
++	unsigned int interactive;
++	log_context_t log;
++
++	test_mech_t rsa_mechs[MAX_MECHS];
++	size_t  num_rsa_mechs;
++	test_mech_t	ec_mechs[MAX_MECHS];
++	size_t  num_ec_mechs;
++	test_mech_t	keygen_mechs[MAX_MECHS];
++	size_t  num_keygen_mechs;
++} token_info_t;
++
++token_info_t token;
++
++#endif /* P11TEST_COMMON_H */
++
+-- 
+2.16.4
+

diff --git a/dev-libs/opensc/metadata.xml b/dev-libs/opensc/metadata.xml
index 52bf7f8f7bb..7c8bf05b0e8 100644
--- a/dev-libs/opensc/metadata.xml
+++ b/dev-libs/opensc/metadata.xml
@@ -16,8 +16,9 @@
 		card.
 	</longdescription>
 	<use>
-		<flag name="openct">Use <pkg>dev-libs/openct</pkg> (and CT-API) for accessing Smartcard hardware</flag>
 		<flag name="ctapi">Use CT-API for accessing Smartcard hardware</flag>
+		<flag name="notify">Enable notifications</flag>
+		<flag name="openct">Use <pkg>dev-libs/openct</pkg> (and CT-API) for accessing Smartcard hardware</flag>
 		<flag name="pcsc-lite">Use <pkg>sys-apps/pcsc-lite</pkg> (and PC/SC API) for accessing Smartcard hardware</flag>
 		<flag name="secure-messaging">Enable secure messaging</flag>
 	</use>

diff --git a/dev-libs/opensc/opensc-0.19.0.ebuild b/dev-libs/opensc/opensc-0.19.0-r1.ebuild
similarity index 75%
rename from dev-libs/opensc/opensc-0.19.0.ebuild
rename to dev-libs/opensc/opensc-0.19.0-r1.ebuild
index ed42b0d921d..10b9ad5a8db 100644
--- a/dev-libs/opensc/opensc-0.19.0.ebuild
+++ b/dev-libs/opensc/opensc-0.19.0-r1.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/OpenSC/OpenSC/releases/download/${PV}/${P}.tar.gz"
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="doc +pcsc-lite secure-messaging openct ctapi readline libressl ssl zlib"
+IUSE="ctapi doc libressl openct notify +pcsc-lite readline secure-messaging ssl test zlib"
 
 RDEPEND="zlib? ( sys-libs/zlib )
 	readline? ( sys-libs/readline:0= )
@@ -21,11 +21,13 @@ RDEPEND="zlib? ( sys-libs/zlib )
 		libressl? ( >=dev-libs/libressl-2.7.0:0= )
 	)
 	openct? ( >=dev-libs/openct-0.5.0 )
-	pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )"
+	pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )
+	notify? ( dev-libs/glib:2= )"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt"
+	dev-libs/libxslt
+	test? ( dev-util/cmocka )"
 
 REQUIRED_USE="
 	pcsc-lite? ( !openct !ctapi )
@@ -33,19 +35,26 @@ REQUIRED_USE="
 	ctapi? ( !pcsc-lite !openct )
 	|| ( pcsc-lite openct ctapi )"
 
+PATCHES=(
+	"${FILESDIR}/${P}-p11test_common.h.patch"
+)
+
 src_configure() {
 	econf \
-		--disable-static \
 		--disable-openpace \
+		--disable-static \
+		--enable-man \
+		$(use_enable ctapi) \
 		$(use_enable doc) \
+		$(use_enable notify ) \
+		$(use_enable openct) \
 		$(use_enable openct) \
+		$(use_enable pcsc-lite pcsc) \
 		$(use_enable readline) \
-		$(use_enable zlib) \
 		$(use_enable secure-messaging sm) \
 		$(use_enable ssl openssl) \
-		$(use_enable pcsc-lite pcsc) \
-		$(use_enable openct) \
-		$(use_enable ctapi)
+		$(use_enable test tests) \
+		$(use_enable zlib)
 }
 
 src_install() {


             reply	other threads:[~2018-09-15 14:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-15 14:52 Alon Bar-Lev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-07  9:25 [gentoo-commits] repo/gentoo:master commit in: dev-libs/opensc/, dev-libs/opensc/files/ David Seifert
2023-11-17  7:47 Sam James
2023-07-17 22:14 Sam James
2023-06-10 19:07 David Seifert
2020-06-18 21:02 Mikle Kolyada
2019-05-19 16:03 Alon Bar-Lev
2019-04-02 18:10 Alon Bar-Lev
2017-03-15  6:27 Alon Bar-Lev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537000129.1ea198753e1e74d6627ef6412abb2990a851426b.alonbl@gentoo \
    --to=alonbl@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox