From owner-svn-ports-all@freebsd.org Sat Jun 11 22:39:07 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73019AF0E50; Sat, 11 Jun 2016 22:39:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241382CD3; Sat, 11 Jun 2016 22:39:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5BMd6cp056587; Sat, 11 Jun 2016 22:39:06 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5BMd6ch056585; Sat, 11 Jun 2016 22:39:06 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201606112239.u5BMd6ch056585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 11 Jun 2016 22:39:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r416762 - in head/security/opencryptoki: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 22:39:07 -0000 Author: hrs Date: Sat Jun 11 22:39:06 2016 New Revision: 416762 URL: https://svnweb.freebsd.org/changeset/ports/416762 Log: Fix build on 9.x. Modified: head/security/opencryptoki/Makefile head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c Modified: head/security/opencryptoki/Makefile ============================================================================== --- head/security/opencryptoki/Makefile Sat Jun 11 22:11:06 2016 (r416761) +++ head/security/opencryptoki/Makefile Sat Jun 11 22:39:06 2016 (r416762) @@ -3,7 +3,7 @@ PORTNAME= opencryptoki PORTVERSION= 3.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= SF @@ -19,6 +19,10 @@ LIB_DEPENDS= libtspi.so:security/trouser USES= alias autoreconf gmake libtool tar:tgz USE_LDCONFIG= ${PREFIX}/lib/opencryptoki +USE_OPENSSL= yes +.if exists(/usr/include/openssl/md2.h) +WITH_OPENSSL_PORT=yes +.endif WRKSRC= ${WRKDIR}/${PORTNAME} INSTALL_TARGET= install-strip GNU_CONFIGURE= yes @@ -29,6 +33,7 @@ CONFIGURE_ARGS= --enable-swtok --enable- --with-lockdir=/var/run/opencryptoki \ --with-logdir=/var/log/opencryptoki \ --localstatedir=/var \ + --with-openssl=${OPENSSLBASE} \ --with-pkcs11user=${USERS} \ --with-pkcs11group=${GROUPS} \ ac_cv_path_CHGRP=true Modified: head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c ============================================================================== --- head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c Sat Jun 11 22:11:06 2016 (r416761) +++ head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c Sat Jun 11 22:39:06 2016 (r416762) @@ -1,6 +1,40 @@ ---- usr/sbin/pkcsslotd/socket_server.c.orig 2016-04-29 17:26:46 UTC -+++ usr/sbin/pkcsslotd/socket_server.c -@@ -337,7 +337,7 @@ int CreateListenerSocket (void) { +--- usr/sbin/pkcsslotd/socket_server.c.orig 2016-04-30 02:26:46.000000000 +0900 ++++ usr/sbin/pkcsslotd/socket_server.c 2016-06-12 07:33:22.000000000 +0900 +@@ -300,6 +300,9 @@ + #include + #include + #include ++#ifndef SOCK_NONBLOCK ++#include ++#endif + + #include "log.h" + #include "slotmgr.h" +@@ -314,11 +317,23 @@ + struct group *grp; + int socketfd; + ++#ifdef SOCK_NONBLOCK + socketfd = socket(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); ++#else ++ socketfd = socket(PF_UNIX, SOCK_STREAM, 0); ++#endif + if (socketfd < 0) { + ErrLog("Failed to create listener socket, errno 0x%X.", errno); + return -1; + } ++#ifndef SOCK_NONBLOCK ++ if (fcntl(socketfd, F_SETFL, ++ fcntl(socketfd, F_GETFL) | O_NONBLOCK) < 0) { ++ ErrLog("Failed to set listener non-block, errno 0x%X.", errno); ++ close(socketfd); ++ return -1; ++ } ++#endif + if (unlink(SOCKET_FILE_PATH) && errno != ENOENT) { + ErrLog("Failed to unlink socket file, errno 0x%X.", errno); + close(socketfd); +@@ -337,7 +352,7 @@ // make socket file part of the pkcs11 group, and write accessable // for that group