forked from maxim-belkin/homebrew-xorg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libice.rb
55 lines (47 loc) · 1.79 KB
/
libice.rb
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
class Libice < Formula
desc "X.Org Libraries: libICE"
homepage "http://www.x.org/" ### http://www.linuxfromscratch.org/blfs/view/svn/x/x7lib.html
url "http://ftp.x.org/pub/individual/lib/libICE-1.0.9.tar.bz2"
sha256 "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
# tag "linuxbrew"
bottle do
cellar :any
sha256 "68cbbeb20dc4db408dba453e9af9eee7274d17f9bb99f7c862ab087d2239b754" => :x86_64_linux
end
option "without-test", "Skip compile-time tests"
option "with-static", "Build static libraries (not recommended)"
option "with-docs", "Build documentation"
option "with-specs", "Build specifications"
# Required dependencies
depends_on "pkg-config" => :build
depends_on "xproto" => :build
depends_on "xtrans" => :build
# Patch for xmlto
patch do
url "https://raw.githubusercontent.com/Linuxbrew/homebrew-xorg/master/patch_configure.diff"
sha256 "e3aff4be9c8a992fbcbd73fa9ea6202691dd0647f73d1974ace537f3795ba15f"
end
if build.with?("docs") or build.with?("specs")
depends_on "xmlto" => :build
depends_on "fop" => [:build, :recommended]
depends_on "libxslt" => [:build, :recommended]
depends_on "xorg-sgml-doctools" => [:build, :recommended]
end
def install
args = %W[
--prefix=#{prefix}
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-dependency-tracking
--disable-silent-rules
]
# Be explicit about the configure flags
args << "--enable-static=#{build.with?("static") ? "yes" : "no"}"
args << "--enable-docs=#{build.with?("docs") ? "yes" : "no"}"
args << "--enable-specs=#{build.with?("specs") ? "yes" : "no"}"
system "./configure", *args
system "make"
system "make", "check" if build.with?("test")
system "make", "install"
end
end