Skip to content

Commit

Permalink
libgd: drop libimagequant for mingw32
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Feb 11, 2025
1 parent faf0be4 commit bde626b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions mingw-w64-libgd/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=libgd
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.3.2
pkgrel=8
pkgrel=9
pkgdesc="GD is an open source code library for the dynamic creation of images by programmers (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -22,7 +22,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-libpng"
"${MINGW_PACKAGE_PREFIX}-libheif"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-fontconfig"
"${MINGW_PACKAGE_PREFIX}-libimagequant"
$([[ "${CARCH}" == "i686" ]] || echo "${MINGW_PACKAGE_PREFIX}-libimagequant")
"${MINGW_PACKAGE_PREFIX}-libwebp"
"${MINGW_PACKAGE_PREFIX}-xpm-nox"
"${MINGW_PACKAGE_PREFIX}-zlib")
Expand Down Expand Up @@ -55,6 +55,14 @@ prepare() {
build() {
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}

declare -a _extra_config
if [ "${CARCH}" != "i686" ]; then
_extra_config+=(
"-DENABLE_LIQ=ON"
"-DLIQ_INCLUDE_DIR=${MINGW_PREFIX}/include/libimagequant"
)
fi

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
-GNinja \
Expand All @@ -70,13 +78,12 @@ build() {
-DENABLE_XPM=ON \
-DENABLE_FREETYPE=ON \
-DENABLE_WEBP=ON \
-DENABLE_LIQ=ON \
-DENABLE_GD_FORMATS=ON \
-DXPM_XPM_INCLUDE_DIR="${MINGW_PREFIX}/include/X11" \
-DWEBP_INCLUDE_DIR="${MINGW_PREFIX}/include/webp/" \
-DLIQ_INCLUDE_DIR="${MINGW_PREFIX}/include/libimagequant" \
-DFREETYPE_INCLUDE_DIR_freetype2="${MINGW_PREFIX}/include/freetype2" \
-DFREETYPE_INCLUDE_DIRS="${MINGW_PREFIX}/include/freetype2" \
"${_extra_config[@]}" \
../${_realname}-${pkgver}

${MINGW_PREFIX}/bin/cmake --build ./
Expand Down

0 comments on commit bde626b

Please sign in to comment.