[70695] trunk/dports/devel/qca

michaelld at macports.org michaelld at macports.org
Tue Aug 17 08:53:05 PDT 2010


Revision: 70695
          http://trac.macports.org/changeset/70695
Author:   michaelld at macports.org
Date:     2010-08-17 08:53:04 -0700 (Tue, 17 Aug 2010)
Log Message:
-----------
Set 'destroot_qca' to simplify destroot installations.
Correct 'configure' comment.
Add in CMake file, installation, and use comment; does not conflict
  with that installed by 'kdelibs4'.

Modified Paths:
--------------
    trunk/dports/devel/qca/Portfile

Added Paths:
-----------
    trunk/dports/devel/qca/files/FindQCA2.cmake

Modified: trunk/dports/devel/qca/Portfile
===================================================================
--- trunk/dports/devel/qca/Portfile	2010-08-17 13:36:12 UTC (rev 70694)
+++ trunk/dports/devel/qca/Portfile	2010-08-17 15:53:04 UTC (rev 70695)
@@ -4,7 +4,7 @@
 PortSystem          1.0
 name                qca
 version             2.0.2
-revision            2
+revision            3
 set branch          [join [lrange [split ${version} .] 0 1] .]
 categories          devel crypto security
 maintainers         michaelld openmaintainer
@@ -30,8 +30,8 @@
 
 # patch to correct pkgconfig file for framework install, if selected.
 # and allow for 'debug' and 'framework' options at the same time.
-# This change is needed to allow for +combined [+framework]; handle
-# +debug [+framework] in pre-extract.
+# This change is needed to allow for +debug [+framework] -- disallow
+# just debug framework via no variants for it.
 patchfiles           patch-configure.diff
 
 set qt_dir           ${prefix}/libexec/qt4-mac
@@ -50,19 +50,30 @@
 destroot.destdir      INSTALL_ROOT="${destroot}"
 
 post-destroot {
+    # alias to destroot QCA top-level directory
+    set destroot_qca ${destroot}${qca_dir}
+
     # tweak header install for framework only
     if {![variant_isset no_framework]} {
         # when installed as a framework, link headers from
-        # the framework into ${qca_dir}/include
-        xinstall -d 755 ${destroot}${qca_dir}/include
-        ln -s ${qca_dir}/lib/qca.framework/Headers \
-            ${destroot}${qca_dir}/include/QtCrypto
+        # the framework into ${destroot_qca}/include
+        xinstall -d 755 ${destroot_qca}/include
+        ln -s ${destroot_qca}/lib/qca.framework/Headers \
+            ${destroot_qca}/include/QtCrypto
     }
 
     # install docs
-    xinstall -d 755 ${destroot}${qca_dir}/share/doc/${name}
+    xinstall -d 755 ${destroot_qca}/share/doc/${name}
     xinstall -m 644 -W ${worksrcpath} COPYING README TODO \
-        ${destroot}${qca_dir}/share/doc/${name}
+        ${destroot_qca}/share/doc/${name}
+
+    # 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 755 ${destroot_qca}/share/cmake/modules
+    xinstall -m 644 -W ${filespath} FindQCA2.cmake \
+        ${destroot_qca}/share/cmake/modules
 }
 
 variant no_framework description \

Added: trunk/dports/devel/qca/files/FindQCA2.cmake
===================================================================
--- trunk/dports/devel/qca/files/FindQCA2.cmake	                        (rev 0)
+++ trunk/dports/devel/qca/files/FindQCA2.cmake	2010-08-17 15:53:04 UTC (rev 70695)
@@ -0,0 +1,48 @@
+# - 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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100817/9387c797/attachment.html>


More information about the macports-changes mailing list