From 423c9a2e3a49c5af879482dda2f425ff20769236 Mon Sep 17 00:00:00 2001 From: Vitaliy Didik Date: Wed, 27 Feb 2019 23:04:50 +0300 Subject: [PATCH] Updated gmime to version 3.2.3. (#5060) --- ports/gmime/CMakeLists.txt | 99 ++++++-------------------------------- ports/gmime/CONTROL | 2 +- ports/gmime/gmime.def | 7 ++- ports/gmime/idna.h | 3 -- ports/gmime/portfile.cmake | 8 ++- 5 files changed, 25 insertions(+), 94 deletions(-) delete mode 100644 ports/gmime/idna.h diff --git a/ports/gmime/CMakeLists.txt b/ports/gmime/CMakeLists.txt index 20c788f7e1..b6bead6dad 100644 --- a/ports/gmime/CMakeLists.txt +++ b/ports/gmime/CMakeLists.txt @@ -2,24 +2,14 @@ cmake_minimum_required(VERSION 3.8) project(gmime C) -set(GLIB_LIB_SUFFIX 2.0) set(GMIME_DLL_SUFFIX 3) set(GMIME_LIB_SUFFIX 3.0) -# Find glib -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GIO_LIBRARY gio-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_SUFFIX}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GIO_LIBRARY} ${GLIB_GOBJECT_LIBRARY}) - -# Find other deps -find_path(ICONV_INCLUDE_DIR iconv.h) -find_library(ICONV_LIBRARY NAMES iconv libiconv) - -find_library(IDN_LIBRARY NAMES libidn2 libidn) - find_package(zlib REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) +find_package(unofficial-iconv REQUIRED) + +find_library(IDN_LIBRARY NAMES libidn2) if(MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE) @@ -29,75 +19,15 @@ endif() add_definitions(-DHAVE_CONFIG_H) add_definitions(-DG_LOG_DOMAIN="GMime") -# List the source files -set(LIB_SRC gmime/gmime.c - gmime/gmime-application-pkcs7-mime.c - gmime/gmime-autocrypt.c - gmime/gmime-certificate.c - gmime/gmime-charset.c - gmime/gmime-common.c - gmime/gmime-content-type.c - gmime/gmime-crypto-context.c - gmime/gmime-data-wrapper.c - gmime/gmime-disposition.c - gmime/gmime-encodings.c - gmime/gmime-events.c - gmime/gmime-filter.c - gmime/gmime-filter-basic.c - gmime/gmime-filter-best.c - gmime/gmime-filter-charset.c - gmime/gmime-filter-checksum.c - gmime/gmime-filter-dos2unix.c - gmime/gmime-filter-enriched.c - gmime/gmime-filter-from.c - gmime/gmime-filter-gzip.c - gmime/gmime-filter-html.c - gmime/gmime-filter-smtp-data.c - gmime/gmime-filter-strip.c - gmime/gmime-filter-unix2dos.c - gmime/gmime-filter-windows.c - gmime/gmime-filter-yenc.c - gmime/gmime-format-options.c - gmime/gmime-gpg-context.c - gmime/gmime-gpgme-utils.c - gmime/gmime-header.c - gmime/gmime-iconv.c - gmime/gmime-iconv-utils.c - gmime/gmime-message.c - gmime/gmime-message-part.c - gmime/gmime-message-partial.c - gmime/gmime-multipart.c - gmime/gmime-multipart-encrypted.c - gmime/gmime-multipart-signed.c - gmime/gmime-object.c - gmime/gmime-param.c - gmime/gmime-parse-utils.c - gmime/gmime-parser.c - gmime/gmime-parser-options.c - gmime/gmime-part.c - gmime/gmime-part-iter.c - gmime/gmime-pkcs7-context.c - gmime/gmime-references.c - gmime/gmime-signature.c - gmime/gmime-stream.c - gmime/gmime-stream-buffer.c - gmime/gmime-stream-cat.c - gmime/gmime-stream-file.c - gmime/gmime-stream-filter.c - gmime/gmime-stream-fs.c - gmime/gmime-stream-gio.c - gmime/gmime-stream-mem.c - gmime/gmime-stream-mmap.c - gmime/gmime-stream-null.c - gmime/gmime-stream-pipe.c - gmime/gmime-text-part.c - gmime/gmime-utils.c - gmime/internet-address.c - util/packed.c - util/url-scanner.c - util/gtrie.c -) +# Source files +file(GLOB LIB_SRC gmime/gmime-*.c) +list(APPEND LIB_SRC gmime/gmime.c + gmime/internet-address.c + util/packed.c + util/url-scanner.c + util/gtrie.c) +# Headers file(GLOB LIB_HEADERS gmime/gmime-*.h) list(APPEND LIB_HEADERS gmime/gmime.h) list(APPEND LIB_HEADERS gmime/internet-address.h) @@ -113,8 +43,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_NAME ${PROJECT_NAME}-${GMIME_LIB_SUFFIX} ) -target_include_directories(${PROJECT_NAME} PRIVATE . ./util ${GLIB_INCLUDE_DIR} ${ICONV_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) -target_link_libraries(${PROJECT_NAME} PRIVATE ${GLIB_LIBRARIES} ${ICONV_LIBRARY} ${ZLIB_LIBRARIES} ${IDN_LIBRARY}) +target_include_directories(${PROJECT_NAME} PRIVATE . ./util) +target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::iconv::libiconv ZLIB::ZLIB ${IDN_LIBRARY}) +target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::glib::gobject unofficial::glib::gio unofficial::glib::glib) target_link_libraries(${PROJECT_NAME} PRIVATE Ws2_32.lib) install(TARGETS ${PROJECT_NAME} diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL index febce0ebe1..21cedc5e63 100644 --- a/ports/gmime/CONTROL +++ b/ports/gmime/CONTROL @@ -1,4 +1,4 @@ Source: gmime -Version: 3.0.5 +Version: 3.2.3 Build-Depends: zlib, glib, libiconv, libidn2 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). diff --git a/ports/gmime/gmime.def b/ports/gmime/gmime.def index b072e0d656..e73d0fa01f 100644 --- a/ports/gmime/gmime.def +++ b/ports/gmime/gmime.def @@ -160,6 +160,11 @@ g_mime_filter_gzip_get_type g_mime_filter_gzip_new g_mime_filter_html_get_type g_mime_filter_html_new +g_mime_filter_openpgp_new +g_mime_filter_openpgp_get_data_type +g_mime_filter_openpgp_get_begin_offset +g_mime_filter_openpgp_get_end_offset +g_mime_filter_openpgp_get_type g_mime_filter_reset g_mime_filter_set_size g_mime_filter_smtp_data_get_type @@ -502,7 +507,7 @@ g_mime_stream_mem_set_owner g_mime_stream_mmap_get_type g_mime_stream_mmap_new g_mime_stream_mmap_new_with_bounds -g_mime_stream_null_count_newlines +g_mime_stream_null_set_count_newlines g_mime_stream_null_get_count_newlines g_mime_stream_null_get_type g_mime_stream_null_new diff --git a/ports/gmime/idna.h b/ports/gmime/idna.h deleted file mode 100644 index 3313cdbc7f..0000000000 --- a/ports/gmime/idna.h +++ /dev/null @@ -1,3 +0,0 @@ -// Redirects header from libidn to libidn2 -// Created to avoid sources patching -#include diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake index ddfeeb74c5..dbe678834d 100644 --- a/ports/gmime/portfile.cmake +++ b/ports/gmime/portfile.cmake @@ -1,15 +1,15 @@ include(vcpkg_common_functions) set(LIB_NAME gmime) -set(LIB_VERSION 3.0.5) +set(LIB_VERSION 3.2.3) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://download.gnome.org/sources/gmime/3.0/${LIB_FILENAME}" + URLS "https://download.gnome.org/sources/gmime/3.2/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 658b9008ffdf8055ffa9dfe8a5a6036a487309b0419572a9376397f68a8fc17d36ba6a05d2dfcb2ad23e634dc9e2aedd2479df1bfa0b7f8944d4c294650cb6c8 + SHA512 abaf9059baf0c045d5b62757953ee2fa0779462eb32142bb41be40c376fc7ac2b3e4a56fd66177fbbe1dca35c6168a251542b14a844125c2cfcc9a99888179b4 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -19,8 +19,6 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) configure_file(${SOURCE_PATH}/build/vs2010/unistd.h ${SOURCE_PATH} COPYONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH}) - -configure_file(${CMAKE_CURRENT_LIST_DIR}/idna.h ${SOURCE_PATH} COPYONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) vcpkg_configure_cmake(