diff options
Diffstat (limited to 'vcpkg/ports/mchehab-zbar')
| -rw-r--r-- | vcpkg/ports/mchehab-zbar/portfile.cmake | 53 | ||||
| -rw-r--r-- | vcpkg/ports/mchehab-zbar/vcpkg.json | 30 | ||||
| -rw-r--r-- | vcpkg/ports/mchehab-zbar/windows.patch | 27 |
3 files changed, 110 insertions, 0 deletions
diff --git a/vcpkg/ports/mchehab-zbar/portfile.cmake b/vcpkg/ports/mchehab-zbar/portfile.cmake new file mode 100644 index 0000000..6fd8a52 --- /dev/null +++ b/vcpkg/ports/mchehab-zbar/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mchehab/zbar + REF "${VERSION}" + SHA512 2dd607afbb1e52346bfb740f916c8616112d14153f071f82458b7c653f647b332290a5089543abebfe1c7679eae98b349a84777185d61cfb9ff275bfecc6e08f + HEAD_REF master + PATCHES + windows.patch + x64.patch +) + +vcpkg_list(SET options) +if("nls" IN_LIST FEATURES) + vcpkg_list(APPEND options "--enable-nls") +else() + vcpkg_list(APPEND options "--disable-nls") + set(ENV{AUTOPOINT} true) # true, the program + set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_HOST_INSTALLED_DIR}/share/gettext/aclocal/\"") + # Simulate the relevant effects of (interactive) `gettextize`. + file(TOUCH "${SOURCE_PATH}/po/Makefile.in.in") +endif() + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + ADD_BIN_TO_PATH # checking for working iconv + OPTIONS + ${options} + --without-dbus + --without-gtk + --without-imagemagick + --without-java + --without-jpeg + --without-python + --without-qt + --disable-video + --without-xv + OPTIONS_RELEASE + --disable-assert +) + +vcpkg_install_make() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/share/doc" + "${CURRENT_PACKAGES_DIR}/tools" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/mchehab-zbar/vcpkg.json b/vcpkg/ports/mchehab-zbar/vcpkg.json new file mode 100644 index 0000000..94ac20a --- /dev/null +++ b/vcpkg/ports/mchehab-zbar/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "mchehab-zbar", + "version": "0.23.93", + "description": "ZBar is an open source software suite for reading bar codes from various sources, including webcams. This fork is actively maintained.", + "homepage": "https://github.com/mchehab/zbar", + "license": "LGPL-2.1-or-later", + "supports": "!uwp & !xbox", + "dependencies": [ + { + "name": "gettext", + "host": true + }, + "libiconv" + ], + "features": { + "nls": { + "description": "Native Language Support", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "gettext-libintl" + ] + } + } +} diff --git a/vcpkg/ports/mchehab-zbar/windows.patch b/vcpkg/ports/mchehab-zbar/windows.patch new file mode 100644 index 0000000..ad38e35 --- /dev/null +++ b/vcpkg/ports/mchehab-zbar/windows.patch @@ -0,0 +1,27 @@ +diff --git a/configure.ac b/configure.ac +index f0f9723..9e79db9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,7 +55,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION], + [Library revision]) + + AM_CPPFLAGS="-I\$(top_srcdir)/include" +-AM_CFLAGS="-Wall -Wno-parentheses" ++AM_CFLAGS="-Wall" + AM_CXXFLAGS="$AM_CFLAGS" + AC_SUBST([AM_CPPFLAGS]) + AC_SUBST([AM_CFLAGS]) +diff --git a/zbar/processor.h b/zbar/processor.h +index a8289e0..8a7e33c 100644 +--- a/zbar/processor.h ++++ b/zbar/processor.h +@@ -29,7 +29,9 @@ + #endif + #include <stdlib.h> + #include <string.h> ++#ifndef WIN32 + #include <unistd.h> ++#endif + + #include <zbar.h> + #include "error.h" |