Skip to content

Commit e118d22

Browse files
committed
Add MinGW and MSys2 support for conf-gtk3, patching the Cygwin case
1 parent 4bae7ec commit e118d22

File tree

3 files changed

+46
-3
lines changed
  • packages
    • conf-gtk3/conf-gtk3.18
    • conf-mingw-w64-gtk3-i686/conf-mingw-w64-gtk3-i686.1
    • conf-mingw-w64-gtk3-x86_64/conf-mingw-w64-gtk3-x86_64.1

3 files changed

+46
-3
lines changed

packages/conf-gtk3/conf-gtk3.18/opam

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ authors: "The GTK Toolkit"
44
homepage: "https://developer.gnome.org/"
55
bug-reports: "https://github.com/garrigue/lablgtk/issues"
66
build: [
7-
["pkgconf" "gtk+-3.0"] {os = "win32" & os-distribution != "cygwinports"}
7+
["pkgconf" "--personality=i686-w64-mingw32" "--print-errors" "--exists" "gtk+-3.0"] {os = "win32" & os-distribution = "cygwin" & host-arch-x86_32:installed}
8+
["pkgconf" "--personality=x86_64-w64-mingw32" "--print-errors" "--exists" "gtk+-3.0"] {os = "win32" & os-distribution = "cygwin" & host-arch-x86_64:installed}
89
["pkg-config" "--short-errors" "--print-errors" "--atleast-version" "3.18" "gtk+-3.0"] {os != "win32" | os-distribution != "cygwin"}
910
]
10-
depends: ["conf-pkg-config" {build}]
11+
depends: [
12+
"conf-pkg-config" {build}
13+
("host-arch-x86_32" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-gtk3-i686" {os = "win32" & os-distribution != "cygwinports"} |
14+
"host-arch-x86_64" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-gtk3-x86_64" {os = "win32" & os-distribution != "cygwinports"})
15+
]
1116
depexts: [
1217
["libgtk-3-dev" "libexpat1-dev"] {os-family = "debian" | os-family = "ubuntu"}
1318
["gtk+3" "expat"] {os-distribution = "homebrew" & os = "macos"}
@@ -19,7 +24,7 @@ depexts: [
1924
["gtk3-devel"] {os-family = "suse" | os-family = "opensuse"}
2025
["gtk3"] {os-family = "arch"}
2126
["gtk3"] {os = "win32" & os-distribution = "cygwinports"}
22-
["libgtk3-devel"] {os = "win32" & os-distribution = "cygwin"}
27+
["libgtk3-devel"] {os = "cygwin"}
2328
["gtk3"] {os = "freebsd"}
2429
]
2530
post-messages: [
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: "GTK+ 3 for i686 mingw-w64 (32-bit x86)"
3+
description: "Ensures the i686 version of GTK+ 3 for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: "The GTK Toolkit"
6+
license: "LGPL-2.1-or-later"
7+
homepage: "https://developer.gnome.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+-3.0"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-i686" {build}
15+
]
16+
depexts: [
17+
["mingw64-i686-gtk3"] {os = "win32" & os-distribution = "cygwin"}
18+
["mingw-w64-i686-gtk3"] {os = "win32" & os-distribution = "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: "GTK+ 3 for i686 mingw-w64 (32-bit x86)"
3+
description: "Ensures the i686 version of GTK+ 3 for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: "The GTK Toolkit"
6+
license: "LGPL-2.1-or-later"
7+
homepage: "https://www.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+-3.0"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-x86_64" {build}
15+
]
16+
depexts: [
17+
["mingw64-x86_64-gtk3"] {os = "win32" & os-distribution = "cygwin"}
18+
["mingw-w64-x86_64-gtk3"] {os = "win32" & os-distribution = "msys2"}
19+
]

0 commit comments

Comments
 (0)