diff options
author | luspi | 2024-03-05 15:43:27 -0600 |
---|---|---|
committer | luspi | 2024-03-05 15:43:27 -0600 |
commit | b1fa0e3426bbad8071f25e7a545289d8e713ea95 (patch) | |
tree | 0ee1f92f54374865a38c6390eea930b8b6990a55 | |
parent | d3c82aa8f7ca81d1bd2ce262533fe0ab7b5dd6bd (diff) | |
download | aur-b1fa0e3426bbad8071f25e7a545289d8e713ea95.tar.gz |
fix compilation with ImageMagick when both ImageMagick 6 and 7 are installed
-rw-r--r-- | .SRCINFO | 4 | ||||
-rwxr-xr-x | PKGBUILD | 10 | ||||
-rw-r--r-- | magick.patch | 27 |
3 files changed, 37 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = photoqt pkgdesc = Fast and highly configurable image viewer with a simple and nice interface. pkgver = 4.3 - pkgrel = 1 + pkgrel = 2 url = http://photoqt.org/ arch = x86_64 license = GPL2 @@ -30,6 +30,8 @@ pkgbase = photoqt optdepends = xcftools: XCF support optdepends = poppler-qt6: PDF support source = https://photoqt.org/downloads/source/photoqt-4.3.tar.gz + source = magick.patch sha256sums = 07466e6ef5881191670f6bfbe1ba4fbfeff0afbbda1d2f503f8ffff7f69f8f34 + sha256sums = 70b1103d71ea0399b3a665c2133f7d85221f2761807d629e42a9875178d9e6b5 pkgname = photoqt @@ -3,7 +3,7 @@ pkgname=photoqt pkgver=4.3 -pkgrel=1 +pkgrel=2 pkgdesc="Fast and highly configurable image viewer with a simple and nice interface." arch=('x86_64') url="http://photoqt.org/" @@ -13,8 +13,10 @@ optdepends=('libqpsd-git: PSB/PSD support' 'xcftools: XCF support' 'poppler-qt6: PDF support') makedepends=('cmake' 'qt6-tools' 'extra-cmake-modules') -source=(https://photoqt.org/downloads/source/$pkgname-$pkgver.tar.gz) -sha256sums=('07466e6ef5881191670f6bfbe1ba4fbfeff0afbbda1d2f503f8ffff7f69f8f34') +source=(https://photoqt.org/downloads/source/$pkgname-$pkgver.tar.gz + magick.patch) +sha256sums=('07466e6ef5881191670f6bfbe1ba4fbfeff0afbbda1d2f503f8ffff7f69f8f34' + '70b1103d71ea0399b3a665c2133f7d85221f2761807d629e42a9875178d9e6b5') # NOTE # To use GraphicsMagick instead of ImageMagick replace it in the depends array above and change @@ -31,6 +33,8 @@ sha256sums=('07466e6ef5881191670f6bfbe1ba4fbfeff0afbbda1d2f503f8ffff7f69f8f34') prepare() { cd $srcdir/$pkgname-$pkgver + patch -p1 < $srcdir/magick.patch + cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFREEIMAGE=OFF -DDEVIL=OFF -DPOPPLER=OFF -DQTPDF=ON -DIMAGEMAGICK=ON -DGRAPHICSMAGICK=OFF -DLIBVIPS=OFF -DVIDEO_MPV=ON -DCHROMECAST=ON -DRESVG=ON -DZXING=ON -DCMAKE_BUILD_TYPE=Release } diff --git a/magick.patch b/magick.patch new file mode 100644 index 000000000000..d938b62e16b7 --- /dev/null +++ b/magick.patch @@ -0,0 +1,27 @@ +--- a/CMakeLists.txt 2024-02-29 19:00:00.000000000 -0600 ++++ b/CMakeLists.txt 2024-03-05 15:40:11.585633947 -0600 +@@ -85,6 +85,7 @@ + + if(IMAGEMAGICK) + find_package(ImageMagick COMPONENTS Magick++) ++ string(REPLACE "libMagick++-6." "libMagick++-7." ImageMagick_Magick++_LIBRARY "${ImageMagick_Magick++_LIBRARY}") + if(GRAPHICSMAGICK) + set(GRAPHICSMAGICK OFF) + message("** ImageMagick and GraphicsMagick cannot be used at the same time.") +@@ -455,13 +456,13 @@ + message(FATAL_ERROR "** Unable to locate ImageMagick... is it installed?") + else() + message("** Using ImageMagick") +- include_directories(${ImageMagick_INCLUDE_DIRS}) ++ include_directories("${ImageMagick_Magick++_INCLUDE_DIR}") + add_definitions(-DPQMIMAGEMAGICK) + add_definitions(-DMAGICKCORE_QUANTUM_DEPTH=16) + add_definitions(-DMAGICKCORE_HDRI_ENABLE=1) +- target_link_libraries(photoqt PRIVATE ${ImageMagick_LIBRARIES}) ++ target_link_libraries(photoqt PRIVATE "${ImageMagick_Magick++_LIBRARY}") + if(TESTING) +- target_link_libraries(photoqt_test PRIVATE ${ImageMagick_LIBRARIES}) ++ target_link_libraries(photoqt_test PRIVATE "${ImageMagick_Magick++_LIBRARY}") + endif() + endif() + else() |