summaryrefslogtreecommitdiff
path: root/devel/ruby-zookeeper
diff options
context:
space:
mode:
authorfhajny <fhajny>2016-01-08 12:53:11 +0000
committerfhajny <fhajny>2016-01-08 12:53:11 +0000
commit332b8b1a40be2b8d881155d35af2f5da98d010b8 (patch)
tree0c05c0288242dbc6d5c4f9622b5ed06087211a3d /devel/ruby-zookeeper
parentdb22ed61f7c652d856c86ced63cb4dde78892d70 (diff)
downloadpkgsrc-332b8b1a40be2b8d881155d35af2f5da98d010b8.tar.gz
Import devel/ruby-zookeeper 1.4.11.
A low-level multi-Ruby wrapper around the ZooKeeper API bindings.
Diffstat (limited to 'devel/ruby-zookeeper')
-rw-r--r--devel/ruby-zookeeper/DESCR1
-rw-r--r--devel/ruby-zookeeper/Makefile14
-rw-r--r--devel/ruby-zookeeper/PLIST85
-rw-r--r--devel/ruby-zookeeper/distinfo8
-rw-r--r--devel/ruby-zookeeper/patches/patch-ext_c__zookeeper.rb15
-rw-r--r--devel/ruby-zookeeper/patches/patch-ext_extconf.rb106
6 files changed, 229 insertions, 0 deletions
diff --git a/devel/ruby-zookeeper/DESCR b/devel/ruby-zookeeper/DESCR
new file mode 100644
index 00000000000..02f6c2f7ada
--- /dev/null
+++ b/devel/ruby-zookeeper/DESCR
@@ -0,0 +1 @@
+A low-level multi-Ruby wrapper around the ZooKeeper API bindings.
diff --git a/devel/ruby-zookeeper/Makefile b/devel/ruby-zookeeper/Makefile
new file mode 100644
index 00000000000..42bddd43664
--- /dev/null
+++ b/devel/ruby-zookeeper/Makefile
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2016/01/08 12:53:11 fhajny Exp $
+#
+DISTNAME= zookeeper-1.4.11
+PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME}
+CATEGORIES= ruby devel
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://github.com/zk-ruby/zookeeper
+COMMENT= Zookeeper bindings for Ruby
+LICENSE= mit
+
+.include "../../devel/libzookeeper/buildlink3.mk"
+.include "../../lang/ruby/gem.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/ruby-zookeeper/PLIST b/devel/ruby-zookeeper/PLIST
new file mode 100644
index 00000000000..8f7237735ff
--- /dev/null
+++ b/devel/ruby-zookeeper/PLIST
@@ -0,0 +1,85 @@
+@comment $NetBSD: PLIST,v 1.1 2016/01/08 12:53:11 fhajny Exp $
+${GEM_HOME}/cache/${GEM_NAME}.gem
+${GEM_LIBDIR}/.ctags_paths
+${GEM_LIBDIR}/.dotfiles/ruby-gemset
+${GEM_LIBDIR}/.dotfiles/ruby-version
+${GEM_LIBDIR}/.dotfiles/rvmrc
+${GEM_LIBDIR}/.gitignore
+${GEM_LIBDIR}/.gitmodules
+${GEM_LIBDIR}/.travis.yml
+${GEM_LIBDIR}/CHANGELOG
+${GEM_LIBDIR}/Gemfile
+${GEM_LIBDIR}/Guardfile
+${GEM_LIBDIR}/LICENSE
+${GEM_LIBDIR}/Manifest
+${GEM_LIBDIR}/README.markdown
+${GEM_LIBDIR}/Rakefile
+${GEM_LIBDIR}/cause-abort.rb
+${GEM_LIBDIR}/ext/.gitignore
+${GEM_LIBDIR}/ext/Rakefile
+${GEM_LIBDIR}/ext/c_zookeeper.rb
+${GEM_LIBDIR}/ext/common.h
+${GEM_LIBDIR}/ext/dbg.h
+${GEM_LIBDIR}/ext/depend
+${GEM_LIBDIR}/ext/event_lib.c
+${GEM_LIBDIR}/ext/event_lib.h
+${GEM_LIBDIR}/ext/extconf.rb
+${GEM_LIBDIR}/ext/generate_gvl_code.rb
+${GEM_LIBDIR}/ext/patches/zkc-3.3.5-network.patch
+${GEM_LIBDIR}/ext/patches/zkc-3.4.5-logging.patch
+${GEM_LIBDIR}/ext/patches/zkc-3.4.5-out-of-order-ping.patch
+${GEM_LIBDIR}/ext/patches/zkc-3.4.5-yosemite-htonl-fix.patch
+${GEM_LIBDIR}/ext/zkc-3.4.5.tar.gz
+${GEM_LIBDIR}/ext/zkrb.c
+${GEM_LIBDIR}/ext/zkrb_wrapper.c
+${GEM_LIBDIR}/ext/zkrb_wrapper.h
+${GEM_LIBDIR}/ext/zkrb_wrapper_compat.c
+${GEM_LIBDIR}/ext/zkrb_wrapper_compat.h
+${GEM_LIBDIR}/ext/zookeeper_base.rb
+${GEM_LIBDIR}/java/java_base.rb
+${GEM_LIBDIR}/lib/zookeeper.rb
+${GEM_LIBDIR}/lib/zookeeper/acls.rb
+${GEM_LIBDIR}/lib/zookeeper/callbacks.rb
+${GEM_LIBDIR}/lib/zookeeper/client.rb
+${GEM_LIBDIR}/lib/zookeeper/client_methods.rb
+${GEM_LIBDIR}/lib/zookeeper/common.rb
+${GEM_LIBDIR}/lib/zookeeper/common/queue_with_pipe.rb
+${GEM_LIBDIR}/lib/zookeeper/compatibility.rb
+${GEM_LIBDIR}/lib/zookeeper/constants.rb
+${GEM_LIBDIR}/lib/zookeeper/continuation.rb
+${GEM_LIBDIR}/lib/zookeeper/core_ext.rb
+${GEM_LIBDIR}/lib/zookeeper/em_client.rb
+${GEM_LIBDIR}/lib/zookeeper/exceptions.rb
+${GEM_LIBDIR}/lib/zookeeper/forked.rb
+${GEM_LIBDIR}/lib/zookeeper/latch.rb
+${GEM_LIBDIR}/lib/zookeeper/logger.rb
+${GEM_LIBDIR}/lib/zookeeper/logger/forwarding_logger.rb
+${GEM_LIBDIR}/lib/zookeeper/monitor.rb
+${GEM_LIBDIR}/lib/zookeeper/rake_tasks.rb
+${GEM_LIBDIR}/lib/zookeeper/request_registry.rb
+${GEM_LIBDIR}/lib/zookeeper/stat.rb
+${GEM_LIBDIR}/lib/zookeeper/version.rb
+${GEM_LIBDIR}/lib/zookeeper_c.${RUBY_DLEXT}
+${GEM_LIBDIR}/notes.txt
+${GEM_LIBDIR}/scripts/upgrade-1.0-sed-alike.rb
+${GEM_LIBDIR}/spec/c_zookeeper_spec.rb
+${GEM_LIBDIR}/spec/chrooted_connection_spec.rb
+${GEM_LIBDIR}/spec/compatibilty_spec.rb
+${GEM_LIBDIR}/spec/default_watcher_spec.rb
+${GEM_LIBDIR}/spec/em_spec.rb
+${GEM_LIBDIR}/spec/ext/zookeeper_base_spec.rb
+${GEM_LIBDIR}/spec/forked_connection_spec.rb
+${GEM_LIBDIR}/spec/latch_spec.rb
+${GEM_LIBDIR}/spec/log4j.properties
+${GEM_LIBDIR}/spec/shared/all_success_return_values.rb
+${GEM_LIBDIR}/spec/shared/connection_examples.rb
+${GEM_LIBDIR}/spec/spec_helper.rb
+${GEM_LIBDIR}/spec/support/00_logging.rb
+${GEM_LIBDIR}/spec/support/10_spawn_zookeeper.rb
+${GEM_LIBDIR}/spec/support/progress_formatter.rb
+${GEM_LIBDIR}/spec/support/zookeeper_spec_helpers.rb
+${GEM_LIBDIR}/spec/zookeeper_spec.rb
+${GEM_LIBDIR}/zookeeper.gemspec
+${GEM_LIBDIR}/zoomonkey/duplicates
+${GEM_LIBDIR}/zoomonkey/zoomonkey.rb
+${GEM_HOME}/specifications/${GEM_NAME}.gemspec
diff --git a/devel/ruby-zookeeper/distinfo b/devel/ruby-zookeeper/distinfo
new file mode 100644
index 00000000000..2a214fb497a
--- /dev/null
+++ b/devel/ruby-zookeeper/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2016/01/08 12:53:11 fhajny Exp $
+
+SHA1 (zookeeper-1.4.11.gem) = 5f52d51207926aadd83e285250cc8d0bda71b8ac
+RMD160 (zookeeper-1.4.11.gem) = 3d597e963677c9b4ed56ac1b31e4bdbdd73b47dd
+SHA512 (zookeeper-1.4.11.gem) = 101d3e50b7f3f800454e4c2d5b3c0c1d1516ba71f55584609551d9770f56703e45b049feb93a66097d601937f407ebeec7b7dfd3b34d1e6a5e7c3cbfd4c752ff
+Size (zookeeper-1.4.11.gem) = 933888 bytes
+SHA1 (patch-ext_c__zookeeper.rb) = 787f51a72b00b9375f0b86d0752cf4f876b4f2b6
+SHA1 (patch-ext_extconf.rb) = ad70116a048ef299f886fae37f9cf14eff081ffd
diff --git a/devel/ruby-zookeeper/patches/patch-ext_c__zookeeper.rb b/devel/ruby-zookeeper/patches/patch-ext_c__zookeeper.rb
new file mode 100644
index 00000000000..e6e571c7dbf
--- /dev/null
+++ b/devel/ruby-zookeeper/patches/patch-ext_c__zookeeper.rb
@@ -0,0 +1,15 @@
+$NetBSD: patch-ext_c__zookeeper.rb,v 1.1 2016/01/08 12:53:11 fhajny Exp $
+
+Use proper lib location.
+
+--- ext/c_zookeeper.rb.orig 2013-11-06 02:37:55.023185230 +0000
++++ ext/c_zookeeper.rb
+@@ -5,7 +5,7 @@ Zookeeper.require_lib(
+ 'zookeeper/exceptions' # zookeeper_c depends on exceptions defined in here
+ )
+
+-Zookeeper.require_root 'ext/zookeeper_c'
++Zookeeper.require_root 'lib/zookeeper_c'
+
+ # require File.expand_path('../zookeeper_c', __FILE__)
+
diff --git a/devel/ruby-zookeeper/patches/patch-ext_extconf.rb b/devel/ruby-zookeeper/patches/patch-ext_extconf.rb
new file mode 100644
index 00000000000..632459ba42d
--- /dev/null
+++ b/devel/ruby-zookeeper/patches/patch-ext_extconf.rb
@@ -0,0 +1,106 @@
+$NetBSD: patch-ext_extconf.rb,v 1.1 2016/01/08 12:53:11 fhajny Exp $
+
+Link pkgsrc libzookeeper instead of the embedded build.
+
+--- ext/extconf.rb.orig 2016-01-08 12:43:23.823917320 +0000
++++ ext/extconf.rb
+@@ -2,96 +2,10 @@ require 'mkmf'
+ require 'rbconfig'
+ require 'fileutils'
+
+-HERE = File.expand_path(File.dirname(__FILE__))
+-BUNDLE = Dir.glob("zkc-*.tar.gz").sort.last
+-ZKC_VERSION = BUNDLE[/(zkc-.*?)\.tar.gz$/, 1]
+-PATCHES = Dir.glob("patches/#{ZKC_VERSION}*.patch")
+-
+-BUNDLE_PATH = File.join(HERE, ZKC_VERSION, 'c')
+-
+-$EXTRA_CONF = ''
+-
+-# CLANG!!!! jeez, if apple would only *stop* "thinking different"
+-if cc = RbConfig::CONFIG['CC'] && cc =~ /^gcc/
+- $CC = cc
+- $EXTRA_CONF = "#{$EXTRA_CONF} CC=#{$CC}"
+-end
+-
+-$CFLAGS = "#{$CFLAGS}".gsub("$(cflags)", "").gsub("-arch ppc", "")
+-$LDFLAGS = "#{$LDFLAGS}".gsub("$(ldflags)", "").gsub("-arch ppc", "")
+-$CXXFLAGS = " -std=gnu++98 #{$CFLAGS}"
+-$CPPFLAGS = $ARCH_FLAG = ""
+-
+-if RUBY_VERSION == '1.8.7'
+- $CFLAGS << ' -DZKRB_RUBY_187'
+-end
+-
+-ZK_DEBUG = (ENV['DEBUG'] or ARGV.any? { |arg| arg == '--debug' })
+ ZK_DEV = ENV['ZK_DEV']
+-DEBUG_CFLAGS = " -O0 -ggdb3 -DHAVE_DEBUG -fstack-protector-all"
+-
+-if ZK_DEBUG
+- $stderr.puts "*** Setting debug flags. ***"
+- $EXTRA_CONF = "#{$EXTRA_CONF} --enable-debug"
+- $CFLAGS.gsub!(/ -O[^0] /, ' ')
+- $CFLAGS << DEBUG_CFLAGS
+-end
+-
+-$includes = " -I#{HERE}/include"
+-$libraries = " -L#{HERE}/lib -L#{RbConfig::CONFIG['libdir']}"
+-$CFLAGS = "#{$includes} #{$libraries} #{$CFLAGS}"
+-$LDFLAGS = "#{$libraries} #{$LDFLAGS}"
+-$LIBPATH = ["#{HERE}/lib"]
+-$DEFLIBPATH = []
+-
+-def safe_sh(cmd)
+- puts cmd
+- system(cmd)
+- unless $?.exited? and $?.success?
+- raise "command failed! #{cmd}"
+- end
+-end
+-
+-Dir.chdir(HERE) do
+- if File.exist?("lib")
+- puts "Zkc already built; run 'rake clobber' in ext/ first if you need to rebuild."
+- else
+- puts "Building zkc."
+-
+- unless File.exists?('c')
+- safe_sh "tar xzf #{BUNDLE} 2>&1"
+- PATCHES.each do |patch|
+- safe_sh "patch -p0 < #{patch} 2>&1"
+- end
+- end
+-
+- # clean up stupid apple rsrc fork bullshit
+- FileUtils.rm_f(Dir['**/._*'].select{|p| test(?f, p)})
+-
+- Dir.chdir(BUNDLE_PATH) do
+- configure = "./configure --prefix=#{HERE} --with-pic --without-cppunit --disable-dependency-tracking #{$EXTRA_CONF} 2>&1"
+- configure = "env CFLAGS='#{DEBUG_CFLAGS}' #{configure}" if ZK_DEBUG
+-
+- safe_sh(configure)
+- safe_sh("make 2>&1")
+- safe_sh("make install 2>&1")
+- end
+-
+- system("rm -rf #{BUNDLE_PATH}") unless ZK_DEBUG or ZK_DEV
+- end
+-end
+-
+-# Absolutely prevent the linker from picking up any other zookeeper_mt
+-Dir.chdir("#{HERE}/lib") do
+- %w[st mt].each do |stmt|
+- %w[a la].each do |ext|
+- system("cp -f libzookeeper_#{stmt}.#{ext} libzookeeper_#{stmt}_gem.#{ext}")
+- end
+- end
+-end
+-
+-# -lm must come after lzookeeper_st_gem to ensure proper link
+-$LIBS << " -lzookeeper_st_gem -lm"
++build_root = ENV['PREFIX']
++ldflags = ENV['LDFLAGS']
++$LIBS << " -lzookeeper_st #{ldflags} -lm"
+
+ have_func('rb_thread_blocking_region')
+ have_func('rb_thread_fd_select')