From a0c65236aa302a0bda2ca434d8953f7514ae110d Mon Sep 17 00:00:00 2001 From: Sergiu Giurgiu Date: Mon, 23 Dec 2024 12:28:59 -0500 Subject: [PATCH 1/3] [gmime] Enable library to be built and used in linux This patch updates the port to enable the library to be built and used in Linux. Only the x64 platform has been tested. --- ports/gmime/config-linux.h | 7 +++++++ ports/gmime/portfile.cmake | 12 +++++++++--- ports/gmime/vcpkg.json | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 ports/gmime/config-linux.h diff --git a/ports/gmime/config-linux.h b/ports/gmime/config-linux.h new file mode 100644 index 00000000000000..6dfe10fbc711ed --- /dev/null +++ b/ports/gmime/config-linux.h @@ -0,0 +1,7 @@ +#define HAVE_GETHOSTNAME 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_NETDB_H 1 +#define LIBIDN 1 +#define HAVE_FSYNC 1 + +#define ssize_t intptr_t diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake index dbdc226e4e342b..a2900194c8de9f 100644 --- a/ports/gmime/portfile.cmake +++ b/ports/gmime/portfile.cmake @@ -18,9 +18,15 @@ vcpkg_extract_source_archive( file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") # We can use file supplied with original sources -configure_file("${SOURCE_PATH}/build/vs2017/unistd.h" "${SOURCE_PATH}" COPYONLY) -configure_file("${SOURCE_PATH}/build/vs2017/config.h" "${SOURCE_PATH}" COPYONLY) -configure_file("${SOURCE_PATH}/build/vs2017/gmime.def" "${SOURCE_PATH}" COPYONLY) +if(VCPKG_TARGET_IS_WINDOWS) + configure_file("${SOURCE_PATH}/build/vs2017/unistd.h" "${SOURCE_PATH}" COPYONLY) + configure_file("${SOURCE_PATH}/build/vs2017/config.h" "${SOURCE_PATH}" COPYONLY) + configure_file("${SOURCE_PATH}/build/vs2017/gmime.def" "${SOURCE_PATH}" COPYONLY) +else() + configure_file(${CMAKE_CURRENT_LIST_DIR}/config-linux.h "${SOURCE_PATH}/config.h" COPYONLY) +endif() + + vcpkg_find_acquire_program(PKGCONFIG) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" diff --git a/ports/gmime/vcpkg.json b/ports/gmime/vcpkg.json index 349a31b7051f2a..5f0f42fe0abe53 100644 --- a/ports/gmime/vcpkg.json +++ b/ports/gmime/vcpkg.json @@ -5,7 +5,7 @@ "description": "GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME).", "homepage": "https://developer.gnome.org/gmime/", "license": "LGPL-2.1-or-later", - "supports": "windows & !xbox", + "supports": "(linux & x64) | (windows & !xbox)", "dependencies": [ "glib", "libiconv", From c0137771524d3cc67c8fec0bedca3183d217350f Mon Sep 17 00:00:00 2001 From: Sergiu Giurgiu Date: Tue, 24 Dec 2024 07:15:26 -0500 Subject: [PATCH 2/3] Updated port version --- ports/gmime/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gmime/vcpkg.json b/ports/gmime/vcpkg.json index 5f0f42fe0abe53..edad9e4c051ac2 100644 --- a/ports/gmime/vcpkg.json +++ b/ports/gmime/vcpkg.json @@ -1,7 +1,7 @@ { "name": "gmime", "version": "3.2.6", - "port-version": 6, + "port-version": 7, "description": "GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME).", "homepage": "https://developer.gnome.org/gmime/", "license": "LGPL-2.1-or-later", From 892c04a8df6240025e052574a063a7b02529c234 Mon Sep 17 00:00:00 2001 From: Sergiu Giurgiu Date: Tue, 24 Dec 2024 15:06:26 -0500 Subject: [PATCH 3/3] Updated versions database --- versions/baseline.json | 2 +- versions/g-/gmime.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index e3c2c74389cfb7..66a0eb978ce8a0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3194,7 +3194,7 @@ }, "gmime": { "baseline": "3.2.6", - "port-version": 6 + "port-version": 7 }, "gmmlib": { "baseline": "22.5.2", diff --git a/versions/g-/gmime.json b/versions/g-/gmime.json index 4f6711334cb6aa..bf7ff1f84191ab 100644 --- a/versions/g-/gmime.json +++ b/versions/g-/gmime.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "eff4c5cfc721a3f1e23cf22c5fd7fc0cad6c4f1d", + "version": "3.2.6", + "port-version": 7 + }, { "git-tree": "93e8b6f02474e1edb7e99db85020d864ee071ce0", "version": "3.2.6",