diff options
| author | codicodi <rob.ceglinski@gmail.com> | 2017-01-14 02:55:41 +0100 |
|---|---|---|
| committer | codicodi <rob.ceglinski@gmail.com> | 2017-01-14 02:55:41 +0100 |
| commit | eb7ccc1223f568d6d2df21b27eb890be93bc8186 (patch) | |
| tree | 5d4189533b53779809bb40ef18316fbded75692e | |
| parent | 5e1c18cd56db66c0a1f4f2816bc7938d47c1376d (diff) | |
| download | vcpkg-eb7ccc1223f568d6d2df21b27eb890be93bc8186.tar.gz vcpkg-eb7ccc1223f568d6d2df21b27eb890be93bc8186.zip | |
Revert "[glib] use win_iconv and add subdir for tools"
This reverts commit ccd3e399f023129a39bb9a402324676a9391a970.
| -rw-r--r-- | ports/glib/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | ports/glib/portfile.cmake | 7 | ||||
| -rw-r--r-- | ports/glib/use-libiconv-on-windows.patch | 14 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 |
4 files changed, 25 insertions, 6 deletions
diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index 1cf65d0a7..79d460bab 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -123,7 +123,7 @@ endmacro() if(NOT GLIB_SKIP_TOOLS) configure_file(gobject/glib-mkenums.in ${CMAKE_SOURCE_DIR}/gobject/glib-mkenums @ONLY) # uses GLIB_VERSION - install(FILES gobject/glib-mkenums DESTINATION tools/glib) + install(FILES gobject/glib-mkenums DESTINATION tools) add_gio_tool(gdbus gio/gdbus-tool.c) add_gio_tool(gio-querymodules gio/gio-querymodules.c) @@ -145,7 +145,7 @@ if(NOT GLIB_SKIP_TOOLS) add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c) add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c) - install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib) + install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools) endif() install(TARGETS ${GLIB_TARGETS} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index b438b2e61..d1777de1d 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -17,10 +17,15 @@ vcpkg_download_distfile(ARCHIVE SHA512 63d7b5ece8d7d15b10e06ef10a8e0a4446f30a8d9c97daa3352ec00dfef622728bd42ed24cbf67e553166a0f9e29a3e3d024d1d085b9804fd67608db438b6771) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/use-libiconv-on-windows.patch) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre) +file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -30,7 +35,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/glib) +vcpkg_copy_tool_dependencies() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glib/COPYING ${CURRENT_PACKAGES_DIR}/share/glib/copyright) diff --git a/ports/glib/use-libiconv-on-windows.patch b/ports/glib/use-libiconv-on-windows.patch new file mode 100644 index 000000000..927de0bb1 --- /dev/null +++ b/ports/glib/use-libiconv-on-windows.patch @@ -0,0 +1,14 @@ +diff --git a/glib/gconvert.c b/glib/gconvert.c +index 3deac78..134ded9 100644 +--- a/glib/gconvert.c ++++ b/glib/gconvert.c +@@ -30,7 +30,8 @@ + #include <stdlib.h> + + #ifdef G_OS_WIN32 +-#include "win_iconv.c" ++#define USE_LIBICONV_GNU ++#include <iconv.h> + #endif + + #ifdef G_PLATFORM_WIN32 diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index 32c3eba0d..d8de15207 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in TOOL_DIR +# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools -function(vcpkg_copy_tool_dependencies TOOL_DIR) +function(vcpkg_copy_tool_dependencies) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) + file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 |
