From 38eb9b0cf210fc7671b07a682da61b7fcad95240 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Sun, 25 Aug 2024 16:33:14 +0300 Subject: [PATCH] Add wvWare data dir patch --- recipes/wvware/all/conandata.yml | 1 + .../wvware/all/patches/wvWare-data-dir.patch | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 recipes/wvware/all/patches/wvWare-data-dir.patch diff --git a/recipes/wvware/all/conandata.yml b/recipes/wvware/all/conandata.yml index 93631bc..91491be 100644 --- a/recipes/wvware/all/conandata.yml +++ b/recipes/wvware/all/conandata.yml @@ -13,3 +13,4 @@ patches: - patch_file: "patches/wv-1.2.9-gcc14-build-fix.patch" - patch_file: "patches/printf-redirect.patch" + - patch_file: "patches/wvWare-data-dir.patch" diff --git a/recipes/wvware/all/patches/wvWare-data-dir.patch b/recipes/wvware/all/patches/wvWare-data-dir.patch new file mode 100644 index 0000000..366e534 --- /dev/null +++ b/recipes/wvware/all/patches/wvWare-data-dir.patch @@ -0,0 +1,27 @@ +--- wvWare.c ++++ wvWare.c +@@ -1604,6 +1604,15 @@ + return (0); + } + ++const char *get_data_dir() ++{ ++ const char *data_dir = getenv("WVDATADIR"); ++ if (NULL == data_dir) { ++ data_dir = WVDATADIR; ++ } ++ return data_dir; ++} ++ + int + wvOpenConfig (state_data *myhandle,char *config) + { +@@ -1618,7 +1627,7 @@ + + if(tmp == NULL) + { +- str_copy (buf, sizeof(buf), WVDATADIR); ++ str_copy (buf, sizeof(buf), get_data_dir()); + str_append(buf, sizeof(buf), "/"); + str_append(buf, sizeof(buf), config); + config = buf;