From owner-svn-ports-all@freebsd.org Tue Feb 6 15:18:24 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E200EDFB89; Tue, 6 Feb 2018 15:18:24 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B366E6E377; Tue, 6 Feb 2018 15:18:23 +0000 (UTC) (envelope-from jhale@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE1941992C; Tue, 6 Feb 2018 15:18:23 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w16FINxU026143; Tue, 6 Feb 2018 15:18:23 GMT (envelope-from jhale@FreeBSD.org) Received: (from jhale@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w16FINXM026140; Tue, 6 Feb 2018 15:18:23 GMT (envelope-from jhale@FreeBSD.org) Message-Id: <201802061518.w16FINXM026140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhale set sender to jhale@FreeBSD.org using -f From: "Jason E. Hale" Date: Tue, 6 Feb 2018 15:18:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r461063 - in head/security: gpgme gpgme-qt5 gpgme/files py-gpgme X-SVN-Group: ports-head X-SVN-Commit-Author: jhale X-SVN-Commit-Paths: in head/security: gpgme gpgme-qt5 gpgme/files py-gpgme X-SVN-Commit-Revision: 461063 X-SVN-Commit-Repository: ports 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.25 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: Tue, 06 Feb 2018 15:18:24 -0000 Author: jhale Date: Tue Feb 6 15:18:23 2018 New Revision: 461063 URL: https://svnweb.freebsd.org/changeset/ports/461063 Log: security/gpgme: - Add some magic to support the regression tests in the case where the test build directory path length exceeds the maximum socket path length. - Fix shebang in the pinentry test script. At long last, the real reason some of the tests were failing has been discovered! - Remove files/patch-tests_gpg_Makefile.in now that the pinentry script is fixed. - Move USES upward. security/gpgme-cpp: - Remove workaround for Bug 193528 (fixed in GCC 6+) security/gpgme-qt5: - Add full test support. - QT5 testlib only needed for tests at build time. - Add DOXYGEN option to install the API documentation. Prevent the automatic building of the docs if doxygen happens to be installed. - Bump PORTREVISION due to added options / dependency change security/py-gpgme: - Add full test support. - Revert flavor logic move from r460759. The logic being below was the reason it wasn't previously working. - Bump PORTREVISION due to added option Deleted: head/security/gpgme/files/patch-tests_gpg_Makefile.in Modified: head/security/gpgme-qt5/Makefile head/security/gpgme/Makefile head/security/py-gpgme/Makefile Modified: head/security/gpgme-qt5/Makefile ============================================================================== --- head/security/gpgme-qt5/Makefile Tue Feb 6 15:17:45 2018 (r461062) +++ head/security/gpgme-qt5/Makefile Tue Feb 6 15:18:23 2018 (r461063) @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 0 +PORTREVISION= 1 PKGNAMESUFFIX= -${SLAVEPORT} MAINTAINER= jhale@FreeBSD.org Modified: head/security/gpgme/Makefile ============================================================================== --- head/security/gpgme/Makefile Tue Feb 6 15:17:45 2018 (r461062) +++ head/security/gpgme/Makefile Tue Feb 6 15:18:23 2018 (r461063) @@ -16,10 +16,13 @@ LICENSE_FILE?= ${WRKSRC}/COPYING.LESSER LIB_DEPENDS= libassuan.so:security/libassuan \ libgpg-error.so:security/libgpg-error -GNU_CONFIGURE= yes -USES= cpe gmake libtool localbase:ldflags tar:bzip2 +USES= cpe gmake libtool localbase:ldflags shebangfix tar:bzip2 USE_LDCONFIG= yes +SHEBANG_FILES= tests/gpg/pinentry +bash_CMD= /bin/sh + +GNU_CONFIGURE= yes INSTALL_TARGET= install-strip TEST_TARGET= check @@ -44,39 +47,39 @@ GNUPG2_DESC= Build gpgme library for GnuPG 2.x GNUPG2_BUILD_DEPENDS= gpg2:security/gnupg GNUPG2_RUN_DEPENDS= gpg2:security/gnupg -# Tests may fail if the test directory path length surpasses the socket path -# length limitation of 104 characters. Due to the way gnupg creates sockets, -# the easiest way to overcome this is to create a /var/run/user/${UID} -# directory set with 700 permissions and owned by the effective user building -# the port. TEST_CONFIGURE_ENABLE= g13-test gpg-test gpgconf-test gpgsm-test TEST_PREVENTS= GNUPG1 TEST_PREVENTS_MSG= TEST option is mainly designed for use with the GNUPG2 option UISERVER_DESC= GnuPG UI server support UISERVER_CONFIGURE_ENABLE= fd-passing -.endif - -.include - -.if defined(SLAVEPORT) +.else LIB_DEPENDS+= libgpgme.so:security/gpgme BUILD_WRKSRC= ${WRKSRC}/lang/${BINDING_NAME} INSTALL_WRKSRC= ${WRKSRC}/lang/${BINDING_NAME} -NO_TEST= yes +TEST_WRKSRC= ${WRKSRC}/lang/${BINDING_NAME}/tests +. if ${SLAVEPORT} != "cpp" +OPTIONS_DEFINE+= TEST +. endif + . if ${SLAVEPORT} == "cpp" -CONFIGURE_ARGS+=--enable-languages="cpp" USES+= compiler:c++11-lib -# Unhide std::to_string() to fix build with GCC 4.8 (ports/193528). -CXXFLAGS+= -D_GLIBCXX_USE_C99 +CONFIGURE_ARGS+=--enable-languages="cpp" +NO_TEST= yes . endif . if ${SLAVEPORT} == "qt5" LIB_DEPENDS+= libgpgmepp.so:security/gpgme-cpp -CONFIGURE_ARGS+=--enable-languages="cpp qt" USES+= compiler:c++11-lib pkgconfig -USE_QT5= buildtools_build core testlib +USE_QT5= buildtools_build core +CONFIGURE_ARGS+=--enable-languages="cpp qt" +DOCSDIR= ${PORTNAME}${PKGNAMESUFFIX} + +OPTIONS_DEFINE+= DOXYGEN +DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen \ + dot:graphics/graphviz +TEST_USE= QT5=testlib_build . endif . if ${SLAVEPORT} == "python" @@ -87,6 +90,11 @@ USES+= python USE_PYTHON= py3kplist flavors CONFIGURE_ENV+= SWIG=${LOCALBASE}/bin/swig3.0 PLIST_SUB+= VERSION=${PORTVERSION} +. if ${FLAVOR:Upy27:Mpy2*} +CONFIGURE_ARGS+=--enable-languages="python2" +. else +CONFIGURE_ARGS+=--enable-languages="python3" +. endif . endif .endif @@ -101,14 +109,56 @@ post-patch: .endif @${REINPLACE_CMD} -e 's|^clfilesdir.*|clfilesdir=$$\(libdir\)/common-lisp/gpgme|g' \ ${WRKSRC}/lang/cl/Makefile.in + +post-patch-DOXYGEN-off: + @${REINPLACE_CMD} -e '/SUBDIRS/s|doc||' \ + ${WRKSRC}/lang/qt/Makefile.in + +post-patch-TEST-off: @${REINPLACE_CMD} -e '/SUBDIRS/s|tests||' \ ${WRKSRC}/lang/python/Makefile.in \ ${WRKSRC}/lang/qt/Makefile.in +# The gnupg programs will create sockets for the tests in a temporary directory +# under /var/run/user/${UID} if it exists. Otherwise, they will try to create +# them in the test build directories. To prevent errors in cases where the test +# build directory path length exceeds the socket path length limitation of 104 +# characters, the sockets are redirected to a temporary directory. +pre-build-TEST-on: + @if [ ! -d "/var/run/user/${UID}" ]; then \ + SOCKETS="dirmngr gpg-agent gpg-agent.browser gpg-agent.extra gpg-agent.ssh scdaemon uiserver"; \ + TESTSUBDIRS="lang/python/tests lang/qt/tests tests/gpg tests/gpgsm"; \ + TMPSOCKETDIR=$$(${MKTEMP} -d -t gpgmetest); \ + ${ECHO_CMD} "$${TMPSOCKETDIR}" > ${WRKDIR}/.tmpsocketdir; \ + trap "${RM} -r $${TMPSOCKETDIR}; exit 1" 1 2 3 5 10 13 15; \ + for sock in $${SOCKETS}; do \ + for subdir in $${TESTSUBDIRS}; do \ + ${PRINTF} "%%Assuan%%\nsocket=$${TMPSOCKETDIR}/S.$${sock}\n" > ${WRKSRC}/$${subdir}/S.$${sock}; \ + done; \ + done; \ + fi + +post-build-TEST-on: + @if [ -f "${WRKDIR}/.tmpsocketdir" ]; then \ + ${XARGS} ${RM} -rf < ${WRKDIR}/.tmpsocketdir; \ + ${RM} ${WRKDIR}/.tmpsocketdir; \ + fi + +pre-test: pre-build-TEST-on + +post-test: post-build-TEST-on + .if !defined(SLAVEPORT) post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .endif + +post-install-DOXYGEN-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR}/html + cd ${WRKSRC}/lang/qt/doc/generated/html && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/html + @${FIND} -P ${STAGEDIR}${DOCSDIR} -type f 2>/dev/null | \ + ${SED} -ne 's|^${STAGEDIR}${PREFIX}/||p' >> ${TMPPLIST} .include Modified: head/security/py-gpgme/Makefile ============================================================================== --- head/security/py-gpgme/Makefile Tue Feb 6 15:17:45 2018 (r461062) +++ head/security/py-gpgme/Makefile Tue Feb 6 15:18:23 2018 (r461063) @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= security python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,12 +11,6 @@ MASTERDIR= ${.CURDIR}/../../security/gpgme SLAVEPORT= python BINDING_NAME= python PLIST= ${.CURDIR}/pkg-plist - -.if ${FLAVOR:Upy27:Mpy2*} -CONFIGURE_ARGS+=--enable-languages="python2" -.else -CONFIGURE_ARGS+=--enable-languages="python3" -.endif post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PYTHON_VERSION}/site-packages/gpg/_gpgme.so