aboutsummaryrefslogtreecommitdiff
path: root/ports/ptex
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-08-24 13:43:57 -0700
committerGitHub <noreply@github.com>2019-08-24 13:43:57 -0700
commit1550b9e71b6ef8530b39db281903edcab73c2e14 (patch)
tree91ee3999b75a66f109b72e5da9a647041b9f7f3d /ports/ptex
parent18a07faca5c8440fb77eb9ec1d76f14841686011 (diff)
downloadvcpkg-1550b9e71b6ef8530b39db281903edcab73c2e14.tar.gz
vcpkg-1550b9e71b6ef8530b39db281903edcab73c2e14.zip
[many ports] Updates 2019.07.09 (#7217)
* [many ports] Upgrades 2019.07.11 * Re-generate patches and fix build errors. * [manyport]Fix build errors. * Fix avro-c and console-bridge failures, revert curl and tesseract * fix botan failure * Fix build errors and undo some ports upgrades. * [aws-c-common,chipmunk,cxxopts,grpc]Fix build errors * Fix build errors. * [angle]Undo upgrade changes. * [directxtk]Fix UWP build error (#7233) * Revert leptonica since it cause tesseract failed * Revert jsonnet * [google-cloud-cpp] Disable parallel configure due to source directory writes * [many ports] Undo undesired changes * [bitsery] Fix indentation * [avro-c][aws-c-common][graphite2] Convert line endings to minimize PR diff * fix console-bridge and remove usockets unused patch * update ogre patch * [many ports] Revert unneeded changes w.r.t. master. Add missing write to console-bridge. * [console-bridge] Fix export macro * [avro-c] Revert upgrade; split to #7875 * [avro-c] Complete previous revert
Diffstat (limited to 'ports/ptex')
-rw-r--r--ports/ptex/CONTROL2
-rw-r--r--ports/ptex/fix-build.patch110
-rw-r--r--ports/ptex/portfile.cmake32
3 files changed, 97 insertions, 47 deletions
diff --git a/ports/ptex/CONTROL b/ports/ptex/CONTROL
index 17e2bbe5e..069f2e628 100644
--- a/ports/ptex/CONTROL
+++ b/ports/ptex/CONTROL
@@ -1,5 +1,5 @@
Source: ptex
-Version: 2.1.28-1
+Version: 2.3.2
Homepage: https://github.com/wdas/ptex
Description: Per-Face Texture Mapping for Production Rendering.
Build-Depends: zlib
diff --git a/ports/ptex/fix-build.patch b/ports/ptex/fix-build.patch
index 6d6484d60..9c74eeda8 100644
--- a/ports/ptex/fix-build.patch
+++ b/ports/ptex/fix-build.patch
@@ -1,35 +1,40 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index dd327d0..5043452 100644
+index c708153..0e004da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -6,15 +6,6 @@ include(CTest)
- include(FindZLIB)
+@@ -60,10 +60,11 @@ include(GNUInstallDirs)
+ include(CTest)
include(FindThreads)
--enable_testing()
++find_package(ZLIB REQUIRED)
++if (0)
+ # Use pkg-config to create a PkgConfig::Ptex_ZLIB imported target
+ find_package(PkgConfig REQUIRED)
+ pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET)
-
--# Detect the build type from the $FLAVOR environment variable
--if ("$ENV{FLAVOR}" MATCHES "debug")
-- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE)
--else ()
-- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE)
--endif ()
--
- if (NOT WIN32)
- set(CMAKE_CXX_FLAGS "-std=c++98 -Wall -Wextra -pedantic")
+ enable_testing()
+
+ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+@@ -77,6 +78,7 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE)
+ endif ()
endif ()
-@@ -40,6 +31,6 @@ include_directories(src/ptex)
- include_directories(${ZLIB_INCLUDE_DIR})
++endif()
+
+ if (NOT WIN32)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
+@@ -99,7 +101,9 @@ endif ()
+ include_directories(src/ptex)
add_subdirectory(src/ptex)
--add_subdirectory(src/utils)
--add_subdirectory(src/tests)
--add_subdirectory(src/doc)
-+#add_subdirectory(src/utils)
-+#add_subdirectory(src/tests)
-+#add_subdirectory(src/doc)
++if (0)
+ add_subdirectory(src/utils)
+ add_subdirectory(src/tests)
+ add_subdirectory(src/doc)
++endif()
+ add_subdirectory(src/build)
diff --git a/src/ptex/CMakeLists.txt b/src/ptex/CMakeLists.txt
-index c926d98..ac2c71d 100644
+index ba3a3cc..1619ff1 100644
--- a/src/ptex/CMakeLists.txt
+++ b/src/ptex/CMakeLists.txt
@@ -1,6 +1,8 @@
@@ -42,24 +47,53 @@ index c926d98..ac2c71d 100644
+ add_definitions(-DPTEX_STATIC)
+endif ()
- set(SRCS
- PtexCache.cpp
-@@ -14,15 +16,11 @@ set(SRCS
- PtexUtils.cpp
+ configure_file(PtexVersion.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/PtexVersion.h @ONLY)
+@@ -18,29 +20,35 @@ set(SRCS
PtexWriter.cpp)
--add_library(Ptex_static STATIC ${SRCS})
--set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex)
-+add_library(Ptex ${SRCS})
-
--add_library(Ptex_dynamic SHARED ${SRCS})
--set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex)
-+target_link_libraries(Ptex ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES})
+ if(PTEX_BUILD_STATIC_LIBS)
+- add_library(Ptex_static STATIC ${SRCS})
+- set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex)
+- target_include_directories(Ptex_static
++ add_library(Ptex STATIC ${SRCS})
++ target_include_directories(Ptex
+ PUBLIC
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR})
+- target_link_libraries(Ptex_static
+- PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::Ptex_ZLIB)
+- install(TARGETS Ptex_static EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ target_link_libraries(Ptex
++ PUBLIC ${CMAKE_THREAD_LIBS_INIT} ZLIB::ZLIB)
++ install(TARGETS Ptex EXPORT Ptex
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++ )
+ endif()
--target_link_libraries(Ptex_dynamic ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES})
--
--install(TARGETS Ptex_static Ptex_dynamic DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+install(TARGETS Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ if(PTEX_BUILD_SHARED_LIBS)
+- add_library(Ptex_dynamic SHARED ${SRCS})
+- set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex)
+- target_include_directories(Ptex_dynamic
++ add_library(Ptex SHARED ${SRCS})
++ target_include_directories(Ptex
+ PUBLIC
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR})
+- target_link_libraries(Ptex_dynamic
+- PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::Ptex_ZLIB)
+- install(TARGETS Ptex_dynamic EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ target_link_libraries(Ptex
++ PUBLIC ${CMAKE_THREAD_LIBS_INIT} ZLIB::ZLIB)
++ install(TARGETS Ptex EXPORT Ptex
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++ )
+ endif()
install(FILES
- PtexHalf.h
diff --git a/ports/ptex/portfile.cmake b/ports/ptex/portfile.cmake
index 52d77096b..94a626a34 100644
--- a/ports/ptex/portfile.cmake
+++ b/ports/ptex/portfile.cmake
@@ -1,23 +1,39 @@
+include(vcpkg_common_functions)
+
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "UWP build not supported")
endif()
-include(vcpkg_common_functions)
+set(PTEX_VER 2.3.2)
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wdas/ptex
- REF v2.1.28
- SHA512 ddce3c79f14d196e550c1e8a5b371482f88190cd667a2e2aa84601de1639f7cabb8571c1b3a49b48df46ce550d27088a00a67b1403c3bfec2ed73437c3dca3e8
- HEAD_REF master)
+ REF 1b8bc985a71143317ae9e4969fa08e164da7c2e5
+ SHA512 37f2df9ec195f3d69d9526d0dea6a93ef49d69287bfae6ccd9671477491502ea760ed14e3b206b4f488831ab728dc749847b7d176c9b8439fb58b0a0466fe6c5
+ HEAD_REF master
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-build.patch
+)
-vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-build.patch)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(BUILD_SHARED_LIB ON)
+ set(BUILD_STATIC_LIB OFF)
+else()
+ set(BUILD_SHARED_LIB OFF)
+ set(BUILD_STATIC_LIB ON)
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA)
+ PREFER_NINJA
+ OPTIONS
+ -DPTEX_VER="v${PTEX_VER}"
+ -DPTEX_BUILD_SHARED_LIBS=${BUILD_SHARED_LIB}
+ -DPTEX_BUILD_STATIC_LIBS=${BUILD_STATIC_LIB}
+)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/Ptex)
vcpkg_copy_pdbs()
foreach(HEADER PtexHalf.h Ptexture.h)
@@ -30,6 +46,6 @@ foreach(HEADER PtexHalf.h Ptexture.h)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${PTEX_HEADER}")
endforeach()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
file(COPY ${SOURCE_PATH}/src/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ptex)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ptex/license.txt ${CURRENT_PACKAGES_DIR}/share/ptex/copyright)