diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2012-03-16 15:52:38 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2012-03-16 15:52:38 +0000 |
commit | 63b12085111a19728a45577f92d8734b926b770d (patch) | |
tree | d467a442e84bddd6f7d9a267060b1a2b42c366f5 /irc | |
parent | 2b88e39fcd922ec149cdec4fb46dc1dfa391d4bf (diff) | |
download | ports-63b12085111a19728a45577f92d8734b926b770d.tar.gz ports-63b12085111a19728a45577f92d8734b926b770d.zip |
Notes
Diffstat (limited to 'irc')
-rw-r--r-- | irc/xchat-ruby/Makefile | 14 | ||||
-rw-r--r-- | irc/xchat-ruby/files/patch-Makefile | 4 | ||||
-rw-r--r-- | irc/xchat-ruby/files/rubypath.rb | 12 |
3 files changed, 23 insertions, 7 deletions
diff --git a/irc/xchat-ruby/Makefile b/irc/xchat-ruby/Makefile index ac5bf9466c95..d9f5cafeb0a5 100644 --- a/irc/xchat-ruby/Makefile +++ b/irc/xchat-ruby/Makefile @@ -20,6 +20,7 @@ RUN_DEPENDS= xchat:${PORTSDIR}/irc/xchat LICENSE= GPLv2 USE_RUBY= yes +USE_LIBRUBY= yes WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCSRC= ${WRKDIR}/${DISTNAME} DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} @@ -28,6 +29,13 @@ PLIST_FILES= lib/xchat/plugins/xchat-ruby.so PORTDOCS= README ChangeLog PORTEXAMPLES= embedify.rb TimerSample.rb JFilter.rb JBanner.rb +post-patch: + ${REINPLACE_CMD} \ + -e 's|^RUBY=.*|RUBY=${RUBY}|' \ + -e 's|-lruby$$|-l${RUBY_NAME}|' \ + -e 's|^ARCHDIR=.*|ARCHDIR=`$$(RUBY) ${FILESDIR}/rubypath.rb`|' \ + ${WRKSRC}/Makefile + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/xchat-ruby.so \ ${PREFIX}/lib/xchat/plugins/ @@ -46,8 +54,4 @@ do-install: .endfor .endif -.include <bsd.port.pre.mk> -.if ${RUBY_VER} == 1.9 -BROKEN= does not build with ruby 1.9 -.endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/irc/xchat-ruby/files/patch-Makefile b/irc/xchat-ruby/files/patch-Makefile index 62eb06497f0f..da7319bd6e34 100644 --- a/irc/xchat-ruby/files/patch-Makefile +++ b/irc/xchat-ruby/files/patch-Makefile @@ -1,11 +1,11 @@ --- Makefile.orig 2007-04-26 13:16:32.000000000 +0200 -+++ Makefile 2008-06-21 23:35:33.000000000 +0200 ++++ Makefile 2012-03-16 12:31:27.000000000 +0100 @@ -21,7 +21,7 @@ all: $(SO_FILE) $(SO_FILE): xchat-ruby.o xchat-ruby-plugin.h - $(CC) -L$(ARCHDIR) $(CFLAGS) -shared -o $(SO_FILE) xchat-ruby.o -lruby -+ $(CC) -L$(PREFIX)/lib $(CFLAGS) -shared -o $(SO_FILE) xchat-ruby.o -lruby18 ++ $(CC) -L$(PREFIX)/lib $(CFLAGS) -shared -o $(SO_FILE) xchat-ruby.o -lruby install: $(SO_FILE) mkdir -p $(XCHAT_DIR) diff --git a/irc/xchat-ruby/files/rubypath.rb b/irc/xchat-ruby/files/rubypath.rb new file mode 100644 index 000000000000..783d1d4a382a --- /dev/null +++ b/irc/xchat-ruby/files/rubypath.rb @@ -0,0 +1,12 @@ +#!/usr/local/bin/ruby +require "rbconfig" +if RbConfig::CONFIG[ 'rubyhdrdir' ].nil? + puts RbConfig::CONFIG['archdir'] +else + print RbConfig::CONFIG['rubyhdrdir'] + print " -I" + print RbConfig::CONFIG['rubyhdrdir'] + print "/" + puts RbConfig::CONFIG['sitearch'] +end +# eof |