Skip to content

Commit 17f57ad

Browse files
authored
Merge pull request #28505 from jmid/ming-support-liblz4
Add Cygwin and MinGW support for liblz4
2 parents 928de1f + 7a45e05 commit 17f57ad

File tree

3 files changed

+49
-2
lines changed
  • packages
    • conf-liblz4/conf-liblz4.1
    • conf-mingw-w64-liblz4-i686/conf-mingw-w64-liblz4-i686.1
    • conf-mingw-w64-liblz4-x86_64/conf-mingw-w64-liblz4-x86_64.1

3 files changed

+49
-2
lines changed

packages/conf-liblz4/conf-liblz4.1/opam

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ homepage: "http://lz4.org"
44
bug-reports: "https://github.com/ocaml/opam-repository/issues"
55
authors: ["Yann Collet"]
66
license: ["GPL-2.0-only" "BSD-2-Clause"]
7-
build: ["pkg-config" "liblz4"]
8-
depends: ["conf-pkg-config" {build}]
7+
build: [
8+
["pkgconf" "--personality=i686-w64-mingw32" "liblz4"] {os = "win32" & os-distribution = "cygwin" & host-arch-x86_32:installed}
9+
["pkgconf" "--personality=x86_64-w64-mingw32" "liblz4"] {os = "win32" & os-distribution = "cygwin" & host-arch-x86_64:installed}
10+
["pkg-config" "liblz4"] {os != "win32" | os-distribution != "cygwin"}
11+
]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
("host-arch-x86_32" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-liblz4-i686" {os = "win32" & os-distribution != "cygwinports"} |
15+
"host-arch-x86_64" {os = "win32" & os-distribution != "cygwinports"} & "conf-mingw-w64-liblz4-x86_64" {os = "win32" & os-distribution != "cygwinports"})
16+
]
917
depexts: [
1018
["liblz4-dev"] {os-family = "debian"}
1119
["liblz4-dev"] {os-family = "ubuntu"}
@@ -17,6 +25,7 @@ depexts: [
1725
["liblz4-devel"] {os-family = "suse" | os-family = "opensuse"}
1826
["lz4"] {os = "macos" & os-distribution = "homebrew"}
1927
["lz4"] {os = "win32" & os-distribution = "cygwinports"}
28+
["liblz4-devel"] {os = "cygwin"}
2029
["liblz4"] {os = "freebsd"}
2130
]
2231
synopsis: "Virtual package relying on liblz4 system installation"
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 liblz4 for i686 mingw-w64 (32-bit x86)"
3+
description: "Ensure that the i686 version of liblz4 for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: ["Yann Collet"]
6+
license: ["GPL-2.0-only" "BSD-2-Clause"]
7+
homepage: "http://lz4.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" "liblz4"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-i686" {build}
15+
]
16+
depexts: [
17+
["mingw64-i686-lz4"] {os = "win32" & os-distribution = "cygwin"}
18+
["mingw-w64-i686-lz4"] {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: "Provides liblz4 for x86_64 mingw-w64 (64-bit x86_64)"
3+
description: "Ensure that the x86_64 version of liblz4 for the mingw-w64 project is available"
4+
maintainer: "https://github.com/ocaml/opam-repository/issues"
5+
authors: ["Yann Collet"]
6+
license: ["GPL-2.0-only" "BSD-2-Clause"]
7+
homepage: "http://lz4.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" "liblz4"]
12+
depends: [
13+
"conf-pkg-config" {build}
14+
"conf-mingw-w64-gcc-x86_64" {build}
15+
]
16+
depexts: [
17+
["mingw64-x86_64-lz4"] {os = "win32" & os-distribution = "cygwin"}
18+
["mingw-w64-x86_64-lz4"] {os = "win32" & os-distribution = "msys2"}
19+
]

0 commit comments

Comments
 (0)