From c21ac719e289817586cae4c52260c4e5ae546573 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Sat, 16 Apr 2005 16:59:36 +0000 Subject: [PATCH] Initial import of x11rec. x11rec is a very ad hoc X11 recorder which create a movie. --- x11rec/DESCR | 4 ++++ x11rec/Makefile | 37 ++++++++++++++++++++++++++++++++++++ x11rec/PLIST | 5 +++++ x11rec/distinfo | 6 ++++++ x11rec/patches/patch-aa | 42 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 x11rec/DESCR create mode 100644 x11rec/Makefile create mode 100644 x11rec/PLIST create mode 100644 x11rec/distinfo create mode 100644 x11rec/patches/patch-aa diff --git a/x11rec/DESCR b/x11rec/DESCR new file mode 100644 index 0000000000..7a442e21b1 --- /dev/null +++ b/x11rec/DESCR @@ -0,0 +1,4 @@ +x11rec is a very ad hoc X11 recorder which creates a movie. +x11rec sequentially runs xwd to capture a sequence of window images and finally +creates a movie file in an MNG or animated GIF format with ImageMagick and +Gifsicle. diff --git a/x11rec/Makefile b/x11rec/Makefile new file mode 100644 index 0000000000..03fcdc96ac --- /dev/null +++ b/x11rec/Makefile @@ -0,0 +1,37 @@ +# $NetBSD: Makefile,v 1.1.1.1 2005/04/16 16:59:36 obache Exp $ +# + +DISTNAME= x11rec-0.3 +CATEGORIES= graphics ruby +MASTER_SITES= http://namazu.org/~satoru/x11rec/ + +MAINTAINER= obata@lins.jp +HOMEPAGE= http://namazu.org/~satoru/x11rec/ +COMMENT= Very ad hoc X11 recorder which create a movie + +USE_X11= yes +NO_BUILD= yes + +DEPENDS+= gifsicle-[0-9]*:../../graphics/gifsicle + +REPLACE_RUBY= x11rec + +INSTALLATION_DIRS= share/doc/html/x11rec + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/x11rec ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/x11rec-en.html ${PREFIX}/share/doc/html/x11rec/index.html.en + ${INSTALL_DATA} ${WRKSRC}/x11rec-ja.html ${PREFIX}/share/doc/html/x11rec/index.html.ja + +.include "../../graphics/ImageMagick/buildlink3.mk" +.include "../../lang/ruby/modules.mk" + +SUBST_CLASSES+= toolpath +SUBST_STAGE.toolpath= pre-configure +SUBST_FILES.toolpath= x11rec +SUBST_SED.toolpath= -e "s|@xwininfo@|${X11BASE}/bin/xwininfo|" \ + -e "s|@xwd@|${X11BASE}/bin/xwd|" \ + -e "s|@convert@|${BUILDLINK_PREFIX.ImageMagick}/bin/convert|" \ + -e "s|@gifsicle@|${PREFIX}/bin/gifsicle|" + +.include "../../mk/bsd.pkg.mk" diff --git a/x11rec/PLIST b/x11rec/PLIST new file mode 100644 index 0000000000..665afe3eb3 --- /dev/null +++ b/x11rec/PLIST @@ -0,0 +1,5 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2005/04/16 16:59:36 obache Exp $ +bin/x11rec +share/doc/html/x11rec/index.html.en +share/doc/html/x11rec/index.html.ja +@dirrm share/doc/html/x11rec diff --git a/x11rec/distinfo b/x11rec/distinfo new file mode 100644 index 0000000000..7d4a5c01e7 --- /dev/null +++ b/x11rec/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2005/04/16 16:59:36 obache Exp $ + +SHA1 (ruby/x11rec-0.3.tar.gz) = c8f9d5ac9f80424c59adc3eba9fc333d90665e25 +RMD160 (ruby/x11rec-0.3.tar.gz) = f942af6462cda842dc96089680f4a1a10ddaa255 +Size (ruby/x11rec-0.3.tar.gz) = 3758 bytes +SHA1 (patch-aa) = 4ac6fbb5613ed346e8bae054c8638fc13f718a1f diff --git a/x11rec/patches/patch-aa b/x11rec/patches/patch-aa new file mode 100644 index 0000000000..b4abe1fdb3 --- /dev/null +++ b/x11rec/patches/patch-aa @@ -0,0 +1,42 @@ +$NetBSD: patch-aa,v 1.1.1.1 2005/04/16 16:59:36 obache Exp $ + +--- x11rec.orig 2001-06-08 04:13:02.000000000 +0900 ++++ x11rec +@@ -40,7 +40,7 @@ class Xrecorder + + def target + $stderr.puts "** Select an X window with a mouse. **" +- IO.popen("xwininfo").each do |line| ++ IO.popen("@xwininfo@").each do |line| + if /id: (\S+)/ =~ line then + @id = $1 + end +@@ -54,7 +54,7 @@ class Xrecorder + while true + tmp1 = sprintf "%s.1.%06d", @tmpprefix, @frames # may be broken. + tmp2 = sprintf "%s.2.%06d", @tmpprefix, @frames # safe to use. +- system "xwd -silent -id #{@id} > #{tmp1}" ++ system "@xwd@ -silent -id #{@id} > #{tmp1}" + File.rename tmp1, tmp2 + @frames += 1 + printf "frames: %d\r", @frames +@@ -73,16 +73,16 @@ class Xrecorder + files.each_with_index do |file, i| + $stderr.printf "converting each xwd file into a gif file: %d/%d\r", + i + 1, files.length +- system "convert #{file} #{file}.gif" ++ system "@convert@ #{file} #{file}.gif" + end + puts + + $stderr.puts "creating the resulting movie file..." +- system "gifsicle --colors 256 -O2 --delay #{delay} #{@tmpprefix}.2.*.gif > #{tmpgif2}" ++ system "@gifsicle@ --colors 256 -O2 --delay #{delay} #{@tmpprefix}.2.*.gif > #{tmpgif2}" + + if /^(.*)\.mng$/ =~ @filename then + # create MNG with ImageMagick if needed. +- system "convert #{tmpgif2} #{@filename}" ++ system "@convert@ #{tmpgif2} #{@filename}" + else + # just rename the temporary file. + File.rename tmpgif2, @filename