Hello community,
here is the log from the commit of package xbacklight for openSUSE:Factory checked in at 2012-09-17 14:16:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xbacklight (Old)
and /work/SRC/openSUSE:Factory/.xbacklight.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xbacklight", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/xbacklight/xbacklight.changes 2012-05-08 12:01:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xbacklight.new/xbacklight.changes 2012-09-17 14:16:42.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Sep 12 01:04:14 UTC 2012 - tobias.johannes.klausmann@mni.thm.de
+
+- Update to 1.2.0:
+ + Port xbacklight to XCB
+
+-------------------------------------------------------------------
Old:
----
xbacklight-1.1.2.tar.bz2
New:
----
xbacklight-1.2.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xbacklight.spec ++++++
--- /var/tmp/diff_new_pack.6A1GMV/_old 2012-09-17 14:16:44.000000000 +0200
+++ /var/tmp/diff_new_pack.6A1GMV/_new 2012-09-17 14:16:44.000000000 +0200
@@ -15,16 +15,20 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: xbacklight
-Version: 1.1.2
+Version: 1.2.0
Release: 0
-License: MIT
Summary: Utility to adjust the screen backlight brightness
-Url: http://xorg.freedesktop.org/
+License: MIT
Group: System/X11/Utilities
+Url: http://xorg.freedesktop.org/
Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
+BuildRequires: autoconf
+BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xcb-util)
BuildRequires: pkgconfig(xorg-macros) >= 1.8
BuildRequires: pkgconfig(xrandr) >= 1.2.0
# This was part of the xorg-x11 package up to version 7.6
@@ -41,6 +45,7 @@
%setup -q
%build
+autoreconf -fi
%configure
make %{?_smp_mflags}
@@ -49,7 +54,7 @@
%files
%defattr(-,root,root)
-%doc ChangeLog COPYING README
+%doc COPYING README
%{_bindir}/xbacklight
%{_mandir}/man1/xbacklight.1%{?ext_man}
++++++ xbacklight-1.1.2.tar.bz2 -> xbacklight-1.2.0.tar.bz2 ++++++
++++ 15260 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/xbacklight-1.1.2/.gitignore new/xbacklight-1.2.0/.gitignore
--- old/xbacklight-1.1.2/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/xbacklight-1.2.0/.gitignore 2012-09-11 23:41:48.000000000 +0200
@@ -0,0 +1,79 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for xbacklight
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
+xbacklight
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/xbacklight-1.1.2/ChangeLog new/xbacklight-1.2.0/ChangeLog
--- old/xbacklight-1.1.2/ChangeLog 2010-12-09 08:11:11.000000000 +0100
+++ new/xbacklight-1.2.0/ChangeLog 1970-01-01 01:00:00.000000000 +0100
@@ -1,187 +0,0 @@
-commit 30ed7c0b3f2dc131e9fa4bb53ba702b65b05b46a
-Author: Alan Coopersmith
-Date: Fri Oct 29 23:36:28 2010 -0700
-
- xbacklight 1.1.2
-
- Signed-off-by: Alan Coopersmith
-
-commit 3aab2f2e43ba5f9afbf7d20d54b70150ca6773a1
-Author: Alan Coopersmith
-Date: Thu Sep 23 10:04:24 2010 -0700
-
- config: Remove unnecessary calls from configure.ac
-
- AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
- PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables
-
- Signed-off-by: Alan Coopersmith
-
-commit 98a594c61ed407facfefc430715df09d5ccc8c6c
-Author: Gaetan Nadon
-Date: Tue Jul 20 18:45:18 2010 -0400
-
- config: update AC_PREREQ statement to 2.60
-
- Unrelated to the previous patches, the new value simply reflects
- the reality that the minimum level for autoconf to configure
- all x.org modules is 2.60 dated June 2006.
-
- ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
-
- Signed-off-by: Gaetan Nadon
-
-commit 3a5f2d5dad2c281e49be2eb3b1cc041bd9ada715
-Author: Alan Coopersmith
-Date: Thu Jul 1 00:31:18 2010 -0700
-
- Remove unused direct dependency on libXrender
-
- Signed-off-by: Alan Coopersmith
-
-commit 5b4cd1f97f578e6574c905b7630841ced0193fc4
-Author: Alan Coopersmith
-Date: Wed Jun 30 23:25:03 2010 -0700
-
- config: upgrade to util-macros 1.8 for additional man page support
-
- Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
- The value of MAN_SUBST is the same for all X.Org packages.
-
- Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
- The existing statement can now be removed from the configuration file.
-
- Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
- Enables silent rule and use platform appropriate version of sed.
-
- Signed-off-by: Alan Coopersmith
-
-commit cc6e442b15988076f5ebc5513654826869378eee
-Author: Gaetan Nadon
-Date: Thu Nov 26 09:19:52 2009 -0500
-
- Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
-
- Now that the INSTALL file is generated.
- Allows running make maintainer-clean.
-
-commit 7fcffe84dccc00f4318179f5237d2937c80abc02
-Author: Gaetan Nadon
-Date: Wed Oct 28 14:09:08 2009 -0400
-
- INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
-
- Add missing INSTALL file. Use standard GNU file on building tarball
- README may have been updated
- Remove AUTHORS file as it is empty and no content available yet.
- Remove NEWS file as it is empty and no content available yet.
-
-commit f634bdf93c3623f48f6e9f6baf65ff64835db0f6
-Author: Gaetan Nadon
-Date: Tue Oct 27 15:07:24 2009 -0400
-
- Deploy the new XORG_DEFAULT_OPTIONS #24242
-
- This macro aggregate a number of existing macros that sets commmon
- X.Org components configuration options. It shields the configuration file from
- future changes.
-
-commit 0fa72795f798e34dd918b51b01fd07adc098cdc5
-Author: Gaetan Nadon
-Date: Mon Oct 26 22:08:38 2009 -0400
-
- Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
-
- ChangeLog filename is known to Automake and requires no further
- coding in the makefile.
-
-commit 36b4b6dba0df92071f54c32154ef8d0366029282
-Author: Gaetan Nadon
-Date: Thu Oct 22 12:34:15 2009 -0400
-
- .gitignore: use common defaults with custom section # 24239
-
- Using common defaults will reduce errors and maintenance.
- Only the very small or inexistent custom section need periodic maintenance
- when the structure of the component changes. Do not edit defaults.
-
-commit cbf474d6751dd32154163b8997519319655f0545
-Author: Alan Coopersmith
-Date: Thu Sep 24 17:54:45 2009 -0700
-
- xbacklight 1.1.1
-
- Signed-off-by: Alan Coopersmith
-
-commit da0d7d89130b9a9e31905897627f0c805a58b2b3
-Author: Alan Coopersmith
-Date: Thu Sep 24 17:53:43 2009 -0700
-
- Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
-
- Signed-off-by: Alan Coopersmith
-
-commit 1b52fc41b59899b45dd1b06f9c1268b4458f9cd6
-Author: Alan Coopersmith
-Date: Thu Sep 24 17:43:47 2009 -0700
-
- Add README with pointers to mailing lists, bugzilla, & git
-
- Signed-off-by: Alan Coopersmith
-
-commit 5512e161157d6ac8a8d8a27fc99d596c6686b1da
-Author: Matthias Hopf
-Date: Wed Aug 19 14:38:31 2009 +0200
-
- Use "Backlight" RandR property, fall back to legacy "BACKLIGHT".
-
-commit 97a3f5665a62ff3a606da48f3854d082f249e6a8
-Author: Paulo Cesar Pereira de Andrade
-Date: Mon Jan 19 19:17:58 2009 -0200
-
- Ansification and compile warning fixes.
-
- This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
- make distcheck and all gcc 4.3 and sparse warnings.
-
-commit a0dc8902b476fc2dddf02fceec7a7186d81f48fc
-Author: Alan Coopersmith
-Date: Thu Sep 6 16:27:47 2007 -0700
-
- Man page typo ("faiding")
-
-commit 922cec4e60a4fb4db6c7333b7264cd940e763239
-Author: Keith Packard
-Date: Thu Jun 21 14:51:57 2007 +0100
-
- Update to version 1.1
-
-commit 4440d319f20d1970b2a3f94a1c4f2b5142158ce3
-Author: Keith Packard
-Date: Thu Jun 21 14:50:54 2007 +0100
-
- Add licenses (oops)
-
-commit ba34df17cfbd7bcf029b1fdc4bcd7b894a49a63d
-Author: Keith Packard
-Date: Thu Jun 21 11:36:30 2007 +0100
-
- Fix version in configure.ac
-
-commit 3000145191a00d4c9b90efb221fadb9ce37380c0
-Author: Keith Packard
-Date: Thu Mar 29 23:18:14 2007 -0700
-
- Add -time and -steps options to adjust fade
-
-commit 38c2c45514d50b825a5c74abedc30cb2272064d7
-Author: Keith Packard
-Date: Thu Mar 29 22:59:29 2007 -0700
-
- Add autogen.sh
-
-commit d52f81e43da29d94122d62c1b1be34946960033c
-Author: Keith Packard
-Date: Thu Mar 29 22:56:13 2007 -0700
-
- Initial xbacklight program
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/xbacklight-1.1.2/INSTALL new/xbacklight-1.2.0/INSTALL
--- old/xbacklight-1.1.2/INSTALL 2010-12-09 08:11:11.000000000 +0100
+++ new/xbacklight-1.2.0/INSTALL 1970-01-01 01:00:00.000000000 +0100
@@ -1,291 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
-
- This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 6. Often, you can also type `make uninstall' to remove the installed
- files again.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Particular systems
-==================
-
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
- ./configure CC="cc -Ae"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
-
- ./configure CC="cc"
-
-and if that doesn't work, try
-
- ./configure CC="cc -nodtk"
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
- Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug. Until the bug is fixed you can use this workaround:
-
- CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
- Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`--prefix=DIR'
- Use DIR as the installation prefix. *Note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
-
-`--no-create'
-`-n'
- Run the configure checks, but stop before creating any output
- files.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
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/xbacklight-1.1.2/Makefile.am new/xbacklight-1.2.0/Makefile.am
--- old/xbacklight-1.1.2/Makefile.am 2010-08-07 06:33:02.000000000 +0200
+++ new/xbacklight-1.2.0/Makefile.am 2012-09-11 23:41:48.000000000 +0200
@@ -21,6 +21,7 @@
AUTOMAKE_OPTIONS = foreign
+SUBDIRS = man
bin_PROGRAMS = xbacklight
AM_CFLAGS = $(CWARNFLAGS) $(XRANDR_CFLAGS)
@@ -29,23 +30,7 @@
xbacklight_SOURCES = \
xbacklight.c
-appman_PRE = \
- xbacklight.man
-
-appmandir = $(APP_MAN_DIR)
-
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-
-EXTRA_DIST = $(appman_PRE) COPYING
MAINTAINERCLEANFILES = ChangeLog INSTALL
-CLEANFILES = $(appman_DATA)
-
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
-
-# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
-.man.$(APP_MAN_SUFFIX):
- $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-
.PHONY: ChangeLog INSTALL
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/xbacklight-1.1.2/autogen.sh new/xbacklight-1.2.0/autogen.sh
--- old/xbacklight-1.1.2/autogen.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/xbacklight-1.2.0/autogen.sh 2012-09-11 23:41:48.000000000 +0200
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
+
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/xbacklight-1.1.2/config.h.in new/xbacklight-1.2.0/config.h.in
--- old/xbacklight-1.1.2/config.h.in 2010-12-09 08:10:31.000000000 +0100
+++ new/xbacklight-1.2.0/config.h.in 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_UNISTD_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Major version of this package */
-#undef PACKAGE_VERSION_MAJOR
-
-/* Minor version of this package */
-#undef PACKAGE_VERSION_MINOR
-
-/* Patch version of this package */
-#undef PACKAGE_VERSION_PATCHLEVEL
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
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/xbacklight-1.1.2/configure.ac new/xbacklight-1.2.0/configure.ac
--- old/xbacklight-1.1.2/configure.ac 2010-10-30 08:34:58.000000000 +0200
+++ new/xbacklight-1.2.0/configure.ac 2012-09-11 23:41:48.000000000 +0200
@@ -22,7 +22,7 @@
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.60])
-AC_INIT([xbacklight], [1.1.2],
+AC_INIT([xbacklight], [1.2.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xbacklight])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -34,9 +34,12 @@
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.0 x11)
+PKG_CHECK_MODULES(XRANDR, [xcb-randr >= 1.2 xcb-atom xcb-aux xcb])
-AC_OUTPUT([Makefile])
+AC_CONFIG_FILES([
+ Makefile
+ man/Makefile])
+AC_OUTPUT
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/xbacklight-1.1.2/man/Makefile.am new/xbacklight-1.2.0/man/Makefile.am
--- old/xbacklight-1.1.2/man/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ new/xbacklight-1.2.0/man/Makefile.am 2012-09-11 23:41:48.000000000 +0200
@@ -0,0 +1,12 @@
+
+appmandir = $(APP_MAN_DIR)
+appman_PRE = xbacklight.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+EXTRA_DIST = $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
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/xbacklight-1.1.2/man/xbacklight.man new/xbacklight-1.2.0/man/xbacklight.man
--- old/xbacklight-1.1.2/man/xbacklight.man 1970-01-01 01:00:00.000000000 +0100
+++ new/xbacklight-1.2.0/man/xbacklight.man 2012-09-11 23:41:48.000000000 +0200
@@ -0,0 +1,58 @@
+.\"
+.\" Copyright © 2007 Keith Packard.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation, and that the name of Keith Packard not be used in
+.\" advertising or publicity pertaining to distribution of the software without
+.\" specific, written prior permission. Keith Packard makes no
+.\" representations about the suitability of this software for any purpose. It
+.\" is provided "as is" without express or implied warranty.
+.\"
+.\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+.\" EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, 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.
+.\"
+.\"
+.TH XBACKLIGHT __appmansuffix__ __vendorversion__
+.SH NAME
+xbacklight \- adjust backlight brightness using RandR extension
+.SH SYNOPSIS
+.B "xbacklight"
+[-help] [-display \fIdisplay\fP]
+[-get]
+[-set percent]
+[-inc percent]
+[-dec percent]
+.SH DESCRIPTION
+.I Xbacklight
+is used to adjust the backlight brightness where supported. It finds all
+outputs on the X server supporting backlight brightness control and changes
+them all in the same way.
+.IP -get
+Print out the current backlight brightness of each output with such a
+control. The brightness is represented as a percentage of the maximum
+brightness supported.
+.IP "-set \fIpercent\fP"
+Sets each backlight brightness to the specified level.
+.IP "-inc \fIpercent\fP"
+Increases brightness by the specified amount.
+.IP "-dec \fIpercent\fP"
+Decreases brightness by the specified amount.
+.IP -help
+Print out a summary of the usage and exit.
+.IP "-time \fImilliseconds\fP"
+Length of time to spend fading the backlight between old and new value.
+Default is 200.
+.IP "-steps \fInumber\fP"
+Number of steps to take while fading. Default is 20.
+.SH "SEE ALSO"
+Xrandr(__libmansuffix__)
+.SH AUTHORS
+Keith Packard,
+Open Source Technology Center, Intel Corporation.
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/xbacklight-1.1.2/missing new/xbacklight-1.2.0/missing
--- old/xbacklight-1.1.2/missing 2010-12-09 08:10:32.000000000 +0100
+++ new/xbacklight-1.2.0/missing 1970-01-01 01:00:00.000000000 +0100
@@ -1,376 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 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, see http://www.gnu.org/licenses/.
-
-# 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=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# 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'
- autom4te touch the output file, or create a stub one
- 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]
-
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
-
-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
-
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# 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). This is about non-GNU programs, so use $1 not
-# $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 $program 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 "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- 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 test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -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 test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -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 "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- 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 "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- 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-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
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/xbacklight-1.1.2/xbacklight.c new/xbacklight-1.2.0/xbacklight.c
--- old/xbacklight-1.1.2/xbacklight.c 2009-10-16 23:38:45.000000000 +0200
+++ new/xbacklight-1.2.0/xbacklight.c 2012-09-11 23:41:48.000000000 +0200
@@ -21,9 +21,11 @@
*/
#include
#include
-#include
-#include
-#include
+
+#include
+#include
+#include
+#include
#include
#include
@@ -33,7 +35,7 @@
static char *program_name;
-static Atom backlight, backlight_new, backlight_legacy;
+static xcb_atom_t backlight, backlight_new, backlight_legacy;
static void
usage (void)
@@ -53,58 +55,75 @@
}
static long
-backlight_get (Display *dpy, RROutput output)
+backlight_get (xcb_connection_t *conn, xcb_randr_output_t output)
{
- unsigned long nitems;
- unsigned long bytes_after;
- unsigned char *prop;
- Atom actual_type;
- int actual_format;
- long value;
+ xcb_generic_error_t *error;
+ xcb_randr_get_output_property_reply_t *prop_reply = NULL;
+ xcb_randr_get_output_property_cookie_t prop_cookie;
+ long value;
backlight = backlight_new;
- if (!backlight ||
- XRRGetOutputProperty (dpy, output, backlight,
- 0, 4, False, False, None,
- &actual_type, &actual_format,
- &nitems, &bytes_after, &prop) != Success) {
- backlight = backlight_legacy;
- if (!backlight ||
- XRRGetOutputProperty (dpy, output, backlight,
- 0, 4, False, False, None,
- &actual_type, &actual_format,
- &nitems, &bytes_after, &prop) != Success)
- return -1;
+ if (backlight != XCB_ATOM_NONE) {
+ prop_cookie = xcb_randr_get_output_property (conn, output,
+ backlight, XCB_ATOM_NONE,
+ 0, 4, 0, 0);
+ prop_reply = xcb_randr_get_output_property_reply (conn, prop_cookie, &error);
+ if (error != NULL || prop_reply == NULL) {
+ backlight = backlight_legacy;
+ if (backlight != XCB_ATOM_NONE) {
+ prop_cookie = xcb_randr_get_output_property (conn, output,
+ backlight, XCB_ATOM_NONE,
+ 0, 4, 0, 0);
+ prop_reply = xcb_randr_get_output_property_reply (conn, prop_cookie, &error);
+ if (error != NULL || prop_reply == NULL) {
+ return -1;
+ }
+ }
+ }
}
- if (actual_type != XA_INTEGER || nitems != 1 || actual_format != 32)
+ if (prop_reply == NULL ||
+ prop_reply->type != XCB_ATOM_INTEGER ||
+ prop_reply->num_items != 1 ||
+ prop_reply->format != 32) {
value = -1;
- else
- value = *((long *) prop);
- XFree (prop);
+ } else {
+ value = *((long *) xcb_randr_get_output_property_data (prop_reply));
+ }
+
+ free (prop_reply);
return value;
}
static void
-backlight_set (Display *dpy, RROutput output, long value)
+backlight_set (xcb_connection_t *conn, xcb_randr_output_t output, long value)
{
- XRRChangeOutputProperty (dpy, output, backlight, XA_INTEGER, 32,
- PropModeReplace, (unsigned char *) &value, 1);
+ xcb_randr_change_output_property (conn, output, backlight, XCB_ATOM_INTEGER,
+ 32, XCB_PROP_MODE_REPLACE,
+ 1, (unsigned char *)&value);
}
int
main (int argc, char **argv)
{
char *dpy_name = NULL;
- Display *dpy;
- int screen;
- int major, minor;
op_t op = Get;
int value = 0;
int i;
int total_time = 200; /* ms */
int steps = 20;
+ xcb_connection_t *conn;
+ xcb_generic_error_t *error;
+
+ xcb_randr_query_version_cookie_t ver_cookie;
+ xcb_randr_query_version_reply_t *ver_reply;
+
+ xcb_intern_atom_cookie_t backlight_cookie[2];
+ xcb_intern_atom_reply_t *backlight_reply;
+
+ xcb_screen_iterator_t iter;
+
program_name = argv[0];
for (i = 1; i < argc; i++)
@@ -177,97 +196,133 @@
}
usage ();
}
- dpy = XOpenDisplay (dpy_name);
- if (!dpy)
- {
- fprintf (stderr, "Cannot open display \"%s\"\n",
- XDisplayName (dpy_name));
+ conn = xcb_connect (dpy_name, NULL);
+ ver_cookie = xcb_randr_query_version (conn, 1, 2);
+ ver_reply = xcb_randr_query_version_reply (conn, ver_cookie, &error);
+ if (error != NULL || ver_reply == NULL) {
+ int ec = error ? error->error_code : -1;
+ fprintf (stderr, "RANDR Query Version returned error %d\n", ec);
exit (1);
}
- if (!XRRQueryVersion (dpy, &major, &minor))
- {
- fprintf (stderr, "RandR extension missing\n");
+ if (ver_reply->major_version != 1 ||
+ ver_reply->minor_version < 2) {
+ fprintf (stderr, "RandR version %d.%d too old\n",
+ ver_reply->major_version, ver_reply->minor_version);
exit (1);
}
- if (major < 1 || (major == 1 && minor < 2))
- {
- fprintf (stderr, "RandR version %d.%d too old\n", major, minor);
+ free (ver_reply);
+
+ backlight_cookie[0] = xcb_intern_atom (conn, 1, strlen("Backlight"), "Backlight");
+ backlight_cookie[1] = xcb_intern_atom (conn, 1, strlen("BACKLIGHT"), "BACKLIGHT");
+
+ backlight_reply = xcb_intern_atom_reply (conn, backlight_cookie[0], &error);
+ if (error != NULL || backlight_reply == NULL) {
+ int ec = error ? error->error_code : -1;
+ fprintf (stderr, "Intern Atom returned error %d\n", ec);
exit (1);
}
- backlight_new = XInternAtom (dpy, "Backlight", True);
- backlight_legacy = XInternAtom (dpy, "BACKLIGHT", True);
- if (backlight_new == None && backlight_legacy == None)
- {
+ backlight_new = backlight_reply->atom;
+ free (backlight_reply);
+
+ backlight_reply = xcb_intern_atom_reply (conn, backlight_cookie[1], &error);
+ if (error != NULL || backlight_reply == NULL) {
+ int ec = error ? error->error_code : -1;
+ fprintf (stderr, "Intern Atom returned error %d\n", ec);
+ exit (1);
+ }
+
+ backlight_legacy = backlight_reply->atom;
+ free (backlight_reply);
+
+ if (backlight_new == XCB_NONE && backlight_legacy == XCB_NONE) {
fprintf (stderr, "No outputs have backlight property\n");
exit (1);
}
- for (screen = 0; screen < ScreenCount (dpy); screen++)
- {
- Window root = RootWindow (dpy, screen);
- XRRScreenResources *resources = XRRGetScreenResources (dpy, root);
- int o;
-
- if (!resources) continue;
- for (o = 0; o < resources->noutput; o++)
+
+ iter = xcb_setup_roots_iterator (xcb_get_setup (conn));
+ while (iter.rem) {
+ xcb_screen_t *screen = iter.data;
+ xcb_window_t root = screen->root;
+ xcb_randr_output_t *outputs;
+
+ xcb_randr_get_screen_resources_cookie_t resources_cookie;
+ xcb_randr_get_screen_resources_reply_t *resources_reply;
+
+ resources_cookie = xcb_randr_get_screen_resources (conn, root);
+ resources_reply = xcb_randr_get_screen_resources_reply (conn, resources_cookie, &error);
+ if (error != NULL || resources_reply == NULL) {
+ int ec = error ? error->error_code : -1;
+ fprintf (stderr, "RANDR Get Screen Resources returned error %d\n", ec);
+ continue;
+ }
+
+ outputs = xcb_randr_get_screen_resources_outputs (resources_reply);
+ for (int o = 0; o < resources_reply->num_outputs; o++)
{
- RROutput output = resources->outputs[o];
- XRRPropertyInfo *info;
+ xcb_randr_output_t output = outputs[o];
double cur, new, step;
double min, max;
double set;
- cur = backlight_get (dpy, output);
+ cur = backlight_get (conn, output);
if (cur != -1)
{
- info = XRRQueryOutputProperty (dpy, output, backlight);
- if (info)
- {
- if (info->range && info->num_values == 2)
- {
- min = info->values[0];
- max = info->values[1];
- if (op == Get) {
- printf ("%f\n", (cur - min) * 100 / (max - min));
- } else {
- set = value * (max - min) / 100;
- switch (op) {
- case Set:
- new = min + set;
- break;
- case Inc:
- new = cur + set;
- break;
- case Dec:
- new = cur - set;
- break;
- default:
- XSync (dpy, False);
- return 1;
- }
- if (new > max) new = max;
- if (new < min) new = min;
- step = (new - cur) / steps;
- for (i = 0; i < steps && step != 0; i++)
- {
- if (i == steps - 1)
- cur = new;
- else
- cur += step;
- backlight_set (dpy, output, (long) cur);
- XFlush (dpy);
- usleep (total_time * 1000 / steps);
- }
+ xcb_randr_query_output_property_cookie_t prop_cookie;
+ xcb_randr_query_output_property_reply_t *prop_reply;
+
+ prop_cookie = xcb_randr_query_output_property (conn, output, backlight);
+ prop_reply = xcb_randr_query_output_property_reply (conn, prop_cookie, &error);
+
+ if (error != NULL || prop_reply == NULL) continue;
+
+ if (prop_reply->range &&
+ xcb_randr_query_output_property_valid_values_length (prop_reply) == 2) {
+ int32_t *values = xcb_randr_query_output_property_valid_values (prop_reply);
+ min = values[0];
+ max = values[1];
+
+ if (op == Get) {
+ printf ("%f\n", (cur - min) * 100 / (max - min));
+ } else {
+ set = value * (max - min) / 100;
+ switch (op) {
+ case Set:
+ new = min + set;
+ break;
+ case Inc:
+ new = cur + set;
+ break;
+ case Dec:
+ new = cur - set;
+ break;
+ default:
+ xcb_aux_sync (conn);
+ return 1;
+ }
+ if (new > max) new = max;
+ if (new < min) new = min;
+ step = (new - cur) / steps;
+ for (i = 0; i < steps && step != 0; i++)
+ {
+ if (i == steps - 1)
+ cur = new;
+ else
+ cur += step;
+ backlight_set (conn, output, (long) cur);
+ xcb_flush (conn);
+ usleep (total_time * 1000 / steps);
}
}
- XFree (info);
}
+ free (prop_reply);
}
}
-
- XRRFreeScreenResources (resources);
+
+ free (resources_reply);
+ xcb_screen_next (&iter);
}
- XSync (dpy, False);
+ xcb_aux_sync (conn);
return 0;
}
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/xbacklight-1.1.2/xbacklight.man new/xbacklight-1.2.0/xbacklight.man
--- old/xbacklight-1.1.2/xbacklight.man 2009-10-16 23:38:45.000000000 +0200
+++ new/xbacklight-1.2.0/xbacklight.man 1970-01-01 01:00:00.000000000 +0100
@@ -1,58 +0,0 @@
-.\"
-.\" Copyright © 2007 Keith Packard.\"
-.\" Permission to use, copy, modify, distribute, and sell this software and its
-.\" documentation for any purpose is hereby granted without fee, provided that
-.\" the above copyright notice appear in all copies and that both that
-.\" copyright notice and this permission notice appear in supporting
-.\" documentation, and that the name of Keith Packard not be used in
-.\" advertising or publicity pertaining to distribution of the software without
-.\" specific, written prior permission. Keith Packard makes no
-.\" representations about the suitability of this software for any purpose. It
-.\" is provided "as is" without express or implied warranty.
-.\"
-.\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-.\" EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, 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.
-.\"
-.\"
-.TH XBACKLIGHT __appmansuffix__ __vendorversion__
-.SH NAME
-xbacklight \- adjust backlight brightness using RandR extension
-.SH SYNOPSIS
-.B "xbacklight"
-[-help] [-display \fIdisplay\fP]
-[-get]
-[-set percent]
-[-inc percent]
-[-dec percent]
-.SH DESCRIPTION
-.I Xbacklight
-is used to adjust the backlight brightness where supported. It finds all
-outputs on the X server supporting backlight brightness control and changes
-them all in the same way.
-.IP -get
-Print out the current backlight brightness of each output with such a
-control. The brightness is represented as a percentage of the maximum
-brightness supported.
-.IP "-set \fIpercent\fP"
-Sets each backlight brightness to the specified level.
-.IP "-inc \fIpercent\fP"
-Increases brightness by the specified amount.
-.IP "-dec \fIpercent\fP"
-Decreases brightness by the specified amount.
-.IP -help
-Print out a summary of the usage and exit.
-.IP "-time \fImilliseconds\fP"
-Length of time to spend fading the backlight between old and new value.
-Default is 200.
-.IP "-steps \fInumber\fP"
-Number of steps to take while fading. Default is 20.
-.SH "SEE ALSO"
-Xrandr(3)
-.SH AUTHORS
-Keith Packard,
-Open Source Technology Center, Intel Corporation.
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org