Skip to content

Commit

Permalink
Updated gmime to version 3.2.3. (#5060)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyhamster authored and Rastaban committed Feb 27, 2019
1 parent 47950ca commit 423c9a2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 94 deletions.
99 changes: 15 additions & 84 deletions ports/gmime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion ports/gmime/CONTROL
Original file line number Diff line number Diff line change
@@ -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).
7 changes: 6 additions & 1 deletion ports/gmime/gmime.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions ports/gmime/idna.h

This file was deleted.

8 changes: 3 additions & 5 deletions ports/gmime/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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})

Expand All @@ -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(
Expand Down

0 comments on commit 423c9a2

Please sign in to comment.