aboutsummaryrefslogtreecommitdiff
path: root/ports/zxing-cpp
diff options
context:
space:
mode:
authormyd7349 <myd7349@gmail.com>2019-06-23 08:16:07 +0800
committermyd7349 <myd7349@gmail.com>2019-06-23 08:16:07 +0800
commit644851da5fbe46aadd0a8fa54e1d7d213f469fb0 (patch)
tree3f5d20aca85fcf02375cf553e893c105758a5d39 /ports/zxing-cpp
parentf1870ae02bedbaa5a501ddf3a7ba5d0a743a1053 (diff)
parentf3db66b403840b24ea2612d09cca30a5285f5ea3 (diff)
downloadvcpkg-644851da5fbe46aadd0a8fa54e1d7d213f469fb0.tar.gz
vcpkg-644851da5fbe46aadd0a8fa54e1d7d213f469fb0.zip
Merge branch 'master' into sx-init
Diffstat (limited to 'ports/zxing-cpp')
-rw-r--r--ports/zxing-cpp/0001-opencv4-compat.patch30
-rw-r--r--ports/zxing-cpp/CONTROL4
-rw-r--r--ports/zxing-cpp/portfile.cmake18
3 files changed, 42 insertions, 10 deletions
diff --git a/ports/zxing-cpp/0001-opencv4-compat.patch b/ports/zxing-cpp/0001-opencv4-compat.patch
new file mode 100644
index 000000000..51cec5387
--- /dev/null
+++ b/ports/zxing-cpp/0001-opencv4-compat.patch
@@ -0,0 +1,30 @@
+diff --git a/opencv-cli/src/main.cpp b/opencv-cli/src/main.cpp
+index 63b6fd3..430dda6 100755
+--- a/opencv-cli/src/main.cpp
++++ b/opencv-cli/src/main.cpp
+@@ -135,14 +135,14 @@ int main(int argc, char** argv) {
+
+ }
+
+- if (!videoCapture.set(CV_CAP_PROP_FRAME_WIDTH, captureWidth)) {
++ if (!videoCapture.set(cv::CAP_PROP_FRAME_WIDTH, captureWidth)) {
+
+ // Log
+ cerr << "Failed to set frame width: " << captureWidth << " (ignoring)" << endl;
+
+ }
+
+- if (!videoCapture.set(CV_CAP_PROP_FRAME_HEIGHT, captureHeight)) {
++ if (!videoCapture.set(cv::CAP_PROP_FRAME_HEIGHT, captureHeight)) {
+
+ // Log
+ cerr << "Failed to set frame height: " << captureHeight << " (ignoring)" << endl;
+@@ -166,7 +166,7 @@ int main(int argc, char** argv) {
+ if (result) {
+
+ // Convert to grayscale
+- cvtColor(image, grey, CV_BGR2GRAY);
++ cvtColor(image, grey, cv::COLOR_BGR2GRAY);
+
+ try {
+
diff --git a/ports/zxing-cpp/CONTROL b/ports/zxing-cpp/CONTROL
index 52dfd95b2..c97ad1734 100644
--- a/ports/zxing-cpp/CONTROL
+++ b/ports/zxing-cpp/CONTROL
@@ -1,4 +1,4 @@
Source: zxing-cpp
-Version: 3.3.3-2
-Build-Depends: opencv[core]
+Version: 3.3.3-5
+Build-Depends: opencv
Description: Barcode detection and decoding library.
diff --git a/ports/zxing-cpp/portfile.cmake b/ports/zxing-cpp/portfile.cmake
index 405210d9c..044342ed6 100644
--- a/ports/zxing-cpp/portfile.cmake
+++ b/ports/zxing-cpp/portfile.cmake
@@ -8,6 +8,8 @@ vcpkg_from_github(
REF 5aad4744a3763d814df98a18886979893e638274
SHA512 a079ad47171224de4469e76bf0779b6ebc9c6dfb3604bd5dbf5e6e5f321d9e6255f689daa749855f8400023602f1773214013c006442e9b32dd4b8146c888c02
HEAD_REF master
+ PATCHES
+ 0001-opencv4-compat.patch
)
vcpkg_configure_cmake(
@@ -18,15 +20,15 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/zxing/cmake" TARGET_PATH share/zxing)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/zxing/cmake TARGET_PATH share/zxing)
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/zxing)
-if (WIN32)
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/zxing)
-else(WIN32)
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing DESTINATION ${CURRENT_PACKAGES_DIR}/tools/zxing)
-endif(WIN32)
-vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/zxing)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT})
+if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
+else()
+ file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
+endif()
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)