aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorDavid Ludwig <dludwig@pobox.com>2018-09-04 19:20:46 -0400
committerRobert Schumacher <roschuma@microsoft.com>2018-09-04 16:20:46 -0700
commitd68cc287f994bc6505473a8264018f5abf5a5183 (patch)
treea7407df945add857ef2a568c473a9ab06f45e235 /ports
parent6af7c99555a03235994bc6dfe495ad07369088c6 (diff)
downloadvcpkg-d68cc287f994bc6505473a8264018f5abf5a5183.tar.gz
vcpkg-d68cc287f994bc6505473a8264018f5abf5a5183.zip
[GraphicsMagick] bug-fix: image files won't load (#4215)
* [GraphicsMagick] bug-fix: image files won't load GM (GraphicsMagick) was failing to load image files, notably PNG or JPEG images, as it was being compiled with support for 'GraphicsMagick Modules'. These are files with names specific to GM, and of the format, 'IM_*.dll'. vcpkg's install process was not setting these up. This patch makes sure that when GM is built, it embed's GM's own image-loading code into graphicsmagick.dll. * [vcpkg_extract_source_archive_ex] Add PATCHES argument * [openmesh] Use direct download instead of gitlab * [blaze] Use PATCHES argument * [graphicsmagick] Use vcpkg_extract_source_archive_ex
Diffstat (limited to 'ports')
-rw-r--r--ports/blaze/portfile.cmake4
-rw-r--r--ports/graphicsmagick/disable_graphicsmagick_modules.patch11
-rw-r--r--ports/graphicsmagick/portfile.cmake28
-rw-r--r--ports/openmesh/CONTROL2
-rw-r--r--ports/openmesh/portfile.cmake30
5 files changed, 42 insertions, 33 deletions
diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake
index 53e845b70..a44808249 100644
--- a/ports/blaze/portfile.cmake
+++ b/ports/blaze/portfile.cmake
@@ -6,10 +6,6 @@ vcpkg_from_bitbucket(
REF bbe39c81b68eb0d8647da703899e1ee4a82cdfd3
SHA512 84eb8226672d9d11d194d165e7aaa333a0d49ca090bb94472f19242e5f2ad0c3e08a30cdafe055cff51b210b603533f879800bd6784f3ffdb0d9eeca65d58b25
HEAD_REF master
-)
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
PATCHES
avoid-src-dir-generation.patch
)
diff --git a/ports/graphicsmagick/disable_graphicsmagick_modules.patch b/ports/graphicsmagick/disable_graphicsmagick_modules.patch
new file mode 100644
index 000000000..bfb91d0fd
--- /dev/null
+++ b/ports/graphicsmagick/disable_graphicsmagick_modules.patch
@@ -0,0 +1,11 @@
+--- a/magick/studio.h 2018-06-23 14:13:49.191541000 -0400
++++ b/magick/studio.h 2018-09-02 11:50:41.856753700 -0400
+@@ -414,7 +414,7 @@
+ #endif
+
+ #if defined(HasLTDL) || ( defined(MSWINDOWS) && defined(_DLL) )
+-# define SupportMagickModules
++//# define SupportMagickModules
+ #endif
+
+ #if defined(_MAGICKMOD_)
diff --git a/ports/graphicsmagick/portfile.cmake b/ports/graphicsmagick/portfile.cmake
index 0c47813f6..c097c9e97 100644
--- a/ports/graphicsmagick/portfile.cmake
+++ b/ports/graphicsmagick/portfile.cmake
@@ -1,27 +1,35 @@
include(vcpkg_common_functions)
set(GM_VERSION 1.3.30)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/graphicsmagick-${GM_VERSION}-windows-source)
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/${GM_VERSION}/GraphicsMagick-${GM_VERSION}-windows-source.7z"
FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z"
SHA512 9e4cfff57ae547f133e6208033213d3aa790cd8c95a061c101c63b8ae8896e7504d02f302efdd20ff24f72c07760a0a5e2b32e21fe454717ed1deb2edeef159c
- )
-vcpkg_extract_source_archive(${ARCHIVE})
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF "${GM_VERSION}"
+ PATCHES
+ # GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined
+ dynamic_bzip2.patch
+
+ # Bake GM's own modules into the .dll itself. This fixes a bug whereby
+ # 'vcpkg install graphicsmagick' did not lead to a copy of GM that could
+ # load either PNG or JPEG files (due to missing GM Modules, with names
+ # matching "IM_*.DLL").
+ disable_graphicsmagick_modules.patch
+)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/magick_types.h DESTINATION ${SOURCE_PATH}/magick)
-# GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/dynamic_bzip2.patch)
-
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
+ OPTIONS_DEBUG
+ -DINSTALL_HEADERS=OFF
)
vcpkg_install_cmake()
diff --git a/ports/openmesh/CONTROL b/ports/openmesh/CONTROL
index b803484eb..cf502b2a2 100644
--- a/ports/openmesh/CONTROL
+++ b/ports/openmesh/CONTROL
@@ -1,3 +1,3 @@
Source: openmesh
-Version: 6.3
+Version: 7.0
Description: A generic and efficient polygon mesh data structure
diff --git a/ports/openmesh/portfile.cmake b/ports/openmesh/portfile.cmake
index 26c167adb..7bfacfe0e 100644
--- a/ports/openmesh/portfile.cmake
+++ b/ports/openmesh/portfile.cmake
@@ -1,24 +1,18 @@
-# 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_gitlab(
+set(VERSION 7.0)
+
+# Note: upstream GitLab instance at https://graphics.rwth-aachen.de:9000 often goes down
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.openmesh.org/media/Releases/${VERSION}/OpenMesh-${VERSION}.tar.gz"
+ FILENAME "OpenMesh-${VERSION}.tar.gz"
+ SHA512 29280c8fe7208d39bd923c4d0444a24463e36b95402e6a75f42adc27bc1b261df9113442f69e1001dc1a8b1198488069ffb049742dcf6eac6ac1ecf4f216fad8
+)
+
+vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
- GITLAB_URL "https://graphics.rwth-aachen.de:9000"
- REPO "OpenMesh/OpenMesh"
- REF "OpenMesh-7.0"
- HEAD_REF "master"
- SHA512 "70e414088c094199af31a8694fb91fa5f9b574b3cc86b30b3fb64d938e6a218f9f38d857c559f958276b01ec9263ef71cd4039444e50a8cb38e820243aac7956"
+ ARCHIVE "${ARCHIVE}"
+ REF "${VERSION}"
)
vcpkg_configure_cmake(