-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
opam
55 lines (55 loc) · 2.31 KB
/
opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
opam-version: "2.0"
maintainer: "7895506+MSoegtropIMC@users.noreply.github.com"
homepage: "https://www.gnu.org/software/bison/"
bug-reports: "https://lists.gnu.org/mailman/listinfo/bug-bison"
license: "GPL-3.0-or-later"
authors: [
"Robert Corbett"
"Richard Stallman"
"Wilfred Hansen"
"Akim Demaille"
"Paul Hilfinger"
"Joel E. Denny"
"Paolo Bonzini"
"Alex Rozenman"
"Paul Eggert"
]
build-env: [
[HOMEBREW_NO_AUTO_UPDATE = "1"]
]
build: [
["bison" "--version"] {os-family != "homebrew"}
["sh" "-c" "\"$(brew --prefix bison)/bin/bison\" --version"] {os-family = "homebrew"}
]
install: [
# Note: Mac homebrew installs bison to a path not in PATH, so symlink it in the opam switch bin folder.
# This affects only the current opam switch and is thus least invasive.
["sh" "-c" "ln -s \"$(brew --prefix bison)/bin/bison\" \"%{bin}%/bison\""] {os-family = "homebrew"}
["sh" "-c" "ln -s \"$(brew --prefix bison)/bin/yacc\" \"%{bin}%/yacc\""] {os-family = "homebrew"}
]
depexts: [
# The list of supported os-family names can be derived from the opam sources (thanks Enrico)
# https://github.com/ocaml/opam/blob/6aefe95e60084e63d01b1c7c028b6b77de1f839f/src/state/opamSysInteract.ml#L84-L123
# The package name for many Linux/BSD/macOS/cygwin/msys platforms can be searched here (thanks Théo)
# https://repology.org specifically https://repology.org/project/bison/versions
# Not listed above but supported by opam are oraclelinix, ol, rhel
# On macOS bison seems to be installed by default, but the homebrew and macports package is listed anyway
[ "bison" ] {os-family = "alpine"}
[ "bison" ] {os-family = "amzn"}
[ "bison" ] {os-family = "arch"}
[ "bison" ] {os-family = "archlinux"}
[ "bison" ] {os-family = "centos"}
[ "bison" ] {os-family = "debian"}
[ "bison" ] {os-family = "fedora"}
[ "sys-devel/bison" ] {os-family = "gentoo"}
[ "bison" ] {os-family = "homebrew"}
[ "bison" ] {os-family = "macports"}
[ "bison" ] {os-family = "mageia"}
[ "bison" ] {os-family = "suse" | os-family = "opensuse"}
[ "bison" ] {os-family = "ubuntu"}
[ "devel/bison" ] {os-family = "bsd"}
]
synopsis: "Virtual package relying on GNU bison"
description: "This package can only install if GNU bison is installed on the system."
# Not technically a conf package for homebrew (has an install step)
# flags: conf