From 7a0769b6581fc1ea9498e53b56bfb1a9c042f351 Mon Sep 17 00:00:00 2001 From: Jean Guyader Date: Fri, 28 Aug 2009 01:57:17 +0100 Subject: [PATCH] [package/ruby-typhoeus] Change the location of the file and make it compile within ruby. --- .../ruby-typhoeus-0.0.16-makefile-fix.patch | 39 ------------------- .../{ => ruby}/ruby-typhoeus/ruby-typhoeus.mk | 18 +++------ package/ruby/ruby.mk | 1 + 3 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 package/ruby-typhoeus/ruby-typhoeus-0.0.16-makefile-fix.patch rename package/{ => ruby}/ruby-typhoeus/ruby-typhoeus.mk (55%) diff --git a/package/ruby-typhoeus/ruby-typhoeus-0.0.16-makefile-fix.patch b/package/ruby-typhoeus/ruby-typhoeus-0.0.16-makefile-fix.patch deleted file mode 100644 index b7cc7b3..0000000 --- a/package/ruby-typhoeus/ruby-typhoeus-0.0.16-makefile-fix.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/ext/typhoeus/Makefile b/ext/typhoeus/Makefile -index 44741d0..fa53d75 100644 ---- a/ext/typhoeus/Makefile -+++ b/ext/typhoeus/Makefile -@@ -37,14 +37,14 @@ datadir = $(datarootdir) - localstatedir = $(prefix)/var - sitelibdir = $(sitedir)/$(ruby_version) - --CC = gcc -+CC ?= gcc - LIBRUBY = $(LIBRUBY_A) - LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a - LIBRUBYARG_SHARED = - LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static - - RUBY_EXTCONF_H = --CFLAGS = -fno-common -g -O2 -pipe -fno-common $(cflags) -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -+CFLAGS ?= -fno-common -g -O2 -pipe -fno-common $(cflags) -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline - INCFLAGS = -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin9.6.0 -I. - DEFS = - CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -@@ -53,7 +53,7 @@ ldflags = -L. - dldflags = - archflag = - DLDFLAGS = $(ldflags) $(dldflags) $(archflag) --LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace -+LDSHARED = $(CC) -shared - AR = ar - EXEEXT = - -@@ -86,7 +86,7 @@ extout = - extout_prefix = - target_prefix = /typhoeus - LOCAL_LIBS = --LIBS = -lcurl -ldl -lobjc -+LIBS = -lcurl -ldl - SRCS = native.c typhoeus_easy.c typhoeus_multi.c - OBJS = native.o typhoeus_easy.o typhoeus_multi.o - TARGET = native diff --git a/package/ruby-typhoeus/ruby-typhoeus.mk b/package/ruby/ruby-typhoeus/ruby-typhoeus.mk similarity index 55% rename from package/ruby-typhoeus/ruby-typhoeus.mk rename to package/ruby/ruby-typhoeus/ruby-typhoeus.mk index 93b0935..7b77e69 100644 --- a/package/ruby-typhoeus/ruby-typhoeus.mk +++ b/package/ruby/ruby-typhoeus/ruby-typhoeus.mk @@ -5,31 +5,23 @@ ############################################################# RUBY_TYPHOEUS_VERSION:=0.0.16 RUBY_TYPHOEUS_SOURCE:=git://github.com/pauldix/typhoeus.git -RUBY_TYPHOEUS_DIR:=$(BUILD_DIR)/ruby-typhoeus-$(RUBY_TYPHOEUS_VERSION) +RUBY_TYPHOEUS_DIR:=$(RUBY_DIR)/ext/typhoeus-$(RUBY_TYPHOEUS_VERSION) RUBY_TYPHOEUS_TARGET:=/lib/ruby/1.9.1 RUBY_TYPHOEUS_COMMIT=06e896324e2b92771b222c763d5a6693315ae2f0 $(RUBY_TYPHOEUS_DIR)/.checkedout: $(GIT) $(RUBY_TYPHOEUS_SOURCE) $(RUBY_TYPHOEUS_DIR) - ( cd $(RUBY_TYPHOEUS_DIR) git checkout $(RUBY_TYPHOEUS_COMMIT) ) + ( cd $(RUBY_TYPHOEUS_DIR) && git checkout $(RUBY_TYPHOEUS_COMMIT) ) touch $@ -$(RUBY_TYPHOEUS_DIR)/.patched: $(RUBY_TYPHOEUS_DIR)/.checkedout - toolchain/patch-kernel.sh $(RUBY_TYPHOEUS_DIR) package/ruby-typhoeus \*.patch - $(RUBY_TYPHOEUS_DIR)/.installed: $(RUBY_TYPHOEUS_DIR)/.compiled mkdir -p $(TARGET_DIR)/$(RUBY_TYPHOEUS_TARGET) rsync -ar $(RUBY_TYPHOEUS_DIR)/lib/ $(TARGET_DIR)/$(RUBY_TYPHOEUS_TARGET) - mkdir -p $(TARGET_DIR)/$(RUBY_TYPHOEUS_TARGET)/i686-linux/typhoeus - cp $(RUBY_TYPHOEUS_DIR)/ext/typhoeus/native.bundle $(TARGET_DIR)/$(RUBY_TYPHOEUS_TARGET)/i686-linux/typhoeus/native.so + cp -r $(RUBY_DIR)/.ext/i686-linux/typhoeus $(TARGET_DIR)/$(RUBY_LIBS_TARGET)/i686-linux touch $@ -$(RUBY_TYPHOEUS_DIR)/.compiled: $(RUBY_TYPHOEUS_DIR)/.patched ruby - cp $(STAGING_DIR)/usr/include/ruby/ruby.h $(RUBY_TYPHOEUS_DIR)/ext/typhoeus - cp $(STAGING_DIR)/usr/include/ruby/defines.h $(RUBY_TYPHOEUS_DIR)/ext/typhoeus - mkdir -p $(RUBY_TYPHOEUS_DIR)/ext/typhoeus/ruby - cp $(STAGING_DIR)/usr/include/i686-linux/ruby/config.h $(RUBY_TYPHOEUS_DIR)/ext/typhoeus/ruby - $(TARGET_CONFIGURE_ENV) CC=$(TARGET_CC) make -C $(RUBY_TYPHOEUS_DIR)/ext/typhoeus +$(RUBY_TYPHOEUS_DIR)/.compiled: ruby libcurl $(RUBY_TYPHOEUS_DIR)/.checkedout + make ruby-compile touch $@ ruby-typhoeus-source: $(RUBY_TYPHOEUS_DIR)/.checkedout diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk index 3ee1bb9..134125d 100644 --- a/package/ruby/ruby.mk +++ b/package/ruby/ruby.mk @@ -119,3 +119,4 @@ endif include package/ruby/ruby-glib2/ruby-glib2.mk include package/ruby/ruby-sys-filesystem/ruby-sys-filesystem.mk +include package/ruby/ruby-typhoeus/ruby-typhoeus.mk -- 2.39.5