From 8e7240074c65856aef434356b980d2a218652c51 Mon Sep 17 00:00:00 2001 From: Kibum Kim Date: Sat, 7 Jan 2012 00:49:27 +0900 Subject: [PATCH] Git init --- AUTHORS | 0 COPYING | 66 ++++ ChangeLog | 532 +++++++++++++++++++++++++++++ Makefile.am | 42 +++ NEWS | 0 README | 25 ++ autogen.sh | 12 + configure.ac | 54 +++ debian/README.source | 73 ++++ debian/changelog | 181 ++++++++++ debian/compat | 1 + debian/control | 85 +++++ debian/copyright | 26 ++ debian/libxinerama-dev.install | 6 + debian/libxinerama1-udeb.install | 1 + debian/libxinerama1.install | 1 + debian/rules | 101 ++++++ debian/watch | 2 + debian/xsfbs/repack.sh | 32 ++ debian/xsfbs/xsfbs.mk | 276 +++++++++++++++ debian/xsfbs/xsfbs.sh | 622 ++++++++++++++++++++++++++++++++++ include/X11/extensions/Xinerama.h | 74 ++++ include/X11/extensions/panoramiXext.h | 85 +++++ man/Makefile.am | 45 +++ man/Xinerama.man | 123 +++++++ man/XineramaIsActive.man | 1 + man/XineramaQueryExtension.man | 1 + man/XineramaQueryScreens.man | 1 + man/XineramaQueryVersion.man | 1 + packaging/libXinerama.spec | 73 ++++ src/Makefile.am | 27 ++ src/Xinerama.c | 313 +++++++++++++++++ xinerama.pc.in | 12 + 33 files changed, 2894 insertions(+) create mode 100644 AUTHORS create mode 100755 COPYING create mode 100755 ChangeLog create mode 100755 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100644 autogen.sh create mode 100755 configure.ac create mode 100644 debian/README.source create mode 100755 debian/changelog create mode 100644 debian/compat create mode 100755 debian/control create mode 100644 debian/copyright create mode 100755 debian/libxinerama-dev.install create mode 100644 debian/libxinerama1-udeb.install create mode 100644 debian/libxinerama1.install create mode 100755 debian/rules create mode 100644 debian/watch create mode 100644 debian/xsfbs/repack.sh create mode 100644 debian/xsfbs/xsfbs.mk create mode 100644 debian/xsfbs/xsfbs.sh create mode 100644 include/X11/extensions/Xinerama.h create mode 100755 include/X11/extensions/panoramiXext.h create mode 100755 man/Makefile.am create mode 100755 man/Xinerama.man create mode 100755 man/XineramaIsActive.man create mode 100755 man/XineramaQueryExtension.man create mode 100755 man/XineramaQueryScreens.man create mode 100755 man/XineramaQueryVersion.man create mode 100644 packaging/libXinerama.spec create mode 100755 src/Makefile.am create mode 100755 src/Xinerama.c create mode 100644 xinerama.pc.in diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/COPYING b/COPYING new file mode 100755 index 0000000..b565d04 --- /dev/null +++ b/COPYING @@ -0,0 +1,66 @@ +Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Copyright 2003 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. diff --git a/ChangeLog b/ChangeLog new file mode 100755 index 0000000..b87a35e --- /dev/null +++ b/ChangeLog @@ -0,0 +1,532 @@ +commit 8e62595cc1af274f1c40868c5d7461c176982062 +Author: Alan Coopersmith +Date: Wed Oct 27 23:28:24 2010 -0700 + + libXinerama 1.1.1 + + Signed-off-by: Alan Coopersmith + +commit d94e21941a296ed125d4704c31af020fd140fcbc +Author: Alan Coopersmith +Date: Wed Oct 27 23:27:21 2010 -0700 + + Sun's copyrights now belong to Oracle + + Signed-off-by: Alan Coopersmith + +commit d3da9510deb14255ee7eabdecc3988af57441ee7 +Author: Jesse Adkins +Date: Tue Sep 28 13:30:03 2010 -0700 + + Purge cvs tags. + + Signed-off-by: Jesse Adkins + Signed-off-by: Alan Coopersmith + +commit c09ed03c45c8141b620a49bce2dc19a2729b60b8 +Author: Gaetan Nadon +Date: Mon Aug 16 20:06:56 2010 -0400 + + man: store shadow man pages in git rather than generating them + + Simplify the build process and the makefile. + + Local fix in CVS for bug 5628 is not required + as the problem has been fixed in + util-macros d9062e4077ebfd0985baf8418f3d0f111b9ddbba + + Signed-off-by: Gaetan Nadon + +commit ade2b02753362b178d7e926e18601ae2b0698532 +Author: Alan Coopersmith +Date: Wed Jul 7 16:38:03 2010 -0700 + + Use make rules instead of shell for loops to generate shadow man pages + + Allows parallel make and simpler build logs/error reporting + + Signed-off-by: Alan Coopersmith + +commit 2921352cfef9faf007f2b35aa06089425ba095ed +Author: Alan Coopersmith +Date: Wed Jul 7 16:32:00 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 2b5874a864152ac0466476b1c5b8ab0203887d20 +Author: Fernando Carrijo +Date: Thu Jul 1 06:57:33 2010 -0300 + + Purge macros NEED_EVENTS and NEED_REPLIES + + Signed-off-by: Fernando Carrijo + Acked-by: Tiago Vignatti + Reviewed-by: Alan Coopersmith + +commit d8a51c48a4278b3481a5301be8ecb533fe87e9a7 +Author: Gaetan Nadon +Date: Mon Mar 29 16:50:34 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 fa1772317219f2e2b4079c463f4139e02bec9853 +Author: Gaetan Nadon +Date: Mon Mar 29 14:53:49 2010 -0400 + + config: remove the pkgconfig pc.in file from EXTRA_DIST + + Automake always includes it in the tarball. + + Signed-off-by: Gaetan Nadon + +commit 43b50ccdd50511aad7bdd1869b294813550f7741 +Author: Gaetan Nadon +Date: Tue Feb 16 10:37:21 2010 -0500 + + config: move CWARNFLAGS from configure.ac to Makefile.am + + Compiler warning flags should be explicitly set in the makefile + rather than being merged with other packages compiler flags. + + Signed-off-by: Gaetan Nadon + +commit e528b336ce5aa66aa720fd94df4618f40a85b818 +Author: Alan Coopersmith +Date: Thu Jan 14 20:43:47 2010 -0800 + + Fill in COPYING with licenses from source files + + Signed-off-by: Alan Coopersmith + +commit e569f85315c0ff82a1481706f0736b85dc3bccf9 +Author: Alan Coopersmith +Date: Thu Jan 14 20:40:40 2010 -0800 + + Update Sun license notices to current X.Org standard form + + Signed-off-by: Alan Coopersmith + +commit a470f6392f4bd532e6e855445346f00e680983db +Author: Gaetan Nadon +Date: Fri Nov 27 20:56:04 2009 -0500 + + Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES + + Now that the INSTALL file is generated. + Allows running make maintainer-clean. + +commit 31f4af6528b6b45ea6f946f5ac97260f06c24071 +Author: Gaetan Nadon +Date: Wed Oct 28 14:09:10 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 f23ac859c9d47158c9ef58b93361e43e8cd63db3 +Author: Gaetan Nadon +Date: Tue Oct 27 15:07:25 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 94b6ea6665839bb399fe4befd3b6d1b20d128de8 +Author: Gaetan Nadon +Date: Mon Oct 26 22:08:43 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 231ee8c9bbed45d89eed56e6c861af259b12f005 +Author: Gaetan Nadon +Date: Thu Oct 22 12:34:19 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 968cb085c8e3fece7f10fe8e4c290f32e0b246b0 +Author: Alan Coopersmith +Date: Mon Nov 2 14:58:54 2009 -0800 + + Fix PanroamiXOff typo in comment in panoramiXext.h + + Signed-off-by: Alan Coopersmith + +commit 96c0d0e13c90e01c4335b64369adfac02ff8a148 +Author: Jeremy Huddleston +Date: Wed Oct 21 12:47:25 2009 -0700 + + This is not a GNU project, so declare it foreign. + + On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote: + > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote: + > > I noticed an INSTALL file in xlsclients and libXvMC today, and it + > > was quite annoying to work around since 'autoreconf -fvi' replaces + > > it and git wants to commit it. Should these files even be in git? + > > Can I nuke them for the betterment of humanity and since they get + > > created by autoreconf anyways? + > + > See https://bugs.freedesktop.org/show_bug.cgi?id=24206 + + As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with + AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation + of the INSTALL file. It is also part of the 24206 solution. + + Signed-off-by: Jeremy Huddleston + +commit ee877cebfea0773a91337439d32ece12444cf0a6 +Author: Peter Hutterer +Date: Fri Oct 2 13:27:04 2009 +1000 + + libXinerama 1.1 + + Signed-off-by: Peter Hutterer + +commit c5f1f903ddf1f2216bb31408caec3e87ea795dd9 +Author: Peter Hutterer +Date: Fri Oct 2 13:26:17 2009 +1000 + + Require macros 1.3 for XORG_DEFAULT_OPTIONS + + Signed-off-by: Peter Hutterer + +commit 46e5273f34fd950cb4757583e06d5687d1f10407 +Author: Peter Hutterer +Date: Thu Aug 27 11:47:34 2009 +1000 + + libXinerama 1.0.99.1 + + Signed-off-by: Peter Hutterer + +commit 0bfbff6d88be339f5837aa2fff016950d07a6bc5 +Author: Peter Hutterer +Date: Thu Aug 27 11:46:33 2009 +1000 + + Require xineramaproto 1.1.99.1 to avoid header conflicts. + + Signed-off-by: Peter Hutterer + +commit 90d4d23bf2e94721149ddc0a80093b10a82e8845 +Author: Benjamin Close +Date: Fri Feb 13 14:48:50 2009 +1030 + + Proto major/minors shouldn't live in the extension header but the proto header + + Previously the Xserver was pulling in the extension header rather than the proto header + this led to issues when compiling the xserver. Instead we shift the proto numbers to + the proto header and tell the X server to use the proto header. Hence it's possible + to compile the server without the lib again. + + Signed-off-by: Benjamin Close + Acked-by: Daniel Stone + Acked-by: Peter Hutterer + +commit 9810140927d4aa646f585367215d6ca684ce60a4 +Author: Alan Coopersmith +Date: Mon Feb 2 20:34:34 2009 -0800 + + Add README with pointers to mailing list, bugzilla & git repos + + Signed-off-by: Alan Coopersmith + +commit 39a19b89cb7bd226ec51000d4e8e7643ac076ce6 +Author: Paulo Cesar Pereira de Andrade +Date: Fri Jan 30 03:53:40 2009 -0200 + + panoramiXext.h is included in X Server build. + + The X Server build only requires the value of the macros + PANORAMIX_MAJOR_VERSION and PANORAMIX_MINOR_VERSION. + +commit 7c72e844a794a9cedd9e614e919f696b47ede5e5 +Author: Paulo Cesar Pereira de Andrade +Date: Thu Jan 29 19:42:06 2009 -0200 + + Janitor: ansification, make distcheck, compiler warnings. + +commit 8123c94eba27d1a3eb3f509a79c229ddfa1f881a +Author: Peter Hutterer +Date: Mon May 19 22:56:50 2008 +0930 + + Add Xinerama.h and panoramiXext.h to includedir. + + Were previously part of xineramaproto, but they really belong here. + For a history of these files please refer to + git://anongit.freedesktop.org/git/xorg/proto/xineramaproto + +commit c5ac895a7dabe5a46e33e733771f20cc08e72d95 +Author: Peter Hutterer +Date: Mon May 19 17:43:19 2008 +0930 + + Rename parameters to clarify QueryVersion/QueryExtension. + + These parameters are not treated as input. Rename them to make the inner + workings slightly more obvious. + + X.Org Bug 14511 + +commit cbfc4113a44053c2dfacd14475ff14f43817f3c1 +Author: Adam Jackson +Date: Thu Mar 6 15:42:56 2008 -0500 + + libXinerama 1.0.3 + +commit 7c169beed2d8324c95385d248777f21c721b332e +Author: Adam Jackson +Date: Sun Feb 24 20:30:03 2008 -0500 + + Bug #13660: XineramaQueryScreens() always modifies the 'number' outparameter. + + This makes the code match the man page. + +commit 52040eaaba626dd998f7a5421a923de0b0e06ad2 +Author: James Cloos +Date: Thu Dec 6 15:51:17 2007 -0500 + + Add missing PHONY line for automatic ChangeLog generation + +commit 5362a27db8fddfb03ade3b2c622a2256d91de9eb +Author: Brice Goglin +Date: Wed Jul 25 21:41:28 2007 +0200 + + Fix typo in Xinerama.man + + Reported by Emanuele Rocca in + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432256 + +commit 583d26d583bb0034ff91119ceefc08df64fbbc46 +Author: Alan Coopersmith +Date: Fri Mar 16 16:26:41 2007 -0700 + + Version bump: 1.0.2 + +commit 96c081ed52e3437ede0062eb7ccfb520879cbc0e +Author: Alan Coopersmith +Date: Fri Mar 16 16:22:21 2007 -0700 + + Replace static ChangeLog with dist-hook to generate from git log + +commit 1a5b5c7e5f603528ff69468f8d6d73e2e30442a5 +Author: Alan Coopersmith +Date: Thu Mar 1 16:56:14 2007 -0800 + + Add man page for Xinerama API functions + +commit 0062a3f12535043fd8d2dc70f41bd45fa6e8b495 +Author: Alan Coopersmith +Date: Thu Mar 1 15:41:55 2007 -0800 + + Remove unneeded #include of + +commit 36a4a6f58b95ce244741df939cccef4733d80b03 +Author: Alan Coopersmith +Date: Thu Feb 15 19:06:14 2007 -0800 + + Clear sparse warnings & error + + Xinerama.c:56:5: warning: incorrect type in initializer (incompatible argument 1 (different types)) + Xinerama.c:68:8: error: symbol 'close_display' redeclared with different type (originally declared at Xinerama.c:48) - incompatible argument 1 (different types) + Xinerama.c:283:5: warning: Using plain integer as NULL pointer + +commit c98be137c711235fe5bff430e93222d2a47b5e6a +Author: Alan Coopersmith +Date: Thu Feb 15 18:59:53 2007 -0800 + + Add support for source code checkers such as sparse & lint + +commit 269885f05a4aed0eb3ee192217fa8ec6494f90c5 +Author: Alan Coopersmith +Date: Thu Feb 15 18:55:38 2007 -0800 + + Add *~ to .gitignore to skip over emacs/patch droppings + +commit e9214fe612d40bf5a792eda2dd9a52ef2bdba805 +Author: Alan Coopersmith +Date: Thu Jul 13 14:59:00 2006 -0700 + + renamed: .cvsignore -> .gitignore + +commit 29feb54b5a0e9a0bc96f02f7f8f89384afbd7feb +Author: Kevin E Martin +Date: Wed Dec 21 02:30:05 2005 +0000 + + Update package version for X11R7 release. + +commit 1da385cfa49d34cf38ec296738db9ecc8e5a2f02 +Author: Adam Jackson +Date: Mon Dec 19 16:28:27 2005 +0000 + + Stub COPYING files + +commit 78b498e1e7b92d59a16aa689cece7c1fdaf18eab +Author: Kevin E Martin +Date: Thu Dec 15 00:24:30 2005 +0000 + + Update package version number for final X11R7 release candidate. + +commit bf6d28d2dd4d6d20e6a8d165f22d2d8c17b16133 +Author: Kevin E Martin +Date: Sat Dec 3 05:49:44 2005 +0000 + + Update package version number for X11R7 RC3 release. + +commit bacedae4107065e7b6617f3218f21a7321d8474c +Author: Kevin E Martin +Date: Sat Dec 3 04:41:50 2005 +0000 + + Add check and cflags for malloc(0) returning NULL. + +commit d1078682cc64b0a669c6180839efd8a137b90d13 +Author: Kevin E Martin +Date: Sat Nov 19 07:15:41 2005 +0000 + + Update pkgconfig files to separate library build-time dependencies from + application build-time dependencies, and update package deps to work + with separate build roots. + +commit 0af77179518266232a5e3b10f180325a21dd3343 +Author: Kevin E Martin +Date: Wed Oct 19 02:48:11 2005 +0000 + + Update package version number for RC1 release. + +commit 219ac4ac54207f1d5ed334efade3335ff2c64add +Author: Alan Coopersmith +Date: Fri Aug 19 00:13:46 2005 +0000 + + More updates for Panoramix -> Xinerama rename + +commit 4306b9835f9015c38f8d5ec19526c8555a1b84cf +Author: Adam Jackson +Date: Wed Aug 3 03:28:01 2005 +0000 + + Do PKG_CHECK_MODULES on a unique token instead of on "DEP", so builds with + a global configure cache don't get confused. + +commit 24aa28a9dad24944a006c4038c35f6302b5ea3b0 +Author: Kevin E Martin +Date: Fri Jul 29 21:22:51 2005 +0000 + + Various changes preparing packages for RC0: + - Verify and update package version numbers as needed + - Implement versioning scheme + - Change bug address to point to bugzilla bug entry form + - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to + reenable it) + - Fix makedepend to use pkgconfig and pass distcheck + - Update build script to build macros first + - Update modular Xorg version + +commit 5468d892030e993a2fdd4c8177cc7cb193ba0411 +Author: Daniel Stone +Date: Sat Jul 16 07:14:52 2005 +0000 + + Set soversion to 1.0.0 using -version-number. + +commit 29971c16c1ad45dc8c958e12561e77e745e4a2fc +Author: Daniel Stone +Date: Tue Jul 12 07:56:48 2005 +0000 + + Change version to 1.1.0 and soversion to 1.0.0. + +commit e6417efb575017851e0e988ad99304094c36290c +Author: Keith Packard +Date: Sat Jul 9 06:42:31 2005 +0000 + + Add .cvsignore files Switch _la_CFLAGS for AM_CFLAGS to clean up directory + +commit 3835ed8e7aac1dfafa02ba6e33273523a6ef139f +Author: Alexander Gottwald +Date: Tue Jun 21 15:41:36 2005 +0000 + + lib/XScrnSaver/configure.ac + lib/XScrnSaver/src/Makefile.am + lib/Xfontcache/configure.ac + lib/Xfontcache/src/Makefile.am + lib/Xinerama/configure.ac + lib/Xinerama/src/Makefile.am + lib/Xtst/configure.ac + lib/Xv/configure.ac + lib/XvMC/configure.ac + lib/dmx/configure.ac Add missing xext.pc and xextproto.pc Add DEP_CFLAGS to + src/Makefile.am + +commit 2a6c0aa8f36dad9ff49385ef15c3dfc2529483b8 +Author: Søren Sandmann Pedersen +Date: Fri Jun 10 19:33:53 2005 +0000 + + util/modular/modularizelibrary.sh: use rm -f instead of rm in one place + util/modular/addbuild.sh: Make it much faster by adding all the files + at once lib/Xinerama: check in the build system + +commit d7469261b17559d537660fbae0fc39fa1e37b6a2 +Author: Egbert Eich +Date: Fri Apr 23 18:43:45 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit c9662b6719b33f6a8dfee281fd93379ca6d4624b +Author: Egbert Eich +Date: Sun Mar 14 08:32:12 2004 +0000 + + Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 + +commit bbbb84282378baf72c0708933366168cbfec284e +Author: Egbert Eich +Date: Wed Mar 3 12:11:29 2004 +0000 + + Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 + +commit 787da2ac90290d601d0c2109c26bff9c3a66118f +Author: Egbert Eich +Date: Thu Feb 26 13:35:33 2004 +0000 + + readding XFree86's cvs IDs + +commit 27f0b1858e9939afc9b9d064bea23d6ebfe0570d +Author: Egbert Eich +Date: Thu Feb 26 09:22:43 2004 +0000 + + Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 + +commit a89cc18ae1eb9cf612d6f4987d49541e008a0fb4 +Author: Kaleb Keithley +Date: Fri Nov 14 16:48:49 2003 +0000 + + XFree86 4.3.0.1 + +commit d16fb988d427bf8c684a80fee18a4fe6c4d1d578 +Author: Kaleb Keithley +Date: Fri Nov 14 16:48:49 2003 +0000 + + Initial revision diff --git a/Makefile.am b/Makefile.am new file mode 100755 index 0000000..037ef62 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,42 @@ +# +# Copyright 2005 Red Hat, Inc. +# +# 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 Red Hat not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Red Hat makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL RED HAT 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. + +SUBDIRS = src man + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xinerama.pc + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL + +if LINT +lint: + (cd src && $(MAKE) $(MFLAGS) lint) +endif LINT diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..3972335 --- /dev/null +++ b/README @@ -0,0 +1,25 @@ +libXinerama - API for Xinerama extension to X11 Protocol + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/lib/libXinerama + + http://cgit.freedesktop.org/xorg/lib/libXinerama + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..904cd67 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,12 @@ +#! /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 --git a/configure.ac b/configure.ac new file mode 100755 index 0000000..a91163c --- /dev/null +++ b/configure.ac @@ -0,0 +1,54 @@ +dnl Copyright 2005 Red Hat, Inc. +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Red Hat not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Red Hat makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.60]) + +AC_INIT([libXinerama], [1.1.1], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], + [libXinerama]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.8) +XORG_DEFAULT_OPTIONS +AM_CONFIG_HEADER(config.h) + +# Check for progs +AC_PROG_CC +AC_PROG_LIBTOOL + +# Check for dependencies +PKG_CHECK_MODULES(XINERAMA, x11 xext xextproto [xineramaproto >= 1.1.99.1]) + +dnl Allow checking code with lint, sparse, etc. +XORG_WITH_LINT +LINT_FLAGS="${LINT_FLAGS} ${XINERAMA_CFLAGS}" + +XORG_CHECK_MALLOC_ZERO + +AC_OUTPUT([Makefile + src/Makefile + man/Makefile + xinerama.pc]) diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..34ab4bf --- /dev/null +++ b/debian/README.source @@ -0,0 +1,73 @@ +------------------------------------------------------ +Quick Guide To Patching This Package For The Impatient +------------------------------------------------------ + +1. Make sure you have quilt installed +2. Unpack the package as usual with "dpkg-source -x" +3. Run the "patch" target in debian/rules +4. Create a new patch with "quilt new" (see quilt(1)) +5. Edit all the files you want to include in the patch with "quilt edit" + (see quilt(1)). +6. Write the patch with "quilt refresh" (see quilt(1)) +7. Run the "clean" target in debian/rules + +Alternatively, instead of using quilt directly, you can drop the patch in to +debian/patches and add the name of the patch to debian/patches/series. + +------------------------------------ +Guide To The X Strike Force Packages +------------------------------------ + +The X Strike Force team maintains X packages in git repositories on +git.debian.org in the pkg-xorg subdirectory. Most upstream packages +are actually maintained in git repositories as well, so they often +just need to be pulled into git.debian.org in a "upstream-*" branch. +Otherwise, the upstream sources are manually installed in the Debian +git repository. + +The .orig.tar.gz upstream source file could be generated this +"upstream-*" branch in the Debian git repository but it is actually +copied from upstream tarballs directly. + +Due to X.org being highly modular, packaging all X.org applications +as their own independent packages would have created too many Debian +packages. For this reason, some X.org applications have been grouped +into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils, +x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils. +Most packages, including the X.org server itself and all libraries +and drivers are, however maintained independently. + +The Debian packaging is added by creating the "debian-*" git branch +which contains the aforementioned "upstream-*" branch plus the debian/ +repository files. +When a patch has to be applied to the Debian package, two solutions +are involved: +* If the patch is available in one of the upstream branches, it + may be git'cherry-picked into the Debian repository. In this + case, it appears directly in the .diff.gz. +* Otherwise, the patch is added to debian/patches/ which is managed + with quilt as documented in /usr/share/doc/quilt/README.source. + +quilt is actually invoked by the Debian X packaging through a larger +set of scripts called XSFBS. XSFBS brings some other X specific +features such as managing dependencies and conflicts due to the video +and input driver ABIs. +XSFBS itself is maintained in a separate repository at + git://git.debian.org/pkg-xorg/xsfbs.git +and it is pulled inside the other Debian X repositories when needed. + +The XSFBS patching system requires a build dependency on quilt. Also +a dependency on $(STAMP_DIR)/patch has to be added to debian/rules +so that the XSFBS patching occurs before the actual build. So the +very first target of the build (likely the one running autoreconf) +should depend on $(STAMP_DIR)/patch. It should also not depend on +anything so that parallel builds are correctly supported (nothing +should probably run while patching is being done). And finally, the +clean target should depend on the xsfclean target so that patches +are unapplied on clean. + +When the upstream sources contain some DFSG-nonfree files, they are +listed in text files in debian/prune/ in the "debian-*" branch of +the Debian repository. XSFBS' scripts then take care of removing +these listed files during the build so as to generate a modified +DFSG-free .orig.tar.gz tarball. diff --git a/debian/changelog b/debian/changelog new file mode 100755 index 0000000..5b39ebe --- /dev/null +++ b/debian/changelog @@ -0,0 +1,181 @@ +libxinerama (2:1.1.1-1slp2) unstable; urgency=low + + * [X1lR7.6] upgrade pakcage + * Git: 165.213.180.234:slp/pkgs/xorg/lib/libxinerama + * Tag: libxinerama_1.1.1-1slp2 + + -- SooChan Lim Thu, 06 Jan 2011 11:49:20 +0900 + +libxinerama (2:1.1-5slp2) unstable; urgency=low + + * Add --as-needed + * Git: 165.213.180.234:/git/slp/pkgs/xorg/lib/libxinerama + * Tag: libxinerama_1.1-5slp2 + + -- SooChan Lim Sat, 20 Nov 2010 15:06:33 +0900 + +libxinerama (2:1.1-4slp2) unstable; urgency=low + + * Update maintainer + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11 + * Tag: libxinerama_1.1-4slp2 + + -- Sung-Jin Park Wed, 21 Apr 2010 13:52:20 +0900 + +libxinerama (2:1.1-3slp2) unstable; urgency=low + + * modify the package name + + -- SooChan Lim Thu, 25 Mar 2010 17:53:44 +0900 + +libxinerama (2:1.1-2) unstable; urgency=low + + * Import debian package + * Install .la files + + -- Sung-Jin Park Mon, 07 Dec 2009 10:29:55 +0900 + +libxinerama (2:1.1-3) unstable; urgency=low + + [ Julien Cristau ] + * Rename the build directory to not include DEB_BUILD_GNU_TYPE for no + good reason. Thanks, Colin Watson! + * Remove myself from Uploaders + + [ Cyril Brulebois ] + * Add udeb needed for the graphical installer: libxinerama1-udeb. + * Version/Bump some B-D to make sure the udeb gets its dependencies on + the (recently-added) udebs rather than on the libraries: + - libx11-dev + - libxext-dev + * Bump Standards-Version from 3.8.3 to 3.8.4 (no changes needed). + * Add myself to Uploaders. + + -- Cyril Brulebois Thu, 11 Mar 2010 04:45:40 +0100 + +libxinerama (2:1.1-2) unstable; urgency=low + + * Upload to unstable. + + -- Julien Cristau Wed, 06 Jan 2010 13:02:47 +0000 + +libxinerama (2:1.1-1) experimental; urgency=low + + [ Brice Goglin ] + * Add upstream URL to debian/copyright. + * Add a link to www.X.org and a reference to the upstream module + in the long description. + + [ Timo Aaltonen ] + * New upstream release (closes: #555997). + * Run autoreconf on build. Add build-deps on automake, libtool + and xutils-dev. + * Parse space-separated DEB_BUILD_OPTIONS, and handle parallel=N. + * Bump Standards-Version to 3.8.3. + * Add headers to libxinerama-dev, moved from x11proto-xinerama-dev. + * Bump {Build-,}Depends, add Replaces on x11proto-xinerama-dev. + * Move -dbg package to section debug. + * Drop pre-dependency on x11-common from libxinerama-dev. This was needed + for upgrades from sarge. + + -- Julien Cristau Wed, 02 Dec 2009 15:06:18 +0100 + +libxinerama (2:1.0.3-2) unstable; urgency=low + + [ Julien Cristau ] + * libxinerama1{,-dbg} don't need to depend on x11-common. + * libxinerama-dev doesn't install any header, remove usr/include/X11/ from + libxinerama-dev.install. + + [ Andres Salomon ] + * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build; + idempotency fix. + * Version x11-common pre-dep in -dev package to 1:7.0.0 to match + the rest of Debian. + * Bump debhelper compat to 5. + * Fix dh_strip call to skip the -dbg package. + + -- Julien Cristau Sun, 18 May 2008 22:02:34 +0200 + +libxinerama (2:1.0.3-1) unstable; urgency=low + + [ Timo Aaltonen ] + * Bump the epoch so that this can be synced to Ubuntu in the future. + + [ Julien Cristau ] + * New upstream release. + * debian/control updates: + + add myself to Uploaders, remove Fabio and Branden with their permission + + bump Standards-Version to 3.7.3 + + drop the XS- prefix from Vcs fields + + drop -1 revisions from build-depends to please lintian + + use ${binary:Version} instead of ${Source-Version} + + -- Julien Cristau Fri, 07 Mar 2008 15:06:39 +0100 + +libxinerama (1:1.0.2-1) unstable; urgency=low + + * New upstream release. + * Ack NMU. Thanks, Pierre Habouzit! + * Add XS-Vcs-* to debian/control, and drop outdated CVS info. + * Fix Section/Priority for binary packages. + * Add and install the upstream ChangeLog. + * Install manpages in libxinerama-dev. + * Run dh_install with --list-missing. + + -- Julien Cristau Thu, 12 Apr 2007 13:14:38 +0200 + +libxinerama (1:1.0.1-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Add the missing copyright file (Closes: #381225). + * Bump Standards-Version to 3.7.2. + * Remove x11-common from libxinerama-dev depends, because it is already + present in the Pre-Depends. + + -- Pierre Habouzit Sun, 13 Aug 2006 01:29:04 +0200 + +libxinerama (1:1.0.1-4) unstable; urgency=low + + * Reorder makeshlib command in rules file so that ldconfig is run + properly. Thanks Drew Parsons and Steve Langasek. + + -- David Nusinow Tue, 18 Apr 2006 21:49:59 -0400 + +libxinerama (1:1.0.1-3) unstable; urgency=low + + * Remove references to xss in -dbg and -dev package descriptions. Thanks + Josh Triplett. (closes: #362057) + + -- David Nusinow Tue, 11 Apr 2006 20:24:37 -0400 + +libxinerama (1:1.0.1-2) unstable; urgency=low + + * Upload to unstable + + -- David Nusinow Thu, 23 Mar 2006 22:44:41 -0500 + +libxinerama (1:1.0.1-1) experimental; urgency=low + + * First modular upload to Debian + + -- David Nusinow Thu, 29 Dec 2005 20:53:24 -0500 + +libxinerama (1:1.1.0+cvs.20050821-1) breezy; urgency=low + + * Update to new upstream version; change x11proto-panoramix-dev B-D to + -xinerama-. + + -- Daniel Stone Sun, 21 Aug 2005 21:13:57 +1000 + +libxinerama (1:1.1.0-2) breezy; urgency=low + + * Bump Build-Depends on libx11-dev and libxext-dev to avoid _XOPEN_SOURCE. + + -- Daniel Stone Sat, 23 Jul 2005 00:39:34 +1000 + +libxinerama (1:1.1.0-1) breezy; urgency=low + + * First libxinerama release. + + -- Daniel Stone Mon, 16 May 2005 22:10:17 +1000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100755 index 0000000..9b8959b --- /dev/null +++ b/debian/control @@ -0,0 +1,85 @@ +Source: libxinerama +Section: x11 +Priority: optional +Maintainer: Sung-Jin Park , Sanjin Lee , Debian X Strike Force +Uploaders: SooChan Lim , Sung-Jin Park , David Nusinow , Cyril Brulebois +Build-Depends: debhelper (>= 5.0.0), libx11-dev (>= 2:1.3.3-2), libxext-dev (>= 2:1.1.1-3), x11proto-xinerama-dev (>= 1.2), pkg-config, automake, libtool, xutils-dev (>= 1:7.5-1slp2) +Standards-Version: 3.8.4 +Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxinerama +Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libxinerama.git + +Package: libxinerama1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: X11 Xinerama extension library + libXinerama provides an X Window System client interface to the XINERAMA + extension to the X protocol. + . + The Xinerama (also known as panoramiX) extension allows for multiple screens + attached to a single display to be treated as belonging together, and to give + desktop applications a better idea of the monitor layout. + . + More information about X.Org can be found at: + + + + . + This module can be found at + git://anongit.freedesktop.org/git/xorg/lib/libXinerama + +#Package: libxinerama1-udeb +#XC-Package-Type: udeb +#Section: debian-installer +#Architecture: any +#Depends: ${shlibs:Depends}, ${misc:Depends} +#Description: X11 Xinerama extension library +# This is a udeb, or a microdeb, for the debian-installer. + +Package: libxinerama1-dbg +Section: debug +Priority: extra +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libxinerama1 (= ${binary:Version}) +Description: X11 Xinerama extension library (debug package) + libXinerama provides an X Window System client interface to the XINERAMA + extension to the X protocol. + . + The Xinerama (also known as panoramiX) extension allows for multiple screens + attached to a single display to be treated as belonging together, and to give + desktop applications a better idea of the monitor layout. + . + This package contains the debug versions of the library found in + libxinerama1. Non-developers likely have little use for this package. + . + More information about X.Org can be found at: + + + + . + This module can be found at + git://anongit.freedesktop.org/git/xorg/lib/libXinerama + +Package: libxinerama-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libxinerama1 (= ${binary:Version}), libx11-dev, libxext-dev, x11proto-xinerama-dev (>= 1.2) +Replaces: x11proto-xinerama-dev (<< 1.2) +Description: X11 Xinerama extension library (development headers) + libXinerama provides an X Window System client interface to the XINERAMA + extension to the X protocol. + . + The Xinerama (also known as panoramiX) extension allows for multiple screens + attached to a single display to be treated as belonging together, and to give + desktop applications a better idea of the monitor layout. + . + This package contains the development headers for the library found in + libxinerama1. Non-developers likely have little use for this package. + . + More information about X.Org can be found at: + + + + . + This module can be found at + git://anongit.freedesktop.org/git/xorg/lib/libXinerama diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..55d0bfd --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This package was downloaded from +http://xorg.freedesktop.org/releases/individual/lib/ + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software. + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, + BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR + IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of Digital Equipment Corporation + shall not be used in advertising or otherwise to promote the sale, use or other + dealings in this Software without prior written authorization from Digital + Equipment Corporation. diff --git a/debian/libxinerama-dev.install b/debian/libxinerama-dev.install new file mode 100755 index 0000000..8b6b4ff --- /dev/null +++ b/debian/libxinerama-dev.install @@ -0,0 +1,6 @@ +usr/lib/libXinerama.a +usr/lib/libXinerama.so +usr/lib/libXinerama.la +usr/lib/pkgconfig/xinerama.pc +usr/share/man/man3/* +usr/include/X11/extensions/* diff --git a/debian/libxinerama1-udeb.install b/debian/libxinerama1-udeb.install new file mode 100644 index 0000000..eba365f --- /dev/null +++ b/debian/libxinerama1-udeb.install @@ -0,0 +1 @@ +usr/lib/libXinerama.so.1* diff --git a/debian/libxinerama1.install b/debian/libxinerama1.install new file mode 100644 index 0000000..eba365f --- /dev/null +++ b/debian/libxinerama1.install @@ -0,0 +1 @@ +usr/lib/libXinerama.so.1* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..5add308 --- /dev/null +++ b/debian/rules @@ -0,0 +1,101 @@ +#!/usr/bin/make -f +# debian/rules for the Debian libxinerama package. +# Copyright © 2004 Scott James Remnant +# Copyright © 2005 Daniel Stone +# Copyright © 2005 David Nusinow + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# set this to the name of the main shlib's binary package +PACKAGE = libxinerama1 + +include debian/xsfbs/xsfbs.mk + +CFLAGS = -Wall -g +LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build=$(DEB_HOST_GNU_TYPE) +else + confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +# confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +endif + + +build: build-stamp +build-stamp: + dh_testdir + autoreconf -vfi + mkdir -p obj-$(DEB_BUILD_GNU_TYPE) + cd obj-$(DEB_BUILD_GNU_TYPE) && \ + ../configure --prefix=/usr --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info $(confflags) \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" + cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) + >$@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + rm -f config.cache config.log config.status + rm -f */config.cache */config.log */config.status + rm -f conftest* */conftest* + rm -rf autom4te.cache */autom4te.cache + rm -rf obj-* + rm -f aclocal.m4 config.guess config.h.in config.sub configure + rm -f depcomp install-sh ltmain.sh missing mkinstalldirs + find -name Makefile.in -exec rm -f {} \; + #find -name Makefile.in -delete + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + +# dh_installdocs + dh_install --sourcedir=debian/tmp --list-missing +# dh_installchangelogs ChangeLog +# dh_installman + dh_link + dh_strip --dbg-package=$(PACKAGE)-dbg + dh_compress + dh_fixperms + dh_makeshlibs + dh_shlibdeps + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-independent files here. +binary-indep: build install +# Nothing to do + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..7c34f8f --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://xorg.freedesktop.org/releases/individual/lib/ libXinerama-(.*)\.tar\.gz diff --git a/debian/xsfbs/repack.sh b/debian/xsfbs/repack.sh new file mode 100644 index 0000000..5935cc9 --- /dev/null +++ b/debian/xsfbs/repack.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +if ! [ -d debian/prune ]; then + exit 0 +fi + +if [ "x$1" != x--upstream-version ]; then + exit 1 +fi + +version="$2" +filename="$3" + +if [ -z "$version" ] || ! [ -f "$filename" ]; then + exit 1 +fi + +dir="$(pwd)" +tempdir="$(mktemp -d)" + +cd "$tempdir" +tar xf "$dir/$filename" +cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done + +tar czf "$dir/$filename" * +cd "$dir" +rm -rf "$tempdir" +echo "Done pruning upstream tarball" + +exit 0 diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk new file mode 100644 index 0000000..5e16b10 --- /dev/null +++ b/debian/xsfbs/xsfbs.mk @@ -0,0 +1,276 @@ +#!/usr/bin/make -f + +# Debian X Strike Force Build System (XSFBS): Make portion + +# Copyright 1996 Stephen Early +# Copyright 1997 Mark Eichin +# Copyright 1998-2005, 2007 Branden Robinson +# Copyright 2005 David Nusinow +# +# Licensed under the GNU General Public License, version 2. See the file +# /usr/share/common-licenses/GPL or . + +# Originally by Stephen Early +# Modified by Mark W. Eichin +# Modified by Adam Heath +# Modified by Branden Robinson +# Modified by Fabio Massimo Di Nitto +# Modified by David Nusinow +# Acknowledgements to Manoj Srivastava. + +# Pass $(DH_OPTIONS) into the environment for debhelper's benefit. +export DH_OPTIONS + +# force quilt to not use ~/.quiltrc and to use debian/patches +QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null + +# Set up parameters for the upstream build environment. + +# Determine (source) package name from Debian changelog. +SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \ + | grep '^Source:' | awk '{print $$2}') + +# Determine package version from Debian changelog. +SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \ + | grep '^Version:' | awk '{print $$2}') + +# Determine upstream version number. +UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//') + +# Determine the source version without the epoch for make-orig-tar-gz +NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://') + +# Figure out who's building this package. +BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}}) + +# Find out if this is an official build; an official build has nothing but +# digits, dots, and/or the codename of a release in the Debian part of the +# version number. Anything else indicates an unofficial build. +OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi) + +# Set up parameters for the Debian build environment. + +# Determine our architecture. +BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +# Work around some old-time dpkg braindamage. +BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH)) +# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy. +ifdef DEB_HOST_ARCH + ARCH:=$(DEB_HOST_ARCH) +else + # dpkg-cross sets the ARCH environment variable; if set, use it. + ifdef ARCH + ARCH:=$(ARCH) + else + ARCH:=$(BUILD_ARCH) + endif +endif + +# $(STAMP_DIR) houses stamp files for complex targets. +STAMP_DIR:=stampdir + +# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place +# their files. +DEBTREEDIR:=$(CURDIR)/debian/tmp + +# All "important" targets have four lines: +# 1) A target name that is invoked by a package-building tool or the user. +# This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart. +# 2) A line delcaring 1) as a phony target (".PHONY:"). +# 3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may +# depend on other targets. +# 4) A line declaring 3) as a member of the $(stampdir_targets) variable; the +# "$(STAMP_DIR)/" prefix is omitted. +# +# This indirection is needed so that the "stamp" files that signify when a rule +# is done can be located in a separate "stampdir". Recall that make has no way +# to know when a goal has been met for a phony target (like "build" or +# "install"). +# +# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@" +# so that the target will not be run again. Removing the file will make Make +# run the target over. + +# All phony targets should be declared as dependencies of .PHONY, even if they +# do not have "($STAMP_DIR)/"-prefixed counterparts. + +# Define a harmless default rule to keep things from going nuts by accident. +.PHONY: default +default: + +# Set up the $(STAMP_DIR) directory. +.PHONY: stampdir +stampdir_targets+=stampdir +stampdir: $(STAMP_DIR)/stampdir +$(STAMP_DIR)/stampdir: + mkdir $(STAMP_DIR) + >$@ + +# Set up the package build directory as quilt expects to find it. +.PHONY: prepare +stampdir_targets+=prepare +prepare: $(STAMP_DIR)/prepare +$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts + >$@ + +.PHONY: log +stampdir_targets+=log +log: $(STAMP_DIR)/log +$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir + mkdir -p $(STAMP_DIR)/log + +# Apply all patches to the upstream source. +.PHONY: patch +stampdir_targets+=patch +patch: $(STAMP_DIR)/patch +$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare + if ! [ `which quilt` ]; then \ + echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \ + exit 1; \ + fi; \ + if $(QUILT) next >/dev/null 2>&1; then \ + echo -n "Applying patches..."; \ + if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \ + cat $(STAMP_DIR)/log/patch; \ + echo "successful."; \ + else \ + cat $(STAMP_DIR)/log/patch; \ + echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \ + exit 1; \ + fi; \ + else \ + echo "No patches to apply"; \ + fi; \ + >$@ + +# Revert all patches to the upstream source. +.PHONY: unpatch +unpatch: $(STAMP_DIR)/log + rm -f $(STAMP_DIR)/patch + @echo -n "Unapplying patches..."; \ + if $(QUILT) applied >/dev/null 2>/dev/null; then \ + if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \ + cat $(STAMP_DIR)/log/unpatch; \ + echo "successful."; \ + else \ + cat $(STAMP_DIR)/log/unpatch; \ + echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \ + exit 1; \ + fi; \ + else \ + echo "nothing to do."; \ + fi + +# Clean the generated maintainer scripts. +.PHONY: cleanscripts +cleanscripts: + rm -f $(STAMP_DIR)/genscripts + rm -f debian/*.config \ + debian/*.postinst \ + debian/*.postrm \ + debian/*.preinst \ + debian/*.prerm + +# Clean the package build tree. +.PHONY: xsfclean +xsfclean: cleanscripts unpatch + dh_testdir + rm -rf .pc + rm -rf $(STAMP_DIR) + dh_clean + +# Remove files from the upstream source tree that we don't need, or which have +# licensing problems. It must be run before creating the .orig.tar.gz. +# +# Note: This rule is for Debian package maintainers' convenience, and is not +# needed for conventional build scenarios. +.PHONY: prune-upstream-tree +prune-upstream-tree: + # Ensure we're in the correct directory. + dh_testdir + grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf + +# Verify that there are no offsets or fuzz in the patches we apply. +# +# Note: This rule is for Debian package maintainers' convenience, and is not +# needed for conventional build scenarios. +.PHONY: patch-audit +patch-audit: prepare unpatch + @echo -n "Auditing patches..."; \ + >$(STAMP_DIR)/log/patch; \ + FUZZY=; \ + while [ -n "$$($(QUILT) next)" ]; do \ + RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\ + case "$$RESULT" in \ + succeeded) \ + echo "fuzzy patch: $$($(QUILT) top)" \ + | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \ + FUZZY=yes; \ + ;; \ + FAILED) \ + echo "broken patch: $$($(QUILT) next)" \ + | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \ + exit 1; \ + ;; \ + esac; \ + done; \ + if [ -n "$$FUZZY" ]; then \ + echo "there were fuzzy patches; please fix."; \ + exit 1; \ + else \ + echo "done."; \ + fi + +# Generate the maintainer scripts. +.PHONY: genscripts +stampdir_targets+=genscripts +genscripts: $(STAMP_DIR)/genscripts +$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir + for FILE in debian/*.config.in \ + debian/*.postinst.in \ + debian/*.postrm.in \ + debian/*.preinst.in \ + debian/*.prerm.in; do \ + if [ -e "$$FILE" ]; then \ + MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \ + sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \ + | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \ + cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \ + sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \ + | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \ + sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \ + -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \ + <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \ + rm $$MAINTSCRIPT.tmp; \ + fi; \ + done + # Validate syntax of generated shell scripts. + #sh debian/scripts/validate-posix-sh debian/*.config \ + # debian/*.postinst \ + # debian/*.postrm \ + # debian/*.preinst \ + # debian/*.prerm + >$@ + +SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null) +VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null) +INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null) +SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS)) +VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI) +INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI) +ifeq ($(PACKAGE),) +PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control) +endif + +.PHONY: serverabi +serverabi: install +ifeq ($(SERVERMINVERS),) + @echo error: xserver-xorg-dev needs to be installed + @exit 1 +else + echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars + echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars + echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars +endif + +# vim:set noet ai sts=8 sw=8 tw=0: diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh new file mode 100644 index 0000000..813fd8d --- /dev/null +++ b/debian/xsfbs/xsfbs.sh @@ -0,0 +1,622 @@ +# This is the X Strike Force shell library for X Window System package +# maintainer scripts. It serves to define shell functions commonly used by +# such packages, and performs some error checking necessary for proper operation +# of those functions. By itself, it does not "do" much; the maintainer scripts +# invoke the functions defined here to accomplish package installation and +# removal tasks. + +# If you are reading this within a Debian package maintainer script (e.g., +# /var/lib/dpkg/info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can +# skip past this library by scanning forward in this file to the string +# "GOBSTOPPER". + +SOURCE_VERSION=@SOURCE_VERSION@ +OFFICIAL_BUILD=@OFFICIAL_BUILD@ + +# Use special abnormal exit codes so that problems with this library are more +# easily tracked down. +SHELL_LIB_INTERNAL_ERROR=86 +SHELL_LIB_THROWN_ERROR=74 +SHELL_LIB_USAGE_ERROR=99 + +# old -> new variable names +if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then + DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE" +fi +if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then + DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF" +fi + +# initial sanity checks +if [ -z "$THIS_PACKAGE" ]; then + cat >&2 < on the World Wide Web for +instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the +"doc-debian" package, or install the "reportbug" package and use the command of +the same name to file a report against version $SOURCE_VERSION of this package. +EOF + exit $SHELL_LIB_USAGE_ERROR +fi + +if [ -z "$THIS_SCRIPT" ]; then + cat >&2 < on the World Wide Web for +instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the +"doc-debian" package, or install the "reportbug" package and use the command of +the same name to file a report against version $SOURCE_VERSION of the +"$THIS_PACKAGE" package. +EOF + exit $SHELL_LIB_USAGE_ERROR +fi + +if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then + RECONFIGURE="true" +else + RECONFIGURE= +fi + +if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then + FIRSTINST="yes" +fi + +if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then + UPGRADE="yes" +fi + +trap "message;\ + message \"Received signal. Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\ + message;\ + exit 1" HUP INT QUIT TERM + +reject_nondigits () { + # syntax: reject_nondigits [ operand ... ] + # + # scan operands (typically shell variables whose values cannot be trusted) for + # characters other than decimal digits and barf if any are found + while [ -n "$1" ]; do + # does the operand contain anything but digits? + if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then + # can't use die(), because it wraps message() which wraps this function + echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \ + "possibly malicious garbage \"$1\"" >&2 + exit $SHELL_LIB_THROWN_ERROR + fi + shift + done +} + +reject_unlikely_path_chars () { + # syntax: reject_unlikely_path_chars [ operand ... ] + # + # scan operands (typically shell variables whose values cannot be trusted) for + # characters unlikely to be seen in a path and which the shell might + # interpret and barf if any are found + while [ -n "$1" ]; do + # does the operand contain any funny characters? + if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then + # can't use die(), because I want to avoid forward references + echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \ + "encountered possibly malicious garbage \"$1\"" >&2 + exit $SHELL_LIB_THROWN_ERROR + fi + shift + done +} + +# Query the terminal to establish a default number of columns to use for +# displaying messages to the user. This is used only as a fallback in the +# event the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while +# the script is running, and this cannot, only being calculated once.) +DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true +if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then + DEFCOLUMNS=80 +fi + +message () { + # pretty-print messages of arbitrary length + reject_nondigits "$COLUMNS" + echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2 +} + +observe () { + # syntax: observe message ... + # + # issue observational message suitable for logging someday when support for + # it exists in dpkg + if [ -n "$DEBUG_XORG_PACKAGE" ]; then + message "$THIS_PACKAGE $THIS_SCRIPT note: $*" + fi +} + +warn () { + # syntax: warn message ... + # + # issue warning message suitable for logging someday when support for + # it exists in dpkg; also send to standard error + message "$THIS_PACKAGE $THIS_SCRIPT warning: $*" +} + +die () { + # syntax: die message ... + # + # exit script with error message + message "$THIS_PACKAGE $THIS_SCRIPT error: $*" + exit $SHELL_LIB_THROWN_ERROR +} + +internal_error () { + # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message + message "internal error: $*" + if [ -n "$OFFICIAL_BUILD" ]; then + message "Please report a bug in the $THIS_SCRIPT script of the" \ + "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \ + "Tracking System. Include all messages above that mention the" \ + "$THIS_PACKAGE package. Visit " \ + " on the World Wide Web for" \ + "instructions, read the file" \ + "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \ + "package, or install the reportbug package and use the command of" \ + "the same name to file a report." + fi + exit $SHELL_LIB_INTERNAL_ERROR +} + +usage_error () { + message "usage error: $*" + message "Please report a bug in the $THIS_SCRIPT script of the" \ + "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \ + "Tracking System. Include all messages above that mention the" \ + "$THIS_PACKAGE package. Visit " \ + " on the World Wide Web for" \ + "instructions, read the file" \ + "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \ + "package, or install the reportbug package and use the command of" \ + "the same name to file a report." + exit $SHELL_LIB_USAGE_ERROR +} + +font_update () { + # run $UPDATECMDS in $FONTDIRS + + local dir cmd shortcmd x_font_dir_prefix + + x_font_dir_prefix="/usr/share/fonts/X11" + + if [ -z "$UPDATECMDS" ]; then + usage_error "font_update() called but \$UPDATECMDS not set" + fi + if [ -z "$FONTDIRS" ]; then + usage_error "font_update() called but \$FONTDIRS not set" + fi + + reject_unlikely_path_chars "$UPDATECMDS" + reject_unlikely_path_chars "$FONTDIRS" + + for dir in $FONTDIRS; do + if [ -d "$x_font_dir_prefix/$dir" ]; then + for cmd in $UPDATECMDS; do + if which "$cmd" > /dev/null 2>&1; then + shortcmd=${cmd##*/} + observe "running $shortcmd in $dir font directory" + cmd_opts= + if [ "$shortcmd" = "update-fonts-alias" ]; then + cmd_opts=--x11r7-layout + fi + if [ "$shortcmd" = "update-fonts-dir" ]; then + cmd_opts=--x11r7-layout + fi + if [ "$shortcmd" = "update-fonts-scale" ]; then + cmd_opts=--x11r7-layout + fi + $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \ + "failed; font directory data may not" \ + "be up to date" + else + warn "$cmd not found; not updating corresponding $dir font" \ + "directory data" + fi + done + else + warn "$dir is not a directory; not updating font directory data" + fi + done +} + +remove_conffile_prepare () { + # syntax: remove_conffile_prepare filename official_md5sum ... + # + # Check a conffile "filename" against a list of canonical MD5 checksums. + # If the file's current MD5 checksum matches one of the "official_md5sum" + # operands provided, then prepare the conffile for removal from the system. + # We defer actual deletion until the package is configured so that we can + # roll this operation back if package installation fails. + # + # Call this function from a preinst script in the event $1 is "upgrade" or + # "install" and verify $2 to ensure the package is being upgraded from a + # version (or installed over a version removed-but-not-purged) prior to the + # one in which the conffile was obsoleted. + + local conffile current_checksum + + # validate arguments + if [ $# -lt 2 ]; then + usage_error "remove_conffile_prepare() called with wrong number of" \ + "arguments; expected at least 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + shift + + # does the conffile even exist? + if [ -e "$conffile" ]; then + # calculate its checksum + current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//') + # compare it to each supplied checksum + while [ -n "$1" ]; do + if [ "$current_checksum" = "$1" ]; then + # we found a match; move the confffile and stop looking + observe "preparing obsolete conffile $conffile for removal" + mv "$conffile" "$conffile.$THIS_PACKAGE-tmp" + break + fi + shift + done + fi +} + +remove_conffile_lookup () { + # syntax: remove_conffile_lookup package filename + # + # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal + # if it matches the actual file's md5sum. + # + # Call this function when you would call remove_conffile_prepare but only + # want to check against dpkg's status database instead of known checksums. + + local package conffile old_md5sum + + # validate arguments + if [ $# -ne 2 ]; then + usage_error "remove_conffile_lookup() called with wrong number of" \ + "arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + package="$1" + conffile="$2" + + if ! [ -e "$conffile" ]; then + return + fi + old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \ + awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')" + if [ -n "$old_md5sum" ]; then + remove_conffile_prepare "$conffile" "$old_md5sum" + fi +} + +remove_conffile_commit () { + # syntax: remove_conffile_commit filename + # + # Complete the removal of a conffile "filename" that has become obsolete. + # + # Call this function from a postinst script after having used + # remove_conffile_prepare() in the preinst. + + local conffile + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "remove_conffile_commit() called with wrong number of" \ + "arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + + # if the temporary file created by remove_conffile_prepare() exists, remove it + if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then + observe "committing removal of obsolete conffile $conffile" + rm "$conffile.$THIS_PACKAGE-tmp" + fi +} + +remove_conffile_rollback () { + # syntax: remove_conffile_rollback filename + # + # Roll back the removal of a conffile "filename". + # + # Call this function from a postrm script in the event $1 is "abort-upgrade" + # or "abort-install" is after having used remove_conffile_prepare() in the + # preinst. + + local conffile + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "remove_conffile_rollback() called with wrong number of" \ + "arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + + # if the temporary file created by remove_conffile_prepare() exists, move it + # back + if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then + observe "rolling back removal of obsolete conffile $conffile" + mv "$conffile.$THIS_PACKAGE-tmp" "$conffile" + fi +} + +replace_conffile_with_symlink_prepare () { + # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \ + # official_md5sum ... + # + # Check a conffile "oldfilename" against a list of canonical MD5 checksums. + # If the file's current MD5 checksum matches one of the "official_md5sum" + # operands provided, then prepare the conffile for removal from the system. + # We defer actual deletion until the package is configured so that we can + # roll this operation back if package installation fails. Otherwise copy it + # to newfilename and let dpkg handle it through conffiles mechanism. + # + # Call this function from a preinst script in the event $1 is "upgrade" or + # "install" and verify $2 to ensure the package is being upgraded from a + # version (or installed over a version removed-but-not-purged) prior to the + # one in which the conffile was obsoleted. + + local conffile current_checksum + + # validate arguments + if [ $# -lt 3 ]; then + usage_error "replace_conffile_with_symlink_prepare() called with wrong" \ + " number of arguments; expected at least 3, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + oldconffile="$1" + shift + newconffile="$1" + shift + + remove_conffile_prepare "$_oldconffile" "$@" + # If $oldconffile still exists, then md5sums didn't match. + # Copy it to new one. + if [ -f "$oldconffile" ]; then + cp "$oldconffile" "$newconffile" + fi + +} + +replace_conffile_with_symlink_commit () { + # syntax: replace_conffile_with_symlink_commit oldfilename + # + # Complete the removal of a conffile "oldfilename" that has been + # replaced by a symlink. + # + # Call this function from a postinst script after having used + # replace_conffile_with_symlink_prepare() in the preinst. + + local conffile + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "replace_conffile_with_symlink_commit() called with wrong" \ + "number of arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + + remove_conffile_commit "$conffile" +} + +replace_conffile_with_symlink_rollback () { + # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename + # + # Roll back the replacing of a conffile "oldfilename" with symlink to + # "newfilename". + # + # Call this function from a postrm script in the event $1 is "abort-upgrade" + # or "abort-install" and verify $2 to ensure the package failed to upgrade + # from a version (or install over a version removed-but-not-purged) prior + # to the one in which the conffile was obsoleted. + # You should have used replace_conffile_with_symlink_prepare() in the + # preinst. + + local conffile + + # validate arguments + if [ $# -ne 2 ]; then + usage_error "replace_conffile_with_symlink_rollback() called with wrong" \ + "number of arguments; expected 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + oldconffile="$1" + newconffile="$2" + + remove_conffile_rollback "$_oldconffile" + if [ -f "$newconffile" ]; then + rm "$newconffile" + fi +} + +run () { + # syntax: run command [ argument ... ] + # + # Run specified command with optional arguments and report its exit status. + # Useful for commands whose exit status may be nonzero, but still acceptable, + # or commands whose failure is not fatal to us. + # + # NOTE: Do *not* use this function with db_get or db_metaget commands; in + # those cases the return value of the debconf command *must* be checked + # before the string returned by debconf is used for anything. + + local retval + + # validate arguments + if [ $# -lt 1 ]; then + usage_error "run() called with wrong number of arguments; expected at" \ + "least 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + "$@" || retval=$? + + if [ ${retval:-0} -ne 0 ]; then + observe "command \"$*\" exited with status $retval" + fi +} + +make_symlink_sane () { + # syntax: make_symlink_sane symlink target + # + # Ensure that the symbolic link symlink exists, and points to target. + # + # If symlink does not exist, create it and point it at target. + # + # If symlink exists but is not a symbolic link, back it up. + # + # If symlink exists, is a symbolic link, but points to the wrong location, fix + # it. + # + # If symlink exists, is a symbolic link, and already points to target, do + # nothing. + # + # This function wouldn't be needed if ln had an -I, --idempotent option. + + # Validate arguments. + if [ $# -ne 2 ]; then + usage_error "make_symlink_sane() called with wrong number of arguments;" \ + "expected 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + # We could just use the positional parameters as-is, but that makes things + # harder to follow. + local symlink target + + symlink="$1" + target="$2" + + if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then + observe "link from $symlink to $target already exists" + else + observe "creating symbolic link from $symlink to $target" + mkdir -p "${target%/*}" "${symlink%/*}" + ln -s -b -S ".dpkg-old" "$target" "$symlink" + fi +} + +migrate_dir_to_symlink () { + # syntax: migrate_dir_to_symlink old_location new_location + # + # Per Debian Policy section 6.5.4, "A directory will never be replaced by a + # symbolic link to a directory or vice versa; instead, the existing state + # (symlink or not) will be left alone and dpkg will follow the symlink if + # there is one." + # + # We have to do it ourselves. + # + # This function moves the contents of old_location, a directory, into + # new_location, a directory, then makes old_location a symbolic link to + # new_location. + # + # old_location need not exist, but if it does, it must be a directory (or a + # symlink to a directory). If it is not, it is backed up. If new_location + # exists already and is not a directory, it is backed up. + # + # This function should be called from a package's preinst so that other + # packages unpacked after this one --- but before this package's postinst runs + # --- are unpacked into new_location even if their payloads contain + # old_location filespecs. + + # Validate arguments. + if [ $# -ne 2 ]; then + usage_error "migrate_dir_to_symlink() called with wrong number of" + "arguments; expected 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + # We could just use the positional parameters as-is, but that makes things + # harder to follow. + local new old + + old="$1" + new="$2" + + # Is old location a symlink? + if [ -L "$old" ]; then + # Does it already point to new location? + if [ "$(readlink "$old")" = "$new" ]; then + # Nothing to do; migration has already been done. + observe "migration of $old to $new already done" + return 0 + else + # Back it up. + warn "backing up symbolic link $old as $old.dpkg-old" + mv -b "$old" "$old.dpkg-old" + fi + fi + + # Does old location exist, but is not a directory? + if [ -e "$old" ] && ! [ -d "$old" ]; then + # Back it up. + warn "backing up non-directory $old as $old.dpkg-old" + mv -b "$old" "$old.dpkg-old" + fi + + observe "migrating $old to $new" + + # Is new location a symlink? + if [ -L "$new" ]; then + # Does it point the wrong way, i.e., back to where we're migrating from? + if [ "$(readlink "$new")" = "$old" ]; then + # Get rid of it. + observe "removing symbolic link $new which points to $old" + rm "$new" + else + # Back it up. + warn "backing up symbolic link $new as $new.dpkg-old" + mv -b "$new" "$new.dpkg-old" + fi + fi + + # Does new location exist, but is not a directory? + if [ -e "$new" ] && ! [ -d "$new" ]; then + warn "backing up non-directory $new as $new.dpkg-old" + mv -b "$new" "$new.dpkg-old" + fi + + # Create new directory if it does not yet exist. + if ! [ -e "$new" ]; then + observe "creating $new" + mkdir -p "$new" + fi + + # Copy files in old location to new location. Back up any filenames that + # already exist in the new location with the extension ".dpkg-old". + observe "copying files from $old to $new" + if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then + die "error(s) encountered while copying files from $old to $new" + fi + + # Remove files at old location. + observe "removing $old" + rm -r "$old" + + # Create symlink from old location to new location. + make_symlink_sane "$old" "$new" +} + +# vim:set ai et sw=2 ts=2 tw=80: + +# GOBSTOPPER: The X Strike Force shell library ends here. diff --git a/include/X11/extensions/Xinerama.h b/include/X11/extensions/Xinerama.h new file mode 100644 index 0000000..666f52a --- /dev/null +++ b/include/X11/extensions/Xinerama.h @@ -0,0 +1,74 @@ +/* + +Copyright 2003 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +#ifndef _Xinerama_h +#define _Xinerama_h + +#include + +typedef struct { + int screen_number; + short x_org; + short y_org; + short width; + short height; +} XineramaScreenInfo; + +_XFUNCPROTOBEGIN + +Bool XineramaQueryExtension ( + Display *dpy, + int *event_base, + int *error_base +); + +Status XineramaQueryVersion( + Display *dpy, + int *major_versionp, + int *minor_versionp +); + +Bool XineramaIsActive(Display *dpy); + + +/* + Returns the number of heads and a pointer to an array of + structures describing the position and size of the individual + heads. Returns NULL and number = 0 if Xinerama is not active. + + Returned array should be freed with XFree(). +*/ + +XineramaScreenInfo * +XineramaQueryScreens( + Display *dpy, + int *number +); + +_XFUNCPROTOEND + +#endif /* _Xinerama_h */ + diff --git a/include/X11/extensions/panoramiXext.h b/include/X11/extensions/panoramiXext.h new file mode 100755 index 0000000..6b18d6d --- /dev/null +++ b/include/X11/extensions/panoramiXext.h @@ -0,0 +1,85 @@ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* + * PanoramiX definitions + */ + +/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ + +#ifndef _panoramiXext_h +#define _panoramiXext_h + +#include + +typedef struct { + Window window; /* PanoramiX window - may not exist */ + int screen; + int State; /* PanoramiXOff, PanoramiXOn */ + int width; /* width of this screen */ + int height; /* height of this screen */ + int ScreenCount; /* real physical number of screens */ + XID eventMask; /* selected events for this client */ +} XPanoramiXInfo; + +_XFUNCPROTOBEGIN + +extern Bool XPanoramiXQueryExtension ( + Display * /* dpy */, + int * /* event_base_return */, + int * /* error_base_return */ +); + +extern Status XPanoramiXQueryVersion( + Display * /* dpy */, + int * /* major_version_return */, + int * /* minor_version_return */ +); + +extern XPanoramiXInfo *XPanoramiXAllocInfo ( + void +); + +extern Status XPanoramiXGetState ( + Display * /* dpy */, + Drawable /* drawable */, + XPanoramiXInfo * /* panoramiX_info */ +); + +extern Status XPanoramiXGetScreenCount ( + Display * /* dpy */, + Drawable /* drawable */, + XPanoramiXInfo * /* panoramiX_info */ +); + +extern Status XPanoramiXGetScreenSize ( + Display * /* dpy */, + Drawable /* drawable */, + int /* screen_num */, + XPanoramiXInfo * /* panoramiX_info */ +); + +_XFUNCPROTOEND + +#endif /* _panoramiXext_h */ diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100755 index 0000000..7a349ef --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,45 @@ +# +# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +libmandir = $(LIB_MAN_DIR) + +libman_PRE = \ + Xinerama.man \ + $(Xinerama_shadows:=.man) + +Xinerama_shadows = \ + XineramaQueryExtension \ + XineramaQueryVersion \ + XineramaIsActive \ + XineramaQueryScreens + +EXTRA_DIST = $(libman_PRE) +CLEANFILES = $(libman_DATA) + +libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) + +SUFFIXES = .$(LIB_MAN_SUFFIX) .man + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +.man.$(LIB_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/man/Xinerama.man b/man/Xinerama.man new file mode 100755 index 0000000..13abe06 --- /dev/null +++ b/man/Xinerama.man @@ -0,0 +1,123 @@ +.\" +.\" Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining a +.\" copy of this software and associated documentation files (the "Software"), +.\" to deal in the Software without restriction, including without limitation +.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, +.\" and/or sell copies of the Software, and to permit persons to whom the +.\" Software is furnished to do so, subject to the following conditions: +.\" +.\" The above copyright notice and this permission notice (including the next +.\" paragraph) shall be included in all copies or substantial portions of the +.\" Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +.\" DEALINGS IN THE SOFTWARE. +.\" +.de TQ +.br +.ns +.TP \\$1 +.. +.TH XINERAMA __libmansuffix__ __vendorversion__ +.SH NAME +Xinerama \- API for Xinerama extension to X11 Protocol +.SH SYNOPSIS +\&#include +.nf +.sp +Bool XineramaQueryExtension \^(\^Display *\fIdpy\fP, + int *\fIevent_base_return\fP, int *\fIerror_base_return\fP\^); +.sp +Status XineramaQueryVersion \^(\^Display *\fIdpy\fP, + int *\fImajor_version_return\fP, + int *\fIminor_version_return\fP\^); +.sp +Bool XineramaIsActive \^(\^Display *\fIdpy\fP\^); +.sp +XineramaScreenInfo * XineramaQueryScreens \^(\^Display *\fIdpy\fP, + int *\fInumber\fP\^); +.fi +.SH ARGUMENTS +.IP \fIdisplay\fP 1i +Specifies the connection to the X server. +.IP \fIevent_base_return\fP 1i +Specifies the return location for the assigned base event code +.IP \fIerror_base_return\fP 1i +Specifies the return location for the assigned base error code +.IP \fImajor_version_return\fP 1i +Returns the major version supported by the server +.IP \fIminor_version_return\fP 1i +Returns the minor version supported by the server +.IP \fInumber\fP 1i +Returns the number of entries in the returned XineramaScreenInfo array. +.SH DESCRIPTION +.B Xinerama +is a simple library designed to interface the Xinerama Extension for +retrieving information about physical output devices which may be combined +into a single logical X screen. + +.SH FUNCTIONS + +.SS \fBXineramaQueryExtension()\fR + +.LP +The XineramaQueryExtension function queries the Xserver to determine the +availability of the Xinerama Extension. If the extension is available, the +return value is True, and event_base_return and error_base_return are set to +the base event number and base error number for the extension, respectively. +Otherwise, the return value is False, and the values of event_base_return and +error_base_return are undefined. +.sp + +.SS \fBXineramaQueryVersion()\fR + +.LP +The XineramaQueryVersion function returns the version of the Xinerama extension +implemented by the Xserver. The version is returned in major_version_return +and minor_version_return. The major version will be incremented for protocol +incompatible changes, and the minor version will be incremented for small, +upwardly compatible changes. +.LP +If the Xinerama library is compatible with the version returned by the +server, it returns nonzero. If the server does not support the +XINERAMA extension, or if there was an error during communications +with the server, or if the server and library protocol versions are +incompatible, it returns zero. +.sp + +.SS \fBXineramaIsActive()\fR + +.LP +The XineramaIsActive function returns a Boolean operator used to determine if +Xinerama is activated on the screen. Returns True for active and False for +not active. +.sp + +.SS \fBXineramaQueryScreens()\fR + +.LP +The \fBXineramaQueryScreens()\fR function returns info about each +individual output device within the Xinerama Screen. The integer +pointed to by the \fInumber\fR argument is updated to the number of +output devices listed in the returned array of \fIXineramaScreenInfo\fR +structures. \fBXineramaQueryScreens()\fR returns NULL and sets \fInumber\fR +to 0 if Xinerama is not active. + +The pointer returned should be released with XFree(__libmansuffix__) +when no longer needed. +.sp + +.SH NOTE +The original API provided for interacting with the XINERAMA extension used +function names beginning with \fIXPanoramiX\fR. That API is now deprecated +and this API should be used instead in new software. + + + diff --git a/man/XineramaIsActive.man b/man/XineramaIsActive.man new file mode 100755 index 0000000..bf86f34 --- /dev/null +++ b/man/XineramaIsActive.man @@ -0,0 +1 @@ +.so man__libmansuffix__/Xinerama.__libmansuffix__ diff --git a/man/XineramaQueryExtension.man b/man/XineramaQueryExtension.man new file mode 100755 index 0000000..bf86f34 --- /dev/null +++ b/man/XineramaQueryExtension.man @@ -0,0 +1 @@ +.so man__libmansuffix__/Xinerama.__libmansuffix__ diff --git a/man/XineramaQueryScreens.man b/man/XineramaQueryScreens.man new file mode 100755 index 0000000..bf86f34 --- /dev/null +++ b/man/XineramaQueryScreens.man @@ -0,0 +1 @@ +.so man__libmansuffix__/Xinerama.__libmansuffix__ diff --git a/man/XineramaQueryVersion.man b/man/XineramaQueryVersion.man new file mode 100755 index 0000000..bf86f34 --- /dev/null +++ b/man/XineramaQueryVersion.man @@ -0,0 +1 @@ +.so man__libmansuffix__/Xinerama.__libmansuffix__ diff --git a/packaging/libXinerama.spec b/packaging/libXinerama.spec new file mode 100644 index 0000000..4056d78 --- /dev/null +++ b/packaging/libXinerama.spec @@ -0,0 +1,73 @@ + +Name: libXinerama +Summary: X.Org X11 libXinerama runtime library +Version: 1.1.1 +Release: 1 +Group: System/Libraries +License: MIT/X11 +URL: http://www.x.org +Source0: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.gz +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +BuildRequires: pkgconfig(xproto) +BuildRequires: pkgconfig(xextproto) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xineramaproto) +BuildRequires: pkgconfig(xorg-macros) + +%description +X.Org X11 libXinerama runtime library + + +%package devel +Summary: X.Org X11 libXinerama development package +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +X.Org X11 libXinerama development package + + +%prep +%setup -q -n %{name}-%{version} + + +%build + +%reconfigure --disable-static + +# Call make instruction with smp support +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + + +%clean +rm -rf %{buildroot} + + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + + +%files +%defattr(-,root,root,-) +%doc COPYING +%{_libdir}/libXinerama.so.1 +%{_libdir}/libXinerama.so.1.0.0 + + +%files devel +%defattr(-,root,root,-) +%doc README ChangeLog +%{_includedir}/X11/extensions/*.h +%{_libdir}/libXinerama.so +%{_libdir}/pkgconfig/xinerama.pc +%{_mandir}/man3/*.3* + diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100755 index 0000000..c362ef1 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,27 @@ +AM_CFLAGS = -I$(top_srcdir)/include \ + -I$(top_srcdir)/include/X11 \ + -I$(top_srcdir)/include/X11/extensions \ + $(XINERAMA_CFLAGS) \ + $(MALLOC_ZERO_CFLAGS) \ + $(CWARNFLAGS) + +lib_LTLIBRARIES = libXinerama.la + +libXinerama_la_SOURCES = \ + Xinerama.c + +libXinerama_la_LIBADD = $(XINERAMA_LIBS) + +libXinerama_la_LDFLAGS = -version-number 1:0:0 -no-undefined + +libXineramaincludedir = $(includedir)/X11/extensions +libXineramainclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xinerama.h \ + $(top_srcdir)/include/X11/extensions/panoramiXext.h + +if LINT +ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +lint: + $(LINT) $(ALL_LINT_FLAGS) $(libXinerama_la_SOURCES) $(XINERAMA_LIBS) +endif LINT diff --git a/src/Xinerama.c b/src/Xinerama.c new file mode 100755 index 0000000..9dbff36 --- /dev/null +++ b/src/Xinerama.c @@ -0,0 +1,313 @@ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + + +static XExtensionInfo _panoramiX_ext_info_data; +static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; +static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME; + +#define PanoramiXCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, panoramiX_extension_name, val) +#define PanoramiXSimpleCheckExtension(dpy,i) \ + XextSimpleCheckExtension (dpy, i, panoramiX_extension_name) + +static int close_display(Display *dpy, XExtCodes *codes); + +static /* const */ XExtensionHooks panoramiX_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, panoramiX_ext_info, + panoramiX_extension_name, + &panoramiX_extension_hooks, + 0, NULL) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info) + + + +/**************************************************************************** + * * + * PanoramiX public interfaces * + * * + ****************************************************************************/ + +Bool XPanoramiXQueryExtension ( + Display *dpy, + int *event_base_return, + int *error_base_return +) +{ + XExtDisplayInfo *info = find_display (dpy); + + if (XextHasExtension(info)) { + *event_base_return = info->codes->first_event; + *error_base_return = info->codes->first_error; + return True; + } else { + return False; + } +} + + +Status XPanoramiXQueryVersion( + Display *dpy, + int *major_version_return, + int *minor_version_return +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXQueryVersionReply rep; + register xPanoramiXQueryVersionReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXQueryVersion; + req->clientMajor = PANORAMIX_MAJOR_VERSION; + req->clientMinor = PANORAMIX_MINOR_VERSION; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + *major_version_return = rep.majorVersion; + *minor_version_return = rep.minorVersion; + UnlockDisplay (dpy); + SyncHandle (); + return 1; +} + +XPanoramiXInfo *XPanoramiXAllocInfo(void) +{ + return (XPanoramiXInfo *) Xmalloc (sizeof (XPanoramiXInfo)); +} + +Status XPanoramiXGetState ( + Display *dpy, + Drawable drawable, + XPanoramiXInfo *panoramiX_info +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXGetStateReply rep; + register xPanoramiXGetStateReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXGetState, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXGetState; + req->window = drawable; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + UnlockDisplay (dpy); + SyncHandle (); + panoramiX_info->window = rep.window; + panoramiX_info->State = rep.state; + return 1; +} + +Status XPanoramiXGetScreenCount ( + Display *dpy, + Drawable drawable, + XPanoramiXInfo *panoramiX_info +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXGetScreenCountReply rep; + register xPanoramiXGetScreenCountReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXGetScreenCount, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXGetScreenCount; + req->window = drawable; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + UnlockDisplay (dpy); + SyncHandle (); + panoramiX_info->window = rep.window; + panoramiX_info->ScreenCount = rep.ScreenCount; + return 1; +} + +Status XPanoramiXGetScreenSize ( + Display *dpy, + Drawable drawable, + int screen_num, + XPanoramiXInfo *panoramiX_info +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXGetScreenSizeReply rep; + register xPanoramiXGetScreenSizeReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXGetScreenSize, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXGetScreenSize; + req->window = drawable; + req->screen = screen_num; /* need to define */ + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + UnlockDisplay (dpy); + SyncHandle (); + panoramiX_info->window = rep.window; + panoramiX_info->screen = rep.screen; + panoramiX_info->width = rep.width; + panoramiX_info->height = rep.height; + return 1; +} + +/*******************************************************************\ + Alternate interface to make up for shortcomings in the original, + namely, the omission of the screen origin. The new interface is + in the "Xinerama" namespace instead of "PanoramiX". +\*******************************************************************/ + +Bool XineramaQueryExtension ( + Display *dpy, + int *event_base_return, + int *error_base_return +) +{ + return XPanoramiXQueryExtension(dpy, event_base_return, error_base_return); +} + +Status XineramaQueryVersion( + Display *dpy, + int *major, + int *minor +) +{ + return XPanoramiXQueryVersion(dpy, major, minor); +} + +Bool XineramaIsActive(Display *dpy) +{ + xXineramaIsActiveReply rep; + xXineramaIsActiveReq *req; + XExtDisplayInfo *info = find_display (dpy); + + if(!XextHasExtension(info)) + return False; /* server doesn't even have the extension */ + + LockDisplay (dpy); + GetReq (XineramaIsActive, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_XineramaIsActive; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + UnlockDisplay (dpy); + SyncHandle (); + return rep.state; +} + +XineramaScreenInfo * +XineramaQueryScreens( + Display *dpy, + int *number +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXineramaQueryScreensReply rep; + xXineramaQueryScreensReq *req; + XineramaScreenInfo *scrnInfo = NULL; + + PanoramiXCheckExtension (dpy, info, NULL); + + LockDisplay (dpy); + GetReq (XineramaQueryScreens, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_XineramaQueryScreens; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + + if(rep.number) { + if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < rep.number; i++) { + _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); + scrnInfo[i].screen_number = i; + scrnInfo[i].x_org = scratch.x_org; + scrnInfo[i].y_org = scratch.y_org; + scrnInfo[i].width = scratch.width; + scrnInfo[i].height = scratch.height; + } + + *number = rep.number; + } else + _XEatData(dpy, rep.length << 2); + } else { + *number = 0; + } + + UnlockDisplay (dpy); + SyncHandle (); + return scrnInfo; +} diff --git a/xinerama.pc.in b/xinerama.pc.in new file mode 100644 index 0000000..a2ffe1b --- /dev/null +++ b/xinerama.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Xinerama +Description: The Xinerama Library +Version: @PACKAGE_VERSION@ +Requires: xineramaproto +Requires.private: x11 xext +Cflags: -I${includedir} +Libs: -L${libdir} -lXinerama -- 2.7.4