summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xorg-x11/ChangeLog8
-rw-r--r--x11-base/xorg-x11/Manifest4
-rw-r--r--x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild399
3 files changed, 154 insertions, 257 deletions
diff --git a/x11-base/xorg-x11/ChangeLog b/x11-base/xorg-x11/ChangeLog
index bf6f4a7bf540..9b86fd214e79 100644
--- a/x11-base/xorg-x11/ChangeLog
+++ b/x11-base/xorg-x11/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-base/xorg-x11
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.168 2004/10/19 08:31:27 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.169 2004/10/19 08:49:56 spyderous Exp $
+
+ 19 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>;
+ xorg-x11-6.8.0-r2.ebuild:
+ Coding style rework. Move logic operators to beginnings of lines rather than
+ ends; Keep 'then' on same line as 'if', same for 'for' and 'do'; indent ';;'
+ of case statements one tab past the current switch.
19 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>;
xorg-x11-6.8.0-r2.ebuild:
diff --git a/x11-base/xorg-x11/Manifest b/x11-base/xorg-x11/Manifest
index 3fe203bb3007..dec420ab9e9a 100644
--- a/x11-base/xorg-x11/Manifest
+++ b/x11-base/xorg-x11/Manifest
@@ -1,8 +1,8 @@
MD5 36a69eed0e585f3dcf096cc82ac54575 metadata.xml 230
-MD5 2d6e62214cf2b4d04718afdd3c7f6e94 xorg-x11-6.8.0-r2.ebuild 43819
+MD5 ce844f3030f34c356263eab7e1196ed2 xorg-x11-6.8.0-r2.ebuild 43712
MD5 ca34ddd369d94ea86b0774e029f54efb xorg-x11-6.7.0-r2.ebuild 38072
MD5 c81b82b9a07e0975156358918886607e xorg-x11-6.8.0-r1.ebuild 41319
-MD5 877a4bcc9d9a3a7c5d959263bd71fa74 ChangeLog 36899
+MD5 1ef6f0ea2ca348c7bccd6a8f91e7d287 ChangeLog 37195
MD5 5f6772219f532c3baf3fb3ceecf1ab65 files/digest-xorg-x11-6.8.0-r2 906
MD5 a3314fbdc270d7d84ea14fd477b8d048 files/digest-xorg-x11-6.7.0-r2 904
MD5 70facbdb85b7ef2bc9b9b702442eda7e files/digest-xorg-x11-6.8.0-r1 908
diff --git a/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild b/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild
index b3271c44a64c..884f1fa8df9d 100644
--- a/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild
+++ b/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild,v 1.25 2004/10/19 08:31:27 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild,v 1.26 2004/10/19 08:49:56 spyderous Exp $
# Set TDFX_RISKY to "yes" to get 16-bit, 1024x768 or higher on low-memory
# voodoo3 cards.
@@ -144,20 +144,21 @@ cflag_setup() {
ALLOWED_FLAGS="-fstack-protector -march -mcpu -O -O1 -O2 -O3 -pipe -fomit-frame-pointer -g -gstabs+ -gstabs -ggdb"
# arch-specific section added by popular demand
case "${ARCH}" in
- mips) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mtune -mips1 -mips2 -mips3 -mips4 -mabi" ;;
+ mips) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mtune -mips1 -mips2 -mips3 -mips4 -mabi"
+ ;;
# -fomit-frame-pointer known to break things and is pointless
# according to ciaranm
# And hardened compiler must be softened. -- fmccor, 20.viii.04
sparc) filter-flags "-fomit-frame-pointer"
- if use hardened
- then
+ if use hardened; then
einfo "Softening gcc for sparc"
ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-pie -fno-PIE"
append-flags "-fno-pie -fno-PIE"
fi
- ;;
+ ;;
# gcc-3.3.2 causes invalid insn error
- hppa ) replace-cpu-flags 2.0 1.0 ;;
+ hppa ) replace-cpu-flags 2.0 1.0
+ ;;
esac
# Recently there has been a lot of stability problem in Gentoo-land. Many
@@ -187,8 +188,7 @@ pkg_setup() {
#################################################
### GET RID OF THIS ONCE THIS EBUILD IS READY ###
#################################################
- if [ -z "${BREAKME}" ]
- then
+ if [ -z "${BREAKME}" ]; then
die "Set the BREAKME variable to emerge this. It's in development. Stop using it."
fi
@@ -200,8 +200,7 @@ pkg_setup() {
cflag_setup
# See bug #35468, circular pam-X11 dep
- if use pam && best_version x11-base/${PN}
- then
+ if use pam && best_version x11-base/${PN}; then
einfo "Previous ${PN} installation detected"
einfo "Enabling PAM features in ${PN}..."
else
@@ -211,20 +210,17 @@ pkg_setup() {
einfo "See http://bugs.gentoo.org/show_bug.cgi?id=35468."
fi
- if use static || use dlloader
- then
+ if use static || use dlloader; then
# A static build disallows building the SDK.
# See config/xf86.rules.
# So does a DllModules YES (use dlloader) build (#50562)
# The latter is pending a potential patch.
- if use sdk
- then
+ if use sdk; then
die "The static and dlloader USE flags are currently incompatible with the sdk USE flag."
fi
fi
- if use dmx && use doc
- then
+ if use dmx && use doc; then
die "The dmx and doc USE flags are temporarily incompatible and result in a dead build."
fi
@@ -237,8 +233,7 @@ pkg_setup() {
# Echo a message to the user about bitmap-fonts
- if ! use bitmap-fonts
- then
+ if ! use bitmap-fonts; then
ewarn "Please emerge this with USE=\"bitmap-fonts\" to enable"
ewarn "75dpi and 100dpi fonts. Your GTK+-1.2 fonts may look"
ewarn "screwy otherwise"
@@ -252,7 +247,8 @@ host_def_setup() {
HOSTCONF=config/cf/host.def
ebegin "Setting up ${HOSTCONF}"
- cd ${S}; cp ${FILES_DIR}/site.def ${HOSTCONF} || die "host.def copy failed"
+ cd ${S}; cp ${FILES_DIR}/site.def ${HOSTCONF} \
+ || die "host.def copy failed"
echo "#define XVendorString \"Gentoo Linux (The X.Org Foundation ${PV}, revision ${PR}-${PATCH_VER})\"" \
>> ${HOSTCONF}
@@ -297,7 +293,7 @@ host_def_setup() {
# Don't use /lib64 if $(get_libdir) != lib64
# Replaces 0181_all_4.3.0-amd64-nolib64.patch
- if [ "$(get_libdir)" == "lib64" ] ; then
+ if [ "$(get_libdir)" == "lib64" ]; then
echo "#define HaveLib64 YES" >> ${HOSTCONF}
else
echo "#define HaveLib64 NO" >> ${HOSTCONF}
@@ -309,40 +305,36 @@ host_def_setup() {
# Bug #12775 .. fails with -Os.
replace-flags "-Os" "-O2"
- if [ "$(gcc-version)" != "2.95" ]
- then
+ if [ "$(gcc-version)" != "2.95" ]; then
# Should fix bug #4189. gcc 3.x have problems with -march=pentium4
# and -march=athlon-tbird
# Seems fixed on 3.3 and higher
- if [ "$(gcc-major-version)" -eq "3" -a "$(gcc-minor-version)" -le "2" ]
- then
+ if [ "$(gcc-major-version)" -eq "3" -a "$(gcc-minor-version)" -le "2" ]; then
replace-cpu-flags pentium4 pentium3
replace-cpu-flags athlon athlon-tbird
fi
#to fix #56702 for now, thanks Spanky
- [ "$(gcc-version)" == "3.4" ] && use x86 && test_flag -mno-sse2 && append-flags -mno-sse2
+ [ "$(gcc-version)" == "3.4" ] && use x86 && test_flag -mno-sse2 \
+ && append-flags -mno-sse2
# Try a fix for #49310, see #50931 for more info. <spyderous>
- if [ "$(is-flag -fomit-frame-pointer)" ]
- then
+ if [ "$(is-flag -fomit-frame-pointer)" ]; then
replace-cpu-flags k6 k6-2 k6-3 i586
fi
# Without this, modules breaks with gcc3
- if [ "$(gcc-version)" = "3.1" ]
- then
+ if [ "$(gcc-version)" = "3.1" ]; then
append-flags "-fno-merge-constants"
append-flags "-fno-merge-constants"
fi
fi
- if ( [ -e "${ROOT}/usr/src/linux" ] && \
- [ ! $(is_kernel "2" "2") ] ) || \
- [ "$(uname -r | cut -d. -f1,2)" != "2.2" ]
- then
+ if ( [ -e "${ROOT}/usr/src/linux" ] \
+ && [ ! $(is_kernel "2" "2") ] ) \
+ || [ "$(uname -r | cut -d. -f1,2)" != "2.2" ]; then
echo "#define HasLinuxInput YES" >> ${HOSTCONF}
fi
@@ -350,16 +342,14 @@ host_def_setup() {
echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >> ${HOSTCONF}
echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >> ${HOSTCONF}
- if use static
- then
+ if use static; then
echo "#define DoLoadableServer NO" >>${HOSTCONF}
else
- if use dlloader ; then
+ if use dlloader; then
einfo "Setting DoLoadableServer/MakeDllModules to YES."
echo "#define DoLoadableServer YES" >> ${HOSTCONF}
echo "#define MakeDllModules YES" >> ${HOSTCONF}
- if use hardened
- then
+ if use hardened; then
echo "#define HardenedGccSpecs YES" >> ${HOSTCONF}
fi
fi
@@ -369,8 +359,7 @@ host_def_setup() {
use_build debug BuildDebug
use_build debug DebuggableLibraries
- if ! use debug
- then
+ if ! use debug; then
echo "#define ExtraXInputDrivers acecad" >> ${HOSTCONF}
# use less ram .. got this from Spider's makeedit.eclass :)
@@ -381,18 +370,15 @@ host_def_setup() {
# Remove circular dep between pam and X11, bug #35468
# If pam is in USE and we have X11, then we can enable PAM
# if use pam && [ "$(best_version x11-base/xorg-x11)" ]
- if [ "$(best_version x11-base/xorg-x11)" ]
- then
+ if [ "$(best_version x11-base/xorg-x11)" ]; then
# If you want to have optional pam support, do it properly ...
use_build pam HasPam
use_build pam HasPamMisc
fi
- if use x86 || use alpha
- then
+ if use x86 || use alpha; then
# build with glide3 support? (build the tdfx_dri.o module)
- if use 3dfx
- then
+ if use 3dfx; then
echo "#define HasGlide3 YES" >> ${HOSTCONF}
fi
# This won't work unless we can disable building the tdfx stuff
@@ -400,8 +386,7 @@ host_def_setup() {
# use_build 3dfx HasGlide3
fi
- if use x86
- then
+ if use x86; then
# optimize Mesa for architecture
use_build mmx HasMMXSupport
use_build mmx MesaUseMMX
@@ -418,8 +403,7 @@ host_def_setup() {
# echo "#define XF86ExtraCardDrivers via" >> ${HOSTCONF}
fi
- if use hppa
- then
+ if use hppa; then
echo "#define DoLoadableServer NO" >> ${HOSTCONF}
echo "#define BuildXF86DRI NO" >> config/cf/host.def
echo "#undef DriDrivers" >> config/cf/host.def
@@ -439,49 +423,42 @@ host_def_setup() {
use_build xv BuildXvExt
# uclibc love from iggy
- if use uclibc
- then
+ if use uclibc; then
echo "#define BuildGLULibrary NO" >> config/cf/host.def
fi
- if use alpha
- then
+ if use alpha; then
echo "#define XF86CardDrivers mga nv tga s3virge sis rendition \
i740 tdfx cirrus tseng fbdev \
ati vga v4l glint" >> ${HOSTCONF}
fi
- if use ppc
- then
+ if use ppc; then
echo "#define XF86CardDrivers mga glint s3virge sis savage trident \
chips tdfx fbdev ati DevelDrivers vga nv imstt \
XF86OSCardDrivers XF86ExtraCardDrivers" >> ${HOSTCONF}
fi
- if use ppc64
- then
+ if use ppc64; then
echo "#define MakeDllModules YES" >> ${HOSTCONF}
echo "#define XF86VgaHw YES" >> ${HOSTCONF}
echo "#define XF86FBDevHw YES" >> ${HOSTCONF}
echo "#define XF86CardDrivers fbdev v4l ati vga nv" >> ${HOSTCONF}
fi
- if use sparc
- then
+ if use sparc; then
echo "#define XF86CardDrivers sunffb sunleo suncg6 suncg3 suncg14 \
suntcx sunbw2 glint mga tdfx ati savage vesa vga fbdev \
XF86OSCardDrivers XF86ExtraCardDrivers \
DevelDrivers" >> ${HOSTCONF}
- if use hardened
- then
+ if use hardened; then
einfo "Softening the assembler so cfb modules will play nice with sunffb"
echo "#define AsCmd CcCmd -c -x assembler -fno-pie -fno-PIE" >> ${HOSTCONF}
echo "#define ModuleAsCmd CcCmd -c -x assembler -fno-pie -fno-PIE" >> ${HOSTCONF}
fi
- if ( [ -e "${ROOT}/usr/src/linux" ] && \
- !( $(is_kernel "2" "6") ) ) || \
- [ "$(uname -r | cut -d. -f1,2)" != "2.6" ]
- then
+ if ( [ -e "${ROOT}/usr/src/linux" ] \
+ && !( $(is_kernel "2" "6") ) ) \
+ || [ "$(uname -r | cut -d. -f1,2)" != "2.6" ]; then
einfo "Building for kernels less than 2.6 requires special treatment"
echo "#define UseDeprecatedKeyboardDriver YES" >> ${HOSTCONF}
einfo "Avoid bug #46593 for sparc32-SMP with kernel 2.4.xx"
@@ -516,8 +493,7 @@ host_def_setup() {
use_build nls BuildHebrewFonts
use_build nls BuildThaiFonts
- if use nls
- then
+ if use nls; then
use_build cjk BuildCIDFonts
use_build cjk BuildJapaneseFonts
use_build cjk BuildKoreanFonts
@@ -542,8 +518,7 @@ host_def_setup() {
use_build insecure-drivers BuildDevelDRIDrivers
- if use ipv6
- then
+ if use ipv6; then
# In case Gentoo ever works on a system with IPv6 sockets that don't
# also listen on IPv4 (see config/cf/X11.tmpl)
echo "#define PreferXdmcpIPv6 YES" >> ${HOSTCONF}
@@ -557,8 +532,7 @@ host_def_setup() {
# Make xprint optional
use_build xprint BuildXprint
# Build libXp even when xprint is off. It's just for clients, server
- if ! use xprint
- then
+ if ! use xprint; then
echo "#define BuildXprintLib YES" >> ${HOSTCONF}
fi
@@ -580,24 +554,20 @@ patch_setup() {
# this patch comments out the Xserver line in xdm's config
# We only want it here
- if ! use s390
- then
+ if ! use s390; then
patch_exclude 7500
fi
- # if ! use gatos
- # then
- patch_exclude 9841_all_4.3.0-gatos-mesa
+ # if ! use gatos; then
+ # patch_exclude 9841_all_4.3.0-gatos-mesa
# fi
- if use debug
- then
+ if use debug; then
patch_exclude 5901*acecad-debug
fi
# TDFX_RISKY - 16-bit, 1024x768 or higher on low-memory voodoo3's
- if use 3dfx && [ "${TDFX_RISKY}" = "yes" ]
- then
+ if use 3dfx && [ "${TDFX_RISKY}" = "yes" ]; then
patch_exclude 5850
else
patch_exclude 5851
@@ -613,8 +583,7 @@ src_unpack() {
unpack X11R${PV}-src{1,2,3,4,5}.tar.gz
eend 0
- if use doc
- then
+ if use doc; then
ebegin "Unpacking documentation"
unpack X11R${PV}-src{6,7}.tar.gz
eend 0
@@ -632,13 +601,11 @@ src_unpack() {
# Unpack extra fonts stuff from Mandrake
ebegin "Unpacking fonts"
- if use nls
- then
+ if use nls; then
unpack gemini-koi8-u.tar.bz2 > /dev/null
fi
unpack eurofonts-X11.tar.bz2 > /dev/null
- if use xfs
- then
+ if use xfs; then
unpack xfsft-encodings-${XFSFT_ENC_VER}.tar.bz2 > /dev/null
fi
eend 0
@@ -658,14 +625,11 @@ src_unpack() {
host_def_setup
cd ${S}
- if use doc
- then
+ if use doc; then
# These are not included anymore as they are obsolete
local x
- for x in ${S}/programs/Xserver/hw/xfree86/{XF98Conf.cpp,XF98Config}
- do
- if [ -f ${x} ]
- then
+ for x in ${S}/programs/Xserver/hw/xfree86/{XF98Conf.cpp,XF98Config}; do
+ if [ -f ${x} ]; then
sed -i '/Load[[:space:]]*"\(pex5\|xie\)"/d' ${x}
fi
done
@@ -686,16 +650,15 @@ src_compile() {
unset MAKE_OPTS
einfo "Building xorg-x11..."
- if use debug
- then
+ if use debug; then
chmod u+x ${S}/config/util/makeg.sh
- FAST=1 ${S}/config/util/makeg.sh World WORLDOPTS="" || die "debug make World failed"
+ FAST=1 ${S}/config/util/makeg.sh World WORLDOPTS="" \
+ || die "debug make World failed"
else
FAST=1 emake World WORLDOPTS="" || die "make World failed"
fi
- if use nls
- then
+ if use nls; then
emake -C ${S}/nls || die "nls build failed"
fi
@@ -704,14 +667,12 @@ src_compile() {
backward_compat_setup() {
# Backwards compatibility for /usr/share move
G_FONTDIRS="CID Speedo TTF Type1 encodings local misc util"
- if use bitmap-fonts
- then
+ if use bitmap-fonts; then
G_FONTDIRS="${G_FONTDIRS} 75dpi 100dpi"
fi
dodir /usr/$(get_libdir)/X11/fonts/
- for G_FONTDIR in ${G_FONTDIRS}
- do
+ for G_FONTDIR in ${G_FONTDIRS}; do
dosym ${ROOT}/usr/share/fonts/${G_FONTDIR} /usr/$(get_libdir)/X11/fonts/${G_FONTDIR}
done
@@ -726,20 +687,17 @@ compose_files_setup() {
# Hack from Mandrake (update ours that just created Compose files for
# all locales)
local x
- for x in $(find ${D}/usr/$(get_libdir)/X11/locale/ -mindepth 1 -type d)
- do
+ for x in $(find ${D}/usr/$(get_libdir)/X11/locale/ -mindepth 1 -type d); do
# make empty Compose files for some locales
# CJK must not have that file (otherwise XIM don't works some times)
case $(basename ${x}) in
C|microsoft-*|iso8859-*|koi8-*)
- if [ ! -f ${x}/Compose ]
- then
+ if [ ! -f ${x}/Compose ]; then
touch ${x}/Compose
fi
;;
ja*|ko*|zh*)
- if [ -r ${x}/Compose ]
- then
+ if [ -r ${x}/Compose ]; then
rm -f ${x}/Compose
fi
;;
@@ -749,12 +707,11 @@ compose_files_setup() {
# Another hack from Mandrake -- to fix dead + space for the us
# international keyboard
local i
- for i in ${D}/usr/$(get_libdir)/X11/locale/*/Compose
- do
+ for i in ${D}/usr/$(get_libdir)/X11/locale/*/Compose; do
sed -i \
-e 's/\(<dead_diaeresis> <space>\).*$/\1 : "\\"" quotedbl/' \
- -e "s/\(<dead_acute> <space>\).*$/\1 : \"'\" apostrophe/" \
- ${i} || eerror "sed ${i} failed"
+ -e "s/\(<dead_acute> <space>\).*$/\1 : \"'\" apostrophe/" ${i} \
+ || eerror "sed ${i} failed"
done
}
@@ -778,13 +735,11 @@ etc_files_install() {
doins ${FILES_DIR}/xinitrc
exeinto /etc/X11/xdm
doexe ${FILES_DIR}/Xsession ${FILES_DIR}/Xsetup_0
- if use xfs
- then
+ if use xfs; then
insinto /etc/X11/fs
newins ${FILES_DIR}/xfs.config config
fi
- if use pam
- then
+ if use pam; then
insinto /etc/pam.d
newins ${FILES_DIR}/xdm.pamd xdm
# Need to fix console permissions first
@@ -792,8 +747,7 @@ etc_files_install() {
fi
exeinto /etc/init.d
newexe ${FILES_DIR}/xdm.start xdm
- if use xfs
- then
+ if use xfs; then
newexe ${FILES_DIR}/xfs.start xfs
insinto /etc/conf.d
newins ${FILES_DIR}/xfs.conf.d xfs
@@ -808,26 +762,20 @@ setup_dynamic_libgl() {
for x in ${D}/usr/$(get_libdir)/libGL.so* \
${D}/usr/$(get_libdir)/libGL.la \
${D}/usr/$(get_libdir)/libGL.a \
- ${D}/usr/$(get_libdir)/libMesaGL.so
- do
- if [ -f ${x} -o -L ${x} ]
- then
+ ${D}/usr/$(get_libdir)/libMesaGL.so; do
+ if [ -f ${x} -o -L ${x} ]; then
# libGL.a cause problems with tuxracer, etc
mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${PN}/$(get_libdir)
fi
done
- for x in ${D}/usr/$(get_libdir)/modules/extensions/libglx*
- do
- if [ -f ${x} -o -L ${x} ]
- then
+ for x in ${D}/usr/$(get_libdir)/modules/extensions/libglx*; do
+ if [ -f ${x} -o -L ${x} ]; then
mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${PN}/extensions
fi
done
# glext.h added for #54984
- for x in ${D}/usr/X11R6/include/GL/{gl.h,glx.h,glxtokens.h,glext.h}
- do
- if [ -f ${x} -o -L ${x} ]
- then
+ for x in ${D}/usr/X11R6/include/GL/{gl.h,glx.h,glxtokens.h,glext.h}; do
+ if [ -f ${x} -o -L ${x} ]; then
mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${PN}/include
fi
done
@@ -836,16 +784,14 @@ setup_dynamic_libgl() {
dosym /usr/$(get_libdir)/opengl/${PN}/include/glext.h /usr/X11R6/include/GL/
# Even if libdir isnt lib, we need a lib symlink for opengl-update and
# friends. See bug 62990 for more info.
- if [ "$(get_libdir)" != "lib" ]
- then
+ if [ "$(get_libdir)" != "lib" ]; then
dosym $(get_libdir) /usr/$(get_libdir)/opengl/${PN}/lib
fi
eend 0
}
strip_execs() {
- if use debug || has nostrip ${FEATURES}
- then
+ if use debug || has nostrip ${FEATURES}; then
ewarn "Debug build turned on by USE=debug"
ewarn "NOT stripping binaries and libraries"
else
@@ -861,25 +807,20 @@ strip_execs() {
local x
for x in $(find ${D}/ -type f -perm +0111 -exec file {} \; | \
grep -v ' shared object,' | \
- sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p')
- do
- if [ -f ${x} ]
- then
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'); do
+ if [ -f ${x} ]; then
# Dont do the modules ...
- if [ "${x/\/usr\/$(get_libdir)\/modules}" = "${x}" ]
- then
- echo "$(echo ${x} | sed -e "s|${D}||")"
+ if [ "${x/\/usr\/$(get_libdir)\/modules}" = "${x}" ]; then
+ echo "$(echo ${x/${D}})"
${STRIP} ${x} || :
fi
fi
done
# Now do the libraries ...
for x in ${D}/usr/{$(get_libdir),$(get_libdir)/opengl/${PN}/$(get_libdir)}/*.so.* \
- ${D}/usr/{$(get_libdir),$(get_libdir)/X11/locale/$(get_libdir)/common}/*.so.*
- do
- if [ -f ${x} ]
- then
- echo "$(echo ${x} | sed -e "s|${D}||")"
+ ${D}/usr/{$(get_libdir),$(get_libdir)/X11/locale/$(get_libdir)/common}/*.so.*; do
+ if [ -f ${x} ]; then
+ echo "$(echo ${x/${D}})"
${STRIP} --strip-debug ${x} || :
fi
done
@@ -904,8 +845,7 @@ update_config_files() {
# This *needs* to be after all other installation so files aren't
# overwritten.
- if [ "${ROOT}" = "/" ]
- then
+ if [ "${ROOT}" = "/" ]; then
einfo "Preparing any installed configuration files for font move..."
FILES="/etc/X11/xorg.conf
/etc/X11/XF86Config-4
@@ -915,16 +855,15 @@ update_config_files() {
# /etc/fonts/local.conf
local FILE
- for FILE in ${FILES}
- do
- if [ -e ${FILE} ]
- then
+ for FILE in ${FILES}; do
+ if [ -e ${FILE} ]; then
# New font paths
sed "s,/usr/X11R6/$(get_libdir)/X11/fonts,/usr/share/fonts,g" \
${ROOT}${FILE} > ${IMAGE}${FILE}
- if [ "${FILE}" = "/etc/X11/xorg.conf" ] || [ "${FILE}" = "/etc/X11/XF86Config" ] || [ "${FILE}" = "/etc/X11/XF86Config-4" ]
- then
+ if [ "${FILE}" = "/etc/X11/xorg.conf" ] \
+ || [ "${FILE}" = "/etc/X11/XF86Config" ] \
+ || [ "${FILE}" = "/etc/X11/XF86Config-4" ]; then
# "keyboard" driver is deprecated and will be removed,
# switch to "kbd"
sed -i 's~^\([ \t]*Driver[ \t]\+\)"[kK]eyboard"~\1"kbd"~' \
@@ -944,8 +883,7 @@ fix_opengl_symlinks() {
# Remove invalid symlinks
local LINK
for LINK in $(find ${D}/usr/$(get_libdir) \
- -name libGL.* -type l)
- do
+ -name libGL.* -type l); do
rm -f ${LINK}
done
# Create required symlinks
@@ -961,18 +899,16 @@ src_install() {
einfo "Installing X.org X11..."
# gcc3 related fix. Do this during install, so that our
# whole build will not be compiled without mmx instructions.
- if [ "$(gcc-version)" != "2.95" ] && use x86
- then
- make install DESTDIR=${D} || \
- make CDEBUGFLAGS="${CDEBUGFLAGS} -mno-mmx" \
+ if [ "$(gcc-version)" != "2.95" ] && use x86; then
+ make install DESTDIR=${D} \
+ || make CDEBUGFLAGS="${CDEBUGFLAGS} -mno-mmx" \
CXXDEBUGFLAGS="${CXXDEBUGFLAGS} -mno-mmx" \
install DESTDIR=${D} || die "install failed"
else
make install DESTDIR=${D} || die "install failed"
fi
- if use sdk
- then
+ if use sdk; then
einfo "Installing X.org X11 SDK..."
make install.sdk DESTDIR=${D} || die "sdk install failed"
fi
@@ -982,8 +918,7 @@ src_install() {
einfo "Compressing man pages..."
prepman /usr
- if use nls
- then
+ if use nls; then
cd ${S}/nls
make DESTDIR=${D} install || die "nls install failed"
fi
@@ -992,19 +927,15 @@ src_install() {
# Fix permissions on locale/common/*.so
local x
- for x in ${D}/usr/$(get_libdir)/X11/locale/$(get_libdir)/common/*.so*
- do
- if [ -f ${x} ]
- then
+ for x in ${D}/usr/$(get_libdir)/X11/locale/$(get_libdir)/common/*.so*; do
+ if [ -f ${x} ]; then
fperms 0755 ${x/${D}}
fi
done
# Fix permissions on modules ...
- for x in $(find ${D}/usr/$(get_libdir)/modules -name '*.o' -o -name '*.so')
- do
- if [ -f ${x} ]
- then
+ for x in $(find ${D}/usr/$(get_libdir)/modules -name '*.o' -o -name '*.so'); do
+ if [ -f ${x} ]; then
fperms 0755 ${x/${D}}
fi
done
@@ -1042,8 +973,7 @@ src_install() {
dosym ../X11R6/include/GL /usr/include/GL
dosym ../../usr/$(get_libdir)/X11/xkb /etc/X11/xkb
- if use glx
- then
+ if use glx; then
fix_opengl_symlinks
fi
@@ -1064,23 +994,20 @@ src_install() {
compose_files_setup
# Yet more Mandrake
- if use xfs
- then
+ if use xfs; then
ebegin "Encoding files for xfsft font server..."
dodir /usr/share/fonts/encodings
cp -a ${WORKDIR}/usr/share/fonts/encodings/* \
${D}/usr/share/fonts/encodings
- for x in ${D}/usr/share/fonts/encodings/{.,large}/*.enc
- do
+ for x in ${D}/usr/share/fonts/encodings/{.,large}/*.enc; do
[ -f "${x}" ] && gzip -9 -f ${x} \
|| eerror "gzipping ${x} failed"
done
eend 0
fi
- if use nls
- then
+ if use nls; then
ebegin "gemini-koi8 fonts..."
cd ${WORKDIR}/ukr
gunzip *.Z || eerror "gunzipping gemini-koi8 fonts failed"
@@ -1096,8 +1023,7 @@ src_install() {
# We move libGLU to /usr/lib now
dosym libGLU.so.1.3 /usr/$(get_libdir)/libMesaGLU.so
- if use glx
- then
+ if use glx; then
setup_dynamic_libgl
fi
@@ -1119,8 +1045,7 @@ src_install() {
# rm ${D}/etc/X11/app-defaults/{UXTerm,XTerm,XTerm-color}
# For Battoussai's gatos stuffs:
- if use sdk
- then
+ if use sdk; then
insinto /usr/$(get_libdir)/Server/include
doins ${S}/extras/drm/shared/drm.h
fi
@@ -1135,8 +1060,7 @@ src_install() {
clean_dynamic_libgl() {
# clean the dynamic libGL stuff's home to ensure
# we don't have stale libs floating around
- if [ -d ${ROOT}/usr/$(get_libdir)/opengl/${PN} ]
- then
+ if [ -d ${ROOT}/usr/$(get_libdir)/opengl/${PN} ]; then
rm -rf ${ROOT}/usr/$(get_libdir)/opengl/${PN}/*
fi
@@ -1149,19 +1073,16 @@ clean_dynamic_libgl() {
pkg_preinst() {
update_config_files
- for G_FONTDIR in ${G_FONTDIRS}
- do
+ for G_FONTDIR in ${G_FONTDIRS}; do
# Get rid of deprecated directories so our symlinks in the same location
# work -- users shouldn't be placing fonts here so that should be fine,
# they should be using ~/.fonts or /usr/share/fonts. <spyderous>
- if [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR} ]
- then
+ if [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR} ]; then
# local directory is for sysadmin-added fonts, so save it
# Note: if we did this in src_install(), we would bring fonts from
# the build machine to the install machine rather than just moving
# fonts on the install machine.
- if [ "${G_FONTDIR}" = "local" ]
- then
+ if [ "${G_FONTDIR}" = "local" ]; then
mv ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR} \
${ROOT}/usr/share/fonts/
else
@@ -1172,45 +1093,37 @@ pkg_preinst() {
# clean out old fonts.* and encodings.dir files, as we
# will regenerate them
# Not Speedo or CID, as their fonts.scale files are "real"
- if [ "${G_FONTDIR}" != "CID" -a "${G_FONTDIR}" != "Speedo" ]
- then
+ if [ "${G_FONTDIR}" != "CID" -a "${G_FONTDIR}" != "Speedo" ]; then
find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'fonts.*' \
-o -name 'encodings.dir' -exec rm -f {} \;
fi
done
# No longer used by xorg-x11
- if [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/truetype ]
- then
+ if [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/truetype ]; then
rm -rf ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/truetype
fi
- if [ -L ${ROOT}/etc/X11/app-defaults ]
- then
+ if [ -L ${ROOT}/etc/X11/app-defaults ]; then
rm -f ${ROOT}/etc/X11/app-defaults
fi
- if [ ! -L ${ROOT}/usr/$(get_libdir)/X11/app-defaults ] && \
- [ -d ${ROOT}/usr/$(get_libdir)/X11/app-defaults ]
- then
- if [ ! -d ${ROOT}/etc/X11/app-defaults ]
- then
+ if [ ! -L ${ROOT}/usr/$(get_libdir)/X11/app-defaults ] \
+ && [ -d ${ROOT}/usr/$(get_libdir)/X11/app-defaults ]; then
+ if [ ! -d ${ROOT}/etc/X11/app-defaults ]; then
mkdir -p ${ROOT}/etc/X11/app-defaults
fi
mv -f ${ROOT}/usr/$(get_libdir)/X11/app-defaults ${ROOT}/etc/X11
fi
- if [ -L ${ROOT}/usr/$(get_libdir)/X11/xkb ]
- then
+ if [ -L ${ROOT}/usr/$(get_libdir)/X11/xkb ]; then
rm -f ${ROOT}/usr/$(get_libdir)/X11/xkb
fi
- if [ ! -L ${ROOT}/etc/X11/xkb ] && \
- [ -d ${ROOT}/etc/X11/xkb ]
- then
- if [ ! -d ${ROOT}/usr/$(get_libdir)/X11/xkb ]
- then
+ if [ ! -L ${ROOT}/etc/X11/xkb ] \
+ && [ -d ${ROOT}/etc/X11/xkb ]; then
+ if [ ! -d ${ROOT}/usr/$(get_libdir)/X11/xkb ]; then
mkdir -p ${ROOT}/usr/$(get_libdir)/X11
fi
@@ -1259,12 +1172,10 @@ font_setup() {
eend 0
- if [ -x ${ROOT}/usr/X11R6/bin/ttmkfdir ]
- then
+ if [ -x ${ROOT}/usr/X11R6/bin/ttmkfdir ]; then
ebegin "Creating fonts.scale files..."
local x
- for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1)
- do
+ for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1); do
[ -z "$(ls ${x}/)" ] && continue
[ "$(ls ${x}/)" = "fonts.cache-1" ] && continue
@@ -1276,16 +1187,14 @@ font_setup() {
# Also, there is no way to regenerate Speedo/CID fonts.scale
# <spyderous@gentoo.org> 2 August 2004
if [ "${x/encodings}" = "${x}" -a \
- -n "$(find ${x} -iname '*.tt[cf]' -print)" ]
- then
+ -n "$(find ${x} -iname '*.tt[cf]' -print)" ]; then
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/$(get_libdir)" \
${ROOT}/usr/X11R6/bin/ttmkfdir -x 2 \
-e ${ROOT}/usr/share/fonts/encodings/encodings.dir \
-o ${x}/fonts.scale -d ${x}
# Next type1 and opentype (pfa,pfb,otf,otc)
elif [ "${x/encodings}" = "${x}" -a \
- -n "$(find ${x} -iname '*.[po][ft][abcf]' -print)" ]
- then
+ -n "$(find ${x} -iname '*.[po][ft][abcf]' -print)" ]; then
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/$(get_libdir)" \
${ROOT}/usr/X11R6/bin/mkfontscale \
-a ${ROOT}/usr/share/fonts/encodings/encodings.dir \
@@ -1298,13 +1207,11 @@ font_setup() {
fi
ebegin "Generating fonts.dir files..."
- for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1)
- do
+ for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1); do
[ -z "$(ls ${x}/)" ] && continue
[ "$(ls ${x}/)" = "fonts.cache-1" ] && continue
- if [ "${x/encodings}" = "${x}" ]
- then
+ if [ "${x/encodings}" = "${x}" ]; then
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/$(get_libdir)" \
${ROOT}/usr/X11R6/bin/mkfontdir \
-e ${ROOT}/usr/share/fonts/encodings \
@@ -1315,16 +1222,14 @@ font_setup() {
eend 0
ebegin "Generating Xft cache..."
- for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1)
- do
+ for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1); do
[ -z "$(ls ${x}/)" ] && continue
[ "$(ls ${x}/)" = "fonts.cache-1" ] && continue
# Only generate XftCache files if there are truetype
# fonts present ...
if [ "${x/encodings}" = "${x}" -a \
- -n "$(find ${x} -iname '*.[otps][pft][cfad]' -print)" ]
- then
+ -n "$(find ${x} -iname '*.[otps][pft][cfad]' -print)" ]; then
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/$(get_libdir)" \
${ROOT}/usr/X11R6/bin/xftcache ${x} &> /dev/null
fi
@@ -1339,8 +1244,7 @@ font_setup() {
# danarmak found out that fc-cache should be run AFTER all the above
# stuff, as otherwise the cache is invalid, and has to be run again
# as root anyway
- if [ -x ${ROOT}/usr/bin/fc-cache ]
- then
+ if [ -x ${ROOT}/usr/bin/fc-cache ]; then
ebegin "Creating FC font cache..."
HOME="/root" ${ROOT}/usr/bin/fc-cache
eend 0
@@ -1385,8 +1289,7 @@ switch_opengl_implem() {
# Use new opengl-update that will not reset user selected
# OpenGL interface ...
echo
- if [ "$(${ROOT}/usr/sbin/opengl-update --get-implementation)" = "xfree" ]
- then
+ if [ "$(${ROOT}/usr/sbin/opengl-update --get-implementation)" = "xfree" ]; then
${ROOT}/usr/sbin/opengl-update ${PN}
else
${ROOT}/usr/sbin/opengl-update --use-old ${PN}
@@ -1399,26 +1302,22 @@ pkg_postinst() {
env-update
- if [ "${ROOT}" = "/" ]
- then
+ if [ "${ROOT}" = "/" ]; then
umask 022
font_setup
- if use glx
- then
+ if use glx; then
switch_opengl_implem
fi
fi
- for x in $(find ${ROOT}/usr/$(get_libdir)/X11/locale/ -mindepth 1 -type d)
- do
+ for x in $(find ${ROOT}/usr/$(get_libdir)/X11/locale/ -mindepth 1 -type d); do
# Remove old compose files we might have created incorrectly
# CJK must not have that file (otherwise XIM don't works some times)
case $(basename ${x}) in
ja*|ko*|zh*)
- if [ -r "${x}/Compose" ]
- then
+ if [ -r "${x}/Compose" ]; then
rm -f ${x}/Compose
fi
;;
@@ -1427,10 +1326,8 @@ pkg_postinst() {
# These need to be owned by root and the correct permissions
# (bug #8281)
- for x in ${ROOT}/tmp/.{ICE,X11}-unix
- do
- if [ ! -d ${x} ]
- then
+ for x in ${ROOT}/tmp/.{ICE,X11}-unix; do
+ if [ ! -d ${x} ]; then
mkdir -p ${x}
fi
@@ -1438,8 +1335,7 @@ pkg_postinst() {
chmod 1777 ${x}
done
- if use ppc64
- then
+ if use ppc64; then
#The problem about display driver is fixed.
cd ${ROOT}/usr/$(get_libdir)/modules/drivers
mv fbdev_drv.so fbdev_drv.so.orig
@@ -1450,8 +1346,7 @@ pkg_postinst() {
ld -rpath ${ROOT}/usr/$(get_libdir)/modules/drivers -shared -o ati_drv.so ati_drv.so.orig radeon_drv.so atimisc_drv.so fbdev_drv.so r128_drv.so vga_drv.so
ld -rpath ${ROOT}/usr/$(get_libdir)/modules/drivers -shared -o nv_drv.so nv_drv.so.orig fbdev_drv.so vga_drv.so
- if use glx
- then
+ if use glx; then
#The problem about DRI module and GLX module is fixed.
cd ${ROOT}/usr/$(get_libdir)/modules/extensions
mv libglx.so libglx.so.orig
@@ -1467,15 +1362,13 @@ pkg_postinst() {
pkg_prerm() {
- if use ppc64
- then
+ if use ppc64; then
cd ${ROOT}/usr/$(get_libdir)/modules/drivers
mv fbdev_drv.so.orig fbdev_drv.so
mv ati_drv.so.orig ati_drv.so
mv nv_drv.so.orig nv_drv.so
cd ${ROOT}/usr/$(get_libdir)/modules/extensions
- if use glx
- then
+ if use glx; then
mv libglx.so.orig libglx.so
mv libdri.so.orig libdri.so
fi
@@ -1485,13 +1378,11 @@ pkg_prerm() {
pkg_postrm() {
# Fix problematic links
- if [ -x ${ROOT}/usr/X11R6/bin/Xorg ]
- then
+ if [ -x ${ROOT}/usr/X11R6/bin/Xorg ]; then
ln -snf ../X11R6/bin ${ROOT}/usr/bin/X11
ln -snf ../X11R6/include/X11 ${ROOT}/usr/include/X11
ln -snf ../X11R6/include/DPS ${ROOT}/usr/include/DPS
- if use glx
- then
+ if use glx; then
ln -snf ../X11R6/include/GL ${ROOT}/usr/include/GL
fi
fi