aboutsummaryrefslogtreecommitdiff
path: root/ports/assimp
diff options
context:
space:
mode:
authorAlexander Saprykin <xelfium@gmail.com>2018-05-26 13:27:14 +0200
committerGitHub <noreply@github.com>2018-05-26 13:27:14 +0200
commit4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch)
treed95c9490352eb73f078d34a33bc4bb44ac9fa48b /ports/assimp
parentfb689bd13dd6ba563a885d71fff1dd2b32a615db (diff)
parent2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff)
downloadvcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz
vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'ports/assimp')
-rw-r--r--ports/assimp/CONTROL2
-rw-r--r--ports/assimp/dont-overwrite-prefix-path.patch12
-rw-r--r--ports/assimp/portfile.cmake61
-rw-r--r--ports/assimp/uninitialized-variable.patch13
4 files changed, 62 insertions, 26 deletions
diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL
index 2c4736563..a2cb8e780 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,4 +1,4 @@
Source: assimp
-Version: 3.3.1
+Version: 4.1.0-1
Description: The Open Asset import library
Build-Depends: zlib
diff --git a/ports/assimp/dont-overwrite-prefix-path.patch b/ports/assimp/dont-overwrite-prefix-path.patch
new file mode 100644
index 000000000..fc58a99c5
--- /dev/null
+++ b/ports/assimp/dont-overwrite-prefix-path.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d781d1f..0d64d50 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -92,7 +92,6 @@ if (WIN32)
+ endif()
+
+ IF(MSVC)
+- set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
+ OPTION( ASSIMP_INSTALL_PDB
+ "Install MSVC debug files."
+ ON
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 452233265..6d4a7ec1d 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -1,40 +1,51 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
include(vcpkg_common_functions)
-SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/assimp/assimp/archive/v3.3.1.zip"
- FILENAME "assimp-3.3.1.zip"
- SHA512 d8488702989629a80297b9aea1f91fd5f3d0736f91cc5d7991a41ade99a445e9897c752fbedb2829350fabb5439d4ea31d34bbedb771b3e66aef23cd40b02122
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO assimp/assimp
+ REF v4.1.0
+ SHA512 5f1292de873ae16c9921d1d44f2871474d74c0ddfd76cc928a7d9b3e03aa6eca4cc72af0513da20a86d09c55d48646e610fd4a4f2b05364f08ad09cf27cbc67a
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/uninitialized-variable.patch"
)
-vcpkg_extract_source_archive(${ARCHIVE})
+
+file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
+set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
+set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS -DASSIMP_BUILD_TESTS=False
- -DASSIMP_BUILD_ASSIMP_VIEW=False
- -DASSIMP_BUILD_ZLIB=False
- -DASSIMP_BUILD_ASSIMP_TOOLS=False
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ OPTIONS -DASSIMP_BUILD_TESTS=OFF
+ -DASSIMP_BUILD_ASSIMP_VIEW=OFF
+ -DASSIMP_BUILD_ZLIB=OFF
+ -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
+ -DASSIMP_INSTALL_PDB=OFF
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.1")
+
+vcpkg_copy_pdbs()
+
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/assimp-3.3 ${CURRENT_PACKAGES_DIR}/share/assimp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG)
+string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)"
+ "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+string(REPLACE "assimp\${ASSIMP_LIBRARY_SUFFIX}"
+ "assimp\${ASSIMP_LIBRARY_SUFFIX}.lib" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
+ "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES})" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}")
+
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright)
-
-vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/assimp/uninitialized-variable.patch b/ports/assimp/uninitialized-variable.patch
new file mode 100644
index 000000000..f7b51c143
--- /dev/null
+++ b/ports/assimp/uninitialized-variable.patch
@@ -0,0 +1,13 @@
+diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h
+index 916fb1f..a7bc178 100644
+--- a/contrib/zip/src/miniz.h
++++ b/contrib/zip/src/miniz.h
+@@ -4420,7 +4420,7 @@ mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name
+ #ifndef MINIZ_NO_STDIO
+ mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
+ {
+- mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes;
++ mz_uint uncomp_crc32 = MZ_CRC32_INIT, level = 0, num_alignment_padding_bytes;
+ mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0;
+ mz_uint64 local_dir_header_ofs, cur_archive_file_ofs, uncomp_size = 0, comp_size = 0;
+ size_t archive_name_size;