aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2020-09-27 17:49:45 -0700
committerGitHub <noreply@github.com>2020-09-27 17:49:45 -0700
commit870d2cd3b1bf4f14b2e03707d40f8efe1fa19376 (patch)
tree08fd461d23ae1f58a561b744f683a40d908e9c94
parent70658669cc038c3016b795b60964e60747a3eb18 (diff)
downloadvcpkg-870d2cd3b1bf4f14b2e03707d40f8efe1fa19376.tar.gz
vcpkg-870d2cd3b1bf4f14b2e03707d40f8efe1fa19376.zip
[libidn2] Support UNIX (#13708)
* [libidn2] Support UNIX * update baseline * Add supports
-rw-r--r--ports/getdns/CONTROL2
-rw-r--r--ports/gmime/CONTROL1
-rw-r--r--ports/libidn2/CONTROL3
-rw-r--r--ports/libidn2/portfile.cmake78
-rw-r--r--scripts/ci.baseline.txt2
5 files changed, 51 insertions, 35 deletions
diff --git a/ports/getdns/CONTROL b/ports/getdns/CONTROL
index d7f45b301..69dc8e3a1 100644
--- a/ports/getdns/CONTROL
+++ b/ports/getdns/CONTROL
@@ -3,7 +3,7 @@ Version: 1.6.0
Build-Depends: libidn2, openssl
Description: GetDNS is a modern asynchronous DNS API
Homepage: https://getdnsapi.net/
-Supports: !uwp
+Supports: !uwp&windows
Feature: libevent
Description: libevent event loop integration
diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL
index c22fa3f60..70200731c 100644
--- a/ports/gmime/CONTROL
+++ b/ports/gmime/CONTROL
@@ -3,3 +3,4 @@ Version: 3.2.6
Build-Depends: zlib, glib, libiconv, libidn2
Homepage: https://developer.gnome.org/gmime/
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).
+Supports: windows \ No newline at end of file
diff --git a/ports/libidn2/CONTROL b/ports/libidn2/CONTROL
index 7dc55f126..00ec059a6 100644
--- a/ports/libidn2/CONTROL
+++ b/ports/libidn2/CONTROL
@@ -1,5 +1,6 @@
Source: libidn2
-Version: 2.2.0-1
+Version: 2.2.0
+Port-Version: 2
Build-Depends: libiconv
Homepage: https://www.gnu.org/software/libidn/
Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names.
diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake
index 1d7c94070..5d637c5b1 100644
--- a/ports/libidn2/portfile.cmake
+++ b/ports/libidn2/portfile.cmake
@@ -13,39 +13,55 @@ vcpkg_extract_source_archive_ex(
REF ${IDN2_VERSION}
)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl)
+if (VCPKG_TARGET_IS_WINDOWS)
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl)
+
+ configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH})
+
+ function(simple_copy_template_header FILE_PATH BASE_NAME)
+ if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h)
+ if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h)
+ configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h)
+ endif()
+ endif()
+ endfunction()
+
+ # There seems to be no difference between source and destination files after 'configure'
+ # apart from auto-generated notification at the top. So why not just do a simple copy.
+ simple_copy_template_header(${SOURCE_PATH}/unistring uniconv)
+ simple_copy_template_header(${SOURCE_PATH}/unistring unictype)
+ simple_copy_template_header(${SOURCE_PATH}/unistring uninorm)
+ simple_copy_template_header(${SOURCE_PATH}/unistring unistr)
+ simple_copy_template_header(${SOURCE_PATH}/unistring unitypes)
+ simple_copy_template_header(${SOURCE_PATH}/unistring alloca)
+
+ vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ )
+
+ vcpkg_install_cmake()
+
+ vcpkg_copy_pdbs()
+
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH})
-
-function(simple_copy_template_header FILE_PATH BASE_NAME)
- if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h)
- if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h)
- configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h)
- endif()
- endif()
-endfunction()
-
-# There seems to be no difference between source and destination files after 'configure'
-# apart from auto-generated notification at the top. So why not just do a simple copy.
-simple_copy_template_header(${SOURCE_PATH}/unistring uniconv)
-simple_copy_template_header(${SOURCE_PATH}/unistring unictype)
-simple_copy_template_header(${SOURCE_PATH}/unistring uninorm)
-simple_copy_template_header(${SOURCE_PATH}/unistring unistr)
-simple_copy_template_header(${SOURCE_PATH}/unistring unitypes)
-simple_copy_template_header(${SOURCE_PATH}/unistring alloca)
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
-)
-
-vcpkg_install_cmake()
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+else()
+ vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ COPY_SOURCE
+ OPTIONS
+ --with-libiconv-prefix=${CURRENT_INSTALLED_DIR}
+ )
+
+ vcpkg_install_make()
+
+ vcpkg_fixup_pkgconfig()
+
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+endif()
# License and man
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright)
file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2)
-
-vcpkg_copy_pdbs()
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index 244f79454..39728e528 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -708,8 +708,6 @@ libhdfs3:x64-linux=fail
libhydrogen:arm64-windows=fail
libics:arm-uwp=fail
libics:x64-uwp=fail
-libidn2:x64-linux=fail
-libidn2:x64-osx=fail
libigl:arm64-windows=fail
libigl:arm-uwp=fail
libigl:x64-uwp=fail