Skip to content

Commit 6155ac2

Browse files
authored
Merge pull request #28507 from jmid/mingw-sdl2-image-support
MinGW and Cygwin support for SDL2_image
2 parents 0ae7845 + 06aded7 commit 6155ac2

File tree

3 files changed

+50
-2
lines changed
  • packages
    • conf-mingw-w64-sdl2-image-i686/conf-mingw-w64-sdl2-image-i686.1
    • conf-mingw-w64-sdl2-image-x86_64/conf-mingw-w64-sdl2-image-x86_64.1
    • conf-sdl2-image/conf-sdl2-image.1

3 files changed

+50
-2
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
opam-version: "2.0"
2+
synopsis: "Provides sdl2-image for i686 mingw-w64 (32-bit x86)"
3+
description: "Ensure that the i686 version of sdl2-image for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: "Sam Lantinga"
6+
license: "Zlib"
7+
homepage: "http://www.libsdl.org/projects/SDL_image/"
8+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
9+
flags: conf
10+
available: os = "win32"
11+
build: ["pkgconf" "--personality=i686-w64-mingw32" "SDL2_image"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-i686" {build}
15+
]
16+
depexts: [
17+
["mingw64-i686-SDL2_image"] {os = "win32" & os-distribution = "cygwin"}
18+
# MSys2 does not offer an i686 SDL2_image package (Sep 2025)
19+
# https://packages.msys2.org/base/mingw-w64-SDL2_image
20+
]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
opam-version: "2.0"
2+
synopsis: "Provides sdl2-image for x86_64 mingw-w64 (64-bit x86_64)"
3+
description: "Ensure that the x86_64 version of sdl2-image for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: "Sam Lantinga"
6+
license: "Zlib"
7+
homepage: "http://www.libsdl.org/projects/SDL_image/"
8+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
9+
flags: conf
10+
available: os = "win32"
11+
build: ["pkgconf" "--personality=x86_64-w64-mingw32" "SDL2_image"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-x86_64" {build}
15+
]
16+
depexts: [
17+
["mingw64-x86_64-SDL2_image"] {os = "win32" & os-distribution = "cygwin"}
18+
["mingw-w64-x86_64-SDL2_image"] {os = "win32" & os-distribution = "msys2"}
19+
]

packages/conf-sdl2-image/conf-sdl2-image.1/opam

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ opam-version: "2.0"
22
maintainer: "https://github.com/ocaml/opam-repository/issues"
33
homepage: "http://www.libsdl.org/projects/SDL_image/"
44
license: "Zlib"
5-
build: [["pkg-config" "SDL2_image"]]
5+
build: [
6+
["pkgconf" "--personality=i686-w64-mingw32" "SDL2_image"] {os = "win32" & os-distribution = "cygwin" & host-arch-x86_32:installed}
7+
["pkgconf" "--personality=x86_64-w64-mingw32" "SDL2_image"] {os = "win32" & os-distribution = "cygwin" & host-arch-x86_64:installed}
8+
["pkg-config" "SDL2_image"] {os != "win32" | os-distribution != "cygwin"}
9+
]
610
depexts: [
711
["sdl2_image-dev"] {os-distribution = "alpine"}
812
["libsdl2-image-dev"] {os-family = "debian"}
@@ -17,11 +21,16 @@ depexts: [
1721
["sdl2-image"] {os-family = "gentoo"}
1822
["sdl2_image"] {os = "freebsd"}
1923
["SDL2_image"] {os = "nixos"}
24+
["libSDL2_image-devel"] {os = "cygwin"}
2025
]
2126
synopsis: "Virtual package relying on a sdl2-image system installation"
2227
description:
2328
"This package can only install if libsdl2-image is installed on the system."
24-
depends: ["conf-pkg-config" {build}]
29+
depends: [
30+
"conf-pkg-config" {build}
31+
("host-arch-x86_32" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-sdl2-image-i686" {os = "win32" & os-distribution != "cygwinports"} |
32+
"host-arch-x86_64" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-sdl2-image-x86_64" {os = "win32" & os-distribution != "cygwinports"})
33+
]
2534
bug-reports: "https://github.com/ocaml/opam-repository/issues"
2635
authors: "Sam Lantinga"
2736
flags: conf

0 commit comments

Comments
 (0)