[Groonga-commit] groonga/groonga at a1bc752 [master] package windows: support building LZ4

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Sun Nov 23 18:36:08 JST 2014


Kouhei Sutou	2014-11-23 18:36:08 +0900 (Sun, 23 Nov 2014)

  New Revision: a1bc7525330b42889bfb310a430edcc341d00106
  https://github.com/groonga/groonga/commit/a1bc7525330b42889bfb310a430edcc341d00106

  Message:
    package windows: support building LZ4

  Modified files:
    packages/windows/Rakefile

  Modified: packages/windows/Rakefile (+31 -0)
===================================================================
--- packages/windows/Rakefile    2014-11-23 18:02:26 +0900 (2a3ab8e)
+++ packages/windows/Rakefile    2014-11-23 18:36:08 +0900 (1bd3af2)
@@ -102,6 +102,36 @@ namespace :build do
     end
   end
 
+  desc "Build LZ4 and install it into #{dist_dir}."
+  task :lz4 do
+    tmp_dir = Pathname.new("tmp/lz4")
+    rm_rf(tmp_dir)
+    mkdir_p(tmp_dir)
+    lz4_version = "r124"
+    lz4_base = "lz4-#{lz4_version}"
+    lz4_tar_gz_url_base =
+      "https://github.com/Cyan4973/lz4/archive"
+    lz4_tar_gz_url =
+      "#{lz4_tar_gz_url_base}/#{lz4_version}.tar.gz"
+    lz4_tar_gz = download(lz4_tar_gz_url, download_dir)
+    Dir.chdir(tmp_dir) do
+      sh("tar", "xzf", lz4_tar_gz.to_s) or exit(false)
+    end
+    Dir.chdir(tmp_dir + lz4_base) do
+      sh("make",
+         "CC=#{host}-gcc",
+         # "EXT=.exe",
+         "SHARED_EXT=dll",
+         "PREFIX=#{binary_dir}",
+         "install") or exit(false)
+
+      lz4_license_dir = license_dir + "lz4"
+      mkdir_p(lz4_license_dir)
+      files = ["LICENSE"]
+      cp(files, lz4_license_dir)
+    end
+  end
+
   desc "Build PCRE and install it into #{dist_dir}."
   task :pcre do
     tmp_dir = Pathname.new("tmp/pcre")
@@ -335,6 +365,7 @@ task "build:post" => "gcc:dll:bundle"
 build_dependencies = [
   "build:pre",
   "build:zlib",
+  "build:lz4",
   "build:pcre",
   "build:msgpack",
   "build:mecab",
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る