Skip to content

Commit 5606b66

Browse files
authored
Merge pull request #28387 from jmid/conf-gtk2-windows
Add conf-gtk2 support for windows (MinGW, MSys2, and Cygwin)
2 parents 563a4c6 + 73905a3 commit 5606b66

File tree

3 files changed

+48
-1
lines changed
  • packages
    • conf-gtk2/conf-gtk2.1
    • conf-mingw-w64-gtk2-i686/conf-mingw-w64-gtk2-i686.1
    • conf-mingw-w64-gtk2-x86_64/conf-mingw-w64-gtk2-x86_64.1

3 files changed

+48
-1
lines changed

packages/conf-gtk2/conf-gtk2.1/opam

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ homepage: "https://gtk.org/"
44
bug-reports: "https://github.com/ocaml/opam-repository/issues"
55
authors: ["The GNOME Project"]
66
license: "LGPL-2.1-or-later"
7-
build: ["pkg-config" "--exists" "gtk+-2.0"]
7+
build: [
8+
["pkgconf" {os = "win32" & os-distribution = "cygwin"}
9+
"--personality=i686-w64-mingw32" {os = "win32" & os-distribution = "cygwin" & host-arch-x86_32:installed}
10+
"--personality=x86_64-w64-mingw32" {os = "win32" & os-distribution = "cygwin" & host-arch-x86_64:installed}
11+
"pkg-config" {os != "win32" | os-distribution != "cygwin"}
12+
"--exists" "gtk+-2.0"]
13+
]
814
depends: [
915
"conf-pkg-config" {build}
16+
("host-arch-x86_32" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-gtk2-i686" {os = "win32" & os-distribution != "cygwinports"} |
17+
"host-arch-x86_64" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-gtk2-x86_64" {os = "win32" & os-distribution != "cygwinports"})
1018
]
1119
depexts: [
1220
["libgtk2.0-dev" "libexpat1-dev"] {os-family = "debian"}
@@ -19,6 +27,7 @@ depexts: [
1927
["gtk2"] {os-family = "arch"}
2028
["gtk2"] {os-distribution = "nixos"}
2129
["gtk2.0"] {os = "win32" & os-distribution = "cygwinports"}
30+
["libgtk2.0-devel"] {os = "cygwin"}
2231
["gtk+" "expat"] {os-distribution = "homebrew" & os = "macos"}
2332
["gtk2"] {os = "freebsd"}
2433
]
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: "gtk2 for i686 mingw-w64 (32-bit x86)"
3+
description: "Ensures the i686 version of gtk2 for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: ["The GNOME Project"]
6+
license: "LGPL-2.1-or-later"
7+
homepage: "https://gtk.org/"
8+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
9+
flags: conf
10+
available: os = "win32"
11+
build: ["pkgconf" "--personality=i686-w64-mingw32" "gtk+-2.0"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-i686" {build}
15+
]
16+
depexts: [
17+
["mingw64-i686-gtk2.0"] {os = "win32" & os-distribution = "cygwin"}
18+
# 32-bit gtk2 not available on MSys2
19+
]
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: "gtk2 for i686 mingw-w64 (32-bit x86)"
3+
description: "Ensures the i686 version of gtk2 for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: ["The GNOME Project"]
6+
license: "LGPL-2.1-or-later"
7+
homepage: "https://gtk.org/"
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" "gtk+-2.0"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-x86_64" {build}
15+
]
16+
depexts: [
17+
["mingw64-x86_64-gtk2.0"] {os = "win32" & os-distribution = "cygwin"}
18+
["mingw-w64-x86_64-gtk2"] {os = "win32" & os-distribution = "msys2"}
19+
]

0 commit comments

Comments
 (0)