1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-09 06:51:44 +00:00
freebsd-ports/textproc/fcitx5/files/patch-src_lib_fcitx-utils_Fcitx5Download.cmake.in
Guangyuan Yang 784693f56c Add Fcitx5 IME framework and related ports
The Fcitx5 IME framework is the future version of the legacy Fcitx IME framework.

Main parts of Fcitx5:
  - x11/xcb-imdkit
  - textproc/fcitx5

Application supports libraries of Fcitx5:
  - textproc/fcitx5-qt
  - textproc/fcitx5-gtk

GUI configuration tool of Fcitx5:
  - textproc/fcitx5-configtool

IME addons for Fcitx5:
  - chinese/fcitx5-rime
  - japanese/fcitx5-anthy

textproc/fcitx5 and chinese/fcitx cannot be installed at the same time right now, due to development environment and runtime conflicts users could possibly run into.

Submitted by:	Ka Ho Ng <khng300@gmail.com>
Approved by:	lwhsu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27667
2020-12-29 14:58:55 +00:00

26 lines
1006 B
CMake

--- src/lib/fcitx-utils/Fcitx5Download.cmake.in.orig 2020-12-04 23:50:28 UTC
+++ src/lib/fcitx-utils/Fcitx5Download.cmake.in
@@ -1,11 +1,16 @@
+SET(FCITX5_DOWNLOAD_DISALLOWED $ENV{FCITX5_DOWNLOAD_DISALLOWED})
if (NOT EXISTS "@FCITX5_DOWNLOAD_DEST@")
message(STATUS "Downloading '@FCITX5_DOWNLOAD_URL@' to '@FCITX5_DOWNLOAD_DEST@'...")
- file(DOWNLOAD
- "@FCITX5_DOWNLOAD_URL@"
- "@FCITX5_DOWNLOAD_DEST@"
- EXPECTED_HASH SHA256=@FCITX5_DOWNLOAD_SHA256@
- TLS_VERIFY ON
- SHOW_PROGRESS)
+ if (NOT FCITX5_DOWNLOAD_DISALLOWED)
+ file(DOWNLOAD
+ "@FCITX5_DOWNLOAD_URL@"
+ "@FCITX5_DOWNLOAD_DEST@"
+ EXPECTED_HASH SHA256=@FCITX5_DOWNLOAD_SHA256@
+ TLS_VERIFY ON
+ SHOW_PROGRESS)
+ else()
+ message(FATAL_ERROR "Downloading is disallowed")
+ endif()
else()
file(SHA256 "@FCITX5_DOWNLOAD_DEST@" actual_value)
if(NOT "${actual_value}" STREQUAL "@FCITX5_DOWNLOAD_SHA256@")