tovid-0.33/0000755000175100017510000000000011374664177011234 5ustar ericerictovid-0.33/missing0000755000175100017510000002517010747247207012632 0ustar ericeric#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-02-08.22 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: tovid-0.33/configure0000755000175100017510000033204311372444353013136 0ustar ericeric#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for tovid svn. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='tovid' PACKAGE_TARNAME='tovid' PACKAGE_VERSION='svn' PACKAGE_STRING='tovid svn' PACKAGE_BUGREPORT='' ac_unique_file="src/tovid" ac_subst_vars='LN_S LTLIBOBJS LIBOBJS pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON TXT2TAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures tovid svn to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/tovid] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of tovid svn:";; esac cat <<\_ACEOF _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tovid configure svn generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tovid $as_me svn, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Require minimum versions of the autotools am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='tovid' VERSION='svn' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # ****************************************************************************** # ****************************************************************************** # # # CHECK FOR DEPENDENCIES # # # ****************************************************************************** # ****************************************************************************** # The only 'compile time' dependency we have is txt2tags, which is used to # build the man pages. # Extract the first word of "txt2tags", so it can be a program name with args. set dummy txt2tags; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_TXT2TAGS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$TXT2TAGS"; then ac_cv_prog_TXT2TAGS="$TXT2TAGS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_TXT2TAGS=":" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_TXT2TAGS" && ac_cv_prog_TXT2TAGS="false" fi fi TXT2TAGS=$ac_cv_prog_TXT2TAGS if test -n "$TXT2TAGS"; then { $as_echo "$as_me:$LINENO: result: $TXT2TAGS" >&5 $as_echo "$TXT2TAGS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if ! $TXT2TAGS; then { { $as_echo "$as_me:$LINENO: error: ERROR: txt2tags cannot be found on your system, but tovid needs it to build the man pages. Please install txt2tags (http://txt2tags.sf.net) and run ./configure again. Thanks! -- http://tovid.wikia.com " >&5 $as_echo "$as_me: error: ERROR: txt2tags cannot be found on your system, but tovid needs it to build the man pages. Please install txt2tags (http://txt2tags.sf.net) and run ./configure again. Thanks! -- http://tovid.wikia.com " >&2;} { (exit 1); exit 1; }; } fi # All run-time dependencies are checked in tovid-init now. In addition to being # the Correct Way to do things, it makes packaging much easier for deb|rpm|??? # maintainers. # ****************************************************************************** # Python # ****************************************************************************** # As seen on http://sources.redhat.com/automake/automake.html#Python # AM_PATH_PYTHON sets many vars, including $(pythondir), which is the directory # name for the site-packages subdirectory of the standard Python install tree; # and $(pyexecdir), which is the directory where Python extension modules # (shared libraries) should be installed. # For example, on friedrij's woody debian system # $(pythondir) = ${prefix}/lib/python2.3/site-packages # $(pyexecdir) = ${exec_prefix}/lib/python2.3/site-packages # From the autoconf manual, available in anything _but_ html (uf, fsf) from # http://www.gnu.org/software/autoconf/manual/index.html # $(prefix) is "The common installation prefix for all files. If $(exec_prefix) # is defined to a different value, prefix is used only for architecture- # independent files." # $(exec_prefix) is "The installation prefix for architecture-dependent files. # By default it's the same as $(prefix). You should avoid installing anything # directly to $(exec_prefix). However, the default value for directories # containing architecture-dependent files should be relative to $(exec_prefix)." # The GNU Coding Standards, available in html (yosh) from # (http://www.gnu.org/prep/standards/standards.html#Directory-Variables), # clarifies the difference between $(prefix) and $(exec_prefix): "Generally, # $(exec_prefix) is used for directories that contain machine-specific files # (such as executables and subroutine libraries), while $(prefix) is used # directly for other directories." # So, this dev thinks we need $(pythondir) and some 'enlightened' python # scripts, as pointed out by # http://sources.redhat.com/automake/automake.html#Hard_002dCoded-Install-Paths # If you do [use $(pythondir) or $(pyexecdir)], then: # * root users can install your package with the same --prefix as Python (you # get the behavior of the previous attempt - eg /usr/lib/python-2.3/...) # * non-root users can install your package too, they will have the extension # module in a place that is not searched by Python but they can work around # this using environment variables (and if you installed scripts that use # this shared library, it's easy to tell Python were to look in the # beginning of your script, so the script works in both cases). # Using pythondir_PYTHON for libtovid will install it to # ${prefix}/lib/python2.3/site-packages (for example) # and the pytovid suite (left as bin_SCRIPTS, so that they are installed as # executables and not byte-compiled like python_PYTHON would do) will need to be # told how to look for libtovid. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5 $as_echo_n "checking whether $PYTHON version >= 2.4... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { { $as_echo "$as_me:$LINENO: error: too old" >&5 $as_echo "$as_me: error: too old" >&2;} { (exit 1); exit 1; }; } fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.4" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.4... " >&6; } if test "${am_cv_pathless_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then break fi done fi { $as_echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 $as_echo "$as_me: error: no suitable Python interpreter found" >&2;} { (exit 1); exit 1; }; } else { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if test "${am_cv_python_version+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if test "${am_cv_python_platform+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if test "${am_cv_python_pythondir+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi # Attempt to inform user that their pyton installation won't work # with the default prefix (/usr/local) USER_PYTHON_PATH=$(python -c "import sys; print sys.path") PYTHON_LOCAL=$(echo $USER_PYTHON_PATH | awk -F ',' '{ for (f=1; f<=NF; f++) {print $f}; }' | grep local | tr -d "' ") if test -z $PYTHON_LOCAL && test x"$prefix" == "xNONE"; then { { $as_echo "$as_me:$LINENO: error: ERROR: It looks like your python installation doesn't look in /usr/local for python modules. tovid installs a few modules on your system, and if python can't find them, then tovid won't work! Please try: ./configure --prefix=/usr to install tovid in a place where python will look for modules. Thanks! -- http://tovid.wikia.com " >&5 $as_echo "$as_me: error: ERROR: It looks like your python installation doesn't look in /usr/local for python modules. tovid installs a few modules on your system, and if python can't find them, then tovid won't work! Please try: ./configure --prefix=/usr to install tovid in a place where python will look for modules. Thanks! -- http://tovid.wikia.com " >&2;} { (exit 1); exit 1; }; } fi # Check to see if this is a svn checkout and set version to revision number if test "$PACKAGE_VERSION" = "svn" && test -e bootstrap; then VERSION="svn-r$(svn info bootstrap | grep Revision | awk '{print $2}')" fi ac_config_files="$ac_config_files Makefile src/tovid-init" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by tovid $as_me svn, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ tovid config.status svn configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/tovid-init") CONFIG_FILES="$CONFIG_FILES src/tovid-init" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # Enable symbolic links for automake { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # ****************************************************************************** # ****************************************************************************** # # PRETTY SUMMARY # # ****************************************************************************** # ****************************************************************************** # Works for all distros INSTALL_COMMAND="su -c \"make install\"" # but *buntu users are used to if $(cat /proc/version | grep -iq buntu); then INSTALL_COMMAND="sudo make install" fi { $as_echo "$as_me:$LINENO: You may now type '$INSTALL_COMMAND' to compile and install tovid. (or you can try to 'make sense' of it all...) " >&5 $as_echo "$as_me: You may now type '$INSTALL_COMMAND' to compile and install tovid. (or you can try to 'make sense' of it all...) " >&6;} tovid-0.33/Makefile0000644000175100017510000013234111372444355012670 0ustar ericeric# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Process this file with automake to produce a Makefile.in # Project homepage: http://tovid.wikia.com # # # Copyright (C) 2005 tovid # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Or see: # # http://www.gnu.org/licenses/gpl.txt pkgdatadir = $(datadir)/tovid pkgincludedir = $(includedir)/tovid pkglibdir = $(libdir)/tovid pkglibexecdir = $(libexecdir)/tovid am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_app_DATA) \ $(dist_icon128_DATA) $(dist_icon32_DATA) $(dist_icon48_DATA) \ $(dist_icon64_DATA) $(dist_iconSVG_DATA) \ $(pythonBACKEND_PYTHON) $(pythonGUIS_PYTHON) \ $(pythonLIBTOVID_PYTHON) $(pythonMETAGUI_PYTHON) \ $(pythonRENDER_PYTHON) $(pythonTEMPLATE_PYTHON) \ $(pythonUTIL_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure \ $(top_srcdir)/src/tovid-init.in AUTHORS COPYING ChangeLog \ INSTALL NEWS install-sh missing py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = src/tovid-init CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(pythonBACKENDdir)" "$(DESTDIR)$(pythonGUISdir)" \ "$(DESTDIR)$(pythonLIBTOVIDdir)" \ "$(DESTDIR)$(pythonMETAGUIdir)" "$(DESTDIR)$(pythonRENDERdir)" \ "$(DESTDIR)$(pythonTEMPLATEdir)" "$(DESTDIR)$(pythonUTILdir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdir)" \ "$(DESTDIR)$(icon128dir)" "$(DESTDIR)$(icon32dir)" \ "$(DESTDIR)$(icon48dir)" "$(DESTDIR)$(icon64dir)" \ "$(DESTDIR)$(iconSVGdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = py_compile = $(top_srcdir)/py-compile man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DATA = $(dist_app_DATA) $(dist_icon128_DATA) $(dist_icon32_DATA) \ $(dist_icon48_DATA) $(dist_icon64_DATA) $(dist_iconSVG_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = ${SHELL} /home/eric/tovid/tovid/missing --run aclocal-1.11 AMTAR = ${SHELL} /home/eric/tovid/tovid/missing --run tar AUTOCONF = ${SHELL} /home/eric/tovid/tovid/missing --run autoconf AUTOHEADER = ${SHELL} /home/eric/tovid/tovid/missing --run autoheader AUTOMAKE = ${SHELL} /home/eric/tovid/tovid/missing --run automake-1.11 AWK = gawk CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"tovid\" -DPACKAGE_TARNAME=\"tovid\" -DPACKAGE_VERSION=\"svn\" -DPACKAGE_STRING=\"tovid\ svn\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"tovid\" -DVERSION=\"svn\" ECHO_C = ECHO_N = -n ECHO_T = INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LIBOBJS = LIBS = LN_S = LTLIBOBJS = MAKEINFO = ${SHELL} /home/eric/tovid/tovid/missing --run makeinfo MKDIR_P = /bin/mkdir -p PACKAGE = tovid PACKAGE_BUGREPORT = PACKAGE_NAME = tovid PACKAGE_STRING = tovid svn PACKAGE_TARNAME = tovid PACKAGE_VERSION = svn PATH_SEPARATOR = : PYTHON = /usr/bin/python PYTHON_EXEC_PREFIX = ${exec_prefix} PYTHON_PLATFORM = linux2 PYTHON_PREFIX = ${prefix} PYTHON_VERSION = 2.6 SET_MAKE = SHELL = /bin/sh STRIP = TXT2TAGS = : VERSION = svn-r3022 abs_builddir = /home/eric/tovid/tovid abs_srcdir = /home/eric/tovid/tovid abs_top_builddir = /home/eric/tovid/tovid abs_top_srcdir = /home/eric/tovid/tovid am__leading_dot = . am__tar = ${AMTAR} chof - "$$tardir" am__untar = ${AMTAR} xf - # Override the default bindir, so the tovid executables are # installed to e.g. /usr/share/tovid/bin # FIXME: This is probably not the correct way to do it bindir = $(libdir)/tovid build_alias = builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} host_alias = htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /home/eric/tovid/tovid/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = /bin/mkdir -p oldincludedir = /usr/include pdfdir = ${docdir} pkgpyexecdir = ${pyexecdir}/tovid pkgpythondir = ${pythondir}/tovid prefix = /usr program_transform_name = s,x,x, psdir = ${docdir} pyexecdir = ${exec_prefix}/lib64/python2.6/site-packages pythondir = ${prefix}/lib64/python2.6/site-packages sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com srcdir = . sysconfdir = ${prefix}/etc target_alias = top_build_prefix = top_builddir = . top_srcdir = . # List the source files for each shell script sh_bin = \ src/idvid \ src/makedvd \ src/makemenu \ src/makevcd \ src/makexml \ src/postproc \ src/todisc \ src/todisc-fade-routine \ src/makempg \ src/tovid-batch \ src/tovid-init \ src/tovid-interactive \ src/make_titlesets # List the source files for each python script py_bin = \ src/tovid \ src/todiscgui \ src/tovid-stats \ src/titleset-wizard # Specify the scripts to make and install. # The .gif is here because I can't be arsed to figure out the # Autohell way of doing it bin_SCRIPTS = \ $(sh_bin) \ $(py_bin) \ icons/tovid.gif # The manpages man_dir = docs/man man_src_dir = docs/src/en man_MANS = \ $(man_dir)/tovid.1 src_MANS = \ $(man_src_dir)/tovid.t2t # Shared data: icons and .desktop files # Icons -- freedesktop.org scheme icon_top_dir = icons/hicolor icon_svg_dir = scalable/apps icon_128_dir = 128x128/apps icon_64_dir = 64x64/apps icon_48_dir = 48x48/apps icon_32_dir = 32x32/apps # Install directories, $(datadir) == $(prefix)/share icon_base_dir = $(datadir)/$(icon_top_dir) icon128dir = $(icon_base_dir)/$(icon_128_dir) icon64dir = $(icon_base_dir)/$(icon_64_dir) icon48dir = $(icon_base_dir)/$(icon_48_dir) icon32dir = $(icon_base_dir)/$(icon_32_dir) iconSVGdir = $(icon_base_dir)/$(icon_svg_dir) appdir = $(datadir)/applications # Distribute the data dist_icon128_DATA = $(icon_top_dir)/$(icon_128_dir)/tovid.png dist_icon64_DATA = $(icon_top_dir)/$(icon_64_dir)/tovid.png dist_icon48_DATA = $(icon_top_dir)/$(icon_48_dir)/tovid.png dist_icon32_DATA = $(icon_top_dir)/$(icon_32_dir)/tovid.png dist_iconSVG_DATA = $(icon_top_dir)/$(icon_svg_dir)/cd.svg \ $(icon_top_dir)/$(icon_svg_dir)/disc.svg \ $(icon_top_dir)/$(icon_svg_dir)/tovid.svg dist_app_DATA = \ tovidgui.desktop # Distribute the scripts and manpage source files # manpages are made and packaged in the dist-hook for tarball users which # prevents them from having to install txt2tags to make the mans, thus # they aren't listed here. # NOTE: this is a bit of a hack. When 'make dist' is called, make puts # the manpage source in the pre-tarball directory. After everything is # finished, the dist-hook comes into play and fresh man pages are made. # We're taking advangtage of this order (make will _always_ do the hook # after the action, that's why it's a 'hook'!) to ensure that the derived # .1 manpages are newer than the .t2t source files. If the man sources are # removed from the distributed tarball, make will try to remake the .1 pages # since it always executes rules for targets without prerequisites, # thinking that it's a rule like clean: . EXTRA_DIST = \ $(bin_SCRIPTS) \ $(src_MANS) \ SENSE \ setup.py # Shared python libraries: libtovid and the gui # See lengthy comments in configure.ac # $(pythondir) is the "The directory name for the site-packages subdirectory # of the standard Python install tree." and is generated by configure.ac's # AM_PATH_PYTHON. Typically, this points to # $(prefix)/lib/pythonM.m/site-packages # $(prefix) generally defaults to /usr/local for ./configure # and "make install" # Specifying a module to install: use 'python' # 'python' works as a prefix of sorts: if you have files that need to be # installed into separate directories, use another python variable pair. # Say you want to install a python module in $(pythondir)/FOO , then # you'll need to define a pair of variables: # (1) pythonFOO_PYTHON which takes the python source files # (2) pythonFOOdir which points to where the module should be installed # (CAPS are not required, but helps readability) pythonLIBTOVID_PYTHON = libtovid/*.py pythonLIBTOVIDdir = $(pythondir)/libtovid # Submodules pythonGUIS_PYTHON = libtovid/guis/*.py pythonGUISdir = $(pythondir)/libtovid/guis pythonBACKEND_PYTHON = libtovid/backend/*.py pythonBACKENDdir = $(pythondir)/libtovid/backend pythonRENDER_PYTHON = libtovid/render/*.py pythonRENDERdir = $(pythondir)/libtovid/render pythonTEMPLATE_PYTHON = libtovid/template/*.py pythonTEMPLATEdir = $(pythondir)/libtovid/template pythonMETAGUI_PYTHON = libtovid/metagui/*.py pythonMETAGUIdir = $(pythondir)/libtovid/metagui pythonUTIL_PYTHON = libtovid/util/*.py pythonUTILdir = $(pythondir)/libtovid/util all: all-am .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): src/tovid-init: $(top_builddir)/config.status $(top_srcdir)/src/tovid-init.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-pythonBACKENDPYTHON: $(pythonBACKEND_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonBACKENDdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonBACKENDdir)" @list='$(pythonBACKEND_PYTHON)'; dlist=; list2=; test -n "$(pythonBACKENDdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonBACKENDdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonBACKENDdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonBACKENDdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonBACKENDdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonBACKENDPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonBACKEND_PYTHON)'; test -n "$(pythonBACKENDdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonBACKENDdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonBACKENDdir)" && rm -f $$fileso install-pythonGUISPYTHON: $(pythonGUIS_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonGUISdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonGUISdir)" @list='$(pythonGUIS_PYTHON)'; dlist=; list2=; test -n "$(pythonGUISdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonGUISdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonGUISdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonGUISdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonGUISdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonGUISPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonGUIS_PYTHON)'; test -n "$(pythonGUISdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonGUISdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonGUISdir)" && rm -f $$fileso install-pythonLIBTOVIDPYTHON: $(pythonLIBTOVID_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonLIBTOVIDdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonLIBTOVIDdir)" @list='$(pythonLIBTOVID_PYTHON)'; dlist=; list2=; test -n "$(pythonLIBTOVIDdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonLIBTOVIDdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonLIBTOVIDdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonLIBTOVIDdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonLIBTOVIDdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonLIBTOVIDPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonLIBTOVID_PYTHON)'; test -n "$(pythonLIBTOVIDdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonLIBTOVIDdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonLIBTOVIDdir)" && rm -f $$fileso install-pythonMETAGUIPYTHON: $(pythonMETAGUI_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonMETAGUIdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonMETAGUIdir)" @list='$(pythonMETAGUI_PYTHON)'; dlist=; list2=; test -n "$(pythonMETAGUIdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonMETAGUIdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonMETAGUIdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonMETAGUIdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonMETAGUIdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonMETAGUIPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonMETAGUI_PYTHON)'; test -n "$(pythonMETAGUIdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonMETAGUIdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonMETAGUIdir)" && rm -f $$fileso install-pythonRENDERPYTHON: $(pythonRENDER_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonRENDERdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonRENDERdir)" @list='$(pythonRENDER_PYTHON)'; dlist=; list2=; test -n "$(pythonRENDERdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonRENDERdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonRENDERdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonRENDERdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonRENDERdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonRENDERPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonRENDER_PYTHON)'; test -n "$(pythonRENDERdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonRENDERdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonRENDERdir)" && rm -f $$fileso install-pythonTEMPLATEPYTHON: $(pythonTEMPLATE_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonTEMPLATEdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonTEMPLATEdir)" @list='$(pythonTEMPLATE_PYTHON)'; dlist=; list2=; test -n "$(pythonTEMPLATEdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonTEMPLATEdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonTEMPLATEdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonTEMPLATEdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonTEMPLATEdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonTEMPLATEPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonTEMPLATE_PYTHON)'; test -n "$(pythonTEMPLATEdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonTEMPLATEdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonTEMPLATEdir)" && rm -f $$fileso install-pythonUTILPYTHON: $(pythonUTIL_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythonUTILdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonUTILdir)" @list='$(pythonUTIL_PYTHON)'; dlist=; list2=; test -n "$(pythonUTILdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythonUTILdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonUTILdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythonUTILdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythonUTILdir)" $$dlist; \ fi; \ else :; fi uninstall-pythonUTILPYTHON: @$(NORMAL_UNINSTALL) @list='$(pythonUTIL_PYTHON)'; test -n "$(pythonUTILdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pythonUTILdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pythonUTILdir)" && rm -f $$fileso install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-dist_appDATA: $(dist_app_DATA) @$(NORMAL_INSTALL) test -z "$(appdir)" || $(MKDIR_P) "$(DESTDIR)$(appdir)" @list='$(dist_app_DATA)'; test -n "$(appdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appdir)" || exit $$?; \ done uninstall-dist_appDATA: @$(NORMAL_UNINSTALL) @list='$(dist_app_DATA)'; test -n "$(appdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(appdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(appdir)" && rm -f $$files install-dist_icon128DATA: $(dist_icon128_DATA) @$(NORMAL_INSTALL) test -z "$(icon128dir)" || $(MKDIR_P) "$(DESTDIR)$(icon128dir)" @list='$(dist_icon128_DATA)'; test -n "$(icon128dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon128dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icon128dir)" || exit $$?; \ done uninstall-dist_icon128DATA: @$(NORMAL_UNINSTALL) @list='$(dist_icon128_DATA)'; test -n "$(icon128dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icon128dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icon128dir)" && rm -f $$files install-dist_icon32DATA: $(dist_icon32_DATA) @$(NORMAL_INSTALL) test -z "$(icon32dir)" || $(MKDIR_P) "$(DESTDIR)$(icon32dir)" @list='$(dist_icon32_DATA)'; test -n "$(icon32dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon32dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icon32dir)" || exit $$?; \ done uninstall-dist_icon32DATA: @$(NORMAL_UNINSTALL) @list='$(dist_icon32_DATA)'; test -n "$(icon32dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icon32dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icon32dir)" && rm -f $$files install-dist_icon48DATA: $(dist_icon48_DATA) @$(NORMAL_INSTALL) test -z "$(icon48dir)" || $(MKDIR_P) "$(DESTDIR)$(icon48dir)" @list='$(dist_icon48_DATA)'; test -n "$(icon48dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon48dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icon48dir)" || exit $$?; \ done uninstall-dist_icon48DATA: @$(NORMAL_UNINSTALL) @list='$(dist_icon48_DATA)'; test -n "$(icon48dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icon48dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icon48dir)" && rm -f $$files install-dist_icon64DATA: $(dist_icon64_DATA) @$(NORMAL_INSTALL) test -z "$(icon64dir)" || $(MKDIR_P) "$(DESTDIR)$(icon64dir)" @list='$(dist_icon64_DATA)'; test -n "$(icon64dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icon64dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icon64dir)" || exit $$?; \ done uninstall-dist_icon64DATA: @$(NORMAL_UNINSTALL) @list='$(dist_icon64_DATA)'; test -n "$(icon64dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icon64dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icon64dir)" && rm -f $$files install-dist_iconSVGDATA: $(dist_iconSVG_DATA) @$(NORMAL_INSTALL) test -z "$(iconSVGdir)" || $(MKDIR_P) "$(DESTDIR)$(iconSVGdir)" @list='$(dist_iconSVG_DATA)'; test -n "$(iconSVGdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iconSVGdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(iconSVGdir)" || exit $$?; \ done uninstall-dist_iconSVGDATA: @$(NORMAL_UNINSTALL) @list='$(dist_iconSVG_DATA)'; test -n "$(iconSVGdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(iconSVGdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(iconSVGdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythonBACKENDdir)" "$(DESTDIR)$(pythonGUISdir)" "$(DESTDIR)$(pythonLIBTOVIDdir)" "$(DESTDIR)$(pythonMETAGUIdir)" "$(DESTDIR)$(pythonRENDERdir)" "$(DESTDIR)$(pythonTEMPLATEdir)" "$(DESTDIR)$(pythonUTILdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdir)" "$(DESTDIR)$(icon128dir)" "$(DESTDIR)$(icon32dir)" "$(DESTDIR)$(icon48dir)" "$(DESTDIR)$(icon64dir)" "$(DESTDIR)$(iconSVGdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_appDATA install-dist_icon128DATA \ install-dist_icon32DATA install-dist_icon48DATA \ install-dist_icon64DATA install-dist_iconSVGDATA install-man \ install-pythonBACKENDPYTHON install-pythonGUISPYTHON \ install-pythonLIBTOVIDPYTHON install-pythonMETAGUIPYTHON \ install-pythonRENDERPYTHON install-pythonTEMPLATEPYTHON \ install-pythonUTILPYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dist_appDATA \ uninstall-dist_icon128DATA uninstall-dist_icon32DATA \ uninstall-dist_icon48DATA uninstall-dist_icon64DATA \ uninstall-dist_iconSVGDATA uninstall-man \ uninstall-pythonBACKENDPYTHON uninstall-pythonGUISPYTHON \ uninstall-pythonLIBTOVIDPYTHON uninstall-pythonMETAGUIPYTHON \ uninstall-pythonRENDERPYTHON uninstall-pythonTEMPLATEPYTHON \ uninstall-pythonUTILPYTHON @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: all all-am am--refresh check check-am clean clean-generic dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distcleancheck distdir distuninstallcheck \ dvi dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dist_appDATA install-dist_icon128DATA \ install-dist_icon32DATA install-dist_icon48DATA \ install-dist_icon64DATA install-dist_iconSVGDATA install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-pythonBACKENDPYTHON \ install-pythonGUISPYTHON install-pythonLIBTOVIDPYTHON \ install-pythonMETAGUIPYTHON install-pythonRENDERPYTHON \ install-pythonTEMPLATEPYTHON install-pythonUTILPYTHON \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dist_appDATA \ uninstall-dist_icon128DATA uninstall-dist_icon32DATA \ uninstall-dist_icon48DATA uninstall-dist_icon64DATA \ uninstall-dist_iconSVGDATA uninstall-hook uninstall-man \ uninstall-man1 uninstall-pythonBACKENDPYTHON \ uninstall-pythonGUISPYTHON uninstall-pythonLIBTOVIDPYTHON \ uninstall-pythonMETAGUIPYTHON uninstall-pythonRENDERPYTHON \ uninstall-pythonTEMPLATEPYTHON uninstall-pythonUTILPYTHON # Make the manpages for svn users (tarball users' man pages made in dist-hook) # This is a static pattern rule as seen on (TV!) # http://www.gnu.org/software/make/manual/make.html#Static-Pattern $(man_MANS): $(man_dir)/%.1: $(man_src_dir)/%.t2t txt2tags -t man -i "$<" -o "$@" # src/tovid-init not needed b/c ./configure derives it from src/tovid-init.in # make the output directory for the man pages, since t2t won't dist-hook: rm -rvf $(top_distdir)/src/tovid-init mkdir $(top_distdir)/docs/man # Hook to create a symbolic link for the main 'tovid' script # FIXME: $(LN_S) is supposed to work since AC_PROG_LN_S is in configure.ac, # but it doesn't for whatever reason (evaluates to empty string). # For now, using explicit `ln -s` install-exec-hook: rm -fv "$(prefix)/bin/tovid" ln -s "$(DESTDIR)$(bindir)/tovid" "$(prefix)/bin/tovid" # After uninstalling tovid, remove the python module directories uninstall-hook: rmdir $(pythonGUISdir) rmdir $(pythonBACKENDdir) rmdir $(pythonRENDERdir) rmdir $(pythonTEMPLATEdir) rmdir $(pythonMETAGUIdir) rmdir $(pythonUTILdir) rmdir $(pythonLIBTOVIDdir) rm $(prefix)/bin/tovid # A little fun :-) sense: fold -w 78 -s SENSE | less # Allow only the bash scripts to be installed/uninstalled # These were copied and modified from the Makefile after ./configure was # run. A little quantum leaping :-) install-bash: $(sh_bin) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(sh_bin)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-bash: @$(NORMAL_UNINSTALL) @list='$(sh_bin)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tovid-0.33/NEWS0000644000175100017510000000000010747247207011713 0ustar ericerictovid-0.33/aclocal.m40000644000175100017510000007435111372444352013073 0ustar ericeric# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR tovid-0.33/libtovid/0000755000175100017510000000000011374664177013050 5ustar ericerictovid-0.33/libtovid/opts.py0000644000175100017510000001725011316016703014372 0ustar ericeric# opts.py # WARNING: This module is a hack in progress __all__ = [ 'Option', 'Usage', 'parse', 'validate', ] import sys import textwrap from libtovid.odict import Odict from libtovid.util import trim class Option (object): """A command-line-style option, expected argument formatting, default value, and notes on usage and purpose. For example:: debug_opt = Option( 'debug', 'none|some|all', 'some', "Amount of debugging information to display" ) This defines a 'debug' option, along with a human-readable string showing expected argument formatting, a default value, and a string documenting the option's purpose and/or usage information. """ def __init__(self, name, argformat='', default=None, doc='Undocumented option', alias=None, required=False): """Create a new option definition with the given attributes. name Option name argformat String describing format of expected arguments default Default value, if any doc Manual-page-style documentation of the option alias An ('option', 'value') equivalent for this option """ self.name = name self.argformat = argformat self.default = default self.doc = trim(doc) self.alias = alias self.required = required # If an alias was provided, generate documentation. # i.e., alias=('tvsys', 'ntsc') means this option is the same as # giving the 'tvsys' option with 'ntsc' as the argument. if self.alias: self.doc = 'Same as -%s %s.' % alias def num_args(self): """Return the number of arguments expected by this option, or -1 if unlimited. """ # Flag alias for another option if self.alias: return 0 # Boolean: no argument elif isinstance(self.default, bool): return 0 # List: unlimited arguments elif isinstance(self.default, list): return -1 # Unary: one argument else: return 1 def __str__(self): """Return a string containing "usage notes" for this option. """ if self.alias: usage = "-%s: Same as '-%s %s'\n" % \ (self.name, self.alias[0], self.alias[1]) else: usage = "-%s %s " % (self.name, self.argformat) if self.required: usage += "(REQUIRED)\n" else: usage += "(default: %s)\n" % self.default for line in textwrap.wrap(self.doc, 60): usage += ' ' + line + '\n' return usage class Usage (object): """Command-line usage definition.""" def __init__(self, usage_string='program [options]', *options): """Define usage of a command-line program. usage_string Command-line syntax and required options options List of allowed Options Examples:: usage = Usage('pytovid [options] -in FILENAME -out NAME', Option('in', 'FILENAME', None, "Input video file, in any format."), Option('out', 'NAME', None, "Output prefix or name."), Option('format', 'vcd|svcd|dvd|half-dvd|dvd-vcd', 'dvd', "Make video compliant with the specified format") ) print(usage) print(usage.options['format']) """ self.usage_string = usage_string # Odict of options indexed by name names = [opt.name for opt in options] self.options = Odict(names, options) def __str__(self): """Return string-formatted usage notes. """ result = "Usage: %s\n" % self.usage_string result += "Allowed options:\n" option_list = ['-' + opt.name for opt in self.options.values()] result += ', '.join(option_list) return result from copy import copy def parse(args): """Parse a list of arguments and return a dictionary of found options. args: List of command-line arguments (such as from sys.argv) The argument list is interpreted in this way: * If it begins with '-', it's an option * Arguments that precede the first option are ignored * Anything following an option is an argument to that option * If there is no argument to an option, it's a flag (True if present) * If there's one argument to an option, it's a single string value * If there are multiple arguments to an option, it's a list of strings """ args = copy(args) options = {} current = None while len(args) > 0: arg = args.pop(0) # New option if arg.startswith('-'): current = arg.lstrip('-') # Treat it as a flag unless we see arguments later options[current] = True # Argument to current option elif current: # Was a flag, now has a single value if options[current] is True: options[current] = arg # Was a single value, now a list elif type(options[current]) != list: options[current] = [options[current], arg] # Was a list, so append new value else: options[current].append(arg) return options import re def validate(option, arg): """Check whether an argument is valid for a given option. option: An Option to validate arg: Candidate argument Expected/allowed values are inferred from the argformat string. argformat patterns to consider: opta|optb|optc # Either opta, optb, or optc [100-999] # Any integer between 100 and 999 NUM:NUM # Any two integers separated by a colon VAR # A single string (VAR can be any all-caps word) VAR [, VAR] # List of strings (empty) # Boolean; no argument required All very experimental... """ # TODO: Eliminate hackery; find a more robust way of doing this. # Also, pretty inefficient, since regexp matching is done every # time this function is called. # Empty argformat means boolean/no argument expected if option.argformat == '': if arg in [True, False, '']: return True else: return False # Any alphanumeric word (any string) if re.compile('^\w+$').match(option.argformat): if arg.__class__ == str: return True else: return False # Square-bracketed values are ranges, i.e. [1-99] match = re.compile('^\[\d+-\d+\]$').match(option.argformat) if match: # Get min/max by stripping and splitting argformat limits = re.split('-', match.group().strip('[]')) option.min = int(limits[0]) option.max = int(limits[1]) if int(arg) >= option.min and int(arg) <= option.max: return True else: return False # Values separated by | are mutually-exclusive if re.compile('[-\w]+\|[-\w]+').match(option.argformat): if arg in option.argformat.split('|'): return True else: return False # For now, accept any unknown cases return True if __name__ == '__main__': print("Option-parsing demo") print("You passed the following arguments:") print(sys.argv[1:]) print("Parsing...") options = parse(sys.argv[1:]) print("Found the following options:") print(options) tovid-0.33/libtovid/encode.py0000644000175100017510000001263611315716231014647 0ustar ericeric"""Encode video to standard formats, using one of several supported backends. One high-level function is provided:: encode(infile, outfile, format, tvsys, method, ...) where "..." is optional keyword arguments (described below). For example:: encode('/video/foo.avi', '/video/bar.mpg', 'dvd', 'ntsc', 'ffmpeg') This will encode '/video/foo.avi' to NTSC DVD format using ffmpeg, saving the result as '/video/bar.mpg'. The ``format``, ``tvsys``, and ``method`` arguments are optional; if you do:: encode('/video/foo.avi', '/video/bar.mpg') then encoding will be DVD NTSC, using ffmpeg. Keyword arguments may be used to further refine encoding behavior, for example:: encode('foo.avi', 'foo.mpg', 'dvd', 'pal', quality=7, interlace='bottom', ...) The supported keywords may vary by backend, but some keywords are supported by all backends. """ __all__ = [ 'encode', 'get_encoder', ] from libtovid.backend import ffmpeg, mplayer, mpeg2enc from libtovid.media import MediaFile, standard_media, correct_aspect _bitrate_limits = { 'vcd': (1150, 1150), 'kvcd': (400, 4000), 'dvd-vcd': (400, 4000), 'svcd': (900, 2400), 'half-dvd': (600, 6000), 'dvd': (900, 9000) } # -------------------------------------------------------------------------- # # Primary interface # # -------------------------------------------------------------------------- def encode(infile, outfile, format='dvd', tvsys='ntsc', method='ffmpeg', **kwargs): """Encode a multimedia file according to a target profile, saving the encoded file to outfile. infile Input filename outfile Desired output filename (.mpg implied) format One of 'vcd', 'svcd', 'dvd' (case-insensitive) tvsys One of 'ntsc', 'pal' (case-insensitive) method Encoding backend: 'ffmpeg', 'mencoder', or 'mpeg2enc' kwargs Additional keyword arguments (name=value) The supported keyword arguments vary by encoding method. See the encoding functions for what is available in each. """ source = mplayer.identify(infile) # Add .mpg to outfile if not already present if not outfile.endswith('.mpg'): outfile += '.mpg' # Get an appropriate encoding target target = standard_media(format, tvsys) target.filename = outfile # Set desired aspect ratio, or auto if 'aspect' in kwargs: target = correct_aspect(source, target, kwargs['aspect']) else: target = correct_aspect(source, target, 'auto') # Some friendly output print("Source media:") print(source) print(' ') print("Target media:") print(target) # Get the appropriate encoding backend encode_method = get_encoder(method) # Evaluate high-level keywords kwargs = eval_keywords(source, target, **kwargs) # Encode! encode_method(source, target, **kwargs) def get_encoder(backend): """Get an encoding function.""" if backend == 'ffmpeg': return ffmpeg.encode elif backend in ['mplayer', 'mencoder']: return mplayer.encode elif backend == 'mpeg2enc': return mpeg2enc.encode # -------------------------------------------------------------------------- # # Helper functions # # -------------------------------------------------------------------------- def eval_keywords(source, target, **kwargs): """Interpret keywords that affect other keywords, and return the result. These are keywords that can be shared between multiple encoding backends. Supported keywords: quality From 1 (lowest) to 10 (highest) video quality. Overrides 'quant' and 'vbitrate' keywords. fit Size in MiB to fit output video to (overrides 'quality') Overrides 'quant' and 'vbitrate' keywords. """ # Set quant and vbitrate to match desired quality if 'quality' in kwargs: kwargs['quant'] = 13-kwargs['quality'] max_bitrate = _bitrate_limits[target.format][1] kwargs['vbitrate'] = kwargs['quality'] * max_bitrate / 10 # Set quant and vbitrate to fit desired size if 'fit' in kwargs: kwargs['quant'], kwargs['vbitrate'] = \ _fit(source, target, kwargs['fit']) return kwargs def _fit(source, target, fit_size): """Return video (quantization, bitrate) to fit a video into a given size. source MediaFile input (the video being encoded) target MediaFile output (desired target profile) fit_size Desired encoded file size, in MiB """ assert isinstance(source, MediaFile) assert isinstance(target, MediaFile) fit_size = float(fit_size) mpeg_overhead = fit_size / 100 aud_vid_size = fit_size - mpeg_overhead audio_size = float(source.length * target.abitrate) / (8*1024) video_size = aud_vid_size - audio_size vid_bitrate = int(video_size*8*1024 / source.length) print("Length: %s seconds" % source.length) print("Overhead: %s MiB" % mpeg_overhead) print("Audio: %s MiB" % audio_size) print("Video: %s MiB" % video_size) print("VBitrate: %s kbps" % vid_bitrate) # Keep bitrates sane for each disc format lower, upper = _bitrate_limits[target.format] quant = 3 if vid_bitrate < lower: return (quant, lower) elif vid_bitrate > upper: return (quant, upper) else: return (quant, vid_bitrate) tovid-0.33/libtovid/odict.py0000644000175100017510000001040511371200244014476 0ustar ericeric# odict.py """Ordered dictionary class, from a Python Cookbook recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747 """ __all__ = ['Odict'] # Python < 3.x try: from UserDict import UserDict # Python 3.x except ImportError: from collections import UserDict class Odict (UserDict): """Ordered dictionary class, compatible with the builtin dict. """ def __init__(self, keys=None, values=None): """Create an Odict from the given keys and values. """ keys = list(keys or []) values = list(values or []) if len(keys) != len(values): raise ValueError("keys and values must be the same length") self._keys = keys UserDict.__init__(self, dict(zip(keys, values))) def __delitem__(self, key): """Delete the value from Odict[key]. """ UserDict.__delitem__(self, key) self._keys.remove(key) def __setitem__(self, key, item): """Set Odict[key] = item. """ UserDict.__setitem__(self, key, item) if key not in self._keys: self._keys.append(key) def clear(self): """Remove all items from the Odict. """ UserDict.clear(self) self._keys = [] def copy(self): """Return an exact copy of the Odict. """ dict_copy = UserDict.copy(self) dict_copy._keys = self._keys[:] return dict_copy def items(self): """Return a list of (key, value) pairs, in order. """ return zip(self._keys, self.values()) def keys(self): """Return the list of keys, in order. """ return self._keys def values(self): """Return the list of values, in order. """ return [self.get(key) for key in self._keys] def popitem(self): """Pop the last (key, value) pair from the Odict, and return it. """ try: key = self._keys[-1] except IndexError: raise KeyError('dictionary is empty') else: return self.pop(key) def pop(self, key): """Pop the item with the given key and return it. """ value = self[key] del self[key] return value def setdefault(self, key, failobj=None): """If Odict[key] doesn't exist, set Odict[key] = failobj, and return the resulting value of Odict[key]. """ result = UserDict.setdefault(self, key, failobj) if key not in self._keys: self._keys.append(key) return result def update(self, other_dict, **kwargs): """Update the Odict with values from another dict. """ UserDict.update(self, other_dict, **kwargs) for key in other_dict.keys(): if key not in self._keys: self._keys.append(key) def __str__(self): """Return a string representation of the Odict. """ lines = [] for key, value in self.items(): lines.append("%s: %s" % (key, value)) return '\n'.join(lines) def convert_list(choices): """Convert a list of choices to an Odict (ordered dictionary). choices may be in one of several formats: string 'one|two|three' list ['one', 'two', 'three'] dict {'a': "Choice A", 'b': "Choice B"} list-of-lists [['a', "Choice A"], ['b', "Choice B"], ..] Note: the dict form does not preserve order. Use list-of-lists to maintain the specified order. """ if type(choices) not in [str, list, dict]: raise TypeError("choices must be a string, list, or dictionary.") if type(choices) == str: choices = choices.split('|') return Odict(choices, choices) if type(choices) == dict: return Odict(choices.keys(), choices.values()) # choices is a list, but what kind? first = choices[0] # list of strings if type(first) == str: return Odict(choices, choices) # list of 2-element string lists elif type(first) == list and len(first) == 2: choices, values = zip(*choices) return Odict(choices, values) else: raise TypeError("choices lists must either be"\ "['a', 'b', 'c'] or [['a', 'A'], ['b', 'B']] style.") tovid-0.33/libtovid/render/0000755000175100017510000000000011374664177014327 5ustar ericerictovid-0.33/libtovid/render/drawing.py0000644000175100017510000013367711315544005016333 0ustar ericeric# -=- encoding: latin-1 -=- # Run this script standalone for a demonstration: # $ python libtovid/render/drawing.py # To use this module from your Python interpreter, run: # $ python # >>> from libtovid.render.drawing import * """Interactive vector drawing and rendering interface. This module provides a class called Drawing, which provides a blank canvas that can be painted with vector drawing functions, and later rendered to a raster image file (.png, .jpg etc.) at any desired resolution. To create a new, blank Drawing:: >>> d = Drawing(800, 600) # width, height Here, (800, 600) defines two things: - On-screen display size, in pixels (800px x 600px) - Intended viewing aspect ratio (800:600 or 4:3) Note that you are still doing vector drawing, so whatever size you pick here has no bearing on your final target resolution--it's mostly intended for a convenient "preview" size while doing interactive drawing. Back on topic: you can now add shapes to the drawing, fill and stroke them:: >>> d.circle(500, 300, 150) # (x, y, radius) >>> d.fill('blue', 0.8) # color name with optional alpha >>> d.stroke('rgb(0, 128, 255)') # rgb values 0-255 Then add more shapes:: >>> d.rectangle(25, 25, 320, 240) # x, y, width, height >>> d.fill('rgb(40%, 80%, 10%)') # rgb percentages >>> d.stroke('#FF0080', 0.5) # rgb hex notation with an alpha To see what the drawing looks like so far, do:: >>> display(d) # display at existing size >>> display(d, 720, 480) # display at different size >>> display(d, fix_aspect=True) # display in correct aspect ratio You may then decide to add more to the drawing:: >>> d.set_source('white') >>> d.text("Dennis", 50, 100) # text, x, y And preview again:: >>> display(d) Once you finish your beautiful painting, save it as a nice high-res PNG:: >>> save_png(d, "my.png", 1600, 1200) Cairo references: [1] http://www.cairographics.org [2] http://tortall.net/mu/wiki/CairoTutorial """ __all__ = [ 'Drawing', 'render', 'display', 'save_image', 'save_jpg', 'save_pdf', 'save_png', 'save_ps', 'save_svg', 'write_ppm', ] import os import sys import time import commands from copy import copy from math import pi, sqrt import cairo import Image # for JPG export import ImageColor # for getrgb, getcolor import ImageFile # for write_png() from libtovid import log from libtovid.util import to_unicode def get_surface(width, height, surface_type='image', filename=''): """Get a cairo surface at the given dimensions. """ if type(width) != int or type(height) != int: log.warning("Surface width and height should be integers."\ " Converting to int.") if surface_type == 'image': return cairo.ImageSurface(cairo.FORMAT_ARGB32, int(width), int(height)) elif surface_type == 'svg': return cairo.SVGSurface(filename, width, height) elif surface_type == 'pdf': return cairo.PDFSurface(filename, width, height) elif surface_type == 'ps': return cairo.PSSurface(filename, width, height) ### -------------------------------------------------------------------- ### Classes ### -------------------------------------------------------------------- class Step: """An atomic drawing procedure, consisting of a closed function that draws on a given cairo surface, and human-readable information about what parameters were given to it. """ def __init__(self, function, *args): self.function = function self.name = function.__name__.lstrip('_') self.args = args def __str__(self): return "%s%s" % (self.name, self.args) # Drawing class notes # # The Drawing class has a number of methods (circle, rectangle, fill, stroke # and many others) that need to operate on a Cairo surface. But we'd like to # delay execution of actually drawing on that surface--otherwise, we can't # easily render a given Drawing to a custom resolution. # # Closures save the day here--that is, functions without "free variables". # Anytime you "paint" on the Drawing, what's actually happening is a new # function is getting created, whose sole purpose in life is to carry out that # specific paint operation. These tiny, single-purpose functions are then # added to a list of steps (self.steps) that will actually be executed at # rendering-time (i.e., when you do display() or save_png). # # This not only lets us render a Drawing to different resolutions, but allows # the possibility of rendering to different Cairo surfaces. class Drawing: tk = None # tkinter widget to send redraws to def __init__(self, width=800, height=600, autodraw=False): """Create a blank drawing at the given size. width, height Dimensions of the drawable region, in arbitrary units autodraw Redraw a preview image after each drawing operation """ self.size = (width, height) self.w = width self.h = height self.aspect = float(width) / height self.autodraw = autodraw #self.commands = [] self.steps = [] # "Dummy" surface/context at the original resolution; # should not be drawn on self.surface = get_surface(width, height, 'image') self.cr = cairo.Context(self.surface) def addStep(self, func, *args): """Add a Step to self.steps using the given function and args.""" step = Step(func, *args) self.steps.append(step) if self.autodraw and step.name in ['fill', 'stroke']: display(self, 640, 480, True) def doStep(self, func, *args): """Add the given Step, and execute it.""" self.addStep(func, *args) func(self.cr) def history(self): """Return a formatted string of all steps in this Drawing.""" result = '' for number, step in enumerate(self.steps): result += '%d. %s\n' % (number, step) return result def affine(self, rot_x, rot_y, scale_x, scale_y, translate_x, translate_y): """Define a 3x3 transformation matrix:: [ scale_x rot_y translate_x ] [ rot_x scale_y translate_y ] [ 0 0 1 ] This is scaling, rotation, and translation in a single matrix, so it's a compact way to represent any transformation. See [http://www.w3.org/TR/SVG11/coords.html] for more on these matrices and how to use them. """ mtx = cairo.Matrix(scale_x, rot_x, rot_y, scale_y, translate_x, translate_y) def _affine(cr): cr.set_matrix(mtx) self.doStep(_affine, rot_x, rot_y, scale_x, scale_y, translate_x, translate_y) def arc(self, x, y, radius, start_deg, end_deg): """Draw an arc from (x, y), with the specified radius, starting at degree start_deg and ending at end_deg. """ def _arc(cr): cr.arc(x, y, radius, start_deg * pi/180., end_deg * pi/180.) self.doStep(_arc, x, y, radius, start_deg, end_deg) def arc_rad(self, x, y, radius, start_rad, end_rad): """Draw an arc from (x, y), with the specified radius, starting at radian start_rad and ending at end_rad. """ def _arc_rad(cr): cr.arc(x, y, radius, start_rad, end_rad) self.doStep(_arc_rad, x, y, radius, start_rad, end_rad) # TODO: Rewrite/cleanup bezier function def bezier(self, points, rel=False, close_path=False): """Create a Bezier curve. Points should look like:: points = [[(x0, y0), (x_ctl1, y_ctl1), (x_ctl2, y_ctl2)], [(x0, y0), (x_ctl1, y_ctl1), (x_ctl2, y_ctl2)], [(x0, y0), (x_ctl1, y_ctl1), (x_ctl2, y_ctl2)], [(x0, y0)], ] where (x0, y0) are the point coordinates, and x_ctl* are the control points coordinates. - ctl1 - control from last point - ctl2 - control to next point The last line would specify that control points are at the same place (x0, y0), drawing straight lines. rel when this is True, the x_ctl and y_ctl become relatives to the (x0, y0) points close_path set this to True to call cr.close_path() before stroking. """ assert len(points) > 1, "You need at least two points" for pt in points: # If only one point is specified, copy it for control points if len(pt) == 1: pt.append(pt[0]) # add the two identical pt.append(pt[0]) # control points assert len(pt) == 3, "You need to specify three tuples for each point, or one single" for y in pt: assert isinstance(y, tuple) and len(y) == 2, "You need "\ "to specify two-values tuples" # Map relative stuff to absolute, when rel=True if rel: for x in range(0, len(points)): pt = points[x] assert len(pt) == 3, "In relative mode, you must "\ "specify control points" # Render relative values to absolute values. npt = [] # # x # y npt.append([pt[0][0], pt[0][1]]) # x0, y0 npt.append([pt[0][0] + pt[1][0], pt[0][1] + pt[1][1]]) npt.append([pt[0][0] + pt[2][0], pt[0][1] + pt[2][1]]) points[x] = npt # Define the actual drawing function def _bezier(cr): # Move to the first x,y in the first point cr.new_path() cr.move_to(points[0][0][0], points[0][0][1]) for pt in points: cr.curve_to(pt[2][0], pt[2][1], pt[0][0], pt[0][1], pt[1][0], pt[1][1]) if close_path: cr.close_path() self.doStep(_bezier, points, rel, close_path) def circle(self, center_x, center_y, radius): """Draw a circle defined by center point and radius.""" def _circle(cr): cr.new_path() cr.arc(center_x, center_y, radius, 0, 2*pi) self.doStep(_circle, center_x, center_y, radius) def fill(self, source=None, opacity=None): """Fill the current (closed) path with an optionally given color. If arguments are present, they are passed to set_source() before filling. Note that this source will be applied to further fill()ings or stroke()ings or text() calls. """ # Optionally set fill color, and save it. if source is not None: self.set_source(source, opacity) def _fill(cr): cr.fill_preserve() self.doStep(_fill, source, opacity) def fill_rule(self, rule): """Set the fill rule to one of: evenodd, winding (nonzero) This determines which parts of an overlapping path polygon will be filled with the fill() command. http://www.w3.org/TR/SVG/painting.html#FillRuleProperty """ tr = {'evenodd': cairo.FILL_RULE_EVEN_ODD, 'winding': cairo.FILL_RULE_WINDING} # Test value tr[rule] def _fill_rule(cr): cr.set_fill_rule(tr[rule]) self.doStep(_fill_rule, rule) def font(self, name, slant='normal', weight='normal'): """Set the current font. name name of the Font, or family (sans-serif, serif) slant one of: italic, normal, oblique weight one of: normal, bold """ sl = {'italic': cairo.FONT_SLANT_ITALIC, 'normal': cairo.FONT_SLANT_NORMAL, 'oblique': cairo.FONT_SLANT_OBLIQUE} wg = {'normal': cairo.FONT_WEIGHT_NORMAL, 'bold': cairo.FONT_WEIGHT_BOLD} def _font(cr): cr.select_font_face(name, sl[slant], wg[weight]) self.doStep(_font, name, slant, weight) def font_size(self, pointsize): """Set the current font size in points. """ def _font_size(cr): cr.set_font_size(pointsize) self.doStep(_font_size, pointsize) def font_stretch(self, x=1.0, y=1.0): """Set the font stretch type in both directions to one of: = 1.0 -- normal > 1.0 -- strench < 1.0 -- shrink """ def _font_stretch(cr): m = cr.get_font_matrix() m.scale(x, y) cr.set_font_matrix(m) self.doStep(_font_stretch, x, y) def font_rotate(self, degrees): """Set the font rotation, in degrees. """ def _font_rotate(cr): m = cr.get_font_matrix() m.rotate(degrees * pi/180.) cr.set_font_matrix(m) self.doStep(_font_rotate, degrees) def image_surface(self, x, y, width, height, surface, mask=None): """Draw a given cairo.ImageSurface centered at (x, y), at the given width and height. If you specify mask, it must be a cairo ImageSurface. """ # Calculate centering and scaling add_x, add_y = (0, 0) dw = float(width) / float(surface.get_width()) dh = float(height) / float(surface.get_height()) if (dw > dh): scale = dh add_x = (width - dh * float(surface.get_width())) / 2 else: scale = dw add_y = (height - dw * float(surface.get_height())) / 2 # Save context and get the surface to right dimensions self.save() self.translate(x + add_x, y + add_y) self.scale(scale, scale) # Create and append the drawing function if (mask): def _image_surface(cr): cr.set_source_surface(surface) cr.mask_surface(mask) self.doStep(_image_surface, x, y, width, height, surface, mask) else: def _image_surface(cr): cr.set_source_surface(surface) cr.paint() self.doStep(_image_surface, x, y, width, height, surface, mask) self.restore() def image(self, x, y, width, height, source): """Draw an image centered at (x, y), scaled to the given width and height. Return the corresponding cairo.ImageSurface object. source - a .png filename (quicker and alpha present), - a cairo.ImageSurface object, which is even better, - a file object - a filename - any file supported by python-imaging, a.k.a PIL [1] Ref: [1] http://www.pythonware.com/library/pil/handbook/formats.htm You can apply some operator() to manipulation how the image is going to show up. See operator() """ # Determine what type of source was given, and make it into # a cairo.ImageSurface if isinstance(source, cairo.ImageSurface): surface = source # PNG files can be added directly elif isinstance(source, str) and source.endswith('.png'): surface = cairo.ImageSurface.create_from_png(source) # Other formats must be converted to PNG else: infile = Image.open(source) outfile = open('/tmp/export.png', 'wb+') infile.save(outfile, 'PNG') outfile.seek(0) surface = cairo.ImageSurface.create_from_png(outfile) outfile.close() # Let someone else do the dirty work self.image_surface(x, y, width, height, surface) return surface def line(self, x0, y0, x1, y1): """Set new path as a line from (x0, y0) to (x1, y1). Don't forget to stroke() """ def _line(cr): cr.new_path() cr.move_to(x0, y0) cr.line_to(x1, y1) self.doStep(_line, x0, y0, x1, y1) def operator(self, operator='clear'): """Set the operator mode. operator One of: clear, source, over, in, out, atop, dest, dest_over, dest_in, dest_out, dest_atop, xor, add, saturate """ ops = {'clear': cairo.OPERATOR_CLEAR, 'source': cairo.OPERATOR_SOURCE, 'over': cairo.OPERATOR_OVER, 'in': cairo.OPERATOR_IN, 'out': cairo.OPERATOR_OUT, 'atop': cairo.OPERATOR_ATOP, 'dest': cairo.OPERATOR_DEST, 'dest_over': cairo.OPERATOR_DEST_OVER, 'dest_in': cairo.OPERATOR_DEST_IN, 'dest_out': cairo.OPERATOR_DEST_OUT, 'dest_atop': cairo.OPERATOR_DEST_ATOP, 'xor': cairo.OPERATOR_XOR, 'add': cairo.OPERATOR_ADD, 'saturate': cairo.OPERATOR_SATURATE, } # Test bad value ops[operator] def _operator(cr): cr.set_operator(ops[operator]) self.doStep(_operator, operator) def paint(self): """Paint the current source everywhere within the current clip region. """ def _paint(cr): cr.paint() self.doStep(_paint) def paint_with_alpha(self, alpha): """Paints the current source everywhere within the current clip region using a mask of constant alpha value alpha. The effect is similar to paint(), but the drawing is faded out using the alpha value. """ def _paint_with_alpha(cr): cr.paint_with_alpha(alpha) self.doStep(_paint_with_alpha, alpha) def point(self, x, y): """Draw a point at (x, y). """ # Circle radius 1/1000 the drawing width radius = float(self.size[0]) / 1000 def _point(cr): cr.new_path() cr.arc(x, y, radius, 0, 2*pi) self.doStep(_point, x, y) def polygon(self, points, close_path=True): """Define a polygonal path defined by (x, y) points in the given list. points = [(x0, y0), (x1, y1), (x2, y2)] Draw strokes and filling yourself, with fill() and stroke(). """ nlist = [] for tup in points: nlist.append([tup]) self.bezier(nlist, False, close_path) def polyline(self, points, close_path=True): """Draw a polygon defined by (x, y) points in the given list. This is a short- (or long-) hand for polygon. In Cairo, you draw your filling (fill()), or strokes (stroke()) yourself, so having polyline and polygon is basiclly useless. """ self.polygon(points, close_path) def rectangle_corners(self, x0, y0, x1, y1): """Draw a rectangle defined by opposite corners (x0, y0) and (x1, y1). """ def _rectangle_corners(cr): cr.new_path() cr.rectangle(x0, y0, x1-x0, y1-y0) self.doStep(_rectangle_corners, x0, y0, x1, y1) def rectangle(self, x, y, width, height): """Draw a rectangle with top-left corner at (x, y), and (width x height) in size. """ def _rectangle(cr): cr.new_path() cr.rectangle(x, y, width, height) self.doStep(_rectangle, x, y, width, height) def rotate_deg(self, degrees): """Rotate by the given number of degrees. """ def _rotate_deg(cr): m = cr.get_matrix() m.rotate(degrees * pi/180.) cr.set_matrix(m) self.doStep(_rotate_deg, degrees) rotate = rotate_deg def rotate_rad(self, rad): """Rotate by the given number of radians. """ def _rotate_rad(cr): m = cr.get_matrix() m.rotate(rad) cr.set_matrix(m) self.doStep(_rotate_rad, rad) def roundrectangle(self, x0, y0, x1, y1, bevel_width, bevel_height): """Draw a rounded rectangle from (x0, y0) to (x1, y1), with a bevel size of (bevel_width, bevel_height). """ bw = bevel_width bh = bevel_height # Add bezier points tl1 = [(x0, y0 + bh), (0, 0), (0, 0)] tl2 = [(x0 + bw, y0), (0, 0), (-bw, 0)] tr1 = [(x1 - bw, y0), (0, 0), (-bw, 0)] tr2 = [(x1, y0 + bh), (0, 0), (0, -bw)] br1 = [(x1, y1 - bh), (0, 0), (0, -bh)] br2 = [(x1 - bw, y1), (0, 0), (+bw, 0)] bl1 = [(x0 + bw, y1), (0, 0), (+bw, 0)] bl2 = [(x0, y1 - bh), (0, 0), (0, +bh)] end = [(x0, y0 + bh), (0, 0), (0, 0)] # Call in relative mode bezier control points. mylst = [tl1, tl2, tr1, tr2, br1, br2, bl1, bl2, end] # Let bezier do the work self.bezier(mylst, True) def set_source(self, source, opacity=None): """Set the source. source One of the following color formats as a string or a tuple (see below), another Surface or Surface-derivative object, or a Pattern object (and its derivatives). opacity Opacity ranging from 0.0 to 1.0. Defaults to None. If you specify a 'string' or 'tuple' RGB-like code as source, opacity defaults to 1.0 You can use the following *tuple* format to specify color: - (red, green, blue) with colors ranging from 0.0 to 1.0, like Cairo wants them You can use the following *string* formats to specify color: - Hexadecimal color specifiers, given as '#rgb' or '#rrggbb'. For example, '#ff0000' specifies pure red. - RGB functions, given as 'rgb(red, green, blue)' where the colour values are integers in the range 0 to 255. Alternatively, the color values can be given as three percentages (0% to 100%). For example, 'rgb(255,0,0)' and 'rgb(100%,0%,0%)' both specify pure red. - Hue-Saturation-Lightness (HSL) functions, given as: 'hsl(hue, saturation%, lightness%)' where hue is the colour given as an angle between 0 and 360 (red=0, green=120, blue=240), saturation is a value between 0% and 100% (gray=0%, full color=100%), and lightness is a value between 0% and 100% (black=0%, normal=50%, white=100%). For example, 'hsl(0,100%,50%)' is pure red. - Common HTML colour names. The ImageColor module provides some 140 standard colour names, based on the colors supported by the X Window system and most web browsers. Colour names are case insensitive. For example, 'red' and 'Red' both specify pure red. """ mysource = self.create_source(source, opacity) def _set_source(cr): cr.set_source(mysource) # Only do the step if the source could be created if mysource: self.doStep(_set_source, source, opacity) def create_source(self, source, opacity=None): """Return a source pattern (solid, gradient, image surface) with anything fed into it. Returns None if the source could not be created successfully. See the set_source() documentation for more details on inputs. You can feed anything returned by this function into set_source() """ if isinstance(source, cairo.Pattern): return source # A string--color name, rgb(), hsv(), or hexadecimal elif isinstance(source, str): try: (r, g, b) = ImageColor.getrgb(source) except ValueError, err: log.error(err) return None alpha = 1.0 if opacity is not None: alpha = opacity return cairo.SolidPattern(r / 255.0, g / 255.0, b / 255.0, alpha) # An (r, g, b) tuple elif isinstance(source, tuple): assert len(source) == 3 (r, g, b) = source alpha = 1.0 if opacity is not None: alpha = opacity return cairo.SolidPattern(r, g, b, alpha) # A cairo Gradient elif isinstance(source, cairo.Gradient): return source # A cairo Surface elif isinstance(source, cairo.Surface): return cairo.SurfacePattern(source) else: raise TypeError, "source must be one of: str, tuple, "\ "cairo.Pattern, cairo.Gradient or cairo.Surface" def get_source(self): """Return the actually used source pattern This returns either of these: cairo.SolidPattern (RGB or RGBA color) cairo.SurfacePattern (some other image) cairo.LinearGradient (linear gradient :) cairo.RadialGradient (radial gradient :) You can then use this source in set_source(), to use the same pattern for fill()ing or stroke()ing. """ # TODO: Fix or remove this function return self.cr.get_source() def scale(self, factor_x, factor_y): """Set scaling to (factor_x, factor_y), where 1.0 means no scaling. Note that the center point for scaling is (0,0); to scale from a different center point, use scale_centered() """ def _scale(cr): m = cr.get_matrix() m.scale(factor_x, factor_y) cr.set_matrix(m) self.doStep(_scale, factor_x, factor_y) def scale_centered(self, center_x, center_y, factor_x, factor_y): """Set scaling to (dx, dy), where dx and dy are horizontal and vertical ratios (floats). scale_centered() will keep the (center_x, center_y) in the middle of the scaling, operating a translation in addition to scaling. """ def _scale_centered(cr): m = cr.get_matrix() # Ouch, we want to keep the center x,y at the same place?! m.translate(-(center_x * factor_x - center_x), -(center_y * factor_y - center_y)) m.scale(factor_x, factor_y) cr.set_matrix(m) self.doStep(_scale_centered, center_x, center_y, factor_x, factor_y) def stroke(self, source=None, opacity=None): """Stroke the current shape. See fill() documentation for parameter explanation. They are the same. """ # Optionally set stroke color, and save it. if source is not None: self.set_source(source, opacity) def _stroke(cr): # Optionally set fill color, and save it. cr.stroke_preserve() self.doStep(_stroke, source, opacity) def stroke_antialias(self, do_antialias=True): """Enable/disable antialiasing for strokes. do_antialias: True, False, 'none', 'default', or 'gray' This does not affect text. See text_antialias() for more info on text antialiasing. """ if do_antialias: aa_type = cairo.ANTIALIAS_GRAY else: aa_type = cairo.ANTIALIAS_NONE def _stroke_antialias(cr): cr.set_antialias(aa_type) self.doStep(_stroke_antialias, do_antialias) def stroke_dash(self, array, offset=0.0): """Set the dash style. array A list of floats, alternating between ON and OFF for each value offset An offset into the dash pattern at which the stroke should start For example:: >>> stroke_dash([5.0, 3.0]) alternates between 5 pixels on, and 3 pixels off. """ def _stroke_dash(cr): cr.set_dash(array, offset) self.doStep(_stroke_dash, array, offset) def stroke_linecap(self, cap_type): """Set the type of line cap to use for stroking. cap_type 'butt', 'round', or 'square' """ dic = {'butt': cairo.LINE_CAP_BUTT, 'round': cairo.LINE_CAP_ROUND, 'square': cairo.LINE_CAP_SQUARE} # Test value dic[cap_type] def _stroke_linecap(cr): cr.set_line_cap(dic[cap_type]) self.doStep(_stroke_linecap, cap_type) def stroke_linejoin(self, join_type): """Set the type of line-joining to do for stroking. join_type 'bevel', 'miter', or 'round' """ dic = {'bevel': cairo.LINE_JOIN_BEVEL, 'miter': cairo.LINE_JOIN_MITER, 'round': cairo.LINE_JOIN_ROUND} # Test value dic[join_type] def _stroke_linejoin(cr): cr.set_line_join(dic[join_type]) self.doStep(_stroke_linejoin, join_type) def stroke_width(self, width): """Set the current stroke width in pixels.""" # (Pixels or points?) def _stroke_width(cr): cr.set_line_width(width) self.doStep(_stroke_width, width) def text(self, text_string, x, y, align='left'): """Draw the given text string. text_string utf8 encoded text string x, y lower-left corner position Set the text's color with set_source() before calling text(). """ text_string = to_unicode(text_string) def _text(cr): (dx, dy, w, h, ax, ay) = cr.text_extents(text_string) if align == 'right': nx = x - w elif align == 'center': nx = x - w / 2 else: nx = x cr.move_to(nx, y) cr.show_text(text_string) self.doStep(_text, text_string, x, y, align) def text_path(self, text_string, x, y): """Same as text(), but sets a path and doesn't draw anything. Call stroke() or fill() yourself. Has the parameters and returns the same values as text(). Beware that text() calls the Cairo function show_text() which caches glyphs, so is more efficient when dealing with large texts. """ if not isinstance(text_string, unicode): text_string = unicode(text_string.decode('latin-1')) def _text_path(cr): cr.move_to(x, y) cr.text_path(text_string) self.doStep(_text_path, text_string, x, y) def text_extents(self, text): """Returns the dimensions of the to-be-drawn text. Call this before calling text() if you want to place it well, according to the dimensions of the text rectangle to be drawn. See text()'s return value for details. Returns: (x_bearing, y_bearing, width, height, x_advance, y_advance) """ text = to_unicode(text) return self.cr.text_extents(text) def translate(self, dx, dy): """Do a translation by (dx, dy) pixels.""" def _translate(cr): m = cr.get_matrix() m.translate(dx, dy) cr.set_matrix(m) self.doStep(_translate, dx, dy) def push_group(self): """Temporarily redirects drawing to an intermediate surface known as a group. The redirection lasts until the group is completed by a call to pop_group() or pop_group_to_source(). These calls provide the result of any drawing to the group as a pattern, (either as an explicit object, or set as the source pattern). """ def _push_group(cr): cr.push_group() self.doStep(_push_group) def pop_group_to_source(self): """Terminates the redirection begun by a call to push_group() and installs the resulting pattern as the source pattern in the current cairo context. """ def _pop_group_to_source(cr): cr.pop_group_to_source() self.doStep(_pop_group_to_source) def save(self): """Save state for Cairo and local contexts. You can save in a nested manner, and calls to restore() will pop the latest saved context. """ def _save(cr): cr.save() self.doStep(_save) BEGIN = save def restore(self): """Restore the previously saved context. """ def _restore(cr): cr.restore() self.doStep(_restore) END = restore def font_family(self, family): """Set the current font, by family name.""" def _font_family(cr): cr.select_font_face(family) self.doStep(_font_family, family) font_face = font_family def text_align(self, text_string, x, y, align='left'): """Draw the given text string. text_string UTF-8 encoded text string x, y Lower-left corner position align 'left', 'center', 'right'. This only changes the alignment in 'x', and 'y' stays the baseline. Set the text's color with set_source() before calling text(). """ (dx, dy, w, h, ax, ay) = self.cr.text_extents(text_string) w = 0 if align == 'right': x = x - w elif align == 'center': x = x - w / 2 else: # 'left' x = x # Let text() do the drawing self.text(text_string, x, y) def text_path_align(self, x, y, text_string, centered=False): """Same as text_align(), but sets a path and doesn't draw anything. Call stroke() or fill() yourself. """ (dx, dy, w, h, ax, ay) = self.cr.text_extents(text_string) if centered: x = x - w / 2 y = y + h / 2 # Let text_path() do the drawing self.text_path(text_string, x, y) ### -------------------------------------------------------------------- ### Exported functions ### -------------------------------------------------------------------- # Cached masks, rendered only once. interlace_fields = None def interlace_drawings(draw1, draw2): """Merge two drawings into one, using interlacing fields. This method interlaces with the BOTTOM-FIRST field order. """ global interlace_fields dr = Drawing(draw1.w, draw1.h) # create masks (only once) if (not interlace_fields): fields = [0, 1] for f in range(0, 2): img = cairo.ImageSurface(cairo.FORMAT_ARGB32, draw1.w, draw1.h) cr = cairo.Context(img) cr.set_antialias(cairo.ANTIALIAS_NONE) cr.set_source_rgba(0.5, 0.5, 0.5, 1) cr.set_line_width(1) for x in range(0, draw1.h / 2): # x*2 + f = top field first.., each two lines.. # -1 à draw1.w +1 -> pour être sur de couvrir aussi les bouts. cr.move_to(-1, x*2 + f) cr.line_to(draw1.w + 1, x*2 + f) cr.stroke() fields[f] = img interlace_fields = fields else: fields = interlace_fields # For bottom first, use fields[0] first, and fields[1] after. # For top-first, use draw1 with fields[1] and draw2 with fields[0] # paint first image dr.image_surface(0, 0, dr.w, dr.h, draw1.surface, fields[0]) # paint second image dr.image_surface(0, 0, dr.w, dr.h, draw2.surface, fields[1]) return dr def render(drawing, context, width, height): """Render a Drawing to the given cairo context at the given size. """ # Scale from the original size scale_x = float(width) / drawing.size[0] scale_y = float(height) / drawing.size[1] drawing.scale(scale_x, scale_y) # Sneaky bit--scaling needs to happen before everything else drawing.steps.insert(0, drawing.steps.pop(-1)) # Execute all draw commands for step in drawing.steps: log.debug("Drawing step: %s" % step) step.function(context) # Remove scaling function drawing.steps.pop(0) def display(drawing, width=None, height=None, fix_aspect=False): """Render and display the given Drawing at the given size. drawing A Drawing object to display width Pixel width of displayed image, or 0 to use the given Drawing's size height Pixel height of displayed image, or 0 to use the given Drawing's size fix_aspect True to adjust height to make the image appear in the correct aspect ratio """ if not width: width = drawing.size[0] if not height: height = drawing.size[1] # Adjust height to fix aspect ratio if desired if fix_aspect: height = width / drawing.aspect # Render and display a .png png_file = '/tmp/drawing.png' save_png(drawing, png_file, width, height) print("Displaying %s at %sx%s" % (png_file, width, height)) print("(press 'q' in image window to continue)") print(commands.getoutput('display %s' % png_file)) def write_ppm(drawing, pipe, width, height, workdir=None): """Write image as a PPM file to a file-object workdir Unused in this context, just to have parallel parameters with write_png(). Useful to pipe directly in ppmtoy4m and to pipe directly to mpeg2enc. """ # Timing start = time.time() if (width, height) == drawing.size: #print("Not re-rendering") surface = drawing.surface else: surface = get_surface(width, height, 'image') context = cairo.Context(surface) render(drawing, context, width, height) buf = surface.get_data() # Assumes surface is cairo.FORMAT_ARGB32 im = Image.frombuffer('RGBA', (surface.get_width(), surface.get_height()), buf) im = im.transpose(Image.FLIP_TOP_BOTTOM) im.save(pipe, 'ppm') #print("write_ppm took %s seconds" % (time.time() - start)) def write_png(drawing, pipe, width, height, workdir): """Write image as a PPM file to a file-object Useful to pipe directly in:: pngtopnm -mix -background=rgb:00/00/00 | ppmtoy4m | mpeg2enc. """ # Timing start = time.time() if (width, height) == drawing.size: #print("Not re-rendering") surface = drawing.surface else: surface = get_surface(width, height, 'image') context = cairo.Context(surface) render(drawing, context, width, height) surface.write_to_png('%s/tmp.png' % workdir) im = Image.open('%s/tmp.png' % workdir) im.load() im.save(pipe, 'ppm') #print("write_png took %s seconds" % (time.time() - start)) def save_png(drawing, filename, width, height): """Saves a drawing to PNG, keeping alpha channel intact. This is the quickest, since Cairo itself exports directly to .png """ # Timing start = time.time() if (width, height) == drawing.size: #print("Not re-rendering") surface = drawing.surface else: surface = get_surface(width, height, 'image') context = cairo.Context(surface) render(drawing, context, width, height) surface.write_to_png(filename) #print("save_png took %s seconds" % (time.time() - start)) def save_jpg(drawing, filename, width, height): """Saves a drawing to JPG, losing alpha channel information. """ f = open('/tmp/export.png', 'wb+') save_png(drawing, f, width, height) f.seek(0) im = Image.open(f) im.save(filename) del(im) f.close() def save_image(drawing, img_filename, width, height): """Render drawing to a .jpg, .png or other image. """ log.info("Saving Drawing to %s" % img_filename) if img_filename.endswith('.png'): save_png(drawing, img_filename, width, height) elif img_filename.endswith('.jpg'): save_jpg(drawing, img_filename, width, height) else: log.debug("Creating temporary .png") temp_png = '/tmp/%s.png' % img_filename save_png(drawing, temp_png, width, height) log.debug("Converting temporary png to %s" % img_filename) cmd = "convert -size %sx%s " % drawing.size cmd += "%s %s" % (temp_png, img_filename) print(commands.getoutput(cmd)) def save_svg(drawing, filename, width, height): """Render drawing to an SVG file. """ surface = get_surface(width, height, 'svg', filename) context = cairo.Context(surface) render(drawing, context, width, height) context.show_page() surface.finish() print("Saved SVG to %s" % filename) def save_pdf(drawing, filename, width, height): """Render drawing to a PDF file. """ surface = get_surface(width, height, 'pdf', filename) context = cairo.Context(surface) render(drawing, context, width, height) context.show_page() surface.finish() print("Saved PDF to %s" % filename) def save_ps(drawing, filename, width, height): """Render drawing to a PostScript file. """ surface = get_surface(width, height, 'ps', filename) context = cairo.Context(surface) render(drawing, context, width, height) context.show_page() surface.finish() print("Saved PostScript to %s" % filename) ### -------------------------------------------------------------------- ### Demo functions ### -------------------------------------------------------------------- def draw_fontsize_demo(drawing): """Draw font size samples on the given drawing. """ assert isinstance(drawing, Drawing) # Save context drawing.save() # TODO: Remove this scaling hack drawing.scale(800.0/720, 600.0/480) # Draw white text in a range of sizes drawing.set_source('white') for size in [12, 16, 20, 24, 28, 32]: ypos = size * size / 5 drawing.font('Nimbus Sans') drawing.font_size(size) drawing.text("%s pt: The quick brown fox" % size, 700, ypos, 'right') # Restore context drawing.restore() def draw_font_demo(drawing): """Draw samples of different fonts on the given drawing. """ assert isinstance(drawing, Drawing) # Save context drawing.save() # TODO: Remove this scaling hack drawing.scale(800.0/720, 600.0/480) fontsize = 24 drawing.font_size(fontsize) fonts = [ 'Arial', 'Baskerville', 'Dragonwick', 'Georgia', 'Helvetica', 'Linotext', 'Luxi Mono', 'Nimbus Sans', 'Old-Town', 'Sharktooth', 'Tahoma', 'Times'] ypos = 0 for font in fonts: drawing.font(font) # Transparent shadow drawing.set_source('darkblue', 0.4) drawing.text(font, 3, ypos+3) # White text drawing.set_source('white', 1.0) drawing.text(font, 0, ypos) ypos += fontsize # Restore context drawing.restore() def draw_shape_demo(drawing): """Draw shape samples on the given drawing. """ assert isinstance(drawing, Drawing) # Save context drawing.save() # TODO: Remove this scaling hack drawing.scale(800.0/720, 600.0/480) # Large orange circle with black stroke drawing.save() drawing.stroke_width(12) # Circle at (500, 200), with radius 200 drawing.circle(500, 200, 200) drawing.stroke('black') drawing.fill('orange') drawing.restore() # Grey-stroked blue circles drawing.save() # TODO: # All circles have the same stroke width and color (and, in other cases, # might all have the same fill style as well). A simpler interface is # called for, e.g.: # drawing.set_style(fill='#8080FF', stroke='#777', stroke_width=2) # drawing.circle((65, 50), 15) # drawing.circle((65, 100), 10) # drawing.circle((65, 150), 5) # drawing.set_style(fill='black') # stroke stays the same as before # drawing.rectangle((40, 30), (50, 150)) drawing.stroke_width(2) drawing.circle(65, 50, 15) drawing.fill('#8080FF') drawing.stroke('#777') drawing.circle(60, 100, 10) drawing.fill('#2020F0') drawing.stroke('#777') drawing.circle(55, 150, 5) drawing.fill('#0000A0') drawing.stroke('#777') drawing.restore() # Semitransparent green rectangles drawing.save() drawing.translate(50, 400) for scale in [0.2, 0.4, 0.7, 1.1, 1.6, 2.2, 2.9, 3.7]: drawing.save() drawing.translate(scale * 70, scale * -50) drawing.scale(scale, scale) drawing.stroke_width(scale) # roundrectangle broken? drawing.roundrectangle(-30, -30, 30, 30, 8, 8) #drawing.rectangle(-30, -30, 30, 30) drawing.fill('lightgreen', scale / 5.0) drawing.stroke('black') drawing.restore() drawing.restore() # Restore context drawing.restore() def draw_stroke_demo(drawing): """Draw a stroke/strokewidth demo on the given drawing. """ assert isinstance(drawing, Drawing) # Save context drawing.save() # TODO: Remove this scaling hack drawing.scale(800.0/720, 600.0/480) for width in [1, 2, 4, 6, 8, 10, 12, 14, 16]: drawing.stroke_width(width) rgb = ((255 - width * 8), (120 - width * 5), 0) offset = width * 10 drawing.line(0, offset, -offset, offset) drawing.stroke('rgb(%s,%s,%s)' % rgb) # Restore context drawing.restore() if __name__ == '__main__': mytime = time.time() # Benchmark drawing = Drawing(800, 600) # Start a new drawing.save() # Add a background fill #->Background drawing.set_source('darkgray') drawing.rectangle(0, 0, 800, 600) drawing.fill() # Shape demo drawing.save() draw_shape_demo(drawing) drawing.restore() # Font size demo drawing.save() draw_fontsize_demo(drawing) drawing.restore() # Stroke demo drawing.save() drawing.translate(680, 240) draw_stroke_demo(drawing) drawing.restore() # Font face demo drawing.save() drawing.translate(60, 160) draw_font_demo(drawing) drawing.restore() # Close out the Cairo rendering... drawing.restore() print("Took %f seconds" % (time.time() - mytime)) # Render and display the Drawing at several different sizes resolutions = [(352, 240), (352, 480), (720, 480), (800, 600)] #resolutions = [(720, 480)] for w, h in resolutions: display(drawing, w, h) #save_svg(drawing, "/tmp/drawing.svg", 400, 300) #save_pdf(drawing, "/tmp/drawing.pdf", 400, 300) #save_ps(drawing, "/tmp/drawing.ps", 400, 300) tovid-0.33/libtovid/render/animation.py0000644000175100017510000002316711315544005016647 0ustar ericeric"""This module provides classes and functions for working with animation. Two classes are provided: Keyframe: A frame with a specific data value Tween: A data sequence interpolated from Keyframes The data being interpolated may represent color, opacity, location, or anything else that can be described numerically. Keyframe data may be scalar (single integers or decimal values) or vector (tuples such as (x, y) coordinates or (r, g, b) color values). For example, let's define three keyframes: >>> keys = [Keyframe(1, 0), ... Keyframe(6, 50), ... Keyframe(12, 10)] The value increases from 0 to 50 over frames 1-6, then back down to 10 over frames 6-12. The values at intermediate frames (2-5 and 7-11) can be interpolated or "tweened" automatically, using the Tween class: >>> tween = Tween(keys) >>> tween.data [0, 10, 20, 30, 40, 50, 43, 36, 30, 23, 16, 10] Another example using tweening of (x, y) coordinates: >>> keys = [Keyframe(1, (20, 20)), ... Keyframe(6, (80, 20)), ... Keyframe(12, (100, 100))] Here, a point on a two-dimensional plane starts at (20, 20), moving first to the right, to (80, 20), then diagonally to (100, 100). >>> tween = Tween(keys) >>> for (x, y) in tween.data: ... print((x, y)) ... (20, 20) (32, 20) (44, 20) (56, 20) (68, 20) (80, 20) (83, 33) (86, 46) (90, 60) (93, 73) (96, 86) (100, 100) """ __all__ = [ 'Keyframe', 'lerp', 'cos_interp', 'interpolate', 'tween', ] import copy import doctest import math class Keyframe: """Associates a specific frame in an animation with a numeric value. A Keyframe is a (frame, data) pair defining a "control point" on a graph:: 100 | | Keyframe(10, 50) data | * | 0 |__________________________ 1 10 20 30 frame The data can represent anything you like. For instance, opacity:: 100 |* Keyframe(1, 100) | opacity(%) | | 0 |____________________* Keyframe(30, 0) 1 10 20 30 frame See the Tween class below for what you can do with these Keyframes, once you have them. """ def __init__(self, frame, data): """Create a keyframe, associating a given frame with some data. The data may be an integer, floating-point value, or a tuple like (x, y) or (r, g, b). """ self.frame = frame self.data = data ### -------------------------------------------------------------------------- ### Interpolation algorithms ### -------------------------------------------------------------------------- def lerp(x, (x0, y0), (x1, y1)): """Do linear interpolation between points (x0, y0), (x1, y1), and return the 'y' of the given 'x'. This form of interpolation simply connects two points with a straight line. Blunt, but effective.""" return y0 + (x - x0) * (y1 - y0) / (x1 - x0) def cos_interp(x, (x0, y0), (x1, y1)): """Do cosine-based interpolation between (x0, y0), (x1, y1) and return the 'y' of the given 'x'. Essentially, a crude alternative to polynomial spline interpolation; this method transitions between two values by matching a segment of the cosine curve [0, pi] (for decreasing value) or [pi, 2*pi] (for increasing value) to the interval between the given points. It gives smoother results at inflection points than linear interpolation, but will result in "ripple" effects if keyframes are too dense or many. """ # Map the interpolation area (domain of x) to [0, pi] x_norm = math.pi * (x - x0) / (x1 - x0) # For y0 < y1, use upward-sloping part of the cosine curve [pi, 2*pi] if y0 < y1: x_norm += math.pi # Calculate and return resulting y-value y_min = min(y1, y0) y_diff = abs(y1 - y0) return y_min + y_diff * (math.cos(x_norm) + 1) / 2.0 def interpolate(frame, left, right, method): """Interpolate data between left and right Keyframes at the given frame, using the given interpolation method ('linear' or 'cosine'). Return the value at the given frame. The left and right Keyframes mark the endpoints of the curve to be interpolated. For example, if a value changes from 50 to 80 over the course of frames 1 to 30:: >>> left = Keyframe(1, 50) >>> right = Keyframe(30, 80) Then, the value at frame 10 can be interpolated as follows:: >>> interpolate(10, left, right, 'linear') 59 >>> interpolate(10, left, right, 'cosine') 56.582194019564263 For frames outside the keyframe interval, the corresponding endpoint value is returned:: >>> interpolate(0, left, right, 'linear') 50 >>> interpolate(40, left, right, 'linear') 80 """ assert isinstance(left, Keyframe) and isinstance(right, Keyframe) # At or beyond endpoints, return endpoint value if frame <= left.frame: return left.data elif frame >= right.frame: return right.data # Use the appropriate interpolation function if method == 'cosine': interp_func = cos_interp else: # method == 'linear' interp_func = lerp # Interpolate integers or floats if isinstance(left.data, int) or isinstance(left.data, float): p0 = (left.frame, left.data) p1 = (right.frame, right.data) return interp_func(frame, p0, p1) # Interpolate a tuple (x, y, ...) elif isinstance(left.data, tuple): # Interpolate each dimension separately dim = 0 result = [] while dim < len(left.data): interp_val = interp_func(frame, (left.frame, left.data[dim]), (right.frame, right.data[dim])) result.append(interp_val) dim += 1 return tuple(result) class Tween: """An "in-between" sequence, calculated by interpolating the data in a list of keyframes according to a given interpolation method. First, define some keyframes:: >>> keyframes = [Keyframe(1, 1), Keyframe(10, 25)] At frame 1, the value is 1; at frame 10, the value is 25. To get an interpolation of the data between these two keyframes, use:: >>> tween = Tween(keyframes) Now, retrieve the interpolated data all at once:: >>> tween.data [1, 3, 6, 9, 11, 14, 17, 19, 22, 25] Or by using array notation, indexed by frame number:: >>> tween[3] 6 >>> tween[8] 19 """ def __init__(self, keyframes, method='linear'): """Create an in-between sequence from a list of keyframes. The interpolation method can be 'linear' or 'cosine'. See effect.py for implementation examples. """ for keyframe in keyframes: assert isinstance(keyframe, Keyframe) self.keyframes = keyframes self.start = self.keyframes[0].frame self.end = self.keyframes[-1].frame self.data = [] self.method = method # Do the tweening self._tween() def _tween(self): """Perform in-betweening calculation on the current keyframes and fill self.data with tweened values, indexed by frame number. """ self.data = [] # TODO: Sort keyframes in increasing order by frame number (to ensure # keyframes[0] is the first frame, and keyframes[-1] is the last frame) # Make a copy of keyframes keys = copy.copy(self.keyframes) first = self.start last = self.end # If keyframe interval is empty, use constant data from first keyframe if first == last: self.data = keys[0].data return # Pop off keyframes as each interval is calculated left = keys.pop(0) right = keys.pop(0) frame = first # Interpolate until the last frame is reached while frame <= last: value = interpolate(frame, left, right, self.method) self.data.append(value) # Get the next interval, if it exists if frame == right.frame and len(keys) > 0: left = right right = keys.pop(0) frame += 1 def __getitem__(self, frame): """Return the interpolated data at the given frame. This allows accessing a tweened value with subscripting by frame number:: >>> keys = [Keyframe(1, 1), Keyframe(30, 50)] >>> tween = Tween(keys) >>> tween[1] 1 >>> tween[30] 50 >>> tween[21] 34 Frame numbers outside the keyframed region have the same values as those at the corresponding endpoints:: >>> tween[0] 1 >>> tween[100] 50 """ # If data is a single value, frame is irrelevant if not isinstance(self.data, list): return self.data # Otherwise, return the value for the given frame, extending endpoints elif frame < self.start: return self.data[0] elif frame > self.end: return self.data[-1] else: return self.data[frame - self.start] if __name__ == '__main__': doctest.testmod(verbose=True) p0 = (1, 1) p1 = (20, 20) print("Interpolation methods") print("x lerp cos_interp") for x in range(1, 21): print("%s %s %s" % \ (x, lerp(x, p0, p1), cos_interp(x, p0, p1))) tovid-0.33/libtovid/render/layer.py0000644000175100017510000007511311364647737016026 0ustar ericeric"""This module provides a Layer class and several derivatives. A Layer is a graphical overlay that may be composited onto an image canvas. Run this script standalone for a demonstration: $ python libtovid/layer.py Layer subclasses may combine graphical elements, including other Layers, into a single interface for drawing and customizing those elements. Layers may exhibit animation, through the use of keyframed drawing commands, or through use of the Effect class (and its subclasses, as defined in libtovid/effect.py). Each Layer subclass provides (at least) an __init__ function, and a draw function. For more on how to use Layers, see the Layer class definition and template example below. """ __all__ = [ 'Layer', 'Background', 'Text', 'ShadedText', 'TextBox', 'Label', 'VideoClip', 'Image', 'Thumb', 'ThumbGrid', 'SafeArea', 'Scatterplot', 'InterpolationGraph', 'ColorBars', ] import os import sys import math import commands from libtovid.util import get_file_type from libtovid.render.drawing import Drawing, save_image from libtovid.render.effect import Effect from libtovid.render.animation import Keyframe, Tween from libtovid.media import MediaFile from libtovid.backend import transcode from libtovid import log class Layer: """A visual element, or a composition of visual elements. Conceptually similar to a layer in the GIMP or Photoshop, with support for animation effects and sub-Layers. """ def __init__(self): """Initialize the layer. Extend this in derived classes to accept configuration settings for drawing the layer; call this function from any derived __init__ functions. """ self.effects = [] self.sublayers = [] self._parent_flipbook = None self._parent_layer = None ### ### Child-parent initialization ### def init_childs(self): """Give access to all descendant layers and effects to their parents. In layers, you can access your parent layer (if sublayed) with: layer._parent_layer and to the top Flipbook object with: layer._parent_flipbook """ for x in range(0, len(self.effects)): self.effects[x].init_parent_flipbook(self._parent_flipbook) self.effects[x].init_parent_layer(self) for x in range(0, len(self.sublayers)): self.sublayers[x][0].init_parent_flipbook(self._parent_flipbook) self.sublayers[x][0].init_parent_layer(self) self.sublayers[x][0].init_childs(self) def init_parent_flipbook(self, flipbook): self._parent_flipbook = flipbook def init_parent_layer(self, layer): self._parent_layer = layer ### ### Derived-class interface ### def draw(self, drawing, frame): """Draw the layer and all sublayers onto the given Drawing. Override this function in derived layers. """ assert isinstance(drawing, Drawing) ### ### Sublayer and effect interface ### def add_sublayer(self, layer, position=(0, 0)): """Add the given Layer as a sublayer of this one, at the given position. Sublayers are drawn in the order they are added; each sublayer may have its own effects, but the parent Layer's effects apply to all sublayers. """ assert isinstance(layer, Layer) self.sublayers.append((layer, position)) def draw_sublayers(self, drawing, frame): """Draw all sublayers onto the given Drawing for the given frame. """ assert isinstance(drawing, Drawing) for sublayer, position in self.sublayers: drawing.save() drawing.translate(*position) sublayer.draw(drawing, frame) drawing.restore() def add_effect(self, effect): """Add the given Effect to this Layer. A Layer may have multiple effects applied to it; all effects apply to the current layer, and all sublayers. """ assert isinstance(effect, Effect) self.effects.append(effect) def draw_with_effects(self, drawing, frame): """Render the entire layer, with all effects applied. drawing: A Drawing object to draw the Layer on frame: The frame number that is being drawn """ # Do preliminary effect rendering for effect in self.effects: effect.pre_draw(drawing, frame) # Draw the layer and sublayers self.draw(drawing, frame) # Close out effect rendering, in reverse (nested) order for effect in reversed(self.effects): effect.post_draw(drawing, frame) # Layer template # # Copy and paste the following code to create your own Layer. # # Layer subclasses should define two things: # # __init__(): How to initialize the layer with parameters # draw(): How do draw the layer on a Drawing # # First, declare the layer class name. Include (Layer) to indicate that your # class is a Layer. class MyLayer (Layer): """Overlapping semitransparent rectangles. (Modify this documentation string to describe what's in your layer)""" # Here's the class initialization function, __init__. Define here any # parameters that might be used to configure your layer's behavior or # appearance in some way (along with default values, if you like). Here, # we're allowing configuration of the fill and stroke colors, with default # values of 'blue' and 'black', respectively: def __init__(self, fill_color='blue', stroke_color='black'): """Create a MyLayer with the given fill and stroke colors.""" # Initialize the base Layer class. Always do this. Layer.__init__(self) # Store the given colors, for later use self.fill_color = fill_color self.stroke_color = stroke_color # The draw() function is responsible for rendering the contents of the # layer onto a Drawing. It will use the configuration given to __init__ # (in this case, fill and stroke colors) to render something onto a Drawing # associated with a particular frame number: def draw(self, drawing, frame): """Draw MyLayer contents onto the given drawing, at the given frame number.""" # For safety's sake, make sure you really have a Drawing object: assert isinstance(drawing, Drawing) # Save the drawing context. This prevents any upcoming effects or # style changes from messing up surrounding layers in the Drawing. drawing.save() # Get a Cairo pattern source for the fill and stroke colors # (TODO: Make this easier, or use a simpler example) fc = drawing.create_source(self.fill_color, 0.6) sc = drawing.create_source(self.stroke_color) # And a stroke width of 1, say: drawing.stroke_width(1) # Now, draw something. Here, a couple of pretty semitransparent # rectangles, using the fill and stroke color patterns created earlier: drawing.rectangle(0, 0, 50, 20) drawing.fill(fc) drawing.stroke(sc) drawing.rectangle(15, 12, 45, 28) drawing.fill(fc) drawing.stroke(sc) # Be sure to restore the drawing context afterwards: drawing.restore() class Background (Layer): """A background that fills the frame with a solid color, or an image.""" def __init__(self, color='black', filename=''): Layer.__init__(self) self.color = color self.filename = filename def draw(self, drawing, frame): assert isinstance(drawing, Drawing) log.debug("Drawing Background") width, height = drawing.size drawing.save() # Fill drawing with an image if self.filename is not '': drawing.image(0, 0, width, height, self.filename) # Fill drawing with a solid color elif self.color: drawing.rectangle(0, 0, width, height) drawing.fill(self.color) drawing.restore() class Image (Layer): """A rectangular image, scaled to the given size. image_source Can be anything Drawing::image() can accept. See documentation in render/drawing.py. """ def __init__(self, image_source, (x, y), (width, height)): Layer.__init__(self) self.size = (width, height) self.image_source = image_source self.position = (x, y) def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing Image") drawing.save() # Save the source for future calls to draw, so no further # processing will be necessary. And other effects can be done # without interferring with the original source. self.image_source = drawing.image(self.position[0], self.position[1], self.size[0], self.size[1], self.image_source) drawing.restore() class VideoClip (Layer): """A rectangular video clip, scaled to the given size. TODO: num_frames should accept a range [first, end], an int (1-INT) and rip frames accordingly. For now, it only accepts an INT for the range 1-INT """ def __init__(self, filename, (width, height), position=(0, 0), num_frames=120): Layer.__init__(self) self.filename = filename self.mediafile = MediaFile(filename) self.size = (width, height) # List of filenames of individual frames self.frame_files = [] # TODO: be able to change hardcoded default values self.rip_frames(1, num_frames) # Set (x,y) position assert(isinstance(position, tuple)) self.position = position def rip_frames(self, start, end): """Rip frames from the video file, from start to end frames.""" log.info("VideoClip: Ripping frames %s to %s" % (start, end)) outdir = '/tmp/%s_frames' % self.filename self.frame_files = transcode.rip_frames(self.mediafile, outdir, [start, end]) def draw(self, drawing, frame=1): """Draw ripped video frames to the given drawing. For now, it's necessary to call rip_frames() before calling this function. Video is looped. """ assert isinstance(drawing, Drawing) log.debug("Drawing VideoClip") if len(self.frame_files) == 0: log.error("VideoClip: need to call rip_frames() before drawing.") sys.exit(1) drawing.save() # Loop frames (modular arithmetic) if frame >= len(self.frame_files): frame = frame % len(self.frame_files) filename = self.frame_files[frame-1] drawing.image(self.position, self.size, filename) drawing.restore() class Text (Layer): """A simple text string, with size, color and font. """ def __init__(self, text, position=(0, 0), color='white', fontsize=20, \ font='Helvetica', align='left'): """Create a Text layer. text UTF8 encoded string. """ Layer.__init__(self) self.text = text self.color = color self.fontsize = fontsize self.font = font self.align = align # Set (x,y) position self.position = position # TODO: This is gonna be pretty broken... def extents(self, drawing): """Return the extents of the text as a (x0, y0, x1, y1) tuple. """ assert isinstance(drawing, Drawing) drawing.save() drawing.font(self.font) drawing.font_size(self.fontsize) x_bearing, y_bearing, width, height, x_adv, y_adv = \ drawing.text_extents(self.text) drawing.restore() # Add current layer's position to the (x,y) bearing of extents x0 = int(self.position[0] + x_bearing) y0 = int(self.position[1] + y_bearing) x1 = int(x0 + width) y1 = int(y0 + height) return (x0, y0, x1, y1) def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing Text") # Drop in debugger drawing.save() drawing.font(self.font) drawing.font_size(self.fontsize) if self.color is not None: drawing.set_source(self.color) # TODO: DO something with the align !! drawing.text(self.text, self.position[0], self.position[1], self.align) drawing.restore() class ShadedText (Layer): """A simple text string, with size, color and font. """ def __init__(self, text, position=(0, 0), offset=(5, 5), color='white', shade_color='gray', fontsize=20, font='Nimbus Sans', align='left'): Layer.__init__(self) shade_position = (position[0] + offset[0], position[1] + offset[1]) self.under = Text(text, shade_position, shade_color, fontsize, font, align) self.over = Text(text, position, color, fontsize, font, align) def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing Text") drawing.save() self.under.draw(drawing, frame) self.over.draw(drawing, frame) drawing.restore() class Label (Text): """A text string with a rectangular background. You can access Text's extents() function from within here too. """ def __init__(self, text, position=(0, 0), color='white', bgcolor='#555', fontsize=20, font='NimbusSans'): Text.__init__(self, text, position, color, fontsize, font) self.bgcolor = bgcolor # Set (x,y) position assert(isinstance(position, tuple)) self.position = position def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing Label") #(dx, dy, w, h, ax, ay) = self.extents(drawing) (x0, y0, x1, y1) = self.extents(drawing) # Save context drawing.save() # Calculate rectangle dimensions from text size/length width = x1 - x0 height = y1 - y0 # Padding to use around text pad = self.fontsize / 3 # Calculate start and end points of background rectangle start = (-pad, -height - pad) end = (width + pad, pad) # Draw a stroked round rectangle drawing.save() drawing.stroke_width(1) drawing.roundrectangle(start[0], start[1], end[0], end[1], pad, pad) drawing.stroke('black') drawing.fill(self.bgcolor, 0.3) drawing.restore() # Call base Text class to draw the text Text.draw(self, drawing, frame) # Restore context drawing.restore() class Thumb (Layer): """A thumbnail image or video. """ def __init__(self, filename, (width, height), position=(0, 0), title=''): Layer.__init__(self) self.filename = filename self.size = (width, height) self.title = title or os.path.basename(filename) # Set (x,y) position assert(isinstance(position, tuple)) self.position = position # Determine whether file is a video or image, and create the # appropriate sublayer filetype = get_file_type(filename) if filetype == 'video': self.add_sublayer(VideoClip(filename, self.size, self.position)) elif filetype == 'image': self.add_sublayer(Image(filename, self.size, self.position)) self.lbl = Label(self.title, fontsize=15) self.add_sublayer(self.lbl, self.position) def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing Thumb") drawing.save() (x0, y0, x1, y1) = self.lbl.extents(drawing) drawing.translate(0, x1-x0) self.draw_sublayers(drawing, frame) drawing.restore() class ThumbGrid (Layer): """A rectangular array of thumbnail images or videos.""" def __init__(self, files, titles=None, (width, height)=(600, 400), (columns, rows)=(0, 0), aspect=(4,3)): """Create a grid of thumbnail images or videos from a list of files, fitting in a space no larger than the given size, with the given number of columns and rows. Use 0 to auto-layout columns or rows, or both (default). """ assert files != [] if titles: assert len(files) == len(titles) else: titles = files Layer.__init__(self) self.size = (width, height) # Auto-dimension (using desired rows/columns, if given) self.columns, self.rows = \ self._fit_items(len(files), columns, rows, aspect) # Calculate thumbnail size, keeping aspect w = (width - self.columns * 16) / self.columns h = w * aspect[1] / aspect[0] thumbsize = (w, h) # Calculate thumbnail positions positions = [] for row in range(self.rows): for column in range(self.columns): x = column * (width / self.columns) y = row * (height / self.rows) positions.append((x, y)) # Add Thumb sublayers for file, title, position in zip(files, titles, positions): title = os.path.basename(file) self.add_sublayer(Thumb(file, thumbsize, (0, 0), title), position) def _fit_items(self, num_items, columns, rows, aspect=(4, 3)): # Both fixed, nothing to calculate if columns > 0 and rows > 0: # Make sure num_items will fit (columns, rows) if num_items < columns * rows: return (columns, rows) # Not enough room; auto-dimension both else: log.warning("ThumbGrid: Can't fit %s items" % num_items +\ " in (%s, %s) grid;" % (columns, rows) +\ " doing auto-dimensioning instead.") columns = rows = 0 # Auto-dimension to fit num_items if columns == 0 and rows == 0: # TODO: Take aspect ratio into consideration to find an optimal fit root = int(math.floor(math.sqrt(num_items))) return ((1 + num_items / root), root) # Rows fixed; use enough columns to fit num_items if columns == 0 and rows > 0: return ((1 + num_items / rows), rows) # Columns fixed; use enough rows to fit num_items if rows == 0 and columns > 0: return (columns, (1 + num_items / columns)) def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing ThumbGrid") drawing.save() self.draw_sublayers(drawing, frame) drawing.restore() class SafeArea (Layer): """Render a safe area box at a given percentage. """ def __init__(self, percent, color): self.percent = percent self.color = color def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing SafeArea") # Calculate rectangle dimensions scale = float(self.percent) / 100.0 width, height = drawing.size topleft = ((1.0 - scale) * width / 2, (1.0 - scale) * height / 2) # Save context drawing.save() drawing.translate(topleft[0], topleft[1]) # Safe area box drawing.stroke_width(3) drawing.rectangle(0, 0, width * scale, height * scale) drawing.stroke(self.color) # Label drawing.font_size(18) drawing.set_source(self.color) drawing.text(u"%s%%" % self.percent, 10, 20) # Restore context drawing.restore() class Scatterplot (Layer): """A 2D scatterplot of data. """ def __init__(self, xy_dict, width=240, height=80, x_label='', y_label=''): """Create a scatterplot using data in xy_dict, a dictionary of lists of y-values, indexed by x-value. """ self.xy_dict = xy_dict self.width, self.height = (width, height) self.x_label = x_label self.y_label = y_label def draw(self, drawing, frame): """Draw the scatterplot.""" assert isinstance(drawing, Drawing) log.debug("Drawing Scatterplot") width, height = (self.width, self.height) x_vals = self.xy_dict.keys() max_y = 0 for x in x_vals: largest = max(self.xy_dict[x] or [0]) if largest > max_y: max_y = largest # For numeric x, scale by maximum x-value x_is_num = isinstance(x_vals[0], int) or isinstance(x_vals[0], float) if x_is_num: x_scale = float(width) / max(x_vals) # For string x, scale by number of x-values else: x_scale = float(width) / len(x_vals) # Scale y according to maximum value y_scale = float(height) / max_y # Save context drawing.save() drawing.rectangle(0, 0, width, height) drawing.fill('white', 0.75) # Draw axes #->comment("Axes of scatterplot") drawing.save() drawing.stroke_width(2) drawing.line(0, 0, 0, height) drawing.stroke('black') drawing.line(0, height, width, height) drawing.stroke('black') drawing.restore() # Axis labels drawing.save() drawing.set_source('blue') drawing.save() for i, x in enumerate(x_vals): drawing.save() if x_is_num: drawing.translate(x * x_scale, height + 15) else: drawing.translate(i * x_scale, height + 15) drawing.rotate(30) drawing.text(x, 0, 0) drawing.restore() drawing.font_size(20) drawing.text(self.x_label, width/2, height+40) drawing.restore() drawing.save() drawing.text(max_y, -30, 0) drawing.translate(-25, height/2) drawing.rotate(90) drawing.text(self.y_label, 0, 0) drawing.restore() drawing.restore() # Plot all y-values for each x (as small circles) #->comment("Scatterplot data") drawing.save() for i, x in enumerate(x_vals): if x_is_num: x_coord = x * x_scale else: x_coord = i * x_scale # Shift x over slightly x_coord += 10 # Plot all y-values for this x for y in self.xy_dict[x]: y_coord = height - y * y_scale drawing.circle(x_coord, y_coord, 3) drawing.fill('red', 0.2) drawing.restore() # Restore context drawing.restore() class InterpolationGraph (Layer): # TODO: Support graphing of tuple data """A graph of an interpolation curve, defined by a list of Keyframes and an interpolation method. """ def __init__(self, keyframes, size=(240, 80), method='linear'): """Create an interpolation graph of the given keyframes, at the given size, using the given interpolation method. """ Layer.__init__(self) self.keyframes = keyframes self.size = size self.method = method # Interpolate keyframes self.tween = Tween(keyframes, method) def draw(self, drawing, frame): """Draw the interpolation graph, including frame/value axes, keyframes, and the interpolation curve.""" assert isinstance(drawing, Drawing) log.debug("Drawing InterpolationGraph") data = self.tween.data # Calculate maximum extents of the graph width, height = self.size x_scale = float(width) / len(data) y_scale = float(height) / max(data) #->drawing.comment("InterpolationGraph Layer") # Save context drawing.save() # Draw axes #->drawing.comment("Axes of graph") drawing.save() drawing.stroke_width(3) drawing.polyline([(0, 0), (0, height), (width, height)], False) drawing.stroke('#ccc') drawing.restore() # Create a list of (x, y) points to be graphed curve = [] x = 1 while x <= len(self.tween.data): # y increases downwards; subtract from height to give a standard # Cartesian-oriented graph (so y increases upwards) point = (int(x * x_scale), int(height - data[x-1] * y_scale)) curve.append(point) x += 1 drawing.save() # Draw the curve drawing.stroke_width(2) drawing.polyline(curve, False) drawing.stroke('blue') drawing.restore() # Draw Keyframes as dotted vertical lines drawing.save() # Vertical dotted lines drawing.set_source('red') drawing.stroke_width(2) for key in self.keyframes: x = int(key.frame * x_scale) drawing.line(x, 0, x, height) drawing.stroke('red') # Draw Keyframe labels drawing.set_source('white') for key in self.keyframes: x = int(key.frame * x_scale) y = int(height - key.data * y_scale - 3) drawing.text(u"(%s,%s)" % (key.frame, key.data), x, y) drawing.restore() # Draw a yellow dot for current frame #->drawing.comment("Current frame marker") drawing.save() pos = (frame * x_scale, height - data[frame-1] * y_scale) drawing.circle(pos[0], pos[1], 2) drawing.fill('yellow') drawing.restore() # Restore context drawing.restore() class ColorBars (Layer): """Standard SMPTE color bars (http://en.wikipedia.org/wiki/SMPTE_color_bars) """ def __init__(self, size, position=(0, 0)): """Create color bars in a region of the given size and position. """ Layer.__init__(self) self.size = size # Set (x,y) position assert(isinstance(position, tuple)) self.position = position def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing ColorBars") x, y = self.position width, height = self.size drawing.save() # Get to the right place and size drawing.translate(x, y) drawing.scale(width, height) # Video-black background drawing.rectangle(0, 0, 1, 1) drawing.fill('rgb(16, 16, 16)') # Top 67% of picture: Color bars at 75% amplitude top = 0 bottom = 2.0 / 3 seventh = 1.0 / 7 size = (seventh, bottom) bars = [(0, top, seventh, bottom, 'rgb(191, 191, 191)'), (seventh, top, seventh, bottom, 'rgb(191, 191, 0)'), (2*seventh, top, seventh, bottom, 'rgb(0, 191, 191)'), (3*seventh, top, seventh, bottom, 'rgb(0, 191, 0)'), (4*seventh, top, seventh, bottom, 'rgb(191, 0, 191)'), (5*seventh, top, seventh, bottom, 'rgb(191, 0, 0)'), (6*seventh, top, seventh, bottom, 'rgb(0, 0, 191)')] # Next 8% of picture: Reverse blue bars top = bottom bottom = 0.75 height = bottom - top bars.extend([(0, top, seventh, height, 'rgb(0, 0, 191)'), (seventh, top, seventh, height, 'rgb(16, 16, 16)'), (2*seventh, top, seventh, height, 'rgb(191, 0, 191)'), (3*seventh, top, seventh, height, 'rgb(16, 16, 16)'), (4*seventh, top, seventh, height, 'rgb(0, 191, 191)'), (5*seventh, top, seventh, height, 'rgb(16, 16, 16)'), (6*seventh, top, seventh, height, 'rgb(191, 191, 191)')]) # Lower 25%: Pluge signal top = bottom bottom = 1.0 sixth = 1.0 / 6 height = bottom - top bars.extend([(0, top, 1.0, height, 'rgb(16, 16, 16)'), (0, top, sixth, height, 'rgb(0, 29, 66)'), (sixth, top, sixth, height, 'rgb(255, 255, 255)'), (2*sixth, top, sixth, height, 'rgb(44, 0, 92)'), # Sub- and super- black narrow bars (4*sixth, top, 0.33*sixth, height, 'rgb(7, 7, 7)'), (4.33*sixth, top, 0.33*sixth, height,'rgb(16, 16, 16)'), (4.66*sixth, top, 0.33*sixth, height, 'rgb(24, 24, 24)')]) # Draw and fill all bars for x, y, width, height, color in bars: drawing.rectangle(x, y, width, height) drawing.fill(color) drawing.restore() if __name__ == '__main__': images = None # Get arguments, if any if len(sys.argv) > 1: # Use all args as image filenames to ThumbGrid images = sys.argv[1:] # A Drawing to render Layer demos to drawing = Drawing(800, 600) # Draw a background layer bgd = Background(color='#7080A0') bgd.draw(drawing, 1) # Draw color bars bars = ColorBars((320, 240), (400, 100)) bars.draw(drawing, 1) # Draw a label drawing.save() drawing.translate(460, 200) label = Label("tovid loves Linux") label.draw(drawing, 1) drawing.restore() # Draw a text layer, with position. text = Text("Jackdaws love my big sphinx of quartz", (82, 62), '#bbb') text.draw(drawing, 1) # Draw a text layer drawing.save() drawing.translate(80, 60) text = Text("Jackdaws love my big sphinx of quartz") text.draw(drawing, 1) drawing.restore() # Draw a template layer (overlapping semitransparent rectangles) template = MyLayer('white', 'darkblue') # Scale and translate the layer before drawing it drawing.save() drawing.translate(50, 100) drawing.scale(3.0, 3.0) template.draw(drawing, 1) drawing.restore() # Draw a safe area test (experimental) safe = SafeArea(93, 'yellow') safe.draw(drawing, 1) # Draw a thumbnail grid (if images were provided) if images: drawing.save() drawing.translate(350, 300) thumbs = ThumbGrid(images, (320, 250)) thumbs.draw(drawing, 1) drawing.restore() # Draw an interpolation graph drawing.save() drawing.translate(60, 400) # Some random keyframes to graph keys = [Keyframe(1, 25), Keyframe(10, 5), Keyframe(30, 35), Keyframe(40, 35), Keyframe(45, 20), Keyframe(60, 40)] interp = InterpolationGraph(keys, (400, 120), method="cosine") interp.draw(drawing, 25) drawing.restore() # Draw a scatterplot drawing.save() xy_data = { 5: [2, 4, 6, 8], 10: [3, 5, 7, 9], 15: [5, 9, 13, 17], 20: [8, 14, 20, 26]} drawing.translate(550, 350) #drawing.scale(200, 200) plot = Scatterplot(xy_data, 200, 200, "Spam", "Eggs") plot.draw(drawing, 1) drawing.restore() log.info("Output to /tmp/my.png") save_image(drawing, '/tmp/my.png', 800, 600) tovid-0.33/libtovid/render/flipbook.py0000644000175100017510000003251011315544006016466 0ustar ericeric"""This module provides the Flipbook class, a collection of drawings that, when displayed in sequence, make up an animation or video. Run this module standalone for a demonstration: $ python flipbook.py To use this module interactively, run 'python' from the command-line, and do: >>> from libtovid.render.flipbook import Flipbook To create a Flipbook 10 seconds long with 'dvd' and 'ntsc' standards, do: >>> flipbook = Flipbook(10, 'dvd', 'ntsc', '4:3') You can retrieve the canvas width and height with: >>> flipbook.canvas (640, 480) >>> flipbook.w 640 >>> flipbook.h 480 All drawing upon a Flipbook is achieved through the use of layers (layer.py). To use them, import the layer module: >>> from libtovid.render import layer You can add layers to a Flipbook on-the-fly: >>> flipbook.add(layer.Background('black')) >>> flipbook.add(layer.Text("Hello, world")) Or, create layers separately before adding them to the Flipbook: >>> text = Text("Elephant talk") >>> flipbook.add(text) This latter approach is useful if you plan to apply animation effects to the Layer. For this, effects classes (effect.py) may be applied. First, import: >>> from libtovid.render import effect Now, say we want the text "Elephant talk" to move across the screen, say from (100, 100) to (500, 100) over the course of the first 90 frames. The effect.Movement class does the trick: >>> text.add_effect(effect.Movement(1, 90, (100, 100), (500, 100))) You can preview a specific frame of the Flipbook by calling render(): >>> flipbook.render(50) Or, you can generate all frames and create an .m2v video stream file by calling render_video(): >>> filename = flipbook.render_video() See the demo below for more on what's possible with Flipbooks. """ __all__ = ['Flipbook'] import os import sys import time import math import cairo import shutil import random from libtovid.render.animation import Keyframe from libtovid.render.drawing import Drawing, interlace_drawings from libtovid.render.drawing import write_ppm, write_png, save_png from libtovid.render import layer, effect from libtovid import standard from libtovid.media import MediaFile from libtovid.backend import mplex, mplayer, ffmpeg class Flipbook: """A collection of Drawings that together comprise an animation. """ def __init__(self, seconds, format, tvsys, aspect='4:3', interlaced=False): """Create a flipbook of the given length in seconds, at the given resolution. seconds Length of flipbook playback in seconds format 'dvd', 'vcd', 'svcd', 'dvd-vcd', or 'half-dvd' tvsys 'ntsc' or 'pal' aspect '4:3' or '16:9' (the latter only for format='dvd') interlaced True/False. When enabled, the framerate will be doubled, but only half the frames (twice the fields) will be rendered. Once you've created the Flipbook, you can grab the dimensions in with the property: flipbook.canvas as (width, height) and with the two properties: flipbook.w (width) flipbook.h (height) """ self.tmpdir = '/tmp' if 'TMPDIR' in os.environ: self.tmpdir = os.environ['TMPDIR'] self.seconds = float(seconds) self.fps = standard.fps(tvsys) self.fps_ratio = standard.fps_ratio(tvsys) if (interlaced): self.fps *= 2 self.interlaced = interlaced self.frames = int(seconds * self.fps) self.output_size = standard.resolution(format, tvsys) # TODO: We'll need aspect ratio here.. 4:3 or 16:9 anamorphic ? self.format = format self.tvsys = tvsys if (aspect not in ['4:3', '16:9']): raise ValueError, "aspect must be: '4:3' or '16:9'" self.aspect = aspect self.widescreen = False if (aspect == '16:9'): self.widescreen = True self.canvas = self.get_canvas_size() self.w = self.canvas[0] self.h = self.canvas[1] # Empty layers, and currently no drawings. self.layers = [] self.drawings = [] self.called_init_childs = False def init_childs(self): """Give access to all descendant layers and effects to their parents. In layers, you can access your parent layer (if sublayed) with: layer._parent_layer and to the top Flipbook object with: layer._parent_flipbook This function gets called just before rendering a video with render_video() It's also called in emergency if you call directly get_drawing(). """ for x in range(0, len(self.layers)): self.layers[x][0].init_parent_flipbook(self) self.layers[x][0].init_childs() self.called_init_childs = True def stof(self, seconds): """Return the number of frames to the specified time (in seconds). """ return int(self.fps * float(seconds)) def get_canvas_size(self): """Return the dimensions of the canvas. """ #ow = self.output_size[0] oh = self.output_size[1] a = self.aspect.split(':') # Calculate the square pixels canvas size based on aspect ratio # and intended output size. x = float(a[0]) * float(oh) / float(a[1]) # Make sure they are factor of '2' nw = int(math.ceil(x / 2.0) * 2) # We'll always change only the width, like it seems the standard, # since on TVs, the number of *lines* can't change (when interlacing # is into business) return (nw, oh) def add(self, layer, position=(0, 0)): """Add a Layer to the flipbook. """ self.layers.append((layer, position)) def render(self, frame=1): """Render the given frame. """ print("DEPRECATED FUNCTION.") exit() filename = "/tmp/flipbook_%s.png" % frame print("Rendering Flipbook frame %s to %s" % (frame, filename)) drawing = self.get_drawing(frame) save_png(drawing, filename, self.output_size[0], self.output_size[1]) def get_drawing(self, frame): """Get a Drawing of the given frame TODO: 0-based or 1-based ? """ # Make sure all layers and effects has been initialized with parents. if (not self.called_init_childs): self.init_childs() drawing = Drawing(self.canvas[0], self.canvas[1]) # Draw each layer for layer, position in self.layers: drawing.save() drawing.translate(position[0], position[1]) # Apply effects and draw layer.draw_with_effects(drawing, frame) drawing.restore() return drawing def render_video(self, out_filename=None): """Render the flipbook to an .m2v video stream file. out_filename Filename for output. If not specified, a temporary filename will be given, and returned from the function. Return the filename of the output, in both cases. """ # Make sure layers and effects have been initialized with parents. self.init_childs() # # if self.tmpdir = /tmp, we get: # /tmp # /tmp/flipbook-120391232-work/ # /tmp/flipbook-120391232-work/bunch-of-files..m2v, .ac3, etc. # /tmp/flipbook-120391232.mpg -> final output.. # tmp_prefix = '' tmp_workdir = '' while 1: rnd = random.randint(1000000, 9999999) tmp_prefix = "%s/flipbook-%s" % (self.tmpdir, rnd) tmp_workdir = "%s-work" % (tmp_prefix) if not os.path.exists(tmp_workdir): break # In case no filename has been specified. if not out_filename: out_filename = "%s.mpg" % tmp_workdir os.mkdir(tmp_workdir) # Encode the frames to an .m2v file m2v_file = "%s/video.m2v" % tmp_workdir ac3_file = "%s/audio.ac3" % tmp_workdir try: #cairo.ImageSurface.get_data pngorpnm = 'ppmtoy4m -F %s -A %s -Ip -B -S 420mpeg2' % \ (self.fps_ratio, self.aspect) _write_img = write_ppm # set write function just below except: pngorpnm = 'ppmtoy4m -F %s -A %s -Ip -S 420mpeg2' % \ (self.fps_ratio, self.aspect) _write_img = write_png # Cinelerra params: -b 0 -q 5 -a 2 -F 4 -I 0 -M 2 -f 8 -R 0 # TODO: move this to encode.py # -M (multi-threading, num CPUs) # # -b 0 -q 5 # or # -b 7500 pipe = os.popen("%s | mpeg2enc -q 5 -g 45 -G 45 -f 8 -a 2 -I 0 " "-o '%s'" % (pngorpnm, m2v_file), 'w') frame = 1 while frame <= self.frames: print("Drawing frame %s of %s" % (frame, self.frames)) if (self.interlaced): draw1 = self.get_drawing(frame) frame += 1 draw2 = self.get_drawing(frame) drawing = interlace_drawings(draw1, draw2) else: drawing = self.get_drawing(frame) # jpeg2yuv likes frames to start at 0 _write_img(drawing, pipe, self.output_size[0], self.output_size[1], tmp_workdir) frame += 1 print("Closing encoder. Output to %s" % out_filename) pipe.close() print("Waiting for encoder to finish...") time.sleep(0.5) os.system("ls -al %s" % m2v_file) os.system("cp %s /tmp/go.m2v" % m2v_file) vidonly = mplayer.identify(m2v_file) # Fix length vidonly.length = float(self.seconds) outvid = MediaFile(out_filename, self.format, self.tvsys) outvid.aspect = self.aspect # Important to render 16:9 video correctly. outvid.widescreen = self.widescreen print("Running audio encoder...") ffmpeg.encode_audio(vidonly, ac3_file, outvid) print("Mplex...") mplex.mux(m2v_file, ac3_file, outvid) # Clean up print("Cleaning up %s ..." % tmp_workdir) shutil.rmtree(tmp_workdir) print("Output: %s" % out_filename) return out_filename def draw_text_demo(flipbook): """Draw a demonstration of Text layers with various effects. """ assert isinstance(flipbook, Flipbook) last_frame = flipbook.frames # Background image bgd = layer.Background('black') flipbook.add(bgd) text1 = layer.Text(u"Spectrum effect demo", color=None) text1.add_effect(effect.Spectrum(1, last_frame)) flipbook.add(text1, (20, 30)) #text2 = layer.Text(u"FadeInOut effect demo") #text2.add_effect(effect.FadeInOut(1, last_frame, last_frame / 4)) #flipbook.add(text2, (20, 60)) text3 = layer.Text(u"Movement effect demo") text3.add_effect(effect.Movement(1, last_frame, (0, 0), (300, 50))) flipbook.add(text3, (20, 90)) text4 = layer.Text(u"Whirl effect demo", color=None, align='center') k = [Keyframe(0, 0), Keyframe(30, 0), Keyframe(40, 15), Keyframe(45, -10), Keyframe(50, 10), Keyframe(55, -2), Keyframe(60, 0)] text4.add_effect(effect.Whirl(k, center=(25, 10), units='deg')) text4.add_effect(effect.Colorfade(1, last_frame, (1.0, 0, 0), (0, 1.0, 0))) flipbook.add(text4, (340, 350)) text5 = layer.Text(u'Whirl effect demo2 ', color='white', align="center") k2 = [Keyframe(0, 0), Keyframe(last_frame, 720)] text5.add_effect(effect.Whirl(k2, center=(25, 10), units='deg')) flipbook.add(text5, (450, 400)) # Keyframed opacity demos, using both linear and cosine interpolation pulse = [Keyframe(1, 0.2), Keyframe(last_frame * 2/10, 1.0), Keyframe(last_frame * 4/10, 0.2), Keyframe(last_frame * 6/10, 1.0), Keyframe(last_frame * 8/10, 0.5), Keyframe(last_frame, 1.0)] # Text Layers text_linear = layer.Text("Keyframed opacity (linear)", color='lightgreen') text_cosine = layer.Text("Keyframed opacity (cosine)", color='lightgreen') # Effects eff_linear = effect.Fade(pulse, 'linear') eff_cosine = effect.Fade(pulse, 'cosine') # Graph of the keyframe effects graph_linear = layer.InterpolationGraph(pulse, method='linear') graph_cosine = layer.InterpolationGraph(pulse, method='cosine') # Add effects to the text layers text_linear.add_effect(eff_linear) text_cosine.add_effect(eff_cosine) # Add layers to the flipbook flipbook.add(text_linear, (20, 150)) flipbook.add(graph_linear, (20, 180)) flipbook.add(text_cosine, (340, 150)) flipbook.add(graph_cosine, (340, 180)) if __name__ == '__main__': start_time = time.time() # Benchmark if len(sys.argv) > 1: seconds = int(sys.argv[1]) else: seconds = 3 flip = Flipbook(seconds, 'dvd', 'ntsc') draw_text_demo(flip) # Video clip #clip = layer.VideoClip(video, (320, 240)) #clip.rip_frames(0, 90) #clip.effects.append(effect.Fade(1, 90, 20)) #flip.add(clip, (260, 200)) # Render the final video filename = flip.render_video('/tmp/flipbook.mpg') print("Took %f seconds to render: %s" % (time.time() - start_time, filename)) tovid-0.33/libtovid/render/__init__.py0000644000175100017510000000013211315275341016416 0ustar ericeric__all__ = [ 'animation', 'drawing', 'effect', 'flipbook', 'layer', ] tovid-0.33/libtovid/render/effect.py0000644000175100017510000003523511315544006016124 0ustar ericeric"""This module defines classes for creating and drawing effects on a series of drawings (as in a Flipbook). Effect classes are arranged in a (currently) simple hierarchy:: Effect (base class) Movement Translate Fade FadeInOut Colorfade Spectrum Scale Whirl PhotoZoom KeyFunction """ __all__ = [ 'Effect', 'Movement', 'Translate', 'Fade', 'FadeInOut' 'Colorfade', 'Spectrum', 'Scale', 'Whirl', 'PhotoZoom', 'KeyFunction', ] from libtovid.render.drawing import Drawing from libtovid.render.animation import Keyframe, Tween from random import randint class Effect: """A "special effect" created by keyframing a Cairo drawing command along the given frame interval. """ def __init__(self, start, end): """Create an effect lasting from start frame to end frame. """ self.start = start self.end = end # List of Keyframes self.keyframes = [Keyframe(self.start, 0), Keyframe(self.end, 0)] self.tween = Tween(self.keyframes) # Parents self._parent_flipbook = None self._parent_layer = None def init_parent_flipbook(self, fb): self._parent_flipbook = fb def init_parent_layer(self, layer): self._parent_layer = layer def pre_draw(self, drawing, frame): """Set up effect elements that must be applied before drawing a Layer. drawing The Drawing to apply effects to frame The frame for which to render the effect Extend this function in derived classes. """ drawing.save() def post_draw(self, drawing, frame): """Finalize effect elements after a Layer is drawn. drawing The Drawing to apply effects to frame The frame for which to render the effect Extend this function in derived classes. """ drawing.restore() # New Effect template # # Copy and paste this code to create your own Effect # # The first line defines your effect's name. (Effect) means it inherits from # the base Effect class, and shares some properties with it. class MyEffect (Effect): """Modify this documentation string to describe what your effect does. """ # The __init__ function is called whenever a MyEffect is created. Make # sure your __init__ takes start and end arguments; additional arguments # (such as start_val and end_val below) allow someone using your effect # class to customize its behavior in some way. See the other effects below # for examples. def __init__(self, start, end, start_val, end_val): """Create a MyEffect lasting from start to end frame. """ # Be sure to call this first-thing: Effect.__init__(self, start, end) # It initializes the base Effect class with start and end frames. # Next, define any keyframes your effect needs to use. This # effect just varies something from start_val to end_val: self.keyframes = [ Keyframe(start, start_val), Keyframe(end, end_val) ] # Call this afterwards, to calculate the values at all frames self.tween = Tween(self.keyframes) def draw(self, drawing, frame): """Undocumented""" # Example function that can be called when drawing a layer. # The Layer must know that his particular effect requires the # calling of this function, or to add special parameters, or to # draw between items in the layer. # First, it's good to make sure we really have a Drawing class assert isinstance(drawing, Drawing) # This effect varies the stroke width across a sequence of frames. # Replace 'stroke_width' with your own drawing function(s) drawing.stroke_width(self.tween[frame]) # Effect rendering occurs in two phases: pre_draw and post_draw. # These functions are already defined in the Effect base class; extend # them to do your effect rendering. def pre_draw(self, drawing, frame): """Do preliminary effect rendering.""" # Always call the base class pre_draw first: Effect.pre_draw(self, drawing, frame) # This effect varies the stroke width across a sequence of frames. # Replace 'stroke_width' with your own drawing function(s) drawing.stroke_width(self.tween[frame]) # Extend post_draw to do any post-rendering cleanup you need to do. Most # of the time, you won't need to extend this, but if you do, be sure to # call the base class post_draw at the end: def post_draw(self, drawing, frame): """Do post-drawing cleanup.""" # Post-drawing cleanup here Effect.post_draw(self, drawing, frame) class Movement (Effect): """A movement effect, from one point to another.""" def __init__(self, start, end, (x0, y0), (x1, y1)): """Move from start (x0, y0) to end (x1, y1). """ Effect.__init__(self, start, end) self.keyframes = [ Keyframe(start, (x0, y0)), Keyframe(end, (x1, y1)) ] self.tween = Tween(self.keyframes) def pre_draw(self, drawing, frame): drawing.save() drawing.translate(*self.tween[frame]) def post_draw(self, drawing, frame): drawing.restore() class Translate (Movement): """Translates the layer to some relative (x,y) coordinates """ def __init__(self, start, end, (dx, dy)): Movement.__init__(self, start, end, (0, 0), (dx, dy)) class Fade (Effect): """A generic fade effect, varying the opacity of a layer. """ def __init__(self, keyframes, method='linear'): """Fade in from start, for fade_length frames; hold at full opacity, then fade out for fade_length frames before end. fade_length Number of frames to fade-in from start, and number of frames to fade-out before end. Everything in-between is at full opacity. keyframes A set of Keyframe() objects, determining the fading curve. Values of the Keyframe() must be floats ranging from 0.0 to 1.0 (setting opacity). method 'linear' or 'cosine' interpolation """ # A fill-opacity curve, something like: # ______ 100% # / \ # start./ \.end 0% # if isinstance(keyframes, list): if not isinstance(keyframes[0], Keyframe): raise ValueError, "Must be a list of Keyframe objects" self.keyframes = keyframes else: raise ValueError, "List of Keyframe objects required" self.tween = Tween(self.keyframes, method) def pre_draw(self, drawing, frame): """Called before drawing on a layer. """ drawing.push_group() def post_draw(self, drawing, frame): """Called after drawing on a layer. """ assert isinstance(drawing, Drawing) drawing.pop_group_to_source() drawing.paint_with_alpha(self.tween[frame]) class FadeInOut (Fade): def __init__(self, start, end, fade_length=30): """Fade in from start, for fade_length frames; hold at full opacity, then fade out for fade_length frames before end. fade_length Number of frames to fade-in from start, and number of frames to fade-out before end. Everything in-between is at full opacity. """ # A fill-opacity curve, something like: # ______ 100% # / \ # start./ \.end 0% # self.keyframes = [ Keyframe(start, 0.0), # Start fading in Keyframe(start + fade_length, 1.0), # Fade-in done Keyframe(end - fade_length, 1.0), # Start fading out Keyframe(end, 0.0) # Fade-out done ] self.tween = Tween(self.keyframes) class Colorfade (Effect): """A color-slide effect between an arbitrary number of RGB colors. """ def __init__(self, start, end, (r0, g0, b0), (r1, g1, b1)): """Fade between the given RGB colors.""" Effect.__init__(self, start, end) self.keyframes = [ Keyframe(start, (r0, g0, b0)), Keyframe(end, (r1, g1, b1)) ] self.tween = Tween(self.keyframes) def pre_draw(self, drawing, frame): """Set source color""" drawing.set_source(self.tween[frame]) def post_draw(self, drawing, frame): pass class Spectrum (Effect): """A full-spectrum color-fade effect between start and end frames. """ def __init__(self, start, end): Effect.__init__(self, start, end) step = (end - start) / 6 self.keyframes = [ Keyframe(start, (1.0, 0, 0)), Keyframe(start + step, (1.0, 0, 1.0)), Keyframe(start + step*2, (0, 0, 1.0)), Keyframe(start + step*3, (0, 1.0, 1.0)), Keyframe(start + step*4, (0, 1.0, 0)), Keyframe(start + step*5, (1.0, 1.0, 0)), Keyframe(end, (1.0, 0, 0)) ] self.tween = Tween(self.keyframes) def pre_draw(self, drawing, frame): drawing.set_source(self.tween[frame]) def post_draw(self, drawing, frame): pass class Scale (Effect): """A Scaling effect, from one size to another. """ def __init__(self, start, end, (w0, h0), (w1, h1)): Effect.__init__(self, start, end) self.keyframes = [ Keyframe(start, (w0, h0)), Keyframe(end, (w1, h1)) ] self.tween = Tween(self.keyframes) def pre_draw(self, drawing, frame): drawing.save() drawing.scale(self.tween[frame]) def post_draw(self, drawing, frame): drawing.restore() class Whirl (Effect): """Rotates an object a number of times. """ def __init__(self, keyframes, center=(0, 0), method='linear', units='deg'): """Create a Whirl effect method 'linear' or 'cosine', for passing from one angle to another units 'deg' or 'rad', the unit used in the Keyframes """ if units != 'deg' and units != 'rad': raise ValueError, "units must be 'rad' (radians) or 'deg' (degrees)" self.units = units if not isinstance(center, tuple): raise ValueError, "center must be a two-value tuple" self.center = center self.keyframes = keyframes self.tween = Tween(self.keyframes, method) def pre_draw(self, drawing, frame): drawing.save() # how to center the thing ? so you give a rotation point ? drawing.translate(*self.center) if self.units is 'deg': drawing.rotate_deg(self.tween[frame]) elif self.units is 'rad': drawing.rotate_rad(self.tween[frame]) def post_draw(self, drawing, frame): drawing.translate(- self.center[0], - self.center[1]) drawing.restore() class PhotoZoom (Effect): """Zoom in and create dynamism by moving a picture. Normally applies to an Image layer, but can be used with others. """ def __init__(self, keyframes, subject=(0, 0), direction=None, movement=50, method='linear'): """Create a PhotoZoom effect keyframes 0.0 for beginning of effect, and 1.0 to reach the end, intermediate values show the intermediate state of the effect. subject Position of the subject of interest. That is the point where the zoom in/out will focus it's attention. If (0, 0), the focus will be chosen randomly in the 2/3 of the center of the screen. direction 'in', 'out', None (random) movement 0 to 100, percentage of movement to create. method 'linear' or 'cosine' """ if direction not in ['in', 'out', None]: raise ValueError, "'direction' must be 'in', 'out' or None" if (direction == None): self.direction = randint(0, 1) and 'in' or 'out' else: self.direction = direction print("Zoom in direction: %s" % self.direction) self.subject = subject self.movement = movement self.keyframes = keyframes self.tween = Tween(self.keyframes, method) def pre_draw(self, drawing, frame): drawing.save() fb = self._parent_flipbook # Use subject, or randomize in the center 1/3 of the image. if (self.subject == (0, 0)): self.subject = (randint(int(0.33 * fb.w), int(0.66 * fb.w)), randint(int(0.33 * fb.h), int(0.66 * fb.h))) # Max moving = 25% * pixels estimation * movement factor zoomfactor = 0.25 * (self.movement / 100.) inter = self.tween[frame] if (self.direction == 'in'): gozoom = 1.0 + (1.0 - inter) * zoomfactor else: gozoom = 1.0 + inter * zoomfactor drawing.scale_centered(self.subject[0], self.subject[1], gozoom, gozoom) def post_draw(self, drawing, frame): drawing.restore() class KeyFunction (Effect): """A keyframed effect on an arbitrary Drawing function. """ def __init__(self, draw_function, keyframes, method='linear'): """Create an effect using the given Drawing function, with values determined by the given list of Keyframes. For example:: KeyFunction(Drawing.stroke_width, [Keyframe(1, 1), Keyframe(30, 12)]) This says to vary the stroke width from 1 (at frame 1) to 12 (at frame 30). The 'method' argument defines an interpolation method to use between keyframes, and may be either 'linear' or 'cosine'. """ # Call base constructor with start and end frames Effect.__init__(self, keyframes[0].frame, keyframes[-1].frame) # TODO: Make sure a valid function name is given self.draw_function = draw_function self.keyframes = keyframes # Tween keyframes using the given interpolation method self.tween = Tween(self.keyframes, method) def pre_draw(self, drawing, frame): drawing.save() self.draw_function(drawing, self.tween[frame]) def post_draw(self, drawing, frame): drawing.restore() tovid-0.33/libtovid/runtest.py0000755000175100017510000000250011315544005015104 0ustar ericeric# runtest.py """libtovid test script Execute this script to run tests on the modules in libtovid. These tests consist of executing each libtovid module standalone; it is presumed that each module to be tested contains at least the following:: import unittest if __name__ == '__main__': unittest.main() which runs unit tests, or:: import doctest if __name__ == '__main__': doctest.testmod(verbose=True) which does an automated verification of the docstrings in each module. NB -- You're going to get lots of output, so a ``> log.txt`` is advised. """ import os import commands from glob import glob libtovid_modules = [ 'author.py', 'cli.py', 'deps.py', 'encode.py', 'media.py', 'odict.py', 'opts.py', 'standard.py', 'stats.py', 'xml.py', ] subdirs = [ 'backend', 'metagui', 'render', 'template', 'test', 'util', ] subdir_modules = [] for subdir in subdirs: subdir_modules.extend(glob('%s/*.py' % subdir)) all_modules = libtovid_modules + subdir_modules if __name__ == '__main__': # Execute each module for mod in all_modules: print("Testing: %s" % mod) try: print(commands.getoutput('python %s' % mod)) except KeyboardInterrupt: print("Test interrupted.") exit() tovid-0.33/libtovid/guis/0000755000175100017510000000000011374664177014017 5ustar ericerictovid-0.33/libtovid/guis/makexml.py0000755000175100017510000000402711315276720016021 0ustar ericeric# makexml.py from libtovid.metagui import * _dvd = Flag("DVD", '-dvd', True) _vcd = Flag("VCD", '-vcd', False) _svcd = Flag("SVCD", '-svcd', False) _overwrite = Flag("Overwrite", '-overwrite', False, "Overwrite any existing .xml output file") _quiet = Flag("Quiet", '-quiet', False, "Limit output to essential messages") # TODO: Figure out how to handle multiple cases # (video list, -menu video list, -slides etc.) # and how to deal with -group / -endgroup VIDEOS = List("Video files", '', None, "List of .mpg video files to include on the disc", Filename()) _menu = Filename("Menu file", '-menu', '', "Menu .mpg, linking to one or more videos.") _slides = List("Slideshow images", '-slides', '', "Create a slide-show of still image files.", Filename()) _group = '' _endgroup = '' _topmenu = Filename("Top menu", '-topmenu', '', "Menu .mpg to use for the top (root-level) DVD menu. This menu " "should link to each of the other menus.") _titlesets = Flag("Create titlesets", '-titlesets', False, "(DVD only) Forces the creation of a separate titleset per title. " "This is useful if the titles of a DVD have different video formats, " "e.g. PAL + NTSC or 4:3 + 16:9. If used with menus, there must be a " "-topmenu option that specifies a menu file with an entry for each " "of the titlesets.") _chapters = Number("Chapter interval", '-chapters', 5, "(DVD only) Creates a chapter every INTERVAL minutes. This option " "can be put at any position in a and is valid for " "all subsequent titles until a new -chapters option is encountered. " "Using this option may take some time, since the duration of the " "video must be calculated.", 1, 60, 'minutes') _nochapters = Flag("No chapters", '-nochapters', False, "Don't add any chapter points to the video.") OUT_PREFIX = Filename("Output file", '', '', "Prefix of .xml file to write as output", 'save', "Choose an output prefix") def run(): pass if __name__ == '__main__': run() tovid-0.33/libtovid/guis/makemenu.py0000755000175100017510000000603011315276720016161 0ustar ericeric# makemenu.py from libtovid.metagui import * # Menu TV system _ntsc = Flag('NTSC', '-ntsc', True) _ntscfilm = Flag('NTSC Film', '-ntscfilm', False) _pal = Flag('PAL', '-pal', False) TVSYS = FlagGroup('TV system', 'exclusive', _ntsc, _ntscfilm, _pal) # Menu format _vcd = Flag('VCD', '-vcd', False) _svcd = Flag('SVCD', '-svcd', False) _dvd = Flag('DVD', '-dvd', True, 'Create a menu in DVD format. Extra features are enabled for DVD menus.', enables=['-button', '-button-font', '-button-outline', '-highlightcolor', '-selectcolor']) FORMAT = FlagGroup('Menu format', 'exclusive', _vcd, _svcd, _dvd) # DVD-only options (enabled by -dvd) _button = Text('Button character', '-button', '>', 'A single character to use for a menu cursor, or one of ' '"play", "movie", or "utf8 xxxx".') _highlightcolor = Color('Highlight color', '-highlightcolor') _selectcolor = Color('Select color', '-selectcolor') _button_outline = Color('Outline color', '-button-outline') _button_font = Font('Button font', '-button-font') DVD_ONLY = VPanel('DVD menu elements', _button, _button_font, _button_outline, _highlightcolor, _selectcolor, ) # Background _background = Filename('BG image', '-background') _crop = Flag('Crop', '-crop', True) _scale = Flag('Scale', '-scale', False) _audio = Filename('BG audio', '-audio') _length = Number('Duration', '-length', 30, 'Menu duration', 1, 600, 'seconds') _nosafearea = Flag('No safe area', '-nosafearea', False) # Fonts _menu_title = Text('Menu title', '-menu-title') _font = Font('Menu font', '-font') _fontsize = Number('Font size', '-fontsize', 24, 'Menu font size', 10, 100, 'pixels') _menu_title_fontsize = Number('Title font size', '-menu-title-fontsze', 32, 'Menu title (heading) font size', 10, 100, 'pixels') _fontdeco = Text('Font decoration', '-fontdeco') _align = Choice('Text alignment', '-align', 'left', 'Align/justify the menu text', 'left|center|middle|right') _textcolor = Color('Menu text color', '-textcolor') # Behavior _debug = Flag('Debug', '-debug', False) _overwrite = Flag('Overwrite', '-overwrite', False) _noask = Flag('No prompting', '-noask', False) _quiet = Flag('Quiet', '-quiet', False) TITLES = List("Titles", '', '', "Video titles to include on the menu", Filename()) OUT_PREFIX = Filename("Output name", '-out', '', "Name of output file (will be given a .mpg extension)", 'save', "Choose an output name") MAIN = VPanel('Makemenu options', HPanel('', FORMAT, DVD_ONLY, TVSYS), VPanel('Background', _background, _audio, HPanel('', FlagGroup('Fit image', 'exclusive', _crop, _scale), _nosafearea, _length ), ), _menu_title, _menu_title_fontsize, _textcolor, _font, _fontsize, _align, _fontdeco, _debug, _overwrite, _noask, _quiet, TITLES, OUT_PREFIX, ) def run(): app = Application('makemenu', MAIN) gui = GUI("tovid metagui", 640, 720, app) gui.run() if __name__ == '__main__': run() tovid-0.33/libtovid/guis/tovid.py0000644000175100017510000002412311342603462015501 0ustar ericeric# tovid.py """A GUI for the ``tovid`` script. """ # Get supporting classes from libtovid.metagui from libtovid.metagui import * ### -------------------------------------------------------------------- ### tovid ### -------------------------------------------------------------------- _in = Filename('Input filename', '-in', '', 'Video file to encode', 'load', 'Select a video file') _out = Filename('Output prefix', '-out', '', 'Name to use for encoded output file (.mpg added automatically)', 'save', 'Choose an output prefix') # Standard formats _dvd = Flag("DVD", '-dvd', False, "(720x480 NTSC, 720x576 PAL) DVD-compatible output. May be burned " "to a DVD[+/-]R[W] disc. Also known as Digital [Versatile|Video] Disc, " "or just DVD depending on who you talk to.") _svcd = Flag("Super Video CD (SVCD)", '-svcd', False, "(480x480 NTSC, 480x576 PAL) Super Video CD format, may be burned " "to a CD-R. Like VCD but with better resolution and variable bitrate. " " About 1 hour of playing time per disc.") _vcd = Flag("Video CD (VCD)", '-vcd', False, "(320x240 NTSC, 320x288 PAL) Video CD format, may be burned to a CD-R. " "About 1 hour of playing time per disc.") # Extra formats _dvd_vcd = Flag('VCD-on-DVD', '-dvd-vcd', False, '(352x240 NTSC, 352x288 PAL) VCD-on-DVD output') _half_dvd = Flag('Half-DVD', '-half-dvd', False, '(352x480 NTSC, 352x576 PAL) Half-D1-compatible output') _kvcd = Flag('KVCD', '-kvcd', False, '(352x240 NTSC, 352x288 PAL) KVCD-enhanced long-playing video CD') _kvcdx3 = Flag('KVCDx3', '-kvcdx3', False, '(528x480 NTSC, 520x576 PAL) KVCDx3 specification') _kvcdx3a = Flag('KVCDx3A', '-kvcdx3a', False, '(544x480 NTSC, 544x576 PAL) KVCDx3a specification') _kdvd = Flag('KDVD', '-kdvd', False, '(720x480 NTSC, 720x576 PAL) KVCD-enhanced long-playing DVD') _bdvd = Flag('BDVD', '-bdvd', False, '(720x480 NTSC, 720x576 PAL) BVCD-enhanced long-playing DVD') # Aspect ratio _full = Flag('4:3 (full-frame)', '-full', False) _wide = Flag('16:9 (widescreen)', '-wide', False) _panavision = Flag('2.35:1 (panavision)', '-panavision', False) _aspect = Text('Aspect ratio', '-aspect', '4:3', 'Explicit integer aspect ratio (ex. 6:4)') # TV Systems _ntsc = Flag("NTSC", '-ntsc', False, "NTSC, US standard, 29.97 fps") _ntscfilm = Flag("NTSC Film", '-ntscfilm', False, "NTSC Film, 23.976 fps") _pal = Flag("PAL", '-pal', False, "PAL, European standard, 25.00 fps") # Video quality/size controls _quality = Number('Quality', '-quality', 6, 'Quality of encoding, on a scale of 1-10, with 10 giving the best ' 'quality, at the expense of a larger output file.', 1, 10) _vbitrate = Number('Bitrate', '-vbitrate', 0, 'Target video bit rate, in kilobits per second. Higher bit rates ' 'give better quality, but a larger output file.', 0, 9000, units='kbits/sec') _fit = Number('Fit to', '-fit', 0, 'Fit the output file into the given size in MiB (2^20 bytes). ' 'Video bitrate and quantization are chosen to ensure the target size ' 'is not exceeded. Ignored for VCD, which has constant bitrate.', 0, 4400, units='MiB') _discsize = Number('Disc size', '-discsize', 0, 'Size of target media, in MiB (2^20 bytes). Output will be split into ' 'chunks of this size.', 0, 4400, units='MiB') # Encoder options _mplayeropts = SpacedText('mplayer options', '-mplayeropts', '', 'TODO: Tooltip') _filters = Choice('mplayer filters', '-filters', 'none', 'TODO: Tooltip', 'none|denoise|deblock|contrast|all', side='top') _ffmpeg = Flag('Encode using ffmpeg', '-ffmpeg', False) _parallel = Flag('Parallel video/audio encoding', '-parallel', False, "(mpeg2enc only) Rip, encode, and multiplex in parallel.") # Interlacing _interlaced = Flag('Interlaced encoding', '-interlaced', False, "Do interlaced encoding. Use this if your source material is interlaced.") _interlaced_bf = Flag('Interlaced (bottom first)', '-interlaced_bf', False, "Do interlaced encoding, bottom-field first. Use this if " "the -interlaced option produces bad output.") _deinterlace = Flag('Deinterlace', '-deinterlace', False, "Deinterlace the input video, and create a progressive-scan output. " "Degrades video quality considerably.") # Picture manipulation _safe = Number('Safe area', '-safe', 90, 'Safe area as a percentage of screen size', 50, 100, 'scale') _crop = Text('Crop', '-crop', '', 'TODO: Tooltip') _slice = Number('Slice', '-slice', 0, 'TODO: Tooltip', 0, 220000) _fps = Text('FPS', '-fps', '', 'TODO: Tooltip') _type = Choice('Video type', '-type', 'live', 'TODO: Tooltip', 'live|animation|bw', side='top') # Subtitles _autosubs = Flag('Auto-subtitles', '-autosubs', False, 'Automatically include subtitle files with the same ' 'name as the input video.') _mkvsub = Text('mkvsub', '-mkvsub', '', 'EXPERIMENTAL. Attempt to encode an integrated subtitle stream ' '(such as may be found in Matroska .mkv files) in the given ' 'language code (eng, jpn, etc.) May work for other formats.') _subtitles = Filename('subtitles', '-subtitles', '', 'Get subtitles from FILE and encode them into the video. ' 'WARNING: This hard-codes the subtitles into the video, and you ' 'cannot turn them off while viewing the video. By default, no subtitles ' 'are loaded. If your video is already compliant with the chosen output ' 'format, it will be re-encoded to include the subtitles.', 'load', 'Select a subtitle file') # Audio options _normalize = Flag('Normalize', '-normalize', False, 'Analyze the audio stream and then normalize the volume of the audio. ' 'This is useful if the audio is too quiet or too loud, or you want to ' 'make volume consistent for a bunch of videos. Similar to running ' 'normalize without any parameters. The default is -12dB average level ' 'with 0dB gain.') _downmix = Flag('Downmix', '-downmix', False, 'Encode all audio tracks as stereo. This can save space on your DVD if ' 'your player only does stereo. The default behavior of tovid is to use the ' 'original number of channels in each track. For aac audio, downmixing is ' 'not possible: tovid runs a quick 1 frame test to try to downmix the input ' 'track with the largest number of channels, and if it fails then it will ' 'revert to the default behavior of using the original channels.') _audiotrack = SpacedText('Audio track', '-audiotrack', '', 'Encode the given audio track, if the input video has multiple ' 'audio tracks. NUM is 1 for the first track, 2 for the second, etc. ' 'You may also provide a list of tracks, separated by spaces or commas, ' 'for example -audiotrack 3,1,2. Use idvid on your source video to ' 'determine which audio tracks it contains. ') _abitrate = Number('Audio bitrate', '-abitrate', 224, 'Encode audio at NUM kilobits per second. Reasonable values include 128, ' '224, and 384. The default is 224 kbits/sec, good enough for most ' 'encodings. The value must be within the allowable range for the chosen ' 'disc format; Ignored for VCD, which must be 224.', 128, 384, units='kbits/sec') _amplitude = Text('Amplitude', '-amplitude', '', 'In addition to analyzing and normalizing, apply the gain to the audio ' 'such that the "average" (RMS) sound level is NUM. Valid values range ' '0.0 - 1.0, with 0.0 being silent and 1.0 being full scale. Use NUMdB ' 'for a decibel gain below full scale ' '(the default without -amplitude is -12dB).') _async = Number('Audio sync', '-async', 0, 'Adjust audio synchronization', -600, 600, units='secs') # File-related _keepfiles = Flag('Keep temporary files', '-keepfiles') _overwrite = Flag('Overwrite files', '-overwrite') _nofifo = Flag('No FIFO', '-nofifo', False, "Don't use a FIFO (pipe) when encoding. Instead, write " "intermediate conversion files to disk. May take " "up lots of space!") # Runtime behavior _config = Filename('Configuration file', '-config', '', 'TODO: Tooltip', 'load', 'Select tovid configuration file') _priority = Choice('Process priority', '-priority', 'high', 'TODO: Tooltip', 'low|medium|high') _update = Number('Update interval', '-update', 5, 'TODO: Tooltip', 1, 20) _quiet = Flag('Quiet', '-quiet') _fake = Flag('Fake encoding', '-fake') _force = Flag('Force encoding', '-force') # Prompting _noask = Flag('No prompts', '-noask', False, 'TODO: Tooltip') _from_gui = Flag('From GUI', '-from-gui', True) ### --------------------------------------------------------------------------- ### Higher-level groups and panels ### --------------------------------------------------------------------------- IN_OUT = VPanel('Filenames', _in, _out) FORMAT = FlagGroup('Disc format', 'exclusive', _dvd, _half_dvd, _kvcd, _kvcdx3a, _kdvd, _bdvd, side='top', columns=3) BASIC_OPTS = VPanel('Basic options', FORMAT, HPanel('Output file size', _quality, _vbitrate, _fit, _discsize), HPanel('', FlagGroup('TV System', 'exclusive', _ntsc, _ntscfilm, _pal), FlagGroup('Aspect ratio', 'exclusive', _full, _wide, _panavision), FlagGroup('Interlacing', 'exclusive', _interlaced, _interlaced_bf, _deinterlace) ), ) MAIN = VPanel('Main', IN_OUT, BASIC_OPTS, ) VIDEO = HPanel('Video', VPanel('Encoder options', FlagGroup('', 'exclusive', _ffmpeg, _parallel), _filters, _mplayeropts, _force, ), VPanel('Picture manipulation', _safe, _crop, _slice, _fps, _type), ) AUDIO = VPanel('Audio & Subtitles', _normalize, _downmix, _audiotrack, _abitrate, _amplitude, _async, _autosubs, _mkvsub, _subtitles, ) BEHAVIOR = VPanel('Behavior', _config, _priority, VPanel('File output', _fake, _overwrite, _keepfiles, _nofifo), VPanel('Prompts and output options', _quiet, _noask, _from_gui, _update) ) ### -------------------------------------------------------------------- ### main GUI ### -------------------------------------------------------------------- def run(): app = Application('tovid', MAIN, VIDEO, AUDIO, BEHAVIOR) gui = GUI("tovid metagui", 640, 720, app) gui.run() if __name__ == '__main__': run() tovid-0.33/libtovid/guis/tovid_batch.py0000755000175100017510000000072311315276721016651 0ustar ericeric# tovid_batch.py from libtovid.metagui import * from libtovid.guis import tovid _infiles = List('Input files', '-infiles', '', 'List of video files to encode', Filename()) MAIN = VPanel('Main', _infiles, tovid.BASIC_OPTS) def run(): app = Application('tovid-batch', MAIN, tovid.VIDEO, tovid.AUDIO, tovid.BEHAVIOR) gui = GUI("tovid-batch metagui", 640, 720, app) gui.run() if __name__ == '__main__': run() tovid-0.33/libtovid/guis/todisc.py0000755000175100017510000012343211373430576015657 0ustar ericeric# todisc.py """A GUI for the todisc command-line program. """ import os # Get supporting classes from libtovid.metagui from libtovid.metagui import * from libtovid.util import filetypes import os import fnmatch from libtovid.cli import Command # Define a few supporting functions def to_title(filename): basename = os.path.basename(filename) firstdot = basename.find('.') if firstdot >= 0: return basename[0:firstdot] else: return basename def strip_all(filename): return '' def find_masks(dir, pattern): file_list=[] ext = pattern.replace('*', '') for path, dirs, files in os.walk(os.path.abspath(dir)): for filename in fnmatch.filter(files, pattern): file_list+=[ filename.replace(ext, '') ] return file_list def nodupes(seq): noDupes = [] [noDupes.append(i) for i in seq if not noDupes.count(i)] return noDupes # List of file-type selections for Filename controls image_filetypes = [filetypes.image_files] image_filetypes.append(filetypes.all_files) #image_filetypes.extend(filetypes.match_types('image')) # confusing # video file-types from filetypes needs some additions v_filetypes = 'm2v vob ts ' v_filetypes += filetypes.get_extensions('video').replace('*.', '') v_filetypes += ' mp4 mpeg4 mp4v divx mkv ogv ogm ram rm rmvb wmv' vid_filetypes = filetypes.new_filetype('Video files', v_filetypes) video_filetypes = [vid_filetypes] video_filetypes += [filetypes.all_files] # some selectors can use video or audio av_filetypes = [ filetypes.all_files, filetypes.audio_files, vid_filetypes ] # some selectors can use image or video visual_filetypes = [ filetypes.all_files, filetypes.image_files, vid_filetypes ] # DVD video dvdext = 'vob mpg mpeg mpeg2' dvd_video_files = [ filetypes.new_filetype('DVD video files', dvdext) ] # Users can use their own thumb masks. Add to thumb mask control drop-down masks = [ 'none', 'normal', 'oval', 'vignette', 'plectrum', 'arch', 'spiral', \ 'blob', 'star', 'flare' ] # $PREFIX/lib/tovid is already added to end of PATH os_path = os.environ['PATH'].rsplit(':') sys_dir = os_path[-1] + '/masks' home_dir = os.path.expanduser("~") + '/.tovid/masks' for dir in sys_dir, home_dir: masks.extend(find_masks(dir, '*.png')) thumb_masks = '|'.join(nodupes(masks)) """Since todisc has a large number of options, it helps to store each one in a variable, named after the corresponding command-line option. Below are defined all the todisc options that will appear in the GUI. The actual GUI layout comes afterwards... """ ### -------------------------------------------------------------------- ### Main todisc options ### -------------------------------------------------------------------- _menu_title = Text('Menu title', '-menu-title', 'My video collection', 'Title text displayed on the main menu. Use \\n for a new line ' 'in a multi-line title.') _files = List('Video files', '-files', None, 'List of video files to include on the disc', Filename('', filetypes=video_filetypes)) _files_and_titles = ListToOne(_files, 'Video titles', '-titles', None, 'Titles to display in the main menu, one for each video file on the disc', Text(), filter=to_title) _group = ListToMany('-files', 'Grouped videos', '-group', None, 'Video files to group together. Select the video in the list ' \ 'on the left, and add files to group with it by using the file ' \ 'selector on the right', Filename('', filetypes=video_filetypes), index=True, repeat=True) _ntsc = Flag('NTSC', '-ntsc', True, 'NTSC, US standard') _pal = Flag('PAL', '-pal', False, 'PAL, European standard') _out = Filename('Output name', '-out', '', 'Name to use for the output directory where the disc will be created.', 'save', 'Choose an output name') ### -------------------------------------------------------------------- ### Showcase options ### -------------------------------------------------------------------- _non_showcase = Label( 'Default is centered thumbnail menu links.\nOr choose ' 'from the following "Edge aligned styles".\n' '( see tooltips )') _showcase = FlagOpt('Showcase', '-showcase', False, 'Arrange menu links along the outside edges, to leave room for' ' an optional "showcase" image or video. The file entry box' ' is for an optional image or video file to be showcased in a' ' large central frame', Filename('', action='load', desc='Select an image or video file.', filetypes=visual_filetypes)) _showcase_seek = Number('Showcase seek', '-showcase-seek', 2, 'Play showcase video from the given seek time. ' 'Note: switched menus uses the value(s) from the ' ' "Thumbnail seek(s)" option, not this one', 0, 3600, 'secs') _textmenu = FlagOpt("Textmenu", '-textmenu', False, 'A menu using just text for links instead of image AND text, arranged at ' 'outside edges. Optionally use a "showcase" image/video, or ' 'static/animated background. Use the "columns" option to set the number ' 'of titles in column 1 (column 2 will use the remainder). Note that ' 'column 2 titles are aligned right. ' 'See also "Quick menu" and "Switched menus".', Number('Columns', '', 13, '', 0, 13)) _quick_menu = Flag('Quick menu (may need a menu video)', '-quick-menu', False, 'Note: may not be available in your ffmpeg ' 'as the needed "vhooks" have been deprecated. Ten times faster than ' 'normal showcase animation. A showcase or background video is required ' 'unless doing switched menus. Menu links are text only. Not compatible ' 'with wave or rotate options.') _switched_menus = Flag('Switched menus (try with "Quick menu" !)', '-switched-menus', False, 'This makes a showcase style menu with text menu ' 'links. The showcased VIDEO or IMAGE will be of each ' 'video "title", and will change as you press the ' 'up/down keys on your remote. Do not select a ' 'showcase file for this option. Use with ' '"Quick menu" option for a huge speed up !') _showcase_framestyle = Choice('', '-showcase-framestyle', 'default', 'This option is only for menu styles with a "showcase" image. ' 'The "none" option will use the default frame method, using imagemagick. ' 'The "glass" option will use mplayer to make frames, giving an animated ' 'effect. The glass style can be much faster - especially if used without ' '-rotate and -wave options', 'default|glass') _showcase_framesize = Number('Frame size', '-showcase-framesize', 4, 'Width of the showcase image/video frame in pixels', 0, 20, 'pixels') _showcase_frame_color = Color('Frame color', '-showcase-frame-color', '#6E6E6E', 'Color of the showcase frame. ') _thumb_framesize = Number('Frame size', '-thumb-frame-size', 4, 'Width of the thumbnail link frame in pixels', 0, 20, 'pixels') _thumb_frame_color = Color('Frame color', '-thumb-frame-color', '#6E6E6E', 'Color of the thumbnail link frame. ') _showcase_shape = Choice('Showcase shape', '-showcase-shape', 'none', 'Apply a shaped transparency mask to showcase videos or images. ' 'No frame will be used for this option. ' 'Leave at "none" to not use a feathered shape.', thumb_masks, 'dropdown') _showcase_geo = Text('Image position', '-showcase-geo', '', 'Enter the position of the top left corner of the showcase image: ' 'e.g. "200x80". This value is applied to the video *before* is is scaled.') _showcase_titles_align = Choice('Title alignment', '-showcase-titles-align', 'none', 'This option is only for showcase style menus with video thumbnails and ' 'text. Default is to center the text above the thumbnails. This option ' 'will align the titles either to the left (west), center, or right ' '(east). Leave at "none" to let todisc sort it out for you.', 'none|west|center|east') # Menu settings _bg_color = Color('', '-bg-color', '#101010', 'Color of the menu background. Default (#101010) is NTSC color-safe black. ' 'Note: the color turns out MUCH lighter than the one you choose, ' 'so pick a VERY dark version of the color you want.') _background = Filename('File', '-background', '', 'Image or video displayed in the background of the main menu', 'load', 'Select an image or video file', filetypes=visual_filetypes) _bgaudio = Filename('File', '-bgaudio', '', 'Audio file to play while the main menu plays. ' 'Static menus use default audio length of 20 seconds. ' 'Change with "Menu length" on "Menu" tab. ' 'Use almost any filetype containing audio.', 'load', 'Select a file containing audio', filetypes=av_filetypes) _bgvideo_seek = Number('Seek', '-bgvideo-seek', 2, 'Play background video from the given seek time (seconds)', 0, 3600, 'secs') _bgaudio_seek = Number('Seek', '-bgaudio-seek', 2, 'Play background audio from the given seek time.', 0, 3600, 'secs') _menu_audio_fade = Number('Fade in', '-menu-audio-fade', 1, 'Number of sec to fade given menu audio in and out ' '(default: 1.0 seconds). Use a fade of "0" for no fade.', 0, 10, 'secs') _menu_fade = FlagOpt('Menu fade (in/out)', '-menu-fade', False, 'Fade the menu in and out. The background will fade in first, then ' 'the title (and mist if called for), then the menu thumbs and/or titles. ' 'The fadeout is in reverse order. The optional numerical argument ' 'is the length of time the background will play before the menu ' 'begins to fade in. To disable the fadeout portion, set the ' '"Pause indefinitely" flag on the "Playback" tab.', Number('Start', '', 1, '', 0, 60, 'secs')) _transition_to_menu = Flag('Transition to menu', '-transition-to-menu', False, 'A convenience option for animated backgrounds using a menu fadein: the ' 'background will become static at the exact point the thumbs finish ' 'fading in. This menu does not loop ' 'unless you enable "Menu looping" on the "Playback" tab).') _intro = Filename('Intro video', '-intro', '', 'Video to play before showing the main menu. At present this must ' 'be a DVD compatible video at the correct resolution etc. Only 4:3 ' 'aspect is supported.', 'load', 'Select a video file', filetypes=[('DVD video', dvd_video_files)]) _menu_length = Number('Menu length', '-menu-length', 20, 'Duration of menu. The length of the menu will also set ' 'the length of background audio for a static menu', 0, 120, 'secs') # Static/animated main menu _static = Flag('Static menu', '-static', False, 'Create still-image menus; takes less time. For duration of background ' 'audio for static menus, use "Menu length" on this tab. See "Main menu" ' 'tab for other menu styles and options.') _animated = Flag('Animated', '', True, 'Create animated menus. See "Main menu" tab for other menu styles and ' 'options.') # Static/animated submenus _submenus = Flag('Static submenus', '-submenus', False, 'Create a submenu for each video title. Submenu links lead to ' ' chapter points. See "Submenus" tab for more submenu options.') _ani_submenus = Flag('Animated', '-ani-submenus', False, 'Create an animated submenu for each video. Submenu links lead to ' 'chapter points. See "Submenus" tab for more submenu options.') _submenu_length = Number('Submenu length', '-submenu-length', 14, 'The length of the submenu. If doing static submenus and using audio ' 'for the submenu, this will be the length of the submenu audio', 0, 80, 'secs') _submenu_audio_fade = Number('Audio fade', '-submenu-audio-fade', 1, 'Number of seconds to fade given submenu audio in and out.', 0, 10, 'secs') _submenu_audio = List('Audio', '-submenu-audio', None, 'File(s) that will play as background audio for each submenu. ' 'Use a single file for all submenus, or 1 file per submenu. ' 'Any file containing audio (that ffmpeg can handle) can be used.', Filename('', filetypes=av_filetypes)) _submenu_background = List('Image(s)', '-submenu-background', None, 'Background image(s) for the submenus(s). Single value or list', Filename('', filetypes=image_filetypes)) _submenu_bg_color = Color('Background color', '-submenu-bg-color', '#101010', 'Background color to use for submenu(s). Default (#101010) is ' 'NTSC-safe black.') _submenu_titles = ListToOne('-files', 'Submenu titles', '-submenu-titles', None, 'Submenu titles for each video. ' 'Use \\n for a new line in a multi-line title.', Text(), filter=strip_all) _chapter_titles = ListToMany('-files', 'Chapter titles', '-chapter-titles', None, 'Chapter titles for each video. Use \\n for a new line in ' 'a multi-line title. Number of titles given must equal the ' 'number of chapters given for that video. HINT: If you ' 'click on a video title in the list to the left, then click ' '"Add" repeatedly until you reach the desired number of ' 'chapters, you can then edit the titles from the keyboard using ' 'the Enter key to cycle through them. ', Text(), side='left', repeat=True) _title_gap = Number('Space between titles', '-title-gap', 10, 'Leave this much vertical gap between titles. ' 'Default is 10 for line buttons, 15 for text-rect buttons. ' 'This value is applied before the menu is scaled.', 0, 400, 'pixels') _text_start = Number('Start titles at', '-text-start', 50, 'Titles will start at this pixel in the vertical axis. ' 'This value is applied before the menu is scaled.', 0, 460, 'pixels') ### -------------------------------------------------------------------- ### Runtime behavior ### -------------------------------------------------------------------- _jobs = Number('Number of jobs to run simultaneously', '-jobs', 0, 'Leave this value at 0 if you wish the default, which is to run ' 'as many jobs as processors found. Use this option if you wish ' 'to limit or increase this number.', 0, 32) _keep_files = Flag('Keep intermediate files on exit', '-keep-files', False) _no_ask = Flag('No prompts for questions', '-no-ask', False) _no_warn = Flag('No pause at warnings', '-no-warn', False) _grid = Flag('Grid preview', '-grid', False, 'Show a second preview image with a grid and numbers that will help in ' 'finding coordinates for options that might use them') _no_menu = Flag('No menu', '-no-menu', False, 'Create a DVD with no menu. This creates a DVD with no menu ' 'which will jump to the first video, and play all videos provided ' 'in sequence. Chapters provided with the -chapters option will be ' 'the chapter interval in minutes, or alternatively you can provide ' 'a single chapter list in HH:MM:SS format.') _slides = List('Images for slideshow one', '-slides', None, "Image files for the slideshow", Filename('', filetypes=image_filetypes)) _submenu_slide_total = SpacedText('Number of slides shown on submenu', '-submenu-slide-total', '', 'Use this many slides for making the slideshow submenus. ' 'The default is to use all the slides given. ' 'For multiple slideshows or slideshow(s) mixed with video(s) only. ' 'Select a submenu option on the "Basic" tab to use this option. ' 'Use a single value for all or list one value per submenu.') _slide_transition = Choice('Transition type', '-slide-transition', 'crossfade', 'The type of fade transition between slides in an ' 'animated slideshow menu. Be sure the menu length ' 'is long enough to support the 1 second transitions ' 'between the slides. The length is determined by ' '1) the length of the -bgaudio AUDIO 2) the ' 'length given with -menu-length DURATION. ' '* See "Basic" tab for menu length option *.', 'crossfade|fade') _slide_border = FlagOpt('Slide border', '-slide-border', False, 'Use a border around animated slideshow slides (default: 100 pixels).', Number('width', '', 100, '', 0, 200, 'pixels')) _slide_frame = FlagOpt('Slide frame', '-slide-frame', False, 'Use a frame around the animated slideshow slides (default: 12).', Number('width', '', 12, '', 0, 20, 'pixels')) _no_confirm_backup = Flag('No reminder prompt to backup your slideshow files', '-no-confirm-backup', False, 'Todisc prompts you for a "yes" ' ' to show you have taken backup precations. This option ' 'disables that prompt.') ### -------------------------------------------------------------------- ### Slideshows ### -------------------------------------------------------------------- _background_slideshow = Flag("Background", '-background-slideshow', False, 'This option is only for multiple slideshows, ' '(or mixed video and slideshow menus). It uses the ' 'animated slideshow as the background video') _showcase_slideshow = Flag("Showcase", '-showcase-slideshow', False, 'This option is only for multiple slideshows, ' '(or mixed video and slideshow menus). It uses the ' 'animated slideshow as the showcase video') _slideshow_menu_thumbs = List('Menu slide thumbs', '-slideshow-menu-thumbs', None, 'Slides for the menu thumbnail. For multiple slideshows or ' 'mixed slideshows/videos only.', Filename('', filetypes=image_filetypes)) _use_dvd_slideshow = FlagOpt('Use dvd-slideshow program', '-use-dvd-slideshow', False, 'Use the "dvd-slideshow" program to make the animated ' 'slideshow. You need of course to have installed this program ' 'to use this. You only need this for special effects like the ' '"Ken Burns effect" otherwise todisc can do the job well ' 'and fast on its own. The optional file is the dvd-slideshow ' 'file you would need for non-todisc options, otherwise ' 'todisc will make the file for you. Using this option will ' 'void many todisc slideshow options.', Filename('', action='load', help='Select the dvd-author configuration file.')) _slides_to_bin = List('Slides to "bin"', '-slides-to-bin', None, '"Binning" resizes the image to 640x480 using a "box" ' 'filter, which reduces "signal to noise ratio"' 'Use in conjuction with the next option for burring, ' 'to achieve stronger denoising', Filename('', filetypes=image_filetypes)) _slides_to_blur = List('Slides to blur', '-slides-to-blur', None, 'Blurring the image can reduce noise such as "ringing" ' 'effects. Use values between 0x0.1 and 0x0.9 for best ' 'results. Enter a single value or 1 value for each slide ' 'to be blurred.', Filename('', filetypes=image_filetypes)) _slide_blur = SpacedText('Slide blur amount', '-slide-blur', '', 'How much to blur each slide given with "Slides to blur". ' 'Use a single value, or a list with one value per slide given' 'The format is {radius}x{sigma} and the default is 0x0.2. Using ' 'values between 0x0.1 and 0x0.9 is probably the best range.') ### -------------------------------------------------------------------- ### Thumbnail images ### -------------------------------------------------------------------- _thumb_shape = Choice('Thumb shape', '-thumb-shape', 'none', 'Apply a shaped transparency mask to thumbnail videos or images. These ' '"feathered" shapes look best against a plain background or used with ' '**-thumb-mist** [COLOR]. To use a "mist" background behind each thumb, ' 'see "Thumb mist" section. No frame will be used for this option. ' 'Leave at "none" to not use a feathered shape.', thumb_masks, 'dropdown') _thumb_columns = Choice('Thumb columns', '-thumb-columns', 'none', 'Use a montage tile of 3x1 or 4x1 instead of the usual 2x2 for 3 videos. ' 'If you want 1 row with 3 thumbs choose "3", or for 1 row with 4 thumbs ' 'choose "4".', 'none|3|4', 'dropdown') _opacity = Number('Opacity', '-opacity', 100, 'Opacity of thumbnail videos as a percentage. ' 'Less than 100(%) is semi-transparent. ' 'Not recommended with dark backgrounds.', 1, 100, '%') _blur = Number('Blur', '-thumb-blur', 1.0, 'The amount of feather blur to apply to the thumb shape. ' 'Default is 1.0 which will more or less keep the shape, creating "soft" ' 'edges. Use float or integer values between 0.1 and 2.0', 0.1, 2.0, '', 'popup', 0.1) _showcase_blur = Text('Blur', '-showcase-blur', "", 'The amount of feather blur to apply to the showcase thumb shape. ' 'Default is 1.0 which will more or less keep the shape, creating "soft" ' 'edges. Use float or integer values between 0.1 and 2.0') _3dthumbs = Flag('3D thumbs', '-3d-thumbs', False, 'This will give an illusion of 3D to the thumbnails: ' 'dynamic lighting on rounded thumbs, and a raised ' ' effect on rectangular thumbs') _rotate_thumbs = SpacedText('Rotate Thumbs (list)', '-rotate-thumbs', '', 'Rotate thumbs the given amount in degrees - can be positive or ' 'negative. There must be one value for each file given with files. If ' 'the values are not the same distance from zero, the thumbs will be of ' 'different sizes as images are necessarily resized *after* rotating. ' 'Note: this will not change a portrait image into a landscape image!') _wave = Flag('Wave effect', '-wave', False, 'Wave effect for showcase image|video. Alters thumbs along a sine ' 'wave. This will pass a wave arg of -20x556, producing a gentle ' 'wave with a small amount of distortion. To use other values you ' 'will need to use "-wave VALUE" in the "todiscopts" box on the "Behavior" ' 'tab. See man todisc for details.') _3dshowcase = Flag('3D thumb', '-3d-showcase', False, 'This will give an illusion of 3D to the thumbnails: ' 'dynamic lighting on rounded thumbs, and a raised ' ' effect on rectangular thumbs') _rotate = Number('Rotate thumb', '-rotate', 0, 'Rotate the showcase image|video clockwise by this number of degrees.' 'Note: this will not change a portait image into a landscape image!', -30, 30, 'degrees') _thumb_mist = FlagOpt('Use thumb mist', '-thumb-mist', False, 'Use a mist behind shaped thumbnails for contrast with the background. ' 'The Color option is the color of the mist. With some font and mist ' 'color combos you may need to use a large bold font for readability.', Color('', '', '#ffffff', '')) _tile3x1 = Flag('1 row of 3 thumbs', '-tile3x1', False, 'Use a montage tile of 3x1 instead of the usual 2x2 ' '(3 videos only). Not a showcase option.') _tile4x1 = Flag('1 row of 4 thumbs', '-tile4x1', False, 'Use a montage tile of 4x1 instead of the usual 2x2 ' '(4 videos only). Not a showcase option.') _align = Choice('Align', '-align', 'north', 'Controls positioning of the thumbnails and their titles. ' 'With some arrangements this will have limited effects however.', 'north|south|east|west|center', 'dropdown') _seek = SpacedText('Thumbnail seek(s)', '-seek', '', 'Play thumbnail videos from the given seek time (seconds). ' 'A single value or space separated list, 1 value per video. ' 'Also used for seeking in switched menus.') ### -------------------------------------------------------------------- ### Fonts and font colors ### -------------------------------------------------------------------- # Menu title font _menu_font = Font('', '-menu-font', 'Helvetica', 'The font to use for the menu title') _menu_fontsize = Number('Size', '-menu-fontsize', 24, 'The font size to use for the menu title', 0, 80, 'pixels', toggles=True) _title_color = Color('', '-title-color', '#eaeaea', 'The font color to use for the menu title') _title_opacity = Number('Opacity', '-title-opacity', 100, 'The opacity of the menu title.', 0, 100, '%') _title_stroke = Color('Stroke', '-title-stroke', None, 'Outline color for the main menu font.') menu_title_font = HPanel('Menu title font', _menu_font, _menu_fontsize, _title_color, _title_opacity, _title_stroke, ) # Video title font _titles_font = Font('', '-titles-font', 'Helvetica', 'The font to use for the video titles') _titles_fontsize = Number('Size', '-titles-fontsize', 12, 'The font size to use for the video titles. ' 'Default size varies depending on options chosen.', 0, 80, 'pixels', toggles=True) _titles_color = Color('', '-titles-color', None, 'The font color to use for the video titles') _titles_opacity = Number('Opacity', '-titles-opacity', 100, 'The opacity of the video titles.', 0, 100, '%') _titles_stroke = Color('Stroke', '-titles-stroke', None, 'The color to use for the video titles font outline (stroke)') video_title_font = HPanel('Video title font', _titles_font, _titles_fontsize, _titles_color, _titles_opacity, _titles_stroke, ) # Submenu font _submenu_font = Font('', '-submenu-font', 'Helvetica', 'The font to use for the Submenu menu titles') _submenu_fontsize = Number('Size', '-submenu-fontsize', 24, 'The font size to use for the submenu title', 0, 80, toggles=True) _submenu_title_color = Color('', '-submenu-title-color', '#eaeaea', 'The font color to use for submenu title(s)') _submenu_title_opacity = Number('Opacity', '-submenu-title-opacity', 100, 'The opacity of the submenu title.', 0, 100, '%') _submenu_stroke = Color('Stroke', '-submenu-stroke', None, 'The color for the submenu font outline (stroke).') submenu_title_font = HPanel('Submenu title font', _submenu_font, _submenu_fontsize, _submenu_title_color, _submenu_title_opacity, _submenu_stroke, ) # Submenu chapter font _chapter_font = Font('', '-chapter-font', 'Helvetica', 'The font to use for the chapter titles') _chapter_fontsize = Number('Size', '-chapter-fontsize', 12, 'The font size to use for the chapter titles', 0, 80, 'pixels', toggles=True) _chapter_color = Color('', '-chapter-color', None, 'The color for the chapters font.') _chapter_title_opacity = Number('Opacity', '-chapter-title-opacity', 100, 'The opacity of the chapter titles.', 0, 100, '%') _chapter_stroke = Color('Stroke', '-chapter-stroke', None, 'The color for the chapters font outline (stroke).') submenu_chapter_font = HPanel('Submenu chapter font', _chapter_font, _chapter_fontsize, _chapter_color, _chapter_title_opacity, _chapter_stroke, ) # Other stuff _menu_title_geo = Choice('Title position', '-menu-title-geo', 'none', 'The position of the menu title', 'north|south|west|east|center|none', 'dropdown') _menu_title_offset = Text('Title offset', '-menu-title-offset', '+0+50', 'Menu title position as an offset (in pixels) from ' 'the N/S/E/W "Title position". Use +X+Y syntax. This ' 'value is applied to the video *before* is is scaled.') _text_mist = Flag('Text mist', '-text-mist', False, 'Use "mist" behind the menu title (helps with contrast).', enables=['-text-mist-color', '-text-mist-opacity']) _text_mist_color = Color('', '-text-mist-color', '#ffffff', 'Color of the mist behind the menu title.') _text_mist_opacity = Number('Opacity', '-text-mist-opacity', 60, 'The opacity of the mist behind the menu title.', 1, 100, '%') ### -------------------------------------------------------------------- ### Menu buttons (spumux) ### -------------------------------------------------------------------- _button_style = Choice('Style', '-button-style', 'none', 'Style or shape of the buttons seen when playing the DVD ' 'menu. "rect": rectangle around the thumbs, "text": uses ' 'the title text, "text-rect": rectangle around the title text, ' '"line": line underneath title. The "line" style is showcase only' ', and the "text" buttons can not be used with "showcase" menus.' 'Leave at "none" to let todisc pick the most appropriate style. ', 'none|rect|line|text|text-rect', 'dropdown') _highlight_color = Color('Highlight', '-highlight-color', '#266cae', 'Color for the menu buttons the dvd remote uses to navigate.') _select_color = Color('Selection', '-select-color', '#de7f7c', 'Color for the menu buttons the dvd remote uses to select.') _outlinewidth = Number('Outlinewidth', '-outlinewidth', 14, 'For spumux outlinewidth variable. This option helps if spumux ' 'fails because of a large gap between button words or characters.', 0, 20, 'pixels') _playall = Flag('"Play all" button', '-playall', False, 'Create a "Play All" button that jumps to the 1st title and plays ' 'all the videos in succession before returning to the main menu.') _chapters = ListToOne('-files', 'Chapters', '-chapters', None, 'Number of chapters or HH:MM:SS string for each video. ' 'If only one value is given, use that for all videos. ' 'For grouped videos, use a "+" separator for joining ' 'the chapter string of each grouped video. ' 'An example chapter string using HH:MM:SS format: ' '00:00:00,00:05:00,00:10:00. An example of 2 grouped videos: ' '00:00:00,00:05:00+00:05:00,00:10:00. ' 'When using HH:MM:SS format the 1st chapter MUST be 00:00:00. ' 'If using -no-menu and passing just integer(s), then the value ' 'represents the chapter INTERVAL not the number of chapters', Text(), side='top', filter=strip_all) _loop = FlagOpt('Menu looping (pause)', '-loop', False, 'Pause before looping playback of the main menu. Set the number spinbox ' 'to the pause desired. Default pause varies depending on other options ' 'chosen. Use -1 to disable looping', Number('', '', '', '', -1, 30, 'secs')) _chain_videos = FlagOpt('Chain videos', '-chain-videos', False, 'This option will "chain" videos so they play ' 'sequentially until the last, which will return to ' 'the menu. You can also specify individual videos to ' 'behave like this by using the text box at the right. ' 'You can use single integers or indicate a range with a ' '"-" separator. Example of a range: "1-2 4-6" (no quotes). ' 'This will play video 1 through video 3 before returning ' 'to the menu, and the same for video 4 through video 6.', Text('')) _videos_are_chapters = Flag('Each video is a chapter', '-videos-are-chapters', False, 'A button will be made on the main menu for each video which You ' 'can use as a chapter button . Selecting any video will play ' 'them all in order starting with the selected one.' ) ### -------------------------------------------------------------------- ### Authoring / burning ### -------------------------------------------------------------------- # Burning options _burn = Flag('Burn project on completion', '-burn', False) _speed = Number('Speed', '-speed', 8, 'Speed for burning', 0, 30) _device = Text('Device', '-device', '/dev/dvdrw', 'Type your burning device (default: /dev/dvdrw)') # Authoring _widescreen = Choice('Widescreen', '-widescreen', 'none', 'This will output a