summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2004-03-14 22:25:22 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2004-03-14 22:25:22 +0000
commitcc62da3f0e9911e4afc4e1a6f9797c72b702af6d (patch)
tree720a0a0fcf56028b90faeab13a901d4369345ed7 /x11-base
parentAdd no-pam for x11-base/xfree. (diff)
downloadhistorical-cc62da3f0e9911e4afc4e1a6f9797c72b702af6d.tar.gz
historical-cc62da3f0e9911e4afc4e1a6f9797c72b702af6d.tar.bz2
historical-cc62da3f0e9911e4afc4e1a6f9797c72b702af6d.zip
Adding for testing. Critical change for end-users: fonts now install to /usr/share/fonts. This will require changes in configuration files. Other than that, minor features: updated libXft/libXrender/render; generates xrender.pc; works with media-video/ati-gatos, x11-misc/linuxwacom and x11-misc/synaptics; closes #21417, #21120, #35468, #36923, #42235, #8927, #38232, #23023, #29953, #23957; branch update patch works with ipv6; patches added for hardened build; build autodetects SSE/MMX/3DNOW; docs and man pages install to /usr/share; SiS driver update; FILESDIR stuff moved to tarball so we can get rid of files/4.3.0/ once 4.3.0-r5 is gone; PDEPEND on media-fonts/ttf-bitstream-vera, it was added to newer upstream sources.
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xfree/ChangeLog16
-rw-r--r--x11-base/xfree/Manifest36
-rw-r--r--x11-base/xfree/files/digest-xfree-4.3.0-r623
-rw-r--r--x11-base/xfree/xfree-4.3.0-r6.ebuild1299
4 files changed, 1356 insertions, 18 deletions
diff --git a/x11-base/xfree/ChangeLog b/x11-base/xfree/ChangeLog
index 2eb2c21f009c..e6b6502ed492 100644
--- a/x11-base/xfree/ChangeLog
+++ b/x11-base/xfree/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for x11-base/xfree
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/ChangeLog,v 1.293 2004/03/10 17:28:33 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/ChangeLog,v 1.294 2004/03/14 22:25:22 spyderous Exp $
+
+*xfree-4.3.0-r6 (14 Mar 2004)
+
+ 14 Mar 2004; Donnie Berkholz <spyderous@gentoo.org>; xfree-4.3.0-r6.ebuild:
+ Adding for testing. Critical change for end-users: fonts now install to
+ /usr/share/fonts. This will require changes in configuration files. Other than
+ that, minor features: updated libXft/libXrender/render; generates xrender.pc;
+ works with media-video/ati-gatos, x11-misc/linuxwacom and x11-misc/synaptics;
+ closes #21417, #21120, #35468, #36923, #42235, #8927, #38232, #23023, #29953,
+ #23957; branch update patch works with ipv6; patches added for hardened build;
+ build autodetects SSE/MMX/3DNOW; docs and man pages install to /usr/share; SiS
+ driver update; FILESDIR stuff moved to tarball so we can get rid of
+ files/4.3.0/ once 4.3.0-r5 is gone; PDEPEND on media-fonts/ttf-bitstream-vera,
+ it was added to newer upstream sources.
10 Mar 2004; Luca Barbato <lu_zero@gentoo.org> xfree-4.3.99.902-r2.ebuild:
Removed some old warnings
diff --git a/x11-base/xfree/Manifest b/x11-base/xfree/Manifest
index 3fcf7c6fc18d..9284d5826d47 100644
--- a/x11-base/xfree/Manifest
+++ b/x11-base/xfree/Manifest
@@ -1,26 +1,28 @@
-MD5 1ac14f81ea0b77dc6a0b8042ff73daef ChangeLog 65281
MD5 e6ee387a2de6b2fea8e5a3573c48b667 metadata.xml 228
-MD5 2519511f9d84da7f3a36f20e6d9c156e xfree-4.2.1-r4.ebuild 23722
-MD5 3b31bc95e68e3627eb85c8eb959da634 xfree-4.3.0-r5.ebuild 34942
-MD5 2edbfb8ddc558ab58857d28bd536c810 xfree-4.3.99.902-r2.ebuild 31027
+MD5 df275c401ca3f4c74de6954a69cb5153 ChangeLog 66144
+MD5 3fdb813f5c778884637f3fe4987c9500 xfree-4.3.0-r6.ebuild 38272
+MD5 612aaaeec51b7e755cefb96a875ceca8 xfree-4.2.1-r4.ebuild 23723
+MD5 f555e785ad164279ec56b33b18f8e13c xfree-4.3.0-r5.ebuild 34943
+MD5 8038311d3ccd398b63e6e13882366538 xfree-4.3.99.902-r2.ebuild 31028
+MD5 cc52e1577d984cd2a2bbb05148291095 files/digest-xfree-4.2.1-r4 1342
+MD5 1b020ee00b1f9cf22a459f6cd00cee25 files/digest-xfree-4.3.0-r6 1528
MD5 a80dd36e88ff79e9019049017fee8cd6 files/digest-xfree-4.3.0-r5 2002
MD5 2308a80167b398e266fc7a711c8014c6 files/digest-xfree-4.3.99.902-r2 1254
-MD5 cc52e1577d984cd2a2bbb05148291095 files/digest-xfree-4.2.1-r4 1342
-MD5 9cb44182ea92068b22973bcb0afda322 files/4.3.0/xserver.pamd 284
-MD5 2a9bb8f65617034695a00cdc5d018a2a files/4.3.0/xdm.start 2833
-MD5 d0cb338160e3be8790524af8071cc4df files/4.3.0/xdm.pamd 380
+MD5 2d22ba49943c630e4299f439d3a0d4cc files/4.3.0/XftConfig 7750
+MD5 c343ee3f0cbca24c7210773d483cfa15 files/4.3.0/10xfree 182
MD5 c6dd3e9a9e557b9cba51ff77cb6108a4 files/4.3.0/Xsession 1521
+MD5 0e84cb8a3f7b821072b2a75482b83f97 files/4.3.0/Xsetup_0 880
+MD5 36f95fc0dcc26c3f70657560a66c983f files/4.3.0/chooser.sh 1573
MD5 e194f962a63f74c674887c9ade54a5ea files/4.3.0/site.def 3731
-MD5 b34a8d24f878209a7a2ce77462872dc6 files/4.3.0/xfs.start 6649
-MD5 c343ee3f0cbca24c7210773d483cfa15 files/4.3.0/10xfree 182
-MD5 1e0cc3d2912af361bc6fd2d919f4d725 files/4.3.0/xfs.conf.d 787
-MD5 2d22ba49943c630e4299f439d3a0d4cc files/4.3.0/XftConfig 7750
+MD5 5a8aa883d4246cc5542379f5de9d52f7 files/4.3.0/startDM.sh 896
+MD5 d0cb338160e3be8790524af8071cc4df files/4.3.0/xdm.pamd 380
+MD5 e5c3b47938e71233fb1cf0611ab12ac6 files/4.3.0/xdm.start 2834
+MD5 0dbec2e7b832f510fe1c630e4c5392b9 files/4.3.0/xfs.conf.d 788
MD5 55ed160cbb7076b1292ea8e3772a2761 files/4.3.0/xfs.config 1331
+MD5 e783c6754efd83492961425ffdfe02d2 files/4.3.0/xfs.start 6650
MD5 4485c7fa46907db803d219218f62a5df files/4.3.0/xinitrc 918
-MD5 0e84cb8a3f7b821072b2a75482b83f97 files/4.3.0/Xsetup_0 880
-MD5 4dbd04dfb5d11cf43c5a7673308b0af1 files/4.3.0/chooser.sh 1572
-MD5 1a6126336c36069b1c71707739367733 files/4.3.0/startDM.sh 895
-MD5 18e1ac4e97a57fdba470897aa2cb452e files/4.3.0/lib/libGLU.la 769
+MD5 9cb44182ea92068b22973bcb0afda322 files/4.3.0/xserver.pamd 284
+MD5 a0ce0f1c8a5771a1194f5895211a3f66 files/4.3.0/Sessions/Xsession 2187
MD5 ee55a387073cca1b14f1b285e1cf33a9 files/4.3.0/lib/libGL.la 777
+MD5 18e1ac4e97a57fdba470897aa2cb452e files/4.3.0/lib/libGLU.la 769
MD5 b2c509837ddfbd12d8f1ed9b50254f01 files/4.3.0/lib/libOSMesa.la 788
-MD5 a0ce0f1c8a5771a1194f5895211a3f66 files/4.3.0/Sessions/Xsession 2187
diff --git a/x11-base/xfree/files/digest-xfree-4.3.0-r6 b/x11-base/xfree/files/digest-xfree-4.3.0-r6
new file mode 100644
index 000000000000..12598a1185ad
--- /dev/null
+++ b/x11-base/xfree/files/digest-xfree-4.3.0-r6
@@ -0,0 +1,23 @@
+MD5 4f241a4f867363f40efa2b00dca292af X430src-1.tgz 10993622
+MD5 844c2ee908d21dbf8911fd13115bf8b4 X430src-2.tgz 7962239
+MD5 b82a0443e1b7bf860e4343e6b6766cb6 X430src-3.tgz 12366363
+MD5 567903747018f2534965ab6cb3976b38 X430src-4.tgz 12906091
+MD5 4dbdbe9a85c8f7f98dd0ee015a3c7b4f X430src-5.tgz 4388018
+MD5 163d9864e1353a4a9f992cb3843c240f X430src-6.tgz 8074919
+MD5 e002e70f24098ca4f62fabd1c2809ed1 X430src-7.tgz 9317241
+MD5 41dc167c1b444ee36f597199f5bf5dbb XFree86-4.3.0-patches-2.1.26.14.tar.bz2 566637
+MD5 e0c52f0e726e20db445e9708665a26d4 xfree86-dri-resume-v8.patch 15333
+MD5 deb63bcb567bde1d545dc443168e4d69 XFree86-4.3.0-files-0.1.4.tar.bz2 11041
+MD5 537bb3e2da7642bd979ebc1cafa8dce7 savage-1.1.27t.zip 76974
+MD5 497834e236509f473b8ba943781d40f4 sis_drv_src_060304-1.tar.gz 430080
+MD5 3d4ee581df78c9dacc6e97aa07a1af72 gemini-koi8-u.tar.bz2 439173
+MD5 4d7d5fdc4ed56c144ef998302581478c eurofonts-X11.tar.bz2 8811
+MD5 01a21c248e5ac4ba02cbbea994fc774a xfsft-encodings-0.1.tar.bz2 11892
+MD5 4c7920d4b9d2ff1213faff4d718946d6 XFree86-compose.dir-0.1.bz2 1877
+MD5 aafd74e26c541382bb382ff338f81f87 XFree86-en_US.UTF-8.old.bz2 7068
+MD5 2e2263bb4adaee6f959fbb6c8df5336a XFree86-locale.alias.bz2 3592
+MD5 d4402be729da91e849aa5b9f506bda06 XFree86-locale.dir.bz2 2094
+MD5 d0fab996daf97adf095e2dad0bd9012e gentoo-cursors-tad-0.3.1.tar.bz2 1196991
+MD5 69233e5fc7cafb3a154447e2eb76ffe7 render-0.8.tar.gz 51478
+MD5 c745339dbe5f05cff8950b71a739e34c libXrender-0.8.4.tar.bz2 205660
+MD5 1dc3a7ae8fe94dee409fe89b0aee002d libXft-2.1.5.tar.bz2 233918
diff --git a/x11-base/xfree/xfree-4.3.0-r6.ebuild b/x11-base/xfree/xfree-4.3.0-r6.ebuild
new file mode 100644
index 000000000000..90bac047eae2
--- /dev/null
+++ b/x11-base/xfree/xfree-4.3.0-r6.ebuild
@@ -0,0 +1,1299 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/xfree-4.3.0-r6.ebuild,v 1.1 2004/03/14 22:25:22 spyderous Exp $
+
+# TODO
+# 14 Mar. 2004 <spyderous@gentoo.org>
+# TARGET: 4.3.0-r6
+# spy: Correct licenses
+# (DONE) spy: Rename media-fonts/corefonts to microsoft-fonts, provide
+# virtual/corefonts in combination with ttf-bitstream-vera, the
+# default
+# -- Hard dep on ttf-bitstream-vera, mirrors upstream decision
+# (DONE) spy: Update xft/xrender/render to latest
+# (DONE) spy: Add compatibility symlink, seds for misc fonts and warnings
+# (DONE) battousai: Update wacom driver and build against SDK (#37389)
+# (DONE) spy: Remove references to libxml. It was never actually used;
+# expat was instead. It's still sitting there for no reason
+# (DONE) spy: Transition to new patch_exclude()
+# (DONE) spy: Enhance docs building to match how we do it in 4.3.99
+# (DONE) spy: Install docs to /usr/share/doc
+# (DONE) spy: Install man pages to /usr/share/man
+# (DONE) spy: Some encodings end up in ${WORKDIR}/usr/X11R6,
+# get font encodings all into /usr/share/fonts/encodings/
+# (DONE) spy: Install fonts to /usr/share/fonts/*
+# (DONE) spy: Filesset 0.1.1: 23957
+# (DONE) spy: Patchset 2.1.26.8: 29953 (evdev), 17345 (2.5 headers)
+# (DONE) Bugs fixed: 21417, 21120, 35468 (crappy fix), 36923, 42235,
+# 8927, 38232, 23023
+# (DONE) cyfred: Move filesdir stuff to patch tarball
+# (DONE) spy: Move corefonts out of ebuild, dep on virtual instead (#37757)
+# (DONE) spy: Update SiS driver to latest snapshot
+# (DONE) spy: Move synaptics out of ebuild
+# (DONE) cyfred: 0100 and 2000 patches working together
+# (DONE) tseng: Hardened patches -- fix on 9930 from solar
+# (DONE) battousai, spy: Gatos patches
+# (DONE) spy: External xft, render, xrender
+# (DONE) spy: Generate xrender.pc
+# (DONE) spy: Allow autodetection of mmx/sse/3dnow
+# TARGET: 4.3.0-r7
+# spy: External zlib
+# spy: Add Alan Cox's VIA 2D+3D driver from XFree86-4.3.0-57.src.rpm, use
+# XFree86-4.3.0-build-libXinerama-before-libGL-for-via-driver.patch
+# cyfred: New X init script setup? (#26354) (DEP: #25705)
+# spy: External xft from x11-libs/{libxft,xft}?
+# spy: Install libs to /usr/lib
+# TARGET: 4.3.0-r8
+# spy: Install binaries to /usr/bin
+# TARGET: unknown
+# battousai?: Backport IGP stuff from DRI CVS?
+# spy: Use all freedesktop.org xlibs
+
+# Make sure Portage does _NOT_ strip symbols. We will do it later and make sure
+# that only we only strip stuff that are safe to strip ...
+RESTRICT="nostrip"
+
+# IUSE="sse mmx 3dnow" were disabled in favor of autodetection
+IUSE="3dfx truetype nls cjk doc ipv6 debug static sdk gatos no-pam pie"
+
+filter-flags "-funroll-loops"
+
+ALLOWED_FLAGS="-fstack-protector -march -mcpu -O -O1 -O2 -O3 -pipe"
+
+# Recently there has been a lot of stability problem in Gentoo-land. Many
+# things can be the cause to this, but I believe that it is due to gcc3
+# still having issues with optimizations, or with it not filtering bad
+# combinations (protecting the user maybe from themselves) yet.
+#
+# This can clearly be seen in large builds like glibc, where too aggressive
+# CFLAGS cause the tests to fail miserbly.
+#
+# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
+# knows what he is talking about:
+#
+# People really shouldn't force code-specific options on... It's a
+# bad idea. The -march options aren't just to look pretty. They enable
+# options that are sensible (and include sse,mmx,3dnow when apropriate).
+#
+# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
+# you do not like it, comment it, but do not bugreport if you run into
+# problems.
+#
+# <azarah@gentoo.org> (13 Oct 2002)
+strip-flags
+
+# Are we using a snapshot ?
+USE_SNAPSHOT="no"
+
+PATCH_VER="2.1.26.14"
+FILES_VER="0.1.4"
+# Whether to drop in external render, xrender and xft from freedesktop.org
+EXT_XFT_XRENDER="yes"
+RENDER_VER="0.8"
+XRENDER_VER="0.8.4"
+XFT_VER="2.1.5"
+XCUR_VER="0.3.1"
+SISDRV_VER="060304-1"
+SAVDRV_VER="1.1.27t"
+#MGADRV_VER="1_3_0beta"
+#VIADRV_VER="0.1"
+XFSFT_ENC_VER="0.1"
+
+BASE_PV="${PV}"
+MY_SV="${BASE_PV//\.}"
+S="${WORKDIR}/xc"
+SRC_PATH="mirror://xfree/${BASE_PV}/source"
+HOMEPAGE="http://www.xfree.org"
+
+# Misc patches we may need to fetch ..
+X_PATCHES="http://dev.gentoo.org/~spyderous/xfree/patchsets/${PV}/XFree86-${PV}-patches-${PATCH_VER}.tar.bz2
+ http://www.cpbotha.net/files/dri_resume/xfree86-dri-resume-v8.patch"
+
+XLIBS="http://freedesktop.org/~xlibs/release/render-${RENDER_VER}.tar.gz
+ http://freedesktop.org/~xlibs/release/libXrender-${XRENDER_VER}.tar.bz2
+ http://freedesktop.org/~xlibs/release/libXft-${XFT_VER}.tar.bz2"
+
+X_FILES="http://dev.gentoo.org/~spyderous/xfree/patchsets/${PV}/XFree86-${PV}-files-${FILES_VER}.tar.bz2"
+
+X_DRIVERS="http://www.probo.com/timr/savage-${SAVDRV_VER}.zip
+ http://www.winischhofer.net/sis/sis_drv_src_${SISDRV_VER}.tar.gz"
+# mirror://gentoo/XFree86-4.3.0-drivers-via-${VIADRV_VER}.tar.bz2"
+# ftp://ftp.matrox.com/pub/mga/archive/linux/2001/beta_1_3_0/mga-${MGADRV_VER}.tgz"
+# 3dfx? ( mirror://gentoo/glide3-headers.tar.bz2 )"
+# Latest Savaga drivers: http://www.probo.com/timr/savage40.html
+# Latest SIS drivers: http://www.winischhofer.net/
+# Glide headers for compiling the tdfx modules
+
+SRC_URI="${SRC_PATH}/X${MY_SV}src-1.tgz
+ ${SRC_PATH}/X${MY_SV}src-2.tgz
+ ${SRC_PATH}/X${MY_SV}src-3.tgz
+ ${SRC_PATH}/X${MY_SV}src-4.tgz
+ ${SRC_PATH}/X${MY_SV}src-5.tgz
+ doc? ( ${SRC_PATH}/X${MY_SV}src-6.tgz
+ ${SRC_PATH}/X${MY_SV}src-7.tgz )"
+
+SRC_URI="${SRC_URI}
+ ${XLIBS}
+ ${X_PATCHES}
+ ${X_FILES}
+ ${X_DRIVERS}
+ nls? ( mirror://gentoo/gemini-koi8-u.tar.bz2 )
+ mirror://gentoo/eurofonts-X11.tar.bz2
+ http://dev.gentoo.org/~spyderous/xfree/patchsets/${PV}/xfsft-encodings-${XFSFT_ENC_VER}.tar.bz2
+ mirror://gentoo/XFree86-compose.dir-0.1.bz2
+ mirror://gentoo/XFree86-en_US.UTF-8.old.bz2
+ mirror://gentoo/XFree86-locale.alias.bz2
+ mirror://gentoo/XFree86-locale.dir.bz2
+ mirror://gentoo/gentoo-cursors-tad-${XCUR_VER}.tar.bz2"
+
+LICENSE="X11"
+SLOT="0"
+KEYWORDS="~x86"
+
+DEPEND=">=sys-apps/baselayout-1.8.3
+ >=sys-libs/ncurses-5.1
+ >=sys-libs/zlib-1.1.3-r2
+ >=sys-devel/flex-2.5.4a-r5
+ >=dev-libs/expat-1.95.3
+ >=media-libs/freetype-2.1.3-r2
+ >=media-libs/fontconfig-2.1-r1
+ >=x11-base/opengl-update-1.4
+ >=x11-misc/ttmkfdir-3.0.4
+ >=sys-apps/sed-4
+ >=sys-devel/patch-2.5.9
+ dev-lang/perl
+ media-libs/libpng
+ app-arch/unzip
+ !virtual/xft"
+#RDEPEND="$DEPEND"
+# unzip - needed for savage driver (version 1.1.27t)
+# x11-libs/xft -- blocked because of interference with xfree's
+
+PDEPEND="3dfx? ( >=media-libs/glide-v3-3.10 )
+ input_devices_synaptics? ( x11-misc/synaptics )
+ input_devices_wacom? ( x11-misc/linuxwacom )
+ media-fonts/ttf-bitstream-vera"
+
+PROVIDE="virtual/x11
+ virtual/opengl
+ virtual/glu
+ virtual/xft"
+
+#inherit needs to happen *after* DEPEND has been defined to have "newdepend"
+#do the right thing. Otherwise RDEPEND doesn't get set properly.
+inherit eutils flag-o-matic gcc xfree
+
+DESCRIPTION="XFree86: famous and free X server"
+
+PATCHDIR=${WORKDIR}/patch
+FILES_DIR=${WORKDIR}/files
+EXCLUDED="${PATCHDIR}/excluded"
+
+pkg_setup() {
+ # See bug #35468, circular pam-xfree dep
+ if [ ! "`use no-pam`" -a "`has_version x11-base/xfree`" ]
+ then
+ einfo "Previous XFree86 installation detected"
+ einfo "Enabling PAM features in XFree86..."
+ else
+ einfo "Disabling PAM features in XFree86..."
+ fi
+
+ # A static build disallows building the SDK.
+ # See config/xf86.rules.
+ if use static
+ then
+ if use sdk || use gatos
+ then
+ die "The static USE flag is incompatible with gatos and sdk USE flags."
+ fi
+
+ # Check for hardened
+ if use hardened && has_version ">=sys-devel/gcc-3.3.3-r1"
+ then
+ append-flags -yet_exec
+ elif has_version "sys-devel/hardened-gcc"
+ then
+ append-flags -yet_exec
+ fi
+ fi
+}
+
+src_unpack() {
+
+ # Unpack source and patches
+ unpack X${MY_SV}src-{1,2,3,4,5}.tgz
+ if use doc
+ then
+ unpack X${MY_SV}src-{6,7}.tgz
+ fi
+
+ unpack XFree86-${PV}-patches-${PATCH_VER}.tar.bz2
+ unpack XFree86-${PV}-files-${FILES_VER}.tar.bz2
+
+ # Unpack TaD's gentoo cursors
+ unpack gentoo-cursors-tad-${XCUR_VER}.tar.bz2
+
+ # Unpack extra fonts stuff from Mandrake
+ if use nls
+ then
+ unpack gemini-koi8-u.tar.bz2
+ fi
+ unpack eurofonts-X11.tar.bz2
+ unpack xfsft-encodings-${XFSFT_ENC_VER}.tar.bz2
+
+ # Remove bum encoding
+ rm -f ${WORKDIR}/usr/share/fonts/encodings/urdunaqsh-0.enc
+
+ # Update the Savage Driver
+ # savage driver 1.1.27t is a .zip and contains a savage directory
+ # (that's why we have to be in drivers, not in savage subdir).
+ # Could be USE flag based
+
+ ebegin "Updating Savage driver"
+ cd ${S}/programs/Xserver/hw/xfree86/drivers
+ unpack savage-${SAVDRV_VER}.zip > /dev/null
+ ln -s ${S}/programs/Xserver/hw/xfree86/vbe/vbe.h \
+ ${S}/programs/Xserver/hw/xfree86/drivers/savage
+ cd ${S}
+ eend 0
+
+ ebegin "Updating SiS driver"
+ cd ${S}/programs/Xserver/hw/xfree86/drivers/sis
+ unpack sis_drv_src_${SISDRV_VER}.tar.gz > /dev/null
+ ln -s ${S}/programs/Xserver/hw/xfree86/vbe/vbe.h \
+ ${S}/programs/Xserver/hw/xfree86/drivers/sis
+ cd ${S}
+ eend 0
+
+ if [ "${EXT_XFT_XRENDER}" = "yes" ]
+ then
+ ebegin "Adding external Render"
+ cd ${S}/lib
+ unpack render-${RENDER_VER}.tar.gz > /dev/null
+ mv render-${RENDER_VER}/render*.h ../include/extensions/
+ mkdir -p ../doc/hardcopy/render
+ cp render-${RENDER_VER}/{protocol,library} ../doc/hardcopy/render
+ eend 0
+
+ ebegin "Adding external Xrender"
+ mv Xrender Xrender.old
+ unpack libXrender-${XRENDER_VER}.tar.bz2 > /dev/null
+ mv libXrender-${XRENDER_VER} Xrender
+ cp Xrender.old/Imakefile Xrender/Imakefile
+ rm Xrender/Makefile*
+ touch Xrender/config.h
+ eend 0
+
+ ebegin "Adding external Xft"
+ mv Xft Xft.old
+ unpack libXft-${XFT_VER}.tar.bz2 > /dev/null
+ mv libXft-${XFT_VER} Xft
+ cp Xft.old/Imakefile Xft/Imakefile
+ cp Xft.old/Xft.man Xft/Xft.man
+ ln -sf ../Xft.old/config Xft/config
+ rm Xft/Makefile*
+ touch Xft/config.h
+ eend 0
+ cd ${S}
+ fi
+
+# ebegin "Adding VIA driver"
+# cd ${WORKDIR}
+# unpack XFree86-${PV}-drivers-via-${VIADRV_VER}.tar.bz2
+# cd ${S}
+# eend 0
+
+# ebegin "Updating Matrox HAL driver"
+# unpack mga-${MGADRV_VER}.tgz
+# touch ${WORKDIR}/mga/HALlib/mgaHALlib.a
+# mv ${WORKDIR}/mga/HALlib/mgaHALlib.a \
+# #{S}/programs/Xserver/hw/xfree86/drivers/mga/HALlib
+# eend 0
+
+ einfo "Excluding patches..."
+
+ if [ "`gcc-version`" = "2.95" ]
+ then
+ # Do not apply this patch for gcc-2.95.3, as it cause compile to fail,
+ # closing bug #10146.
+ patch_exclude 0138_all_4.2.1-gcc32-internal-compiler-error.patch
+
+ patch_exclude 0260_ia64_4.2.99.1-gcc3.1.patch
+ fi
+
+ # This was formerly applied if USE=debug, but it causes builds
+ # to randomly die (spyderous).
+ patch_exclude 0120
+
+ # This is splite's ia64 patch. Is it necessary,
+ # now that 0262 is applied? (spyderous)
+ patch_exclude 0261
+
+ if use debug
+ then
+ patch_exclude 5901
+ fi
+# FIXME: bug #19812, 075 should be deprecated by 076, left as
+# TDFX_RISKY for feedback (put in -r3 if no problems)
+ if [ "`use 3dfx`" -a "${TDFX_RISKY}" = "yes" ]
+ then
+ patch_exclude 5850
+ else
+ patch_exclude 5851
+ fi
+
+ if [ -z "`use ipv6`" ]
+ then
+ patch_exclude 200*
+ else
+ if [ -z "`use doc`" ]
+ then
+ patch_exclude 2001
+ fi
+ fi
+
+ if [ "${EXT_XFT_XRENDER}" = "yes" ]
+ then
+ patch_exclude 1075
+ fi
+
+ # Unsure of this patch's effect if other gatos stuff is not used
+ if [ ! "`use gatos`" ]
+ then
+ patch_exclude 9841_all_4.3.0-gatos-mesa
+ fi
+
+ einfo "Done excluding patches"
+
+ # Various Patches from all over
+ EPATCH_SUFFIX="patch" epatch ${PATCHDIR}
+
+ unset EPATCH_EXCLUDE
+
+ # Fix DRI related problems
+ cd ${S}/programs/Xserver/hw/xfree86/
+ epatch ${DISTDIR}/xfree86-dri-resume-v8.patch
+
+ ebegin "Setting up config/cf/host.def"
+ cd ${S}; cp ${FILES_DIR}/${PV}/site.def config/cf/host.def || die
+ echo "#define XVendorString \"Gentoo Linux (XFree86 ${PV}, revision ${PR})\"" \
+ >> config/cf/host.def
+
+ # Makes ld bail at link time on undefined symbols
+ # Suggested by Mike Harris <mharris@redhat.com>
+ echo "#define SharedLibraryLoadFlags -shared -Wl,-z,defs" \
+ >> config/cf/host.def
+
+ # FHS install locations for docs
+ echo "#define ManDirectoryRoot /usr/share/man" >> config/cf/host.def
+ echo "#define DocDir /usr/share/doc/${PF}" >> config/cf/host.def
+
+ # Make man4 and man7 stuff get 'x' suffix like everything else
+ # Necessary so we can install to /usr/share/man without overwriting
+ echo "#define DriverManDir \$(MANSOURCEPATH)4" >> config/cf/host.def
+ echo "#define DriverManSuffix 4x /* use just one tab or cpp will die */" \
+ >> config/cf/host.def
+ echo "#define MiscManDir \$(MANSOURCEPATH)7" >> config/cf/host.def
+ echo "#define MiscManSuffix 7x /* use just one tab or cpp will die */" \
+ >> config/cf/host.def
+
+ # We're using Xwrapper instead -- so that nothing else needs to be
+ # set uid any more.
+ echo "#define InstallXserverSetUID NO" >> config/cf/host.def
+ echo "#define BuildServersOnly NO" >> config/cf/host.def
+
+ # Bug #12775 .. fails with -Os.
+ replace-flags "-Os" "-O2"
+
+ if [ "`gcc-version`" != "2.95" ]
+ then
+ # Should fix bug #4189. gcc-3.x have problems with -march=pentium4
+ # and -march=athlon-tbird
+ replace-flags "-march=pentium4" "-march=pentium3"
+ replace-flags "-march=athlon-tbird" "-march=athlon"
+
+ # Without this, modules breaks with gcc3
+ if [ "`gcc-version`" = "3.1" ]
+ then
+ append-flags "-fno-merge-constants"
+ append-flags "-fno-merge-constants"
+ fi
+ fi
+
+ if ( [ -e "/usr/src/linux" ] && \
+ [ ! `is_kernel "2" "2"` ] ) || \
+ [ "`uname -r | cut -d. -f1,2`" != "2.2" ]
+ then
+ echo "#define HasLinuxInput YES" >> config/cf/host.def
+ fi
+
+ echo "#define CcCmd ${CC}" >> config/cf/host.def
+ echo "#define OptimizedCDebugFlags ${CFLAGS}" >> config/cf/host.def
+ echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS}" >> config/cf/host.def
+
+ if use static
+ then
+ echo "#define DoLoadableServer NO" >>config/cf/host.def
+ else
+ if use pie ; then
+ einfo "Setting DoLoadableServer/MakeDllModules to YES for etdyn building"
+ echo "#define DoLoadableServer YES" >>config/cf/host.def
+ echo "#define MakeDllModules YES" >>config/cf/host.def
+ fi
+ fi
+
+ if use debug
+ then
+ echo "#define XFree86Devel YES" >> config/cf/host.def
+ else
+ echo "#define ExtraXInputDrivers acecad" >> config/cf/host.def
+ # use less ram .. got this from Spider's makeedit.eclass :)
+ echo "#define GccWarningOptions -Wno-return-type -w" \
+ >> config/cf/host.def
+ fi
+
+ # Remove circular dep between pam and xfree, bug #35468
+ # If no-pam isn't in USE and we have xfree, then we can enable PAM
+ if [ ! "`use no-pam`" -a "`has_version x11-base/xfree`" ]
+ then
+ # If you want to have optional pam support, do it properly ...
+ echo "#define HasPam YES" >> config/cf/host.def
+ echo "#define HasPamMisc YES" >> config/cf/host.def
+ else
+ echo "#define HasPam NO" >> config/cf/host.def
+ echo "#define HasPamMisc NO" >> config/cf/host.def
+ fi
+
+ if use nls
+ then
+ echo "#define XtermWithI18N YES" >> config/cf/host.def
+ fi
+
+ if use x86
+ then
+ # build with glide3 support? (build the tdfx_dri.o module)
+ if use 3dfx
+ then
+ echo "#define HasGlide3 YES" >> config/cf/host.def
+ fi
+
+ # Compile the VIA driver
+# echo "#define XF86ExtraCardDrivers via" >> config/cf/host.def
+ fi
+
+ if use hppa
+ then
+ echo "#define DoLoadableServer NO" >> config/cf/host.def
+ fi
+
+ if use alpha
+ then
+ echo "#define XF86CardDrivers mga nv tga s3virge sis rendition \
+ i740 tdfx cirrus tseng fbdev \
+ ati vga v4l glint" >> config/cf/host.def
+ fi
+
+ if use ppc
+ then
+ echo "#define XF86CardDrivers mga glint s3virge sis savage trident \
+ chips tdfx fbdev ati DevelDrivers vga nv imstt \
+ XF86OSCardDrivers XF86ExtraCardDrivers" >> config/cf/host.def
+ fi
+
+ 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" >> config/cf/host.def
+ fi
+
+ if use amd64
+ then
+ # the built-in zlib doesnt build in amd64 because of -fPIC issues
+ grep -v HasZlib config/cf/host.def > ${T}/host.def
+ mv ${T}/host.def config/cf/host.def
+ echo "#define HasZlib YES" >> config/cf/host.def
+ fi
+
+ # The definitions for fontconfig
+ echo "#define UseFontconfig YES" >> config/cf/host.def
+ echo "#define HasFontconfig YES" >> config/cf/host.def
+
+ # Use Xft2 lib from xfree
+ echo "#define SharedLibXft YES" >> config/cf/host.def
+
+ # Set up docs building
+ if use doc
+ then
+ local DOC="YES"
+ else
+ local DOC="NO"
+ fi
+
+ echo "#define BuildLinuxDocText ${DOC}" >> config/cf/host.def
+ echo "#define BuildLinuxDocHtml ${DOC}" >> config/cf/host.def
+ echo "#define BuildLinuxDocPS ${DOC}" >> config/cf/host.def
+ echo "#define BuildSpecsDocs ${DOC}" >> config/cf/host.def
+ echo "#define BuildHtmlManPages ${DOC}" >> config/cf/host.def
+
+ # enable Japanese docs, optionally
+ if use cjk
+ then
+ echo "#define InstallJapaneseDocs ${DOC}" >> config/cf/host.def
+ fi
+
+ # Native Language Support Fonts
+ if [ -z "`use nls`" ]
+ then
+ echo "#define BuildCyrillicFonts NO" >> config/cf/host.def
+ echo "#define BuildArabicFonts NO" >> config/cf/host.def
+ echo "#define BuildGreekFonts NO" >> config/cf/host.def
+ echo "#define BuildHebrewFonts NO" >> config/cf/host.def
+ echo "#define BuildThaiFonts NO" >> config/cf/host.def
+
+ if [ -z "`use cjk`" ]
+ then
+ echo "#define BuildCIDFonts NO" >> config/cf/host.def
+ echo "#define BuildJapaneseFonts NO" >> config/cf/host.def
+ echo "#define BuildKoreanFonts NO" >> config/cf/host.def
+ echo "#define BuildChineseFonts NO" >> config/cf/host.def
+ fi
+ fi
+
+ if use ipv6
+ then
+ echo "#define HasIPv6 YES" >> config/cf/host.def
+ fi
+
+# # Build with the binary MatroxHAL driver
+# echo "#define HaveMatroxHal YES" >> config/cf/host.def
+# echo "#define UseMatroxHal YES" >> config/cf/host.def
+
+# Will uncomment this after kde, qt, and *box ebuilds are alterered to use
+# it
+# if use xinerama
+# then
+# echo "#define BuildXinerama YES" >> config/cf/host.def
+# echo "#define BuildXineramaLibrary YES" >> config/cf/host.def
+# fi
+
+ # End the host.def definitions here
+ eend 0
+
+ cd ${S}
+ bzcat ${DISTDIR}/XFree86-compose.dir-0.1.bz2 > nls/compose.dir
+ bzcat ${DISTDIR}/XFree86-locale.alias.bz2 > nls/locale.alias
+ bzcat ${DISTDIR}/XFree86-locale.dir.bz2 > nls/locale.dir
+ bzcat ${DISTDIR}/XFree86-en_US.UTF-8.old.bz2 > nls/Compose/en_US.UTF-8
+
+ if use doc
+ then
+ # These are not included anymore as they are obsolete
+ rm -rf ${S}/doc/hardcopy/{XIE,PEX5}
+ for x in ${S}/programs/Xserver/hw/xfree86/{XF98Conf.cpp,XF98Config}
+ do
+ if [ -f ${x} ]
+ then
+ cp ${x} ${x}.orig
+ grep -iv 'Load[[:space:]]*"\(pex5\|xie\)"' ${x}.orig > ${x}
+ rm -f ${x}.orig
+ fi
+ done
+ fi
+}
+
+src_compile() {
+
+ # Set MAKEOPTS to have proper -j? option ..
+ get_number_of_jobs
+
+ # Compile ucs2any C implementation (patch #9142)
+ ebegin "Compiling ucs2any optimized C implementation"
+ cd ${S}/fonts/util
+ gcc -Wall -o ucs2any ucs2any.c
+ [ ! -d ${S}/exports/bin/ ] && mkdir -p ${S}/exports/bin/
+ mv ucs2any ${S}/exports/bin/
+ cd ${S}
+ eend 0
+
+ # If a user defines the MAKE_OPTS variable in /etc/make.conf instead of
+ # MAKEOPTS, they'll redefine an internal XFree86 Makefile variable and the
+ # xfree build will silently die. This is tricky to track down, so I'm
+ # adding a preemptive fix for this issue by making sure that MAKE_OPTS is
+ # unset. (drobbins, 08 Mar 2003)
+ unset MAKE_OPTS
+
+ einfo "Building XFree86..."
+ cd ${S}
+ FAST=1 emake World FONTDIR="${S}/fonts" || die
+
+ if use nls
+ then
+ cd ${S}/nls
+ make || die
+ cd ${S}
+ fi
+
+}
+
+src_install() {
+
+ unset MAKE_OPTS
+
+ einfo "Installing XFree86..."
+ # 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} FONTDIR="/usr/share/fonts" || \
+ make CDEBUGFLAGS="${CDEBUGFLAGS} -mno-mmx" \
+ CXXDEBUGFLAGS="${CXXDEBUGFLAGS} -mno-mmx" \
+ install DESTDIR=${D} FONTDIR="/usr/share/fonts" || die
+ else
+ make install DESTDIR=${D} FONTDIR="/usr/share/fonts" || die
+ fi
+
+ if use sdk || use gatos
+ then
+ einfo "Installing XFree86 SDK..."
+ make install.sdk DESTDIR=${D} || die
+ fi
+
+ # We do not want these, so remove them ...
+ rm -rf ${D}/usr/X11R6/include/fontconfig
+ rm -f ${D}/usr/X11R6/lib/libfontconfig.*
+ rm -f ${D}/usr/X11R6/bin/{fontconfig-config,fc-cache,fc-list}
+ rm -f ${D}/usr/X11R6/man/man3/fontconfig.3x*
+ rm -rf ${D}/etc/fonts/
+
+ if [ "${EXT_XFT_XRENDER}" = "yes" ]
+ then
+ cd ${D}/usr/X11R6/lib
+ mv libXft.so.2.1 libXft.so.2.1.1
+ ln -snf libXft.so.2.1.1 libXft.so.2
+ mv libXrender.so.1.2 libXrender.so.1.2.2
+ ln -snf libXrender.so.1.2.2 libXrender.so.1
+ cd ${S}
+
+ # Generate xrender.pc using 'EOF' style here document with no expansion
+ # (adapted from Red Hat)
+ cat <<-'EOF' > ${D}/usr/X11R6/lib/pkgconfig/xrender.pc
+ prefix=/usr/X11R6
+ exec_prefix=${prefix}
+ libdir=${exec_prefix}/lib
+ includedir=${prefix}/include
+
+ Name: Xrender
+ Description: X Render Library
+ Version: 0.8.3
+ Cflags: -I${includedir} -I/usr/X11R6/include
+ Libs: -L${libdir} -lXrender -L/usr/X11R6/lib -lX11
+EOF
+
+ fperms 0644 /usr/X11R6/lib/pkgconfig/xrender.pc
+
+ # Fix problem in xft.pc with version not being defined
+ sed -i "s:@VERSION@:${XFT_VER}:g" ${D}/usr/X11R6/lib/pkgconfig/xft.pc
+ fi
+
+ # These need to be in /usr/lib
+ insinto /usr/lib/pkgconfig
+ doins ${D}/usr/X11R6/lib/pkgconfig/{xcursor,xft}.pc
+ if [ "${EXT_XFT_XRENDER}" = "yes" ]
+ then
+ doins ${D}/usr/X11R6/lib/pkgconfig/xrender.pc
+ fi
+ # Now remove the invalid xft.pc, and co ...
+ rm -rf ${D}/usr/X11R6/lib/pkgconfig
+
+ einfo "Installing man pages..."
+ make install.man DESTDIR=${D} || die
+ einfo "Compressing man pages..."
+ prepman /usr/X11R6
+
+ if use nls
+ then
+ cd ${S}/nls
+ make DESTDIR=${D} install || die
+ fi
+
+ # Backwards compatibility so X server will still start
+ # after installing fonts to /usr/share/fonts
+ # if XF86Config is not edited
+ # This provides the 'fixed' font
+ dosym ${ROOT}/usr/share/fonts/misc /usr/X11R6/lib/X11/fonts/misc
+
+ # Fix default config files after installing fonts to /usr/share/fonts
+ sed -i "s:/usr/X116/lib/X11/fonts:/usr/share/fonts:g" \
+ ${D}/etc/X11/XF86Config.example
+ sed -i "s:/usr/X116/lib/X11/fonts:/usr/share/fonts:g" \
+ ${D}/etc/X11/fs/config
+
+ # Make sure the user running xterm can only write to utmp.
+ fowners root:utmp /usr/X11R6/bin/xterm
+ fperms 2755 /usr/X11R6/bin/xterm
+ # bug 24414, somehow it slips through stripping later in the ebuild
+ strip ${D}/usr/X11R6/bin/xterm
+
+ # Fix permissions on locale/common/*.so
+ for x in ${D}/usr/X11R6/lib/X11/locale/lib/common/*.so*
+ do
+ if [ -f ${x} ]
+ then
+ fperms 0755 `echo ${x} | sed -e "s|${D}||"`
+ fi
+ done
+
+ # Fix permissions on modules ...
+ for x in $(find ${D}/usr/X11R6/lib/modules -name '*.o') \
+ $(find ${D}/usr/X11R6/lib/modules -name '*.so')
+ do
+ if [ -f ${x} ]
+ then
+ fperms 0755 `echo ${x} | sed -e "s|${D}||"`
+ fi
+ done
+
+ # We zap our CFLAGS in the host.def file, as hardcoded CFLAGS can
+ # mess up other things that use xmkmf
+ ebegin "Fixing lib/X11/config/host.def"
+ cp ${D}/usr/X11R6/lib/X11/config/host.def ${T}
+ awk '!/OptimizedCDebugFlags|OptimizedCplusplusDebugFlags|GccWarningOptions/ {print $0}' \
+ ${T}/host.def > ${D}/usr/X11R6/lib/X11/config/host.def
+ # theoretically, /usr/X11R6/lib/X11/config is a possible candidate for
+ # config file management. If we find that people really worry about imake
+ # stuff, we may add it. But for now, we leave the dir unprotected.
+ eend 0
+
+ insinto /etc/X11
+ # We still use freetype for now ...
+ doins ${FILES_DIR}/${PV}/XftConfig
+ newins ${FILES_DIR}/${PV}/XftConfig XftConfig.new
+ # This is if we are using Fontconfig only ...
+ #newins ${S}/lib/Xft1/XftConfig-OBSOLETE XftConfig
+ dosym ../../../../etc/X11/XftConfig /usr/X11R6/lib/X11/XftConfig
+
+ # Install example config file
+ newins ${S}/programs/Xserver/hw/xfree86/XF86Config XF86Config.example
+
+ # EURO support
+ ebegin "Euro Support..."
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/lib" \
+ ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-8x14.bdf | \
+ gzip -9 > ${D}/usr/share/fonts/misc/Xlat9-8x14-lat9.pcf.gz
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/lib" \
+ ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-9x16.bdf | \
+ gzip -9 > ${D}/usr/share/fonts/misc/Xlat9-9x16-lat9.pcf.gz
+ eend 0
+
+ # Standard symlinks
+ dodir /usr/{bin,include,lib}
+ dosym ../X11R6/bin /usr/bin/X11
+ dosym ../X11R6/include/X11 /usr/include/X11
+ dosym ../X11R6/include/DPS /usr/include/DPS
+ dosym ../X11R6/include/GL /usr/include/GL
+ dosym ../X11R6/lib/X11 /usr/lib/X11
+ dosym ../../usr/X11R6/lib/X11/xkb /etc/X11/xkb
+
+ # Some critical directories
+ keepdir /var/lib/xdm
+ dosym ../../../var/lib/xdm /etc/X11/xdm/authdir
+
+ # Remove invalid symlinks
+ rm -f ${D}/usr/lib/libGL.*
+ # Create required symlinks
+ dosym libGL.so.1.2 /usr/X11R6/lib/libGL.so
+ dosym libGL.so.1.2 /usr/X11R6/lib/libGL.so.1
+ dosym libGL.so.1.2 /usr/X11R6/lib/libMesaGL.so
+ # We move libGLU to /usr/lib now
+ dosym libGLU.so.1.3 /usr/lib/libMesaGLU.so
+
+ # .la files for libtool support
+ insinto /usr/X11R6/lib
+ doins ${FILES_DIR}/${PV}/lib/*.la
+
+ # Remove libz.a, as it causes problems (bug #4777)
+ rm -f ${D}/usr/X11R6/lib/libz.a
+ # And do not forget the includes (bug #9470)
+ rm -f ${D}/usr/X11R6/include/{zconf.h,zlib.h}
+
+ # Use the Xwrapper as the X binary
+ rm -f ${D}/usr/X11R6/bin/X
+ dosym Xwrapper /usr/X11R6/bin/X
+ dosym ../../usr/X11R6/bin/XFree86 /etc/X11/X
+
+ # Fix perms
+ fperms 755 /usr/X11R6/lib/X11/xkb/geometry/sgi
+ fperms 755 /usr/X11R6/bin/dga
+
+ # Hack from Mandrake (update ours that just created Compose files for
+ # all locales)
+ for x in $(find ${D}/usr/X11R6/lib/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
+ touch ${x}/Compose
+ fi
+ ;;
+ ja*|ko*|zh*)
+ if [ -r ${x}/Compose ]
+ then
+ rm -f ${x}/Compose
+ fi
+ ;;
+ esac
+ done
+
+ # Another hack from Mandrake -- to fix dead + space for the us
+ # international keyboard
+ for i in ${D}/usr/X11R6/lib/X11/locale/*/Compose
+ do
+ sed -i \
+ -e 's/\(<dead_diaeresis> <space>\).*$/\1 : "\\"" quotedbl/' \
+ -e "s/\(<dead_acute> <space>\).*$/\1 : \"'\" apostrophe/" \
+ ${i}
+ done
+
+ # Yet more Mandrake
+ 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
+ [ -f "${x}" ] && gzip -9 -f ${x}
+ done
+ eend 0
+
+ if use nls
+ then
+ ebegin "gemini-koi8 fonts..."
+ cd ${WORKDIR}/ukr
+ gunzip *.Z
+ gzip -9 *.pcf
+ cd ${S}
+ cp -a ${WORKDIR}/ukr ${D}/usr/share/fonts
+ eend 0
+ fi
+
+ exeinto /etc/X11
+ # new session management script
+ doexe ${FILES_DIR}/${PV}/chooser.sh
+ # new display manager script
+ doexe ${FILES_DIR}/${PV}/startDM.sh
+ exeinto /etc/X11/Sessions
+ for x in ${FILES_DIR}/${PV}/Sessions/*
+ do
+ [ -f ${x} ] && doexe ${x}
+ done
+ insinto /etc/env.d
+ doins ${FILES_DIR}/${PV}/10xfree
+ insinto /etc/X11/xinit
+ doins ${FILES_DIR}/${PV}/xinitrc
+ exeinto /etc/X11/xdm
+ doexe ${FILES_DIR}/${PV}/Xsession ${FILESDIR}/${PV}/Xsetup_0
+ insinto /etc/X11/fs
+ newins ${FILES_DIR}/${PV}/xfs.config config
+
+ if use pam
+ then
+ insinto /etc/pam.d
+ newins ${FILES_DIR}/${PV}/xdm.pamd xdm
+ # Need to fix console permissions first
+ newins ${FILES_DIR}/${PV}/xserver.pamd xserver
+ fi
+
+ exeinto /etc/init.d
+ newexe ${FILES_DIR}/${PV}/xdm.start xdm
+ newexe ${FILES_DIR}/${PV}/xfs.start xfs
+ insinto /etc/conf.d
+ newins ${FILES_DIR}/${PV}/xfs.conf.d xfs
+
+ # we want libGLU.so* in /usr/lib
+ mv ${D}/usr/X11R6/lib/libGLU.* ${D}/usr/lib
+
+ # next section is to setup the dynamic libGL stuff
+ ebegin "Moving libGL and friends for dynamic switching"
+ dodir /usr/lib/opengl/xfree/{lib,extensions,include}
+ local x=""
+ for x in ${D}/usr/X11R6/lib/libGL.so* \
+ ${D}/usr/X11R6/lib/libGL.la \
+ ${D}/usr/X11R6/lib/libGL.a \
+ ${D}/usr/X11R6/lib/libMesaGL.so
+ do
+ if [ -f ${x} -o -L ${x} ]
+ then
+ # libGL.a cause problems with tuxracer, etc
+ mv -f ${x} ${D}/usr/lib/opengl/xfree/lib
+ fi
+ done
+ for x in ${D}/usr/X11R6/lib/modules/extensions/libglx*
+ do
+ if [ -f ${x} -o -L ${x} ]
+ then
+ mv -f ${x} ${D}/usr/lib/opengl/xfree/extensions
+ fi
+ done
+ for x in ${D}/usr/X11R6/include/GL/{gl.h,glx.h,glxtokens.h}
+ do
+ if [ -f ${x} -o -L ${x} ]
+ then
+ mv -f ${x} ${D}/usr/lib/opengl/xfree/include
+ fi
+ done
+ eend 0
+
+ # Make the core cursor the default. People seem not to like whiteglass
+ # for some reason.
+ dosed 's:whiteglass:core:' /usr/share/cursors/xfree/default/index.theme
+
+ einfo "Stripping binaries and libraries..."
+ # This bit I got from Redhat ... strip binaries and drivers ..
+ # NOTE: We do NOT want to strip the drivers, modules or DRI modules!
+ 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
+ # Dont do the modules ...
+ if [ "${x/\/usr\/X11R6\/lib\/modules}" = "${x}" ]
+ then
+ echo "`echo ${x} | sed -e "s|${D}||"`"
+ strip ${x} || :
+ fi
+ fi
+ done
+ # Now do the libraries ...
+ for x in ${D}/usr/{lib,lib/opengl/xfree/lib}/*.so.* \
+ ${D}/usr/X11R6/{lib,lib/X11/locale/lib/common}/*.so.*
+ do
+ if [ -f ${x} ]
+ then
+ echo "`echo ${x} | sed -e "s|${D}||"`"
+ strip --strip-debug ${x} || :
+ fi
+ done
+
+ # Install TaD's gentoo cursors
+ insinto /usr/share/cursors/xfree/gentoo/cursors
+ doins ${WORKDIR}/cursors/gentoo/cursors/*
+ insinto /usr/share/cursors/xfree/gentoo-blue/cursors
+ doins ${WORKDIR}/cursors/gentoo-blue/cursors/*
+ insinto /usr/share/cursors/xfree/gentoo-silver/cursors
+ doins ${WORKDIR}/cursors/gentoo-silver/cursors/*
+
+}
+
+pkg_preinst() {
+
+ # These changed from a directory/file to a symlink and reverse
+ if [ ! -L ${ROOT}/usr/X11R6/lib/X11/XftConfig ] && \
+ [ -f ${ROOT}/usr/X11R6/lib/X11/XftConfig ]
+ then
+ rm -rf ${ROOT}/usr/X11R6/lib/X11/XftConfig
+ fi
+
+ if [ -L ${ROOT}/etc/X11/app-defaults ]
+ then
+ rm -f ${ROOT}/etc/X11/app-defaults
+ fi
+
+ if [ ! -L ${ROOT}/usr/X11R6/lib/X11/app-defaults ] && \
+ [ -d ${ROOT}/usr/X11R6/lib/X11/app-defaults ]
+ then
+ if [ ! -d ${ROOT}/etc/X11/app-defaults ]
+ then
+ mkdir -p ${ROOT}/etc/X11/app-defaults
+ fi
+
+ mv -f ${ROOT}/usr/X11R6/lib/X11/app-defaults ${ROOT}/etc/X11
+ fi
+
+ if [ -L ${ROOT}/usr/X11R6/lib/X11/xkb ]
+ then
+ rm -f ${ROOT}/usr/X11R6/lib/X11/xkb
+ fi
+
+ if [ ! -L ${ROOT}/etc/X11/xkb ] && \
+ [ -d ${ROOT}/etc/X11/xkb ]
+ then
+ if [ ! -d ${ROOT}/usr/X11R6/lib/X11/xkb ]
+ then
+ mkdir -p ${ROOT}/usr/X11R6/lib/X11
+ fi
+
+ mv -f ${ROOT}/etc/X11/xkb ${ROOT}/usr/X11R6/lib/X11
+ fi
+
+ # clean the dinamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d ${ROOT}/usr/lib/opengl/xfree ]
+ then
+ rm -rf ${ROOT}/usr/lib/opengl/xfree/*
+ fi
+
+ # clean out old fonts.* and encodings.dir files, as we
+ # will regenerate them
+ find ${ROOT}/usr/share/fonts/ -type f -name 'fonts.*' \
+ -exec rm -f {} \;
+ find ${ROOT}/usr/share/fonts/ -type f -name 'encodings.dir' \
+ -exec rm -f {} \;
+
+ # make sure we do not have any stale files lying round
+ # that could break things.
+ rm -f ${ROOT}/usr/X11R6/lib/libGL*
+}
+
+update_XftConfig() {
+
+ if [ "${ROOT}" = "/" ]
+ then
+ local CHECK1="f901d29ec6e3cbb0a5b0fd5cbdd9ff33"
+ local CHECK2="$(md5sum ${ROOT}/etc/X11/XftConfig | cut -d ' ' -f1)"
+
+ if [ "${CHECK1}" = "${CHECK2}" ]
+ then
+ echo
+ ewarn "Due to an invalid /etc/X11/XftConfig from x11-base/xfree-4.2.1,"
+ ewarn "/etc/X11/XftConfig is being updated automatically. Your old"
+ ewarn "version of /etc/X11/XftConfig will be backed up as:"
+ ewarn
+ ewarn " ${ROOT}etc/X11/XftConfig.bak"
+ echo
+
+ cp -a ${ROOT}/etc/X11/XftConfig \
+ ${ROOT}/etc/X11/XftConfig.bak
+ mv -f ${ROOT}/etc/X11/XftConfig.new \
+ ${ROOT}/etc/X11/XftConfig
+ rm -f ${ROOT}/etc/X11/._cfg????_XftConfig
+ else
+ rm -f ${ROOT}/etc/X11/XftConfig.new
+ fi
+ fi
+}
+
+
+pkg_postinst() {
+
+ env-update
+
+ if [ "${ROOT}" = "/" ]
+ then
+ local x=""
+
+ umask 022
+
+ # This one cause ttmkfdir to segfault :/
+ #rm -f ${ROOT}/usr/share/fonts/encodings/large/gbk-0.enc.gz
+
+ # ********************************************************************
+ # A note about fonts and needed files:
+ #
+ # 1) Create /usr/share/fonts/encodings/encodings.dir
+ #
+ # 2) Create font.scale for TrueType fonts (need to do this before
+ # we create fonts.dir files, else fonts.dir files will be
+ # invalid for TrueType fonts...)
+ #
+ # 3) Now Generate fonts.dir files.
+ #
+ # CID fonts is a bit more involved, but as we do not install any,
+ # thus I am not going to bother.
+ #
+ # <azarah@gentoo.org> (20 Oct 2002)
+ #
+ # ********************************************************************
+
+ ebegin "Generating encodings.dir..."
+ # Create the encodings.dir in /usr/share/fonts/encodings
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/lib" \
+ ${ROOT}/usr/X11R6/bin/mkfontdir -n \
+ -e ${ROOT}/usr/share/fonts/encodings \
+ -e ${ROOT}/usr/share/fonts/encodings/large \
+ -- ${ROOT}/usr/share/fonts/encodings
+ eend 0
+
+ if [ -x ${ROOT}/usr/X11R6/bin/ttmkfdir ]
+ then
+ ebegin "Creating fonts.scale files..."
+ 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 .scale files if there are truetype
+ # fonts present ...
+ if [ "${x/encodings}" = "${x}" -a \
+ -n "$(find ${x} -iname '*.[otps][pft][cfad]' -print)" ]
+ then
+ ${ROOT}/usr/X11R6/bin/ttmkfdir -x 2 \
+ -e ${ROOT}/usr/share/fonts/encodings/encodings.dir \
+ -o ${x}/fonts.scale -d ${x}
+ fi
+ done
+ eend 0
+ fi
+
+ ebegin "Generating fonts.dir files..."
+ 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
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/lib" \
+ ${ROOT}/usr/X11R6/bin/mkfontdir \
+ -e ${ROOT}/usr/share/fonts/encodings \
+ -e ${ROOT}/usr/share/fonts/encodings/large \
+ -- ${x}
+ fi
+ done
+ eend 0
+
+ ebegin "Generating Xft Cache..."
+ 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
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/lib" \
+ ${ROOT}/usr/X11R6/bin/xftcache ${x} &> /dev/null
+ fi
+ done
+ eend 0
+
+ ebegin "Fixing permissions..."
+ find ${ROOT}/usr/share/fonts/ -type f -name 'font.*' \
+ -exec chmod 0644 {} \;
+ eend 0
+
+ # 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
+ ebegin "Creating FC font cache..."
+ HOME="/root" ${ROOT}/usr/bin/fc-cache -f
+ eend 0
+ fi
+
+ # Switch to the xfree implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo; ${ROOT}/usr/sbin/opengl-update --use-old xfree
+ fi
+
+ for x in $(find ${ROOT}/usr/X11R6/lib/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
+ rm -f ${x}/Compose
+ fi
+ ;;
+ esac
+ done
+
+ # Update /etc/X11/XftConfig if its the one from Xft1.2, as its
+ # invalid for Xft1.1 ....
+ # NOTE: This should not be needed for xfree-4.2.99 or later,
+ # but lets not take chances with people that may downgrade
+ # at a later stage ....
+ update_XftConfig
+
+ # 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
+ mkdir -p ${x}
+ fi
+
+ chown root:root ${x}
+ chmod 1777 ${x}
+ done
+
+ echo
+ ewarn "BEWARE:"
+ ewarn "Font installation location has MOVED to:"
+ ewarn "/usr/share/fonts"
+ echo
+ ewarn "Edit /etc/X11/XF86Config, /etc/fonts/fonts.conf,"
+ ewarn "/etc/fonts/local.conf and /etc/X11/fs/config"
+ ewarn "to reflect this change."
+ ewarn "One compatibility symlink to the misc fonts,"
+ ewarn "including the 'fixed' font, has been provided"
+ ewarn "so an emergency X server will start."
+ echo
+
+ # Try to get people to read /usr/share/fonts move
+ for TICKER in 1 2 3 4 5
+ do
+ # Double beep here.
+ echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
+ echo -ne "\a" ; sleep 1
+ done
+ sleep 10
+
+ if use 3dfx
+ then
+ echo
+ einfo "If using a 3DFX card, and you had \"3dfx\" in your USE flags,"
+ einfo "please merge media-libs/glide-v3 if you have not done so yet"
+ einfo "by doing:"
+ einfo
+ einfo " # emerge media-libs/glide-v3"
+ echo
+ fi
+
+ echo
+ einfo "If you experience font corruption on OpenOffice.org or similar"
+ einfo "glitches please remake your XF86Config"
+ echo
+
+ einfo "Please note that the xcursors are in /usr/share/cursors/xfree"
+ einfo "Any custom cursor sets should be placed in that directory."
+ echo
+ einfo "If you wish to set system-wide default cursors, please set"
+ einfo "them in /usr/local/share/cursors/xfree so future emerges"
+ einfo "will not overwrite those settings."
+ echo
+ einfo "The Synaptics touchpad driver is no longer compiled in this build."
+ einfo "Please emerge x11-misc/synaptics if you require it."
+ einfo "Set INPUT_DEVICES=\"synaptics\" in make.conf to do this"
+ einfo "automatically."
+ echo
+ einfo "Listening on TCP is disabled by default with startx."
+ einfo "To enable it, edit /usr/X11R6/bin/startx."
+}
+
+pkg_postrm() {
+
+ # Fix problematic links
+ if [ -x ${ROOT}/usr/X11R6/bin/XFree86 ]
+ 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
+ ln -snf ../X11R6/include/GL ${ROOT}/usr/include/GL
+ ln -snf ../X11R6/lib/X11 ${ROOT}/usr/lib/X11
+ fi
+}