Hello community,
here is the log from the commit of package alsa-tools for openSUSE:Factory
checked in at Fri Apr 23 01:38:29 CEST 2010.
--------
--- alsa-tools/alsa-tools.changes 2009-12-18 17:37:22.000000000 +0100
+++ /mounts/work_src_done/STABLE/alsa-tools/alsa-tools.changes 2010-04-19 11:15:15.000000000 +0200
@@ -1,0 +2,11 @@
+Mon Apr 19 11:11:23 CEST 2010 - tiwai@suse.de
+
+- enabled hwmixvolme, using pyalsa and python-gtk
+
+-------------------------------------------------------------------
+Mon Apr 19 10:43:14 CEST 2010 - tiwai@suse.de
+
+- updated to version 1.0.23:
+ * added hwmixvolume
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
alsa-tools-1.0.22.tar.bz2
New:
----
alsa-tools-1.0.23.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ alsa-tools.spec ++++++
--- /var/tmp/diff_new_pack.YgKJgb/_old 2010-04-23 01:38:22.000000000 +0200
+++ /var/tmp/diff_new_pack.YgKJgb/_new 2010-04-23 01:38:22.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package alsa-tools (Version 1.0.22)
+# spec file for package alsa-tools (Version 1.0.23)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,10 +20,10 @@
Name: alsa-tools
BuildRequires: alsa-devel fdupes fltk-devel gcc-c++ gtk2-devel update-desktop-files
-%define package_version 1.0.22
+%define package_version 1.0.23
Url: http://www.alsa-project.org/
Summary: Various ALSA Tools
-Version: 1.0.22
+Version: 1.0.23
Release: 1
License: GPLv2+
Group: Productivity/Multimedia/Sound/Utilities
@@ -55,6 +55,7 @@
Summary: Various ALSA Tools with GUI
Group: Productivity/Multimedia/Sound/Utilities
License: GPLv2+
+Requires: pyalsa, python-gtk
%description gui
Various tools for ALSA with GUI for controlling the configuration and
@@ -98,7 +99,7 @@
for d in envy24control rmedigicontrol echomixer; do
cp $d/configure.in-gtk2 $d/configure.in
done
-ALL_PACKS="envy24control seq/sbiload sscape_ctl hdspconf hdsploader hdspmixer rmedigicontrol echomixer usx2yloader us428control as10k1 ld10k1"
+ALL_PACKS="envy24control seq/sbiload sscape_ctl hdspconf hdsploader hdspmixer rmedigicontrol echomixer usx2yloader us428control as10k1 ld10k1 hwmixvolume"
%ifnarch ppc ppc64
ALL_PACKS="$ALL_PACKS sb16_csp"
%endif
@@ -116,7 +117,7 @@
make -C as10k1/examples dsp
%install
-ALL_PACKS="envy24control seq/sbiload sscape_ctl hdspconf hdsploader hdspmixer rmedigicontrol echomixer usx2yloader us428control as10k1 ld10k1"
+ALL_PACKS="envy24control seq/sbiload sscape_ctl hdspconf hdsploader hdspmixer rmedigicontrol echomixer usx2yloader us428control as10k1 ld10k1 hwmixvolume"
%ifnarch ppc ppc64
ALL_PACKS="$ALL_PACKS sb16_csp"
%endif
@@ -201,6 +202,7 @@
%{_bindir}/hdspconf
%{_bindir}/hdspmixer
%{_bindir}/echomixer
+%{_bindir}/hwmixvolume
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*
++++++ alsa-tools-1.0.22.tar.bz2 -> alsa-tools-1.0.23.tar.bz2 ++++++
++++ 5414 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/Makefile new/alsa-tools-1.0.23/Makefile
--- old/alsa-tools-1.0.22/Makefile 2009-12-16 16:30:46.000000000 +0100
+++ new/alsa-tools-1.0.23/Makefile 2010-04-16 13:21:16.000000000 +0200
@@ -1,8 +1,9 @@
-VERSION = 1.0.22
+VERSION = 1.0.23
TOP = .
SUBDIRS = ac3dec as10k1 envy24control hdsploader hdspconf hdspmixer \
mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1
+ us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \
+ hwmixvolume
all:
@for i in $(SUBDIRS); do \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/hwmixvolume/Makefile.am new/alsa-tools-1.0.23/hwmixvolume/Makefile.am
--- old/alsa-tools-1.0.22/hwmixvolume/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-tools-1.0.23/hwmixvolume/Makefile.am 2010-04-16 13:11:09.000000000 +0200
@@ -0,0 +1,11 @@
+# # Process this file with automake to procude Makefile.in.
+bin_SCRIPTS = hwmixvolume
+#man_MANS =
+EXTRA_DIST = gitcompile hwmixvolume
+AUTOMAKE_OPTIONS = foreign
+
+alsa-dist: distdir
+ @rm -rf ../distdir/hwmixvolume
+ @mkdir -p ../distdir/hwmixvolume
+ @cp -RLpv $(distdir)/* ../distdir/hwmixvolume
+ @rm -rf $(distdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/hwmixvolume/README new/alsa-tools-1.0.23/hwmixvolume/README
--- old/alsa-tools-1.0.22/hwmixvolume/README 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-tools-1.0.23/hwmixvolume/README 2010-04-16 13:11:09.000000000 +0200
@@ -0,0 +1,17 @@
+hwmixvolume
+===========
+
+This tool allows you to control the volume of individual streams on sound cards
+that use hardware mixing, i.e., those based on the following chips:
+* Creative Emu10k1 (SoundBlaster Live!) (driver: snd-emu10k1)
+* VIA VT823x southbridge (driver: snd-via82xx)
+* Yamaha DS-1 (YMF-724/740/744/754) (driver: snd-ymfpci)
+
+
+This tool requires Python, pygtk, and alsa-pyton 1.0.22 or later.
+
+It is recommended to use at least Linux kernel 2.6.32 or alsa-driver 1.0.22;
+otherwise, the name of the program that is using a stream cannot be shown.
+
+
+Author: Clemens Ladisch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/hwmixvolume/configure.ac new/alsa-tools-1.0.23/hwmixvolume/configure.ac
--- old/alsa-tools-1.0.22/hwmixvolume/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-tools-1.0.23/hwmixvolume/configure.ac 2010-04-16 13:11:09.000000000 +0200
@@ -0,0 +1,6 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT([hwmixvolume], [0.9])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([hwmixvolume])
+AC_PROG_INSTALL
+AC_OUTPUT([Makefile])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/hwmixvolume/gitcompile new/alsa-tools-1.0.23/hwmixvolume/gitcompile
--- old/alsa-tools-1.0.22/hwmixvolume/gitcompile 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-tools-1.0.23/hwmixvolume/gitcompile 2010-04-16 13:11:09.000000000 +0200
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+if test -z "$AUTOMAKE_DIR" ; then
+ if test -d /usr/local/share/automake; then
+ AUTOMAKE_DIR=/usr/local/share/automake
+ fi
+ if test -d /usr/share/automake; then
+ AUTOMAKE_DIR="/usr/share/automake"
+ fi
+ if test -z "$AUTOMAKE_DIR" ; then
+ AUTOMAKE_DIR=/usr/share/`ls /usr/share | grep automake | tail -n 1`
+ fi
+fi
+
+for f in install-sh mkinstalldirs missing; do
+ cp -av $AUTOMAKE_DIR/$f . || exit 1
+done
+
+aclocal $ACLOCAL_FLAGS || exit 1
+automake --foreign --add-missing || exit 1
+autoconf || exit 1
+echo "./configure $@"
+./configure $@ || exit 1
+if [ -z "$GITCOMPILE_NO_MAKE" ]; then
+ make || exit 1
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/hwmixvolume/hwmixvolume new/alsa-tools-1.0.23/hwmixvolume/hwmixvolume
--- old/alsa-tools-1.0.22/hwmixvolume/hwmixvolume 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-tools-1.0.23/hwmixvolume/hwmixvolume 2010-04-16 13:11:09.000000000 +0200
@@ -0,0 +1,310 @@
+#!/usr/bin/env python
+
+# hwmixvolume - ALSA hardware mixer volume control applet
+# Copyright (c) 2009-2010 Clemens Ladisch
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+import gobject, gtk
+from pyalsa import alsacard, alsahcontrol
+
+INTF_PCM = alsahcontrol.interface_id['PCM']
+INTF_MIXER = alsahcontrol.interface_id['MIXER']
+TYPE_INTEGER = alsahcontrol.element_type['INTEGER']
+EVENT_VALUE = alsahcontrol.event_mask['VALUE']
+EVENT_INFO = alsahcontrol.event_mask['INFO']
+EVENT_REMOVE = alsahcontrol.event_mask_remove
+
+class Stream:
+ def __init__(self, element, parent):
+ self.element = element
+ self.element.set_callback(self)
+ self.parent = parent
+ self.label = None
+ self.scales = []
+ self.adjustments = []
+ self.callback(self.element, EVENT_INFO)
+
+ def destroy(self):
+ self.deactivate()
+
+ def callback(self, e, mask):
+ if mask == EVENT_REMOVE:
+ self.deactivate()
+ elif (mask & EVENT_INFO) != 0:
+ info = alsahcontrol.Info(self.element)
+ if info.is_inactive:
+ self.deactivate()
+ else:
+ self.activate()
+ elif (mask & EVENT_VALUE) != 0:
+ self.update_scales_from_ctl()
+
+ def activate(self):
+ if self.label:
+ return
+ info = alsahcontrol.Info(self.element)
+ value = alsahcontrol.Value(self.element)
+ value.read()
+ values = value.get_tuple(TYPE_INTEGER, info.count)
+ self.label = gtk.Label(self.get_label(info))
+ self.label.set_single_line_mode(True)
+ self.parent.scales_vbox.pack_start(self.label, expand=False)
+ for i in range(info.count):
+ adj = gtk.Adjustment(value=values[i],
+ lower=info.min, upper=info.max,
+ step_incr=1,
+ page_incr=(info.max-info.min+1)/8)
+ adj.connect('value-changed', self.update_ctl_from_scale, i)
+ scale = gtk.HScale(adj)
+ scale.set_draw_value(False)
+ self.parent.scales_vbox.pack_start(scale, expand=False)
+ self.scales.append(scale)
+ self.adjustments.append(adj)
+ self.parent.scales_vbox.show_all()
+ self.parent.update_msg_label()
+
+ def deactivate(self):
+ if not self.label:
+ return
+ self.label.destroy()
+ for s in self.scales:
+ s.destroy()
+ self.label = None
+ self.scales = []
+ self.adjustments = []
+ self.parent.update_msg_label()
+
+ def update_scales_from_ctl(self):
+ if not self.label:
+ return
+ count = len(self.adjustments)
+ value = alsahcontrol.Value(self.element)
+ value.read()
+ values = value.get_tuple(TYPE_INTEGER, count)
+ for i in range(count):
+ self.adjustments[i].set_value(values[i])
+
+ def update_ctl_from_scale(self, adj, index):
+ scale_value = adj.get_value()
+ value_to_set = int(round(adj.get_value()))
+ count = len(self.adjustments)
+ value = alsahcontrol.Value(self.element)
+ if self.parent.lock_check.get_active():
+ values = [value_to_set for i in range(count)]
+ else:
+ value.read()
+ values = value.get_array(TYPE_INTEGER, count)
+ values[index] = value_to_set
+ value.set_array(TYPE_INTEGER, values)
+ value.write()
+ if value_to_set != scale_value:
+ adj.set_value(value_to_set)
+
+ def get_label(self, info):
+ pid = self.get_pid(info)
+ if pid:
+ cmdline = self.get_pid_cmdline(pid)
+ if cmdline:
+ return cmdline
+ else:
+ return "PID %d" % pid
+ else:
+ name = info.name
+ if name[-7:] == " Volume":
+ name = name[:-7]
+ if name[-9:] == " Playback":
+ name = name[:-9]
+ return name
+
+ def get_pid(self, info):
+ card = self.parent.current_card
+ device = info.device
+ subdevice = info.subdevice
+ if subdevice == 0:
+ subdevice = info.index
+ filename = "/proc/asound/card%d/pcm%dp/sub%d/status" % (card, device, subdevice)
+ try:
+ f = open(filename, "r")
+ except IOError:
+ return None
+ try:
+ for line in f.readlines():
+ if line[:9] == "owner_pid":
+ return int(line.split(':')[1].strip())
+ finally:
+ f.close()
+ return None
+
+ def get_pid_cmdline(self, pid):
+ try:
+ f = open("/proc/%d/cmdline" % pid, "r")
+ except IOError:
+ return None
+ try:
+ cmdline = f.read()
+ finally:
+ f.close()
+ return cmdline.replace('\x00', ' ').strip()
+
+class MixerWindow(gtk.Window):
+ card_numbers = alsacard.card_list()
+ current_card = -1
+ hcontrol = None
+ scales_vbox = None
+ msg_label = None
+ streams = []
+ hctl_sources = []
+
+ def __init__(self):
+ gtk.Window.__init__(self)
+ self.connect('destroy', lambda w: gtk.main_quit())
+ self.set_title("Hardware Mixer Volumes")
+
+ vbox = gtk.VBox()
+ self.add(vbox)
+
+ hbox = gtk.HBox()
+ vbox.pack_start(hbox, expand=False)
+
+ label = gtk.Label("_Sound Card: ")
+ label.set_use_underline(True)
+ hbox.pack_start(label, expand=False)
+
+ combo = gtk.combo_box_new_text()
+ for i in self.card_numbers:
+ str = "%d: %s" % (i, alsacard.card_get_name(i))
+ combo.append_text(str)
+ if len(self.card_numbers) > 0:
+ combo.set_active(0)
+ combo.connect('changed', lambda c: self.change_card(self.card_numbers[combo.get_active()]))
+ hbox.pack_start(combo)
+ label.set_mnemonic_widget(combo)
+
+ self.lock_check = gtk.CheckButton(label="_Lock Channels")
+ self.lock_check.set_active(True)
+ vbox.pack_start(self.lock_check, expand=False)
+
+ scrollwin = gtk.ScrolledWindow()
+ scrollwin.set_policy(hscrollbar_policy=gtk.POLICY_NEVER, vscrollbar_policy=gtk.POLICY_AUTOMATIC)
+ scrollwin.set_shadow_type(gtk.SHADOW_NONE)
+ vbox.pack_start(scrollwin)
+
+ self.scales_vbox = gtk.VBox()
+ scrollwin.add_with_viewport(self.scales_vbox)
+
+ label = gtk.Label()
+ label.set_single_line_mode(True)
+ line_height = label.size_request()[1]
+ label.destroy()
+ scale = gtk.HScale()
+ scale.set_draw_value(False)
+ line_height += scale.size_request()[1]
+ scale.destroy()
+ # always have space for at least four sliders
+ scrollwin.set_size_request(width=-1, height=line_height*4+4)
+
+ # TODO: select the default card or the first card with stream controls
+ if len(self.card_numbers) > 0:
+ self.change_card(self.card_numbers[0])
+ self.update_msg_label()
+
+ self.show_all()
+
+ def change_card(self, cardnum):
+ for s in self.hctl_sources:
+ gobject.source_remove(s)
+ self.hctl_sources = []
+
+ self.hcontrol = self.open_hcontrol_for_card(cardnum)
+
+ for s in self.streams:
+ s.destroy()
+ self.streams = []
+
+ self.current_card = cardnum
+
+ if not self.hcontrol:
+ self.update_msg_label()
+ return
+
+ for id in self.hcontrol.list():
+ if not self.is_stream_elem(id):
+ continue
+ elem = alsahcontrol.Element(self.hcontrol, id[0])
+ info = alsahcontrol.Info(elem)
+ if not self.is_stream_info(info):
+ continue
+ stream = Stream(elem, self)
+ self.streams.append(stream)
+
+ for fd,condition in self.hcontrol.poll_fds:
+ self.hctl_sources.append(gobject.io_add_watch(fd, condition, self.hctl_io_callback))
+
+ self.update_msg_label()
+
+ self.scales_vbox.show_all()
+
+ def update_msg_label(self):
+ needs_msg = len(self.scales_vbox.get_children()) < 2
+ has_msg = self.msg_label
+ if has_msg and not needs_msg:
+ self.msg_label.destroy()
+ self.msg_label = None
+ elif needs_msg:
+ if len(self.streams) > 0:
+ msg = "There are no open streams."
+ else:
+ msg = "This card does not have stream controls."
+ if not has_msg:
+ self.msg_label = gtk.Label(msg)
+ self.scales_vbox.pack_start(self.msg_label)
+ self.scales_vbox.show_all()
+ elif self.msg_label.get_text() != msg:
+ self.msg_label.set_text(msg)
+
+ def open_hcontrol_for_card(self, cardnum):
+ devname = "hw:CARD=" + str(cardnum)
+ try:
+ hc = alsahcontrol.HControl(name=devname,
+ mode=alsahcontrol.open_mode['NONBLOCK'])
+ except:
+ # TODO: alsa error msg
+ dlg = gtk.MessageDialog(self,
+ gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
+ gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
+ "Cannot open sound card control device.")
+ dlg.run()
+ dlg.destroy()
+ return None
+ return hc
+
+ def is_stream_elem(self, id):
+ return ((id[1] == INTF_PCM and
+ id[4] in ("PCM Playback Volume", "EMU10K1 PCM Volume")) or
+ (id[1] == INTF_MIXER and
+ id[4] == "VIA DXS Playback Volume"))
+
+ def is_stream_info(self, info):
+ return info.is_readable and info.is_writable and info.type == TYPE_INTEGER
+
+ def hctl_io_callback(self, source, condition):
+ self.hcontrol.handle_events()
+ return True
+
+def main():
+ MixerWindow()
+ gtk.main()
+
+main()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.22/hwmixvolume/missing new/alsa-tools-1.0.23/hwmixvolume/missing
--- old/alsa-tools-1.0.22/hwmixvolume/missing 1970-01-01 01:00:00.000000000 +0100
+++ new/alsa-tools-1.0.23/hwmixvolume/missing 2006-11-25 12:29:49.000000000 +0100
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, 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
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ 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:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org