diff options
Diffstat (limited to 'package/ruby-ldap')
-rw-r--r-- | package/ruby-ldap/Makefile | 16 | ||||
-rw-r--r-- | package/ruby-ldap/patches/patch-rbldap_h | 23 |
2 files changed, 32 insertions, 7 deletions
diff --git a/package/ruby-ldap/Makefile b/package/ruby-ldap/Makefile index 8f26ca0ef..6289c1cb8 100644 --- a/package/ruby-ldap/Makefile +++ b/package/ruby-ldap/Makefile @@ -24,17 +24,19 @@ CONFIG_STYLE:= manual FAKE_FLAGS+= DESTDIR="/" do-configure: - (cd $(WRKBUILD) && $(STAGING_DIR)/bin/ruby -I$(STAGING_DIR)/usr/lib/ruby/1.9.1/$(CPU_ARCH)-linux/ extconf.rb \ + (cd $(WRKBUILD) && $(STAGING_HOST_DIR)/usr/bin/ruby -I$(STAGING_DIR)/usr/lib/ruby/2.0.0/$(CPU_ARCH)-linux/ extconf.rb \ --with-openldap2 \ + --without-libnsl \ + --with-ldap-dir=$(STAGING_DIR)/usr \ --with-ldap-lib=$(STAGING_DIR)/usr/lib \ --with-ldap-include=$(STAGING_DIR)/usr/include) ruby-ldap-install: - $(INSTALL_DIR) $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/1.9.1/$(CPU_ARCH)-linux - $(INSTALL_DIR) $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/1.9.1/ldap - $(CP) $(STAGING_DIR)/usr/lib/ruby/site_ruby/1.9.1/$(CPU_ARCH)-linux/ldap.so \ - $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/1.9.1/$(CPU_ARCH)-linux - $(CP) $(STAGING_DIR)//usr/lib/ruby/site_ruby/1.9.1/ldap/*.rb \ - $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/1.9.1/ldap + $(INSTALL_DIR) $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/2.0.0/$(CPU_ARCH)-linux + $(INSTALL_DIR) $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/2.0.0/ldap + $(CP) $(STAGING_DIR)/usr/lib/ruby/site_ruby/2.0.0/$(CPU_ARCH)-linux/ldap.so \ + $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/2.0.0/$(CPU_ARCH)-linux + $(CP) $(STAGING_DIR)//usr/lib/ruby/site_ruby/2.0.0/ldap/*.rb \ + $(IDIR_RUBY_LDAP)/usr/lib/ruby/site_ruby/2.0.0/ldap include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ruby-ldap/patches/patch-rbldap_h b/package/ruby-ldap/patches/patch-rbldap_h new file mode 100644 index 000000000..6e4e68dd7 --- /dev/null +++ b/package/ruby-ldap/patches/patch-rbldap_h @@ -0,0 +1,23 @@ +--- ruby-ldap-0.9.8.orig/rbldap.h 2009-03-25 10:25:27.000000000 +0100 ++++ ruby-ldap-0.9.8/rbldap.h 2013-10-26 23:33:03.000000000 +0200 +@@ -162,16 +162,18 @@ VALUE rb_ldap_mod_vals (VALUE); + RB_LDAPENTRY_DATA *ptr; \ + Data_Get_Struct(obj, struct rb_ldapmsg_data, ptr); \ + if( ! ptr->msg ){ \ ++ VALUE value = rb_inspect(obj); \ + rb_raise(rb_eLDAP_InvalidEntryError, "%s is not a valid entry", \ +- STR2CSTR(rb_inspect(obj))); \ ++ StringValuePtr(value)); \ + }; \ + } + + #define GET_LDAPENTRY_DATA(obj,ptr) { \ + Data_Get_Struct(obj, struct rb_ldapentry_data, ptr); \ + if( ! ptr->msg ){ \ ++ VALUE value = rb_inspect(obj); \ + rb_raise(rb_eLDAP_InvalidEntryError, "%s is not a valid entry", \ +- STR2CSTR(rb_inspect(obj))); \ ++ StringValuePtr(value)); \ + }; \ + } + |