From e73d6251f99a091d3e8bac848dd47c64603293bc Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 15 May 2019 02:45:13 +0800 Subject: [PATCH] [libmaxminddb]fix build error in linux. (#6435) --- ports/libmaxminddb/CONTROL | 2 +- ports/libmaxminddb/fix-linux-build.patch | 19 +++++++++++++++++++ ports/libmaxminddb/portfile.cmake | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ports/libmaxminddb/fix-linux-build.patch diff --git a/ports/libmaxminddb/CONTROL b/ports/libmaxminddb/CONTROL index a075cdb552..f8b7f85be4 100644 --- a/ports/libmaxminddb/CONTROL +++ b/ports/libmaxminddb/CONTROL @@ -1,3 +1,3 @@ Source: libmaxminddb -Version: 1.3.2-1 +Version: 1.3.2-2 Description: C library for the MaxMind DB file format \ No newline at end of file diff --git a/ports/libmaxminddb/fix-linux-build.patch b/ports/libmaxminddb/fix-linux-build.patch new file mode 100644 index 0000000000..334b0f64cb --- /dev/null +++ b/ports/libmaxminddb/fix-linux-build.patch @@ -0,0 +1,19 @@ +diff --git a/include/maxminddb.h b/include/maxminddb.h +index de1fdf8..1d17bc3 100644 +--- a/include/maxminddb.h ++++ b/include/maxminddb.h +@@ -24,11 +24,12 @@ extern "C" { + #include + #include + ++/* libmaxminddb package version from configure */ ++#define PACKAGE_VERSION "1.3.2" ++ + #ifdef _WIN32 + #include + #include +-/* libmaxminddb package version from configure */ +-#define PACKAGE_VERSION "1.3.2" + + typedef ADDRESS_FAMILY sa_family_t; + diff --git a/ports/libmaxminddb/portfile.cmake b/ports/libmaxminddb/portfile.cmake index f2b17342f9..bbc13472ef 100644 --- a/ports/libmaxminddb/portfile.cmake +++ b/ports/libmaxminddb/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( REF 1.3.2 SHA512 43ff5f4e3a413772cd315412afc1070fb80280405d8845dc9d94a795265a71007c6c182dc01da8e14bf7b8ab8defe05714bec543faa956e7fb0f0a7756e7df48 HEAD_REF master + PATCHES fix-linux-build.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})