1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

Add ruby-gdk_pixbuf, a Ruby binding for Gdkpixbuf.

This commit is contained in:
Akinori MUSHA 2001-02-28 12:58:23 +00:00
parent 4fb7bb6be4
commit 6b7854c088
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38889
11 changed files with 207 additions and 0 deletions

View File

@ -177,6 +177,7 @@
SUBDIR += rayshade
SUBDIR += ruby-gd
SUBDIR += ruby-gdk_imlib
SUBDIR += ruby-gdk_pixbuf
SUBDIR += ruby-libpng
SUBDIR += ruby-ming
SUBDIR += ruby-opengl

View File

@ -0,0 +1,47 @@
# New ports collection makefile for: ruby-gdk_pixbuf
# Date created: 28 February 2001
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= gdk_pixbuf
PORTVERSION= ${RUBY_GNOME_PORTVERSION}
CATEGORIES= graphics ruby
MASTER_SITES= ${RUBY_GNOME_MASTER_SITES}
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
DISTNAME= ${RUBY_GNOME_DISTNAME}
DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
LIB_DEPENDS= gdk_pixbuf.2:${PORTSDIR}/graphics/gdk-pixbuf
RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/gtk.so:${PORTSDIR}/x11-toolkits/ruby-gtk
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
USE_XLIB= yes
USE_GLIB= yes
.include "${.CURDIR}/../../x11/ruby-gnome/Makefile.common"
WRKSRC= ${RUBY_GNOME_WRKSRC}/${PORTNAME}
INSTALL_TARGET= site-install
CONFIGURE_ARGS= --with-glib-config="${GLIB_CONFIG}"
DOCS_EN= ChangeLog README
post-extract:
${MV} ${WRKSRC:S/gdk_pixbuf$/gdkpixbuf/} ${WRKSRC}
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_EXAMPLESDIR}/${PORTNAME}
${CP} -R ${WRKSRC}/sample/* ${RUBY_EXAMPLESDIR}/${PORTNAME}/
${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}
.for f in ${DOCS_EN}
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/
.endfor
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,42 @@
--- extconf.rb.orig Fri Mar 31 06:21:47 2000
+++ extconf.rb Wed Feb 28 21:18:34 2001
@@ -1,26 +1,25 @@
require 'mkmf'
-rubygtk_dir = "../gtk"
-rubygtk_dir = ARGV[0] if ARGV[0]
+glib_config = with_config("glib-config", "glib-config")
+gdk_pixbuf_config = with_config("gdk-pixbuf-config", "gdk-pixbuf-config")
+
+while /^--/ =~ ARGV[0]
+ ARGV.shift
+end
+
+rubygtk_dir = ARGV.shift || "../gtk"
unless FileTest.exist?(rubygtk_dir)
raise "directry #{rubygtk_dir} not found. Please specify Ruby/Gtk source dir."
end
-gtklib_dir = []
-`gtk-config --libs`.split(' ').each do |e|
- if e=~ /^-L/ then
- gtklib_dir.push(e)
- end
-end
-$CFLAGS = "-I#{rubygtk_dir}/src " + `gdk-pixbuf-config --cflags`.chomp
-$LDFLAGS = `gdk-pixbuf-config --libs`.chomp
+$CFLAGS += "-I#{rubygtk_dir}/src " + `#{glib_config} --cflags`.chomp + ' ' + `#{gdk_pixbuf_config} --cflags`.chomp
+$LDFLAGS += `#{glib_config} --libs`.chomp + ' ' + `#{gdk_pixbuf_config} --libs`.chomp
have_library("X11", "XOpenDisplay") &&
have_library("Xi", "XOpenDevice") &&
have_library("Xext", "XextFindDisplay") &&
have_library("Xmu", "XmuInternAtom") &&
-have_library("glib", "g_print") &&
-have_library("gdk", "gdk_init") &&
-have_library("gdk_pixbuf", "gdk_pixbuf_new") &&
-
+have_func("g_print") &&
+have_func("gdk_init") &&
+have_func("gdk_pixbuf_new") &&
create_makefile('gdk_pixbuf')

View File

@ -0,0 +1 @@
Ruby binding for Gdkpixbuf

View File

@ -0,0 +1,4 @@
Ruby/Gdkpixbuf is a Ruby binding for Gdkpixbuf.
Author: Hiroshi Igarashi <igarashi@ueda.info.waseda.ac.jp>
WWW: http://www.ruby-lang.org/gtk/en/

View File

@ -0,0 +1,9 @@
%%RUBY_SITEARCHLIBDIR%%/gdk_pixbuf.so
%%RUBY_SITELIBDIR%%/gdk_pixbuf.rb
%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/gdk_pixbuf/scale.rb
%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/gdk_pixbuf/test.rb
%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/gdk_pixbuf/to_drawable.rb
%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/gdk_pixbuf
%%PORTDOCS%%%%RUBY_DOCDIR%%/gdk_pixbuf/ChangeLog
%%PORTDOCS%%%%RUBY_DOCDIR%%/gdk_pixbuf/README
%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/gdk_pixbuf

View File

@ -0,0 +1,47 @@
# New ports collection makefile for: ruby-gdk_pixbuf
# Date created: 28 February 2001
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= gdk_pixbuf
PORTVERSION= ${RUBY_GNOME_PORTVERSION}
CATEGORIES= graphics ruby
MASTER_SITES= ${RUBY_GNOME_MASTER_SITES}
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
DISTNAME= ${RUBY_GNOME_DISTNAME}
DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
LIB_DEPENDS= gdk_pixbuf.2:${PORTSDIR}/graphics/gdk-pixbuf
RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/gtk.so:${PORTSDIR}/x11-toolkits/ruby-gtk
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
USE_XLIB= yes
USE_GLIB= yes
.include "${.CURDIR}/../../x11/ruby-gnome/Makefile.common"
WRKSRC= ${RUBY_GNOME_WRKSRC}/${PORTNAME}
INSTALL_TARGET= site-install
CONFIGURE_ARGS= --with-glib-config="${GLIB_CONFIG}"
DOCS_EN= ChangeLog README
post-extract:
${MV} ${WRKSRC:S/gdk_pixbuf$/gdkpixbuf/} ${WRKSRC}
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_EXAMPLESDIR}/${PORTNAME}
${CP} -R ${WRKSRC}/sample/* ${RUBY_EXAMPLESDIR}/${PORTNAME}/
${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}
.for f in ${DOCS_EN}
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/
.endfor
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,42 @@
--- extconf.rb.orig Fri Mar 31 06:21:47 2000
+++ extconf.rb Wed Feb 28 21:18:34 2001
@@ -1,26 +1,25 @@
require 'mkmf'
-rubygtk_dir = "../gtk"
-rubygtk_dir = ARGV[0] if ARGV[0]
+glib_config = with_config("glib-config", "glib-config")
+gdk_pixbuf_config = with_config("gdk-pixbuf-config", "gdk-pixbuf-config")
+
+while /^--/ =~ ARGV[0]
+ ARGV.shift
+end
+
+rubygtk_dir = ARGV.shift || "../gtk"
unless FileTest.exist?(rubygtk_dir)
raise "directry #{rubygtk_dir} not found. Please specify Ruby/Gtk source dir."
end
-gtklib_dir = []
-`gtk-config --libs`.split(' ').each do |e|
- if e=~ /^-L/ then
- gtklib_dir.push(e)
- end
-end
-$CFLAGS = "-I#{rubygtk_dir}/src " + `gdk-pixbuf-config --cflags`.chomp
-$LDFLAGS = `gdk-pixbuf-config --libs`.chomp
+$CFLAGS += "-I#{rubygtk_dir}/src " + `#{glib_config} --cflags`.chomp + ' ' + `#{gdk_pixbuf_config} --cflags`.chomp
+$LDFLAGS += `#{glib_config} --libs`.chomp + ' ' + `#{gdk_pixbuf_config} --libs`.chomp
have_library("X11", "XOpenDisplay") &&
have_library("Xi", "XOpenDevice") &&
have_library("Xext", "XextFindDisplay") &&
have_library("Xmu", "XmuInternAtom") &&
-have_library("glib", "g_print") &&
-have_library("gdk", "gdk_init") &&
-have_library("gdk_pixbuf", "gdk_pixbuf_new") &&
-
+have_func("g_print") &&
+have_func("gdk_init") &&
+have_func("gdk_pixbuf_new") &&
create_makefile('gdk_pixbuf')

View File

@ -0,0 +1 @@
Ruby binding for Gdkpixbuf

View File

@ -0,0 +1,4 @@
Ruby/Gdkpixbuf is a Ruby binding for Gdkpixbuf.
Author: Hiroshi Igarashi <igarashi@ueda.info.waseda.ac.jp>
WWW: http://www.ruby-lang.org/gtk/en/

View File

@ -0,0 +1,9 @@
%%RUBY_SITEARCHLIBDIR%%/gdk_pixbuf.so
%%RUBY_SITELIBDIR%%/gdk_pixbuf.rb
%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/gdk_pixbuf/scale.rb
%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/gdk_pixbuf/test.rb
%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/gdk_pixbuf/to_drawable.rb
%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/gdk_pixbuf
%%PORTDOCS%%%%RUBY_DOCDIR%%/gdk_pixbuf/ChangeLog
%%PORTDOCS%%%%RUBY_DOCDIR%%/gdk_pixbuf/README
%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/gdk_pixbuf