From 7fee6a4756c8f276d63ebb84385c0be579817db7 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Mon, 11 Jan 2021 15:55:40 +0800 Subject: [PATCH] [libjpeg-turbo/mozjpeg] Add conflict messages (#15196) * [libjpeg-turbo/mozjpeg] Add conflict messages * Add missed CONTROL for libjpeg-turbo * Update ports/mozjpeg/CONTROL --- ports/libjpeg-turbo/CONTROL | 2 +- ports/libjpeg-turbo/portfile.cmake | 4 ++++ ports/mozjpeg/CONTROL | 3 ++- ports/mozjpeg/portfile.cmake | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index 8dd51db8a691d9..581b62dd6c05ac 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,6 +1,6 @@ Source: libjpeg-turbo Version: 2.0.5 -Port-Version: 2 +Port-Version: 3 Homepage: https://github.com/libjpeg-turbo/libjpeg-turbo Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index b135c5aeaaa64f..b218a5f9702c39 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -1,3 +1,7 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/mozjpeg/copyright") + message(FATAL_ERROR "Can't build ${PORT} if mozjpeg is installed. Please remove mozjpeg:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libjpeg-turbo/libjpeg-turbo diff --git a/ports/mozjpeg/CONTROL b/ports/mozjpeg/CONTROL index 998e5eacfe4b3f..39ee813a056237 100644 --- a/ports/mozjpeg/CONTROL +++ b/ports/mozjpeg/CONTROL @@ -1,5 +1,6 @@ Source: mozjpeg -Version: 2020-06-02-1 +Version: 2020-06-02 +Port-Version: 2 Build-Depends: libpng Homepage: https://github.com/mozilla/mozjpeg Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. diff --git a/ports/mozjpeg/portfile.cmake b/ports/mozjpeg/portfile.cmake index 9c756e778d11e8..b5095a9adadc6e 100644 --- a/ports/mozjpeg/portfile.cmake +++ b/ports/mozjpeg/portfile.cmake @@ -1,3 +1,7 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libjpeg-turbo/copyright") + message(FATAL_ERROR "Can't build ${PORT} if libjpeg-turbo is installed. Please remove libjpeg-turbo:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mozilla/mozjpeg