[wxwidgets] Upgrade to 3.1.1

This commit is contained in:
Robert Schumacher 2018-02-24 01:29:13 -08:00
parent 63901137f6
commit e391e7b5dd
4 changed files with 47 additions and 1291 deletions

View File

@ -1,4 +1,4 @@
Source: wxwidgets
Version: 3.1.0-1
Version: 3.1.1
Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications.
Build-Depends: zlib, libpng, tiff, expat

View File

@ -0,0 +1,13 @@
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
index 06256b1..2960a31 100644
--- a/build/cmake/init.cmake
+++ b/build/cmake/init.cmake
@@ -66,7 +66,7 @@ else()
set(wxCOMPILER_PREFIX)
endif()
-if(MSVC OR MINGW)
+if((MSVC OR MINGW) AND NOT wxBUILD_DISABLE_PLATFORM_LIB_DIR)
if(wxBUILD_SHARED)
set(lib_suffix "dll")
else()

View File

@ -1,110 +1,51 @@
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wxWidgets/wxWidgets
REF v3.1.0
SHA512 740f3c977526395f32c2da4ea7f5f2ddc9b9a4cfd8d2cd129f011ede8e427621461c551c648b5d7a8f9ce78477e30426b836b310cff09c427ca8f9b9a9532074
REF v3.1.1
SHA512 f6d8974e2f48bae7e96a8938df3ad5efc403036c1dcbe2b48edd276ee7923802ba3e95e3f3bd9db17985e427b8e4f78950df0cbba83ae99d508ed04633816c95
HEAD_REF master
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-installed-libs.patch"
PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable-platform-lib-dir.patch"
)
find_program(NMAKE nmake REQUIRED)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DwxUSE_REGEX=builtin
-DwxUSE_ZLIB=sys
-DwxUSE_EXPAT=sys
-DwxUSE_LIBJPEG=sys
-DwxUSE_LIBPNG=sys
-DwxUSE_LIBTIFF=sys
-DwxUSE_STL=ON
-DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON
)
set(NMAKE_OPTIONS "")
vcpkg_install_cmake()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
list(APPEND NMAKE_OPTIONS TARGET_CPU=X64)
set(LIB_SUB_PATH_PRE vc_x64)
else ()
set(LIB_SUB_PATH_PRE vc)
file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
if(DLLS)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
foreach(DLL ${DLLS})
get_filename_component(N "${DLL}" NAME)
file(RENAME ${DLL} ${CURRENT_PACKAGES_DIR}/bin/${N})
endforeach()
endif()
file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
if(DLLS)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
foreach(DLL ${DLLS})
get_filename_component(N "${DLL}" NAME)
file(RENAME ${DLL} ${CURRENT_PACKAGES_DIR}/debug/bin/${N})
endforeach()
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND NMAKE_OPTIONS SHARED=1)
set(LIB_SUB_PATH_TYP dll)
else()
set(LIB_SUB_PATH_TYP lib)
endif()
if (VCPKG_CRT_LINKAGE STREQUAL "static")
list(APPEND NMAKE_OPTIONS RUNTIME_LIBS=static)
endif()
set(LIB_SUB_PATH ${LIB_SUB_PATH_PRE}_${LIB_SUB_PATH_TYP}${TARGET_TRIPLET})
list(APPEND NMAKE_OPTIONS VCPKG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include)
set(NMAKE_OPTIONS_REL
${NMAKE_OPTIONS}
VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib
BUILD=release
CFG=${TARGET_TRIPLET}-rel
)
set(NMAKE_OPTIONS_DBG
${NMAKE_OPTIONS}
VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib
CFG=${TARGET_TRIPLET}-dbg
)
file(REMOVE_RECURSE ${SOURCE_PATH}/lib/${LIB_SUB_PATH})
################
# Release build
################
message(STATUS "Building ${TARGET_TRIPLET}-rel")
set(ENV{_LINK_} ${CURRENT_INSTALLED_DIR}/lib/expat.lib)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc ${NMAKE_OPTIONS_REL}
WORKING_DIRECTORY ${SOURCE_PATH}/build/msw
LOGNAME nmake-build-${TARGET_TRIPLET}-release
)
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
################
# Debug build
################
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
set(ENV{_LINK_} ${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc ${NMAKE_OPTIONS_DBG}
WORKING_DIRECTORY ${SOURCE_PATH}/build/msw
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
# Install headers and libraries
file(INSTALL ${SOURCE_PATH}/include
DESTINATION ${CURRENT_PACKAGES_DIR})
file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/setup.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx)
file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/msw/rcdefs.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx/msw)
file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/
DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb")
file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/
DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll")
file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb")
file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu ${CURRENT_PACKAGES_DIR}/debug/lib/mswud)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/mswu ${CURRENT_PACKAGES_DIR}/debug/bin/mswud)
# Handle copyright
file(COPY ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/wxWidgets/licence.txt ${CURRENT_PACKAGES_DIR}/share/wxwidgets/copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

File diff suppressed because it is too large Load Diff