-
Notifications
You must be signed in to change notification settings - Fork 1
/
kyoto-cabinet-java.rb
53 lines (46 loc) · 1.4 KB
/
kyoto-cabinet-java.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
class KyotoCabinetJava < Formula
desc "The Java binding of Kyoto Cabinet"
homepage "http://fallabs.com/kyotocabinet/"
url "http://fallabs.com/kyotocabinet/javapkg/kyotocabinet-java-1.24.tar.gz"
sha256 "9c0ddd561dc34e6b45cb37bef69e0d4536cc42040646247f28635b898e477fb0"
depends_on "kyoto-cabinet"
depends_on :java => "1.6+"
patch :DATA
def install
java_home = ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
ENV.append "CPPFLAGS", "-I#{java_home}/include -I#{java_home}/include/darwin"
system "./configure", "--prefix=#{prefix}"
system "make"
system "make", "install"
end
end
__END__
--- a/Makefile.in
+++ b/Makefile.in
@@ -29,6 +29,7 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
LIBDIR = @libdir@
+JARDIR = @exec_prefix@/share/java
DESTDIR =
# Building configuration
@@ -91,7 +92,8 @@ untabify :
install :
mkdir -p $(DESTDIR)$(LIBDIR)
- cp -Rf $(JARFILES) $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(JARDIR)
+ cp -Rf $(JARFILES) $(DESTDIR)$(JARDIR)
cp -Rf $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
@printf '\n'
@printf '#================================================================\n'
--- a/configure
+++ b/configure
@@ -2192,7 +2192,7 @@ printf '%s\n' "$MYJAVAHOME"
printf 'checking JVMPLATFORM... '
if uname | grep Darwin >config.tmp
then
- JVMPLATFORM="mac"
+ JVMPLATFORM="darwin"
else
for file in `\ls $MYJAVAHOME/include`
do