jemalloc 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ Release 0.1.7 - 2012/11/22
2
+ - fixed build for ruby 2.0.0-preview1
3
+
4
+ Release 0.1.6 - 2012/11/09
5
+ - jemalloc v3.2.0
6
+
1
7
  Release 0.1.5 - 2012/10/21
2
8
  - fixed homepage at gemspec
3
9
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jemalloc (0.1.6)
4
+ jemalloc (0.1.7)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -4,21 +4,32 @@ require 'rbconfig'
4
4
  $stdout.sync = true
5
5
  pkg = "jemalloc-3.2.0"
6
6
 
7
+ def sys(cmd)
8
+ puts "$ #{cmd}"
9
+ unless ret = xsystem(cmd)
10
+ raise "system command `#{cmd}' failed, please report to https://github.com/ibc/em-udns/issues"
11
+ end
12
+ ret
13
+ end
14
+
7
15
  # monfigure and copy sources to cur_dir
16
+ src_dir = File.expand_path(File.dirname(__FILE__))
8
17
  cur_dir = Dir.pwd
9
18
  Dir.chdir File.dirname(__FILE__) do
10
19
  # cleanup
11
- puts `rm -fR #{pkg}`
12
- puts `tar vjxf #{pkg}.tar.bz2`
20
+ FileUtils.remove_dir(pkg, force = true)
21
+
22
+ # decompress and copy source files
23
+ sys "tar vjxf #{pkg}.tar.bz2"
13
24
  Dir.chdir(pkg) do
14
25
  # configure
15
- puts `./configure`
26
+ sys "./configure"
16
27
  # zone.c is only for Mac OS X
17
28
  if RbConfig::CONFIG['target_vendor'] != "apple"
18
- puts `rm -fR src/zone.c`
29
+ sys "rm -fR src/zone.c"
19
30
  end
20
31
  # mkmf only allows *.c files on current dir
21
- puts `cp src/*.c #{cur_dir}`
32
+ sys "cp src/*.c #{src_dir}"
22
33
  end
23
34
  end
24
35
  Dir.chdir cur_dir
@@ -28,15 +39,21 @@ $CFLAGS << %[ -std=gnu99 -Wall -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
28
39
 
29
40
  create_makefile('jemalloc')
30
41
 
31
- # modify Makefile to create .dylib, instead of .bundle
42
+ # Modify Makefile to create .dylib, instead of .bundle. Because extconf.rb
43
+ # generates .bundle by default, but .bundle cannot be dynamically loaded by
44
+ # LD_PRELOAD.
32
45
  # NOTICE: Mac OS X only
33
46
  if RbConfig::CONFIG['target_vendor'] == "apple"
34
47
  makefile = open('Makefile').read
48
+ # for 1.9.2 and 1.9.3
35
49
  if makefile =~ /-dynamic\ -bundle/ && makefile =~ /-flat_namespace/
36
50
  makefile.gsub!(/-dynamic\ -bundle/, '-shared')
37
51
  makefile.gsub!(/-flat_namespace/, '-dylib_install_name')
52
+ # for 2.0.0
53
+ elsif makefile =~ /-dynamic\ -bundle/
54
+ makefile.gsub!(/-dynamic\ -bundle/, '-shared')
38
55
  else
39
- raise 'Your platform is not supported. Please report to http://github.com/treasure-data/je'
56
+ raise 'Your platform is not supported. Please report to http://github.com/treasure-data/jemalloc-rb'
40
57
  end
41
58
  open('Makefile', 'w'){ |f| f.write(makefile) }
42
59
  end
@@ -1,3 +1,3 @@
1
1
  module JEMalloc
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jemalloc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-09 00:00:00.000000000 Z
12
+ date: 2012-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler