From 00e4692bcd06262b53ea471751d8d1429d6318eb Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 21 Feb 2023 18:00:56 +0100 Subject: [PATCH] [mchehab-zbar] Fix build without nls (#29411) * [mchehab-zbar] Fix build without nls * More placeholders for no-nls * Use m4 files from gettext * Another m4 file * More * More * ADD_BIN_TO_PATH --- ports/mchehab-zbar/portfile.cmake | 26 ++++++++++++++++++++++++++ ports/mchehab-zbar/vcpkg.json | 6 +----- versions/baseline.json | 2 +- versions/m-/mchehab-zbar.json | 5 +++++ 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/ports/mchehab-zbar/portfile.cmake b/ports/mchehab-zbar/portfile.cmake index 4436200b03..c2da7714e3 100644 --- a/ports/mchehab-zbar/portfile.cmake +++ b/ports/mchehab-zbar/portfile.cmake @@ -16,11 +16,37 @@ 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 + file(TOUCH "${SOURCE_PATH}/po/Makefile.in.in") + # Get missing build-time m4 files from gettext source + set(gettext_version 0.21.1) + vcpkg_download_distfile(gettext_archive + URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-${gettext_version}.tar.gz" + "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${gettext_version}.tar.gz" + FILENAME "gettext-${gettext_version}.tar.gz" + SHA512 ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05 + ) + file(ARCHIVE_EXTRACT INPUT "${gettext_archive}" + DESTINATION "${SOURCE_PATH}/gettext-autoconf" + PATTERNS "*/gettext-runtime/m4/gettext.m4" + "*/gettext-runtime/m4/iconv.m4" + "*/gettext-runtime/m4/intlmacosx.m4" + "*/gettext-runtime/m4/nls.m4" + "*/gettext-runtime/m4/po.m4" + "*/gettext-runtime/m4/progtest.m4" + "*/gettext-runtime/gnulib-m4/host-cpu-c-abi.m4" + "*/gettext-runtime/gnulib-m4/lib-ld.m4" + "*/gettext-runtime/gnulib-m4/lib-link.m4" + "*/gettext-runtime/gnulib-m4/lib-prefix.m4" + ) + file(GLOB_RECURSE m4_files "${SOURCE_PATH}/gettext-autoconf/*/*.m4") + file(INSTALL ${m4_files} DESTINATION "${SOURCE_PATH}/config") endif() vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}" AUTOCONFIG + ADD_BIN_TO_PATH # checking for working iconv OPTIONS ${options} --without-dbus diff --git a/ports/mchehab-zbar/vcpkg.json b/ports/mchehab-zbar/vcpkg.json index 7712359bd0..cf61794cc3 100644 --- a/ports/mchehab-zbar/vcpkg.json +++ b/ports/mchehab-zbar/vcpkg.json @@ -1,16 +1,12 @@ { "name": "mchehab-zbar", "version": "0.23.90", - "port-version": 2, + "port-version": 3, "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", "dependencies": [ - { - "name": "gettext", - "host": true - }, "libiconv" ], "features": { diff --git a/versions/baseline.json b/versions/baseline.json index 547fb2aa74..f02434f708 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4958,7 +4958,7 @@ }, "mchehab-zbar": { "baseline": "0.23.90", - "port-version": 2 + "port-version": 3 }, "mcpp": { "baseline": "2.7.2.14", diff --git a/versions/m-/mchehab-zbar.json b/versions/m-/mchehab-zbar.json index 25b137a5a6..ac77fde99e 100644 --- a/versions/m-/mchehab-zbar.json +++ b/versions/m-/mchehab-zbar.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "09371ba90d3c31d038bffd54a90203b5b4f7fdc8", + "version": "0.23.90", + "port-version": 3 + }, { "git-tree": "af1f66aef9076cd2e27c941851d1549d1cbffe00", "version": "0.23.90",