Skip to content

Commit

Permalink
[new package] sdl3-image 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
podsvirov committed Jan 25, 2025
1 parent a7d132b commit 64438ee
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions mingw-w64-sdl3-image/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Maintainer: Konstantin Podsvirov <[email protected]>

_realname=sdl3-image
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=3.1.1
pkgrel=1
pkgdesc="A simple library to load images of various formats as SDL surfaces (Version 3) (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/libsdl-org/SDL_image"
license=('spdx:Zlib')
depends=("${MINGW_PACKAGE_PREFIX}-sdl3"
"${MINGW_PACKAGE_PREFIX}-libavif"
"${MINGW_PACKAGE_PREFIX}-libjxl"
"${MINGW_PACKAGE_PREFIX}-libpng"
"${MINGW_PACKAGE_PREFIX}-libtiff"
"${MINGW_PACKAGE_PREFIX}-libjpeg-turbo"
"${MINGW_PACKAGE_PREFIX}-libwebp")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("${url}/releases/download/prerelease-${pkgver}/SDL3_image-${pkgver}.tar.gz"{,.sig})
sha256sums=('d5685f220d5ae99439d710d808d8c478c6ccfaac539876929239b875a6723792'
'SKIP')
validpgpkeys=('1528635D8053A57F77D1E08630A59377A7763BE6') # Sam Lantinga <[email protected]>

build() {
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
extra_config+=("-DSDLIMAGE_INSTALL=ON"
"-DSDLIMAGE_JXL=ON")

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-S "SDL3_image-${pkgver}" \
-B "build-${MSYSTEM}-static"

cmake --build "build-${MSYSTEM}-static"

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=ON \
-S "SDL3_image-${pkgver}" \
-B "build-${MSYSTEM}-shared"

cmake --build "build-${MSYSTEM}-shared"
}

package() {
DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}-static"

DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}-shared"
}

0 comments on commit 64438ee

Please sign in to comment.