aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kaspar <alexander.kaspar@gmail.com>2016-11-30 19:11:07 +0100
committerAlexander Kaspar <alexander.kaspar@gmail.com>2016-11-30 19:11:07 +0100
commit90f0e2fb17dcaa146a2cadb807cdb125af7bfa56 (patch)
treee02cfcf6b234c6ef4ec41d476a2088b82beb6f44
parent255849a3c0d4638e37a538f9547625818516e6e4 (diff)
parent5a04753a4a99a6210990b25e8773b86ccbffec0b (diff)
downloadvcpkg-90f0e2fb17dcaa146a2cadb807cdb125af7bfa56.tar.gz
vcpkg-90f0e2fb17dcaa146a2cadb807cdb125af7bfa56.zip
Merge branch 'qca' of github.com:gnome71/vcpkg into qca
-rw-r--r--ports/qca/0001-fix-path-for-vcpkg.patch23
-rw-r--r--ports/qca/import-local-certificates.ps135
-rw-r--r--ports/qca/portfile.cmake23
3 files changed, 70 insertions, 11 deletions
diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch
index d7764c01d..9db22af1d 100644
--- a/ports/qca/0001-fix-path-for-vcpkg.patch
+++ b/ports/qca/0001-fix-path-for-vcpkg.patch
@@ -1,14 +1,14 @@
-From bab44a6614d4a540af56860432bcc0d6bdf420c9 Mon Sep 17 00:00:00 2001
-From: devel <alexander.kaspar@gmail.com>
-Date: Wed, 23 Nov 2016 16:54:44 +0100
+From a3a8d50f3bdcb4df630f7126718c21f23efd7832 Mon Sep 17 00:00:00 2001
+From: Alexander Kaspar <alexander.kaspar@gmail.com>
+Date: Wed, 30 Nov 2016 15:45:12 +0100
Subject: [PATCH] fix path for vcpkg
---
- CMakeLists.txt | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
+ CMakeLists.txt | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 605621b..a8c3774 100644
+index 605621b..3b5a9be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -277,7 +277,7 @@ if(DEVELOPER_MODE)
@@ -20,6 +20,15 @@ index 605621b..a8c3774 100644
")
endif()
+@@ -320,7 +320,7 @@ else (qca_CERTSTORE)
+ 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/qca/certs")
+ endif()
+ endif (qca_CERTSTORE)
+ message(STATUS "certstore path: " ${qca_CERTSTORE})
@@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND)
include(CMakePackageConfigHelpers)
configure_package_config_file(
@@ -50,5 +59,5 @@ index 605621b..a8c3774 100644
)
endif()
--
-2.9.2.windows.1
+2.8.1.windows.1
diff --git a/ports/qca/import-local-certificates.ps1 b/ports/qca/import-local-certificates.ps1
new file mode 100644
index 000000000..94e68e766
--- /dev/null
+++ b/ports/qca/import-local-certificates.ps1
@@ -0,0 +1,35 @@
+# According to:
+# https://www.openssl.org/docs/faq.html#USER16
+# it is up to developers or admins to maintain CAs.
+#
+# This script imports LocalMachine certificates into rootcerts.pem
+# needed by qca.
+#
+# PS> .\import-local-certificates.ps1 -certstore Root -outpath C:\src\git\vcpkg\ports\qca
+#
+
+param (
+ # one of Root, My, CA, ...
+ [string]$certstore = "Root",
+ # the path where it should be in qca buildtree (without trailing '\')
+ [Parameter(Mandatory=$true)][string]$outpath
+)
+
+$certs = (Get-ChildItem -Path 'Cert:\LocalMachine\Root')
+$outfile = $outpath + "\rootcerts.pem"
+
+Write-Host "Importing: " $certs.Count " certificates ..."
+
+foreach ($cert in $certs)
+{
+ $certs.GetIssuerName()
+ $out = New-Object String[] -ArgumentList 3
+ $out[0] = "-----BEGIN CERTIFICATE-----"
+ $out[1] = [System.Convert]::ToBase64String($cert.PublicKey.EncodedKeyValue.RawData, "InsertLineBreaks")
+ $out[2] = "-----END CERTIFICATE-----"
+
+ [System.IO.File]::AppendAllLines($outfile, $out)
+}
+
+Write-Host "Written to: " $outfile
+Write-Host "Importing certificates done."
diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake
index fa38970d3..b92596ef9 100644
--- a/ports/qca/portfile.cmake
+++ b/ports/qca/portfile.cmake
@@ -53,12 +53,13 @@ vcpkg_configure_cmake(
-DUSE_RELATIVE_PATHS=ON
-DQT4_BUILD=OFF
-DBUILD_TESTS=OFF
- -DBUILD_TOOLS=OFF
- -DQCA_SUFFIX=OFF #
+ -DBUILD_TOOLS=ON
+ -DQCA_SUFFIX=OFF
+ -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features
OPTIONS_DEBUG
- -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca #
+ -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca
OPTIONS_RELEASE
- -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca #
+ -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca
)
vcpkg_install_cmake()
@@ -84,6 +85,20 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake
"${QCA_TARGET_CONFIG}"
)
+# Move tools
+file(COPY ${CURRENT_PACKAGES_DIR}/bin/mozcerts.exe
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca/tools
+)
+file(COPY ${CURRENT_PACKAGES_DIR}/bin/qcatool.exe
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca/tools
+)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mozcerts.exe
+ ${CURRENT_PACKAGES_DIR}/bin/qcatool.exe
+ ${CURRENT_PACKAGES_DIR}/debug/bin/mozcerts.exe
+ ${CURRENT_PACKAGES_DIR}/debug/bin/mozcerts.pdb
+ ${CURRENT_PACKAGES_DIR}/debug/bin/qcatool.exe
+)
+
# Remove unneeded dirs
file(REMOVE_RECURSE
${CURRENT_BUILDTREES_DIR}/share/man