libstxxl 1.4.0
parent
a8b437e042
commit
a7b36e3593
|
@ -2,51 +2,62 @@ require 'formula'
|
|||
|
||||
class Libstxxl < Formula
|
||||
homepage 'http://stxxl.sourceforge.net/'
|
||||
url 'https://downloads.sourceforge.net/project/stxxl/stxxl/1.3.1/stxxl-1.3.1.tar.gz'
|
||||
sha1 '5fba2bb26b919a07e966b2f69ae29aa671892a7d'
|
||||
url 'https://downloads.sourceforge.net/project/stxxl/stxxl/1.4.0/stxxl-1.4.0.tar.gz'
|
||||
sha1 'a7001e7f04904be2bad9e80aa360528768a2068a'
|
||||
|
||||
# issue has been rectified in upstream and future 1.4.0 release
|
||||
patch :DATA if MacOS.version >= :mavericks
|
||||
depends_on 'cmake' => :build
|
||||
|
||||
# all patches can be removed with a new upstream release
|
||||
# compile fixes for OS X 10.7 and 10.8 as discussed
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/d23dd29b9492061a8da2201ab2585914b66bb9c3.diff"
|
||||
sha1 "af0e84a74f20047def5a76146057f3c176f12845"
|
||||
end
|
||||
# uncrustify older modification in unique_ptr.h
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/014eccfb640602de7be085670d6ac251663e3934.diff"
|
||||
sha1 "7fc9c045c8939a81694072280058c5efb4d639cb"
|
||||
end
|
||||
# adding binary_buffer and binary_reader for in-memory serialization
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/4a5305d360199693707322c920ab68a0e09beba8.diff"
|
||||
sha1 "e3f1f35746caef3d45d85048ee4a7d243f3b6590"
|
||||
end
|
||||
# extended test_vector_buf test case to check writing to empty vector
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/08ea799de263fcd235eb1a4b7151d7feb1f36acb.diff"
|
||||
sha1 "183b03d460e673a289dfbb920e017e43b1a98183"
|
||||
end
|
||||
# changed only some of cmakelint's warnings
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/590726a202cd21d56e1b9fe902a7b6a4b6ba0896.diff"
|
||||
sha1 "93abf0db1c5d5c4b55f86377d809b547df742d5b"
|
||||
end
|
||||
# fixing occurrances for atoint64 in older programs. atoint64 was renamed to atouint64, which is what it does
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/c92521a91aedb950d57cd7e0f596cc622f2e67c8.diff"
|
||||
sha1 "a4be262a09e277a136fb9565ca1e8043647c829c"
|
||||
end
|
||||
# adding --block_size parameter to benchmark_disks stxxl_tool subprogram
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/f3c3cc1563cd179d114a73333e426bd8c817754f.diff"
|
||||
sha1 "79e1addec69cf6f6e87789e67d7f27b22a713553"
|
||||
end
|
||||
# rewriting adaptor.h: removing register keyword and fixing illegal variable names
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/9d673f67328b2f5a4d53f036c70cbcc44610452c.diff"
|
||||
sha1 "72e453563041617aa79a99267cab25e4eab7bb96"
|
||||
end
|
||||
# adding -stdlib=libc++ on MacOSX when compiling with clang
|
||||
patch do
|
||||
url "https://github.com/stxxl/stxxl/commit/40361d83389234d05499be30fcddc2b6bd64e967.diff"
|
||||
sha1 "e051fa9a8354faf3741d4a60374238715831a721"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV['COMPILER'] = ENV.cxx
|
||||
if MacOS.version >= :mavericks
|
||||
inreplace 'make.settings.gnu' do |s|
|
||||
s.gsub! /USE_MACOSX.*no/, 'USE_MACOSX ?= yes#'
|
||||
s.gsub! /#STXXL_SPECIFIC\s*\+=.*$/, 'STXXL_SPECIFIC += -std=c++0x'
|
||||
end
|
||||
mkdir "build" do
|
||||
system "cmake", "..", *std_cmake_args
|
||||
system 'make install'
|
||||
end
|
||||
system "make", "config_gnu", "USE_MACOSX=yes"
|
||||
system "make", "library_g++", "USE_MACOSX=yes"
|
||||
|
||||
prefix.install 'include'
|
||||
lib.install 'lib/libstxxl.a'
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
Index: utils/mlock.cpp
|
||||
===================================================================
|
||||
--- stxxl-1.3.1/utils/mlock.cpp (revision 3229)
|
||||
+++ stxxl-1.3.1/utils/mlock.cpp (working copy)
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <iostream>
|
||||
#include <sys/mman.h>
|
||||
|
||||
+#include <chrono>
|
||||
+#include <thread>
|
||||
+
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
if (argc == 2) {
|
||||
@@ -28,8 +31,9 @@
|
||||
c[i] = 42;
|
||||
if (mlock(c, M) == 0) {
|
||||
std::cout << "mlock(, " << M << ") successful, press Ctrl-C to finish" << std::endl;
|
||||
+ std::chrono::seconds duration(86400);
|
||||
while (1)
|
||||
- sleep(86400);
|
||||
+ std::this_thread::sleep_for(duration);
|
||||
} else {
|
||||
std::cerr << "mlock(, " << M << ") failed!" << std::endl;
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue