Changeset 145233


Ignore:
Timestamp:
Jan 29, 2016, 3:51:40 AM (23 months ago)
Author:
michaelld@…
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.

Location:
trunk/dports/devel/qca
Files:
3 deleted
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/qca/Portfile

    r145220 r145233  
    77name                qca
    88version             2.1.0
     9revision            1
    910set branch          [join [lrange [split ${version} .] 0 1] .]
    1011categories          devel crypto security
     
    2526                    sha256 226dcd76138c3738cdc15863607a96b3758a4c3efd3c47295939bcea4e7a9284
    2627
    27 # (1) correct pkgconfig file for framework install, if selected.
    28 # (2) allow for 'debug' and 'framework' options at the same time.
    29 #     This change is needed to allow for +debug [+framework] --
    30 #     disallow just debug framework via no variants for it.
    31 # (3) allow simple replacement for universal arch arguments, if that
    32 #     variant is requested.
     28# do VPATH (out of source tree) build
    3329
    34 patchfiles          patch-qca_basic_h.diff \
    35                     patch-CMakeLists_txt.diff
     30cmake.out_of_source yes
    3631
    37 # fix C++ inheritance for a specific class to make clang happy
    38 #patchfiles-append    patch-src_botantools_botan_botan_secmem.h.diff
     32# temporary patch to add including QIODevice to qca_basic.h
     33
     34patchfiles-append patch-include_QtCrypto_qca_basic.h.diff
     35
     36# fix install directories for certs and cmake files
     37
     38patchfiles-append patch-CMakeLists.txt.diff
    3939
    4040# remove unnecessary Carbon #include, which fails on 10.8
    41 #patchfiles-append    patch-src_qac_systemstore_mac.cpp.diff
     41
     42patchfiles-append patch-src_qac_systemstore_mac.cpp.diff
     43
     44# Qt variants
    4245
    4346variant qt4 conflicts qt5 description "Build with qt4" {
    44 
    45     PortGroup   qt4 1.0
    46     configure.args-append   "-DQT4_BUILD=ON"
    47 
     47    PortGroup qt4 1.0
     48    configure.args-append -DQT4_BUILD=ON
    4849}
    4950
    5051variant qt5 conflicts qt4 description "Build with qt5" {
    51 
    52     PortGroup               qt5 1.0
    53     configure.args-append   "-DQCA_FEATURE_INSTALL_DIR=${prefix}/libexec/qt5/mkspecs"
    54 
     52    PortGroup qt5 1.0
    5553}
    5654
    5755if {![variant_isset qt4] && ![variant_isset qt5]} {
    58     default_variants     +qt4
     56    default_variants +qt4
    5957}
    6058
     
    6563    return -code error "Invalid variant selection"
    6664}
     65
     66# set install directory for mkspec files
     67
     68pre-configure {
     69    configure.args-append \
     70        -DQCA_FEATURE_INSTALL_DIR=${qt_mkspecs_dir}
     71}
     72
     73# build as a framework
     74
     75configure.args-append \
     76    -DOSX_FRAMEWORK=YES
     77
     78# specify various configure options
     79
     80configure.args-append \
     81    -DBUILD_PLUGINS=NO \
     82    -DQCA_INSTALL_IN_QT_PREFIX=NO \
     83    -DQCA_MAN_INSTALL_DIR=${prefix}/share/man \
     84    -DQCA_LIBRARY_INSTALL_DIR=${frameworks_dir} \
     85    -DCMAKE_MODULES_DIR=${prefix}/share/cmake \
     86    -DPKGCONFIG_INSTALL_PREFIX=${prefix}/lib/pkgconfig \
     87    -DQCA_PLUGINS_INSTALL_DIR=${prefix}/share/${name}/plugins \
     88    -DQCA_DOC_INSTALL_DIR=${prefix}/share/${name}/doc
    6789
    6890# allow ccache, if specified by the user
     
    7597
    7698post-destroot {
    77     # alias to destroot QCA top-level directory
    78     set destroot_qt ${destroot}${qt_dir}
    7999
    80100    # install docs
    81     xinstall -d -m 755 ${destroot_qt}/share/doc/${name}
     101
     102    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    82103    xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
    83         ${destroot_qt}/share/doc/${name}
     104        ${destroot}${prefix}/share/doc/${name}
    84105
    85     if {[variant_isset qt4]} {
    86         # install cmake file (taken from port 'kdelibs4'). To use this
    87         # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during
    88         # the initial 'configure' stage (which uses CMake), to the full
    89         # path of where the CMake files are installed.
    90         xinstall -d -m 755 ${destroot}${qt_cmake_module_dir}
    91         xinstall -m 644 -W ${filespath} FindQCA2.cmake \
    92             ${destroot}${qt_cmake_module_dir}
    93     }
     106    # get qca's version numbers
     107
     108    set qca_vers [split ${version} "."]
     109    set qca_major [lindex ${qca_vers} 0]
     110    set qca_minor [lindex ${qca_vers} 1]
     111    set qca_patch [lindex ${qca_vers} 2]
     112
     113    # link includes and libraries for each actual installed framework
     114
     115    set tf_full ${frameworks_dir}/qca.framework/Versions/${version}
     116
     117    # link headers into ${prefix}/include, removing
     118    # directories if they are already there first
     119
     120    set dr_inc_file ${destroot}${prefix}/include
     121    ln -s ${tf_full}/Headers ${dr_inc_file}/qca
     122    ln -s ${tf_full}/Headers ${dr_inc_file}/QtCrypto
     123
     124    # link libraries into ${dr_libs_dir}, all 4 number variants
     125
     126    set dr_libs_dir ${destroot}${prefix}/lib
     127    ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.dylib
     128    ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.dylib
     129    ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.dylib
     130    ln -s ${tf_full}/qca ${dr_libs_dir}/libqca.${qca_major}.${qca_minor}.${qca_patch}.dylib
     131
    94132}
    95133
    96 variant debug description \
    97 {Build both release and debug library} {
    98     configure.args-delete --release
    99     configure.args-append --debug-and-release
    100 }
    101 
    102 variant examples description \
    103 {Include examples in install} {
     134variant examples description {Include examples in install} {
    104135    post-destroot {
    105         xinstall -d -m 755 ${destroot}${qt_dir}/share/examples/${name}
     136        xinstall -d -m 755 ${destroot}${prefix}/share/examples/${name}
    106137        eval file copy [glob ${worksrcpath}/examples/*] \
    107             ${destroot}${qt_dir}/share/examples/${name}
     138            ${destroot}${prefix}/share/examples/${name}
    108139    }
    109 }
    110 
    111 platform darwin 8 {
    112     # might not be necessary
    113     if {[variant_exists universal] && [variant_isset universal]} {
    114         configure.args-append --mac-sdk=${developer_dir}/SDKs/MacOSX10.4u.sdk
    115     }
    116 }
    117 
    118 variant universal {
    119     # Add the universal flag understood by qmake
    120     configure.universal_args-append --universal
    121140}
    122141
  • trunk/dports/devel/qca/files/patch-CMakeLists.txt.diff

    r145232 r145233  
    1 --- CMakeLists.txt.orig 2015-11-24 15:15:17.000000000 +0100
    2 +++ CMakeLists.txt      2015-11-24 15:16:02.000000000 +0100
    3 @@ -292,7 +292,7 @@
     1--- CMakeLists.txt.orig
     2+++ CMakeLists.txt
     3@@ -166,17 +166,31 @@
     4   set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Directory where lib will install")
     5 
     6   set(QCA_PREFIX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Directory where qca will install")
     7-  set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}" CACHE PATH "Directory where qca plugins will install")
     8+  if(NOT QCA_PLUGINS_INSTALL_DIR)
     9+    set(QCA_PLUGINS_INSTALL_DIR "${LIB_INSTALL_DIR}/${QCA_LIB_NAME}"
     10+  CACHE PATH "Directory where qca plugins will install")
     11+  endif()
     12   set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install")
     13   set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install")
     14-  set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")
     15+  if(NOT QCA_FEATURE_INSTALL_DIR)
     16+    set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install")
     17+  endif()
     18   set(QCA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca public headers will install")
     19-  set(QCA_PRIVATE_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca headers will install")
     20-  set(QCA_DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html" CACHE PATH "Directory where qca documentation will install")
     21-  set(QCA_MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Directory where qca man pages will install")
     22+  set(QCA_PRIVATE_INCLUDE_INSTALL_DIR
     23+  "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca
     24+  headers will install")
     25+  if(NOT QCA_DOC_INSTALL_DIR)
     26+    set(QCA_DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${QCA_LIB_NAME}/html" CACHE PATH "Directory where qca documentation will install")
     27+  endif()
     28+  if(NOT QCA_MAN_INSTALL_DIR)
     29+    set(QCA_MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH
     30+  "Directory where qca man pages will install")
     31+  endif()
     32 endif( QCA_INSTALL_IN_QT_PREFIX )
     33 
     34+if(NOT PKGCONFIG_INSTALL_PREFIX)
     35 set(PKGCONFIG_INSTALL_PREFIX "${QCA_LIBRARY_INSTALL_DIR}/pkgconfig" CACHE PATH "Base directory for pkgconfig files")
     36+endif()
     37 
     38 normalize_path(QCA_PREFIX_INSTALL_DIR)
     39 
     40@@ -292,7 +306,7 @@
    441   set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem")
    542   # note that INSTALL_FILES targets are relative to the current installation prefix...
     
    1047 endif (qca_CERTSTORE)
    1148 message(STATUS "certstore path: " ${qca_CERTSTORE})
     49@@ -374,7 +388,7 @@
     50 configure_package_config_file(
     51   "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in"
     52   "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake"
     53-  INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
     54+  INSTALL_DESTINATION ${CMAKE_MODULES_DIR}/Qca
     55 )
     56 write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion)
     57 
     58@@ -434,10 +448,10 @@
     59   endif()
     60   message("")
     61 
     62-  install(EXPORT QCATargets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca FILE QcaTargets.cmake)
     63+  install(EXPORT QCATargets DESTINATION ${CMAKE_MODULES_DIR}/Qca FILE QcaTargets.cmake)
     64   install(FILES
     65     "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfig.cmake"
     66     "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/Qca/QcaConfigVersion.cmake"
     67-    DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/Qca
     68+    DESTINATION ${CMAKE_MODULES_DIR}/Qca
     69     )
     70 endif()
Note: See TracChangeset for help on using the changeset viewer.