Initial import of x11rec.
x11rec is a very ad hoc X11 recorder which create a movie.
This commit is contained in:
parent
d5e81e964b
commit
c21ac719e2
5 changed files with 94 additions and 0 deletions
4
x11rec/DESCR
Normal file
4
x11rec/DESCR
Normal file
|
@ -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.
|
37
x11rec/Makefile
Normal file
37
x11rec/Makefile
Normal file
|
@ -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"
|
5
x11rec/PLIST
Normal file
5
x11rec/PLIST
Normal file
|
@ -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
|
6
x11rec/distinfo
Normal file
6
x11rec/distinfo
Normal file
|
@ -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
|
42
x11rec/patches/patch-aa
Normal file
42
x11rec/patches/patch-aa
Normal file
|
@ -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
|
Loading…
Reference in a new issue