* Use lang/ruby/gem.mk instead of misc/rubygems/rubygem.mk.

* Add LICENSE.
* Remove RUBY_HAS_ARCHLIB.
* Change PKG_DESTDIR_SUPPORT to user-destdir.
* Add patches to support both ruby18 and ruby19.
This commit is contained in:
taca 2010-09-10 13:36:15 +00:00
parent f1e9eccd6a
commit bb6e9d351c
3 changed files with 69 additions and 4 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.45 2010/09/07 17:20:27 taca Exp $
# $NetBSD: Makefile,v 1.46 2010/09/10 13:36:15 taca Exp $
DISTNAME= ruby-gtk-${VERSION}
PKGNAME= ${RUBY_PKGPREFIX}-gtk-${VERSION}
@ -9,17 +9,18 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ruby-gnome/}
MAINTAINER= taca@NetBSD.org
HOMEPAGE= http://ruby-gnome.sourceforge.net/
COMMENT= Ruby interface to Gtk+ toolkits
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
RUBY_VERSION_SUPPORTED= 18
VERSION= 0.34
RUBY_HAS_ARCHLIB= yes
USE_RUBY_EXTCONF= yes
INSTALL_TARGET= site-install
DOCS_EN= README README.EXT doc/rbbr.rb
DOCS_JA= README.ja README.EXT.ja
INSTALLATION_DIRS== ${RUBY_VENDORLIB} ${RUBY_EG}/gtk/doc \
${RUBY_EG}/gtk/test ${RUBY_EG}/gtk/testgtk
PKG_DESTDIR_SUPPORT= destdir
post-install:
${INSTALL_DATA} ${WRKSRC}/sample/*.rb ${DESTDIR}${PREFIX}/${RUBY_EG}/gtk

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.8 2007/06/09 14:11:56 taca Exp $
$NetBSD: distinfo,v 1.9 2010/09/10 13:36:15 taca Exp $
SHA1 (ruby-gtk-0.34.tar.gz) = 395ed0396e5df0ae41383163b2ae2bdd51903604
RMD160 (ruby-gtk-0.34.tar.gz) = 4339aad4ad732b2981a79003430af40ff5619704
Size (ruby-gtk-0.34.tar.gz) = 283056 bytes
SHA1 (patch-aa) = 8ab0f9eda6e07470eb5abcc119dd6320eb06166b
SHA1 (patch-ab) = 026c254f342a908b99c9d2cf0ae009a1df71229e

View file

@ -0,0 +1,63 @@
$NetBSD: patch-ab,v 1.1 2010/09/10 13:36:15 taca Exp $
Use RUBY_PLATFORM instead of obsolete PLATFORM.
--- extconf.rb.orig 2003-07-06 17:20:37.000000000 +0000
+++ extconf.rb
@@ -7,7 +7,7 @@ require "mkmf"
#
# detect GTK+ configurations
#
-if /mswin32/ !~ PLATFORM
+if /mswin32/ !~ RUBY_PLATFORM
config_cmd = with_config("gtk-config", "gtk-config")
begin
@@ -55,9 +55,9 @@ begin
Dir.chdir "src"
lib_ary = []
- if /cygwin|mingw/ =~ PLATFORM
+ if /cygwin|mingw/ =~ RUBY_PLATFORM
$CFLAGS += " -fnative-struct -DNATIVE_WIN32" unless gdkx
- elsif /mswin32/ !~ PLATFORM
+ elsif /mswin32/ !~ RUBY_PLATFORM
lib_ary = [ ["X11", "XOpenDisplay"],
["Xext", "XShmQueryVersion"],
["Xi", "XOpenDevice"],
@@ -94,7 +94,7 @@ begin
item.gsub(/\.c$/, obj_ext)
end
- if /mswin32/ =~ PLATFORM
+ if /mswin32/ =~ RUBY_PLATFORM
$objs << "rbgdkkeysyms.lib"
else
$objs << "librbgdkkeysyms.a"
@@ -104,7 +104,7 @@ begin
raise Interrupt if not FileTest.exist? "Makefile"
mfile = File.open("Makefile", "a")
- if /mswin32/ =~ PLATFORM
+ if /mswin32/ =~ RUBY_PLATFORM
mfile.puts " copy /Y gtk.lib .."
mfile.puts
end
@@ -115,7 +115,7 @@ begin
mfile.print "rbgdkconst#{obj_ext}: rbgdkconst.c rbgdkcursors.h\n"
mfile.print "rbgdk#{obj_ext}: rbgdk.c global.h\n"
- if /mswin32/ =~ PLATFORM
+ if /mswin32/ =~ RUBY_PLATFORM
mfile.print "\
rbgdkkeysyms.lib: makedefconst.rb rbgdkkeysyms.h
$(RUBY) makedefconst.rb rbgdkkeysyms.h Init_gtk_gdkkeysyms
@@ -144,7 +144,7 @@ allclean: clean
Dir.chdir ".."
mfile = File.open("Makefile", "w")
- if /mswin32/ =~ PLATFORM
+ if /mswin32/ =~ RUBY_PLATFORM
mfile.print "\
all: