[145233] trunk/dports/devel/qca
michaelld at macports.org
michaelld at macports.org
Thu Jan 28 19:51:40 PST 2016
Revision: 145233
https://trac.macports.org/changeset/145233
Author: michaelld at macports.org
Date: 2016-01-28 19:51:40 -0800 (Thu, 28 Jan 2016)
Log Message:
-----------
qca:
+ remove unnecessary patchfiles;
+ rename patchfiles for each specific file changed;
+ add patchfiles into Portfile, with a comment for each about what it does;
+ add various configure.args to get the file layout correct for installation;
+ since installing as a framework, link into include and lib;
+ install into ${prefix}, not ${qt_dir};
+ remove obsolesced variants;
+ rev-bump for changes.
Modified Paths:
--------------
trunk/dports/devel/qca/Portfile
Added Paths:
-----------
trunk/dports/devel/qca/files/patch-CMakeLists.txt.diff
trunk/dports/devel/qca/files/patch-include_QtCrypto_qca_basic.h.diff
Removed Paths:
-------------
trunk/dports/devel/qca/files/FindQCA2.cmake
trunk/dports/devel/qca/files/patch-CMakeLists_txt.diff
trunk/dports/devel/qca/files/patch-configure.diff
trunk/dports/devel/qca/files/patch-qca_basic_h.diff
trunk/dports/devel/qca/files/patch-src_botantools_botan_botan_secmem.h.diff
Modified: trunk/dports/devel/qca/Portfile
===================================================================
--- trunk/dports/devel/qca/Portfile 2016-01-29 02:38:48 UTC (rev 145232)
+++ trunk/dports/devel/qca/Portfile 2016-01-29 03:51:40 UTC (rev 145233)
@@ -6,6 +6,7 @@
name qca
version 2.1.0
+revision 1
set branch [join [lrange [split ${version} .] 0 1] .]
categories devel crypto security
maintainers michaelld openmaintainer
@@ -24,38 +25,35 @@
checksums rmd160 30358bbd182cfeb9eaa696b5b39fa9e6d1f99b4c \
sha256 226dcd76138c3738cdc15863607a96b3758a4c3efd3c47295939bcea4e7a9284
-# (1) correct pkgconfig file for framework install, if selected.
-# (2) allow for 'debug' and 'framework' options at the same time.
-# This change is needed to allow for +debug [+framework] --
-# disallow just debug framework via no variants for it.
-# (3) allow simple replacement for universal arch arguments, if that
-# variant is requested.
+# do VPATH (out of source tree) build
-patchfiles patch-qca_basic_h.diff \
- patch-CMakeLists_txt.diff
+cmake.out_of_source yes
-# fix C++ inheritance for a specific class to make clang happy
-#patchfiles-append patch-src_botantools_botan_botan_secmem.h.diff
+# temporary patch to add including QIODevice to qca_basic.h
+patchfiles-append patch-include_QtCrypto_qca_basic.h.diff
+
+# fix install directories for certs and cmake files
+
+patchfiles-append patch-CMakeLists.txt.diff
+
# remove unnecessary Carbon #include, which fails on 10.8
-#patchfiles-append patch-src_qac_systemstore_mac.cpp.diff
-variant qt4 conflicts qt5 description "Build with qt4" {
+patchfiles-append patch-src_qac_systemstore_mac.cpp.diff
- PortGroup qt4 1.0
- configure.args-append "-DQT4_BUILD=ON"
+# Qt variants
+variant qt4 conflicts qt5 description "Build with qt4" {
+ PortGroup qt4 1.0
+ configure.args-append -DQT4_BUILD=ON
}
variant qt5 conflicts qt4 description "Build with qt5" {
-
- PortGroup qt5 1.0
- configure.args-append "-DQCA_FEATURE_INSTALL_DIR=${prefix}/libexec/qt5/mkspecs"
-
+ PortGroup qt5 1.0
}
if {![variant_isset qt4] && ![variant_isset qt5]} {
- default_variants +qt4
+ default_variants +qt4
}
# make sure -qt4 wasn't specified alone
@@ -65,6 +63,30 @@
return -code error "Invalid variant selection"
}
+# set install directory for mkspec files
+
+pre-configure {
+ configure.args-append \
+ -DQCA_FEATURE_INSTALL_DIR=${qt_mkspecs_dir}
+}
+
+# build as a framework
+
+configure.args-append \
+ -DOSX_FRAMEWORK=YES
+
+# specify various configure options
+
+configure.args-append \
+ -DBUILD_PLUGINS=NO \
+ -DQCA_INSTALL_IN_QT_PREFIX=NO \
+ -DQCA_MAN_INSTALL_DIR=${prefix}/share/man \
+ -DQCA_LIBRARY_INSTALL_DIR=${frameworks_dir} \
+ -DCMAKE_MODULES_DIR=${prefix}/share/cmake \
+ -DPKGCONFIG_INSTALL_PREFIX=${prefix}/lib/pkgconfig \
+ -DQCA_PLUGINS_INSTALL_DIR=${prefix}/share/${name}/plugins \
+ -DQCA_DOC_INSTALL_DIR=${prefix}/share/${name}/doc
+
# allow ccache, if specified by the user
pre-build {
@@ -74,52 +96,49 @@
}
post-destroot {
- # alias to destroot QCA top-level directory
- set destroot_qt ${destroot}${qt_dir}
# install docs
- xinstall -d -m 755 ${destroot_qt}/share/doc/${name}
+
+ xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
- ${destroot_qt}/share/doc/${name}
+ ${destroot}${prefix}/share/doc/${name}
- if {[variant_isset qt4]} {
- # install cmake file (taken from port 'kdelibs4'). To use this
- # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during
- # the initial 'configure' stage (which uses CMake), to the full
- # path of where the CMake files are installed.
- xinstall -d -m 755 ${destroot}${qt_cmake_module_dir}
- xinstall -m 644 -W ${filespath} FindQCA2.cmake \
- ${destroot}${qt_cmake_module_dir}
- }
-}
+ # get qca's version numbers
-variant debug description \
-{Build both release and debug library} {
- configure.args-delete --release
- configure.args-append --debug-and-release
+ set qca_vers [split ${version} "."]
+ set qca_major [lindex ${qca_vers} 0]
+ set qca_minor [lindex ${qca_vers} 1]
+ set qca_patch [lindex ${qca_vers} 2]
+
+ # link includes and libraries for each actual installed framework
+
+ set tf_full ${frameworks_dir}/qca.framework/Versions/${version}
+
+ # link headers into ${prefix}/include, removing
+ # directories if they are already there first
+
+ set dr_inc_file ${destroot}${prefix}/include
+ ln -s ${tf_full}/Headers ${dr_inc_file}/qca
+ ln -s ${tf_full}/Headers ${dr_inc_file}/QtCrypto
+
+ # link libraries into ${dr_libs_dir}, all 4 number variants
+
+ set dr_libs_dir ${destroot}${prefix}/lib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.dylib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.dylib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.dylib
+ ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.${qca_patch}.dylib
+
}
-variant examples description \
-{Include examples in install} {
+variant examples description {Include examples in install} {
post-destroot {
- xinstall -d -m 755 ${destroot}${qt_dir}/share/examples/${name}
+ xinstall -d -m 755 ${destroot}${prefix}/share/examples/${name}
eval file copy [glob ${worksrcpath}/examples/*] \
- ${destroot}${qt_dir}/share/examples/${name}
+ ${destroot}${prefix}/share/examples/${name}
}
}
-platform darwin 8 {
- # might not be necessary
- if {[variant_exists universal] && [variant_isset universal]} {
- configure.args-append --mac-sdk=${developer_dir}/SDKs/MacOSX10.4u.sdk
- }
-}
-
-variant universal {
- # Add the universal flag understood by qmake
- configure.universal_args-append --universal
-}
-
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Deleted: trunk/dports/devel/qca/files/FindQCA2.cmake
===================================================================
--- trunk/dports/devel/qca/files/FindQCA2.cmake 2016-01-29 02:38:48 UTC (rev 145232)
+++ trunk/dports/devel/qca/files/FindQCA2.cmake 2016-01-29 03:51:40 UTC (rev 145233)
@@ -1,48 +0,0 @@
-# - Try to find QCA2 (Qt Cryptography Architecture 2)
-# Once done this will define
-#
-# QCA2_FOUND - system has QCA2
-# QCA2_INCLUDE_DIR - the QCA2 include directory
-# QCA2_LIBRARIES - the libraries needed to use QCA2
-# QCA2_DEFINITIONS - Compiler switches required for using QCA2
-#
-# use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-
-# Copyright (c) 2006, Michael Larouche, <michael.larouche at kdemail.net>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-include(FindLibraryWithDebug)
-
-if (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
-
- # in cache already
- set(QCA2_FOUND TRUE)
-
-else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
-
-
- if (NOT WIN32)
- find_package(PkgConfig)
- pkg_check_modules(PC_QCA2 QUIET qca2)
- set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
- endif (NOT WIN32)
-
- find_library_with_debug(QCA2_LIBRARIES
- WIN32_DEBUG_POSTFIX d
- NAMES qca
- HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS}
- )
-
- find_path(QCA2_INCLUDE_DIR QtCrypto
- HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS}
- PATH_SUFFIXES QtCrypto)
-
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(QCA2 DEFAULT_MSG QCA2_LIBRARIES QCA2_INCLUDE_DIR)
-
- mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES)
-
-endif (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
Copied: trunk/dports/devel/qca/files/patch-CMakeLists.txt.diff (from rev 145232, trunk/dports/devel/qca/files/patch-CMakeLists_txt.diff)
===================================================================
--- trunk/dports/devel/qca/files/patch-CMakeLists.txt.diff (rev 0)
+++ trunk/dports/devel/qca/files/patch-CMakeLists.txt.diff 2016-01-29 03:51:40 UTC (rev 145233)
@@ -0,0 +1,70 @@
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -166,17 +166,31 @@
+ set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Directory where lib will install")
+
+ set(QCA_PREFIX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Directory where qca will install")
+- set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}" CACHE PATH "Directory where qca plugins will install")
++ if(NOT QCA_PLUGINS_INSTALL_DIR)
++ set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}"
++ CACHE PATH "Directory where qca plugins will install")
++ endif()
+ set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install")
+ set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install")
+- set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")
++ if(NOT QCA_FEATURE_INSTALL_DIR)
++ set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")
++ endif()
+ set(QCA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca public headers will install")
+- set(QCA_PRIVATE_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca headers will install")
+- set(QCA_DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html" CACHE PATH "Directory where qca documentation will install")
+- set(QCA_MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Directory where qca man pages will install")
++ set(QCA_PRIVATE_INCLUDE_INSTALL_DIR
++ "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca
++ headers will install")
++ if(NOT QCA_DOC_INSTALL_DIR)
++ set(QCA_DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html" CACHE PATH "Directory where qca documentation will install")
++ endif()
++ if(NOT QCA_MAN_INSTALL_DIR)
++ set(QCA_MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH
++ "Directory where qca man pages will install")
++ endif()
+ endif( QCA_INSTALL_IN_QT_PREFIX )
+
++if(NOT PKGCONFIG_INSTALL_PREFIX)
+ set(PKGCONFIG_INSTALL_PREFIX "${QCA_LIBRARY_INSTALL_DIR}/pkgconfig" CACHE PATH "Base directory for pkgconfig files")
++endif()
+
+ normalize_path(QCA_PREFIX_INSTALL_DIR)
+
+@@ -292,7 +306,7 @@
+ set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem")
+ # note that INSTALL_FILES targets are relative to the current installation prefix...
+ if(NOT DEVELOPER_MODE)
+- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs")
++ install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/certs")
+ endif()
+ endif (qca_CERTSTORE)
+ message(STATUS "certstore path: " ${qca_CERTSTORE})
+@@ -374,7 +388,7 @@
+ configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake"
+- INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
++ INSTALL_DESTINATION ${CMAKE_MODULES_DIR}/Qca
+ )
+ write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion)
+
+@@ -434,10 +448,10 @@
+ endif()
+ message("")
+
+- install(EXPORT QCATargets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca FILE QcaTargets.cmake)
++ install(EXPORT QCATargets DESTINATION ${CMAKE_MODULES_DIR}/Qca FILE QcaTargets.cmake)
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake"
+- DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
++ DESTINATION ${CMAKE_MODULES_DIR}/Qca
+ )
+ endif()
Deleted: trunk/dports/devel/qca/files/patch-CMakeLists_txt.diff
===================================================================
--- trunk/dports/devel/qca/files/patch-CMakeLists_txt.diff 2016-01-29 02:38:48 UTC (rev 145232)
+++ trunk/dports/devel/qca/files/patch-CMakeLists_txt.diff 2016-01-29 03:51:40 UTC (rev 145233)
@@ -1,11 +0,0 @@
---- CMakeLists.txt.orig 2015-11-24 15:15:17.000000000 +0100
-+++ CMakeLists.txt 2015-11-24 15:16:02.000000000 +0100
-@@ -292,7 +292,7 @@
- set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem")
- # note that INSTALL_FILES targets are relative to the current installation prefix...
- if(NOT DEVELOPER_MODE)
-- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs")
-+ install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/certs")
- endif()
- endif (qca_CERTSTORE)
- message(STATUS "certstore path: " ${qca_CERTSTORE})
Deleted: trunk/dports/devel/qca/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/qca/files/patch-configure.diff 2016-01-29 02:38:48 UTC (rev 145232)
+++ trunk/dports/devel/qca/files/patch-configure.diff 2016-01-29 03:51:40 UTC (rev 145233)
@@ -1,81 +0,0 @@
---- configure.orig 2010-11-02 16:22:33.000000000 -0400
-+++ configure 2010-11-02 16:34:52.000000000 -0400
-@@ -618,12 +618,6 @@
- }
- #endif
-
-- if(opt_framework && qc_buildmode_debug)
-- {
-- printf("\nError: Cannot use both --framework and --debug.\n");
-- exit(1);
-- }
--
- // sanity check exclusive options
- int x;
-
-@@ -695,24 +689,19 @@
- bool exec()
- {
- #ifdef Q_OS_MAC
-+ QString str = "CONFIG += @ARCHES@\n";
- if(qc_getenv("QC_UNIVERSAL") == "Y")
- {
- qc_universal_enabled = true;
-
-- QString str =
-- "contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
-- " CONFIG += x86 ppc\n"
-- "}\n";
--
- QString sdk = qc_getenv("QC_MAC_SDK");
- if(!sdk.isEmpty())
- {
- str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
- qc_universal_sdk = sdk;
- }
--
-- conf->addExtra(str);
- }
-+ conf->addExtra(str);
- #endif
- return true;
- }
-@@ -814,13 +803,9 @@
- str += "QMAKE_CFLAGS += -g\n";
- str += "QMAKE_CXXFLAGS += -g\n";
- }
-+ str += " CONFIG += @ARCHES@\n";
- if(universal)
- {
-- str +=
-- "contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
-- " CONFIG += x86 ppc\n"
-- "}\n";
--
- if(!sdk.isEmpty())
- str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
- }
-@@ -884,10 +869,19 @@
- QString pkg_template3 = QString(
- "Requires: %1\n");
-
-- QString pkg_template4 = QString(
-- "Libs: -L\${libdir} -l%1\n"
-- "Cflags: -I\${includedir}\n"
-- "\n");
-+ QString pkg_template4;
-+ if (qc_buildmode_framework_enabled) {
-+ pkg_template4 = QString(
-+ "Libs: -F\${libdir} -framework %1\n"
-+ "Libs.private: -L\${libdir}\n"
-+ "Cflags: -I\${includedir}\n"
-+ "\n");
-+ } else {
-+ pkg_template4 = QString(
-+ "Libs: -L\${libdir} -l%1\n"
-+ "Cflags: -I\${includedir}\n"
-+ "\n");
-+ }
-
- QStringList pcfiles;
-
Copied: trunk/dports/devel/qca/files/patch-include_QtCrypto_qca_basic.h.diff (from rev 145232, trunk/dports/devel/qca/files/patch-qca_basic_h.diff)
===================================================================
--- trunk/dports/devel/qca/files/patch-include_QtCrypto_qca_basic.h.diff (rev 0)
+++ trunk/dports/devel/qca/files/patch-include_QtCrypto_qca_basic.h.diff 2016-01-29 03:51:40 UTC (rev 145233)
@@ -0,0 +1,10 @@
+--- include/QtCrypto/qca_basic.h.orig 2014-11-06 09:15:45.000000000 +0100
++++ include/QtCrypto/qca_basic.h 2015-11-24 14:28:04.000000000 +0100
+@@ -34,6 +34,7 @@
+ #define QCA_BASIC_H
+
+ #include "qca_core.h"
++#include <QIODevice>
+
+ // Qt5 comes with QStringLiteral for wrapping string literals, which Qt4 does
+ // not have. It is needed if the headers are built with QT_NO_CAST_FROM_ASCII.
Deleted: trunk/dports/devel/qca/files/patch-qca_basic_h.diff
===================================================================
--- trunk/dports/devel/qca/files/patch-qca_basic_h.diff 2016-01-29 02:38:48 UTC (rev 145232)
+++ trunk/dports/devel/qca/files/patch-qca_basic_h.diff 2016-01-29 03:51:40 UTC (rev 145233)
@@ -1,10 +0,0 @@
---- include/QtCrypto/qca_basic.h.orig 2014-11-06 09:15:45.000000000 +0100
-+++ include/QtCrypto/qca_basic.h 2015-11-24 14:28:04.000000000 +0100
-@@ -34,6 +34,7 @@
- #define QCA_BASIC_H
-
- #include "qca_core.h"
-+#include <QIODevice>
-
- // Qt5 comes with QStringLiteral for wrapping string literals, which Qt4 does
- // not have. It is needed if the headers are built with QT_NO_CAST_FROM_ASCII.
Deleted: trunk/dports/devel/qca/files/patch-src_botantools_botan_botan_secmem.h.diff
===================================================================
--- trunk/dports/devel/qca/files/patch-src_botantools_botan_botan_secmem.h.diff 2016-01-29 02:38:48 UTC (rev 145232)
+++ trunk/dports/devel/qca/files/patch-src_botantools_botan_botan_secmem.h.diff 2016-01-29 03:51:40 UTC (rev 145233)
@@ -1,11 +0,0 @@
---- src/botantools/botan/botan/secmem.h.orig 2012-09-26 21:16:22.000000000 -0400
-+++ src/botantools/botan/botan/secmem.h 2012-09-26 21:16:38.000000000 -0400
-@@ -214,7 +214,7 @@
-
- SecureVector(u32bit n = 0) { MemoryRegion<T>::init(true, n); }
- SecureVector(const T in[], u32bit n)
-- { MemoryRegion<T>::init(true); set(in, n); }
-+ { MemoryRegion<T>::init(true); MemoryRegion<T>::set(in, n); }
- SecureVector(const MemoryRegion<T>& in)
- { MemoryRegion<T>::init(true); set(in); }
- SecureVector(const MemoryRegion<T>& in1, const MemoryRegion<T>& in2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160128/2312b988/attachment-0001.html>
More information about the macports-changes
mailing list