Import FreeBSD's "ruby-gtk" port:

Ruby interface to Gtk+ toolkits
This commit is contained in:
sakamoto 1999-09-17 04:51:37 +00:00
parent 87f8a0414f
commit f9bd5608fc
6 changed files with 116 additions and 0 deletions

54
x11/ruby-gtk/Makefile Normal file
View file

@ -0,0 +1,54 @@
# New ports collection makefile for: ruby-gtk
# Version required: 0.21
# Date created: 19 April 1999
# Whom: Yasuhiro Fukuma <yasuf@big.or.jp>
#
# $FreeBSD: ports/x11-toolkits/ruby-gtk/Makefile,v 1.3 1999/08/31 02:59:33 peter Exp $
#
DISTNAME= ruby-gtk-0.21
CATEGORIES= x11-toolkits
MASTER_SITES= http://www.ueda.info.waseda.ac.jp/~igarashi/ruby/ \
ftp://ftp.netlab.co.jp/pub/lang/ruby/contrib/ \
ftp://ftp.TokyoNet.AD.JP/pub/misc/ruby/contrib/ \
ftp://ftp.iij.ad.jp/pub/lang/ruby/contrib/ \
ftp://blade.nagaokaut.ac.jp/pub/lang/ruby/contrib/ \
ftp://ftp.krnet.ne.jp/pub/ruby/contrib/ \
ftp://mirror.nucba.ac.jp/mirror/ruby/contrib/
MAINTAINER= yasuf@big.or.jp
BUILD_DEPENDS= ruby:${PORTSDIR}/lang/ruby
RUN_DEPENDS= ruby:${PORTSDIR}/lang/ruby
LIB_DEPENDS= gtk12.2:${PORTSDIR}/x11-toolkits/gtk12
USE_XLIB= yes
WRKSRC= ${WRKDIR}/gtk
PLIST_SUB+= RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"
RUBY= ${PREFIX}/bin/ruby
RUBY_VER= 1.4
RUBY_ARCH= ${ARCH}-freebsd${OSREL}
.if defined(NO_IMLIB)
GTK_CONFIG?= ${X11BASE}/bin/gtk12-config
.else
LIB_DEPENDS+= Imlib.4:${PORTSDIR}/graphics/imlib
GTK_CONFIG?= ${X11BASE}/bin/imlib-config
.endif
do-configure:
@cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} extconf.rb ${GTK_CONFIG}
post-install:
${INSTALL_DATA} ${WRKSRC}/lib/*.rb ${PREFIX}/lib/ruby/${RUBY_VER}
${MKDIR} ${PREFIX}/share/examples/ruby/gtk
${INSTALL_DATA} ${WRKSRC}/sample/*.rb ${PREFIX}/share/examples/ruby/gtk
${MKDIR} ${PREFIX}/share/examples/ruby/gtk/browser
${INSTALL_DATA} ${WRKSRC}/doc/*.rb ${PREFIX}/share/examples/ruby/gtk/browser
.if !defined(NO_IMLIB)
${MKDIR} ${PREFIX}/share/examples/ruby/gtk/gdkimlib
${INSTALL_DATA} ${WRKSRC}/sample/gdkimlib/*.rb ${PREFIX}/share/examples/ruby/gtk/gdkimlib
.endif
.include <bsd.port.mk>

1
x11/ruby-gtk/files/md5 Normal file
View file

@ -0,0 +1 @@
MD5 (ruby-gtk-0.21.tar.gz) = c93477a649e5982379fcba756ab8825c

View file

@ -0,0 +1,36 @@
--- extconf.rb.orig Sat Aug 7 02:57:08 1999
+++ extconf.rb Wed Aug 25 08:44:11 1999
@@ -8,22 +8,26 @@
# detect GTK+ (and Imlib) configurations
#
if /mswin32/ !~ PLATFORM
- config_cmds = [
- ["imlib-config", "--libs-gdk", "--cflags-gdk"],
- ["gtk-config", "--libs", "--cflags"],
- ]
+ config_cmds = ["imlib-config", "gtk-config"]
if ARGV.size > 0
- config_cmds.unshift([ARGV[0], "--libs", "--cflags"])
+ config_cmds.unshift(ARGV[0])
end
begin
- config_cmds.each do |config_cmd, config_libs, config_cflags|
+ config_cmds.each do |config_cmd|
version = `#{config_cmd} --version`
if not version.chomp.empty?
+ if /^imlib/ === File.basename(config_cmd)
+ with_imlib = true
+ config_libs, config_cflags = "--libs-gdk", "--cflags-gdk"
+ else
+ with_imlib = false
+ config_libs, config_cflags = "--libs", "--cflags"
+ end
$LDFLAGS, *libs = `#{config_cmd} #{config_libs}`.chomp.split(/(-l.*)/)
$libs = libs.join(' ') + ' ' + $libs
$CFLAGS = `#{config_cmd} #{config_cflags}`.chomp
- if /^imlib/ === config_cmd
+ if with_imlib
$CFLAGS = $CFLAGS + " -DHAVE_GDKIMLIB"
STDERR.puts("Imlib support enabled.")
end

1
x11/ruby-gtk/pkg/COMMENT Normal file
View file

@ -0,0 +1 @@
Ruby interface to Gtk+ toolkits

6
x11/ruby-gtk/pkg/DESCR Normal file
View file

@ -0,0 +1,6 @@
Ruby extension module to use Gtk+.
WWW: http://www.ueda.info.waseda.ac.jp/~igarashi/ruby/gtk.html
- Yasuhiro Fukuma
yasuf@big.or.jp

18
x11/ruby-gtk/pkg/PLIST Normal file
View file

@ -0,0 +1,18 @@
lib/ruby/%%RUBY_VER%%/%%RUBY_ARCH%%/gtk.so
lib/ruby/%%RUBY_VER%%/gtkcompat.rb
share/examples/ruby/gtk/drawing.rb
share/examples/ruby/gtk/helloworld.rb
share/examples/ruby/gtk/text.rb
share/examples/ruby/gtk/texthook.rb
share/examples/ruby/gtk/browser/gtkbrows.rb
share/examples/ruby/gtk/browser/rbbr_gtk.rb
share/examples/ruby/gtk/browser/rbbr_rb.rb
share/examples/ruby/gtk/browser/rbdump.rb
@dirrm share/examples/ruby/gtk/browser
share/examples/ruby/gtk/gdkimlib/sample1.rb
share/examples/ruby/gtk/gdkimlib/sample2.rb
share/examples/ruby/gtk/gdkimlib/sample3.rb
share/examples/ruby/gtk/gdkimlib/sample4.rb
share/examples/ruby/gtk/gdkimlib/sample5.rb
@dirrm share/examples/ruby/gtk/gdkimlib
@dirrm share/examples/ruby/gtk