-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclthreads.rb
57 lines (46 loc) · 1.96 KB
/
clthreads.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
56
57
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Clthreads < Formula
homepage 'http://http://kokkinizita.linuxaudio.org/linuxaudio/'
url 'http://kokkinizita.linuxaudio.org/linuxaudio/downloads/clthreads-2.4.0.tar.bz2'
sha1 'c16da8e4b18455f727aeb11b40ca26be118243a3'
def install
#ENV.j1 # if your formula's build system can't parallelize
inreplace 'Makefile-osx', '/usr/local', "#{prefix}"
system "make -f Makefile-osx" # if this fails, try separate make/make install steps
system "make -f Makefile-osx install"
# include.install "clthreads.h"
end
def patches
DATA
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! It's enough to just replace
# "false" with the main program this formula installs, but it'd be nice if you
# were more thorough. Run the test with `brew test clthreads`.
system "false"
end
end
__END__
--- a/Makefile-osx 2013-05-07 11:48:19.000000000 +0200
+++ b/Makefile-osx 2013-05-07 11:37:37.000000000 +0200
@@ -19,7 +19,7 @@
# Modify as required.
#
PREFIX = /usr/local
-SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+#SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
LIBDIR = lib$(SUFFIX)
@@ -48,8 +48,9 @@
-compatibility_version $(MAJVERS) \
-o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREAD_DEP) $(LDFLAGS)
-install: $(CLTHREADS_MIN)
+install: $(CLTHREADS_MIN) $(CLTHREADS_H)
/usr/bin/install -d $(PREFIX)/$(LIBDIR)
+ /usr/bin/install -d $(PREFIX)/include
/usr/bin/install -m 644 $(CLTHREADS_H) $(PREFIX)/include
/usr/bin/install -m 755 $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)
ln -sf $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)/$(CLTHREADS_MAJ)