diff options
author | Donnie Berkholz <spyderous@gentoo.org> | 2004-06-14 19:57:56 +0000 |
---|---|---|
committer | Donnie Berkholz <spyderous@gentoo.org> | 2004-06-14 19:57:56 +0000 |
commit | f32a1d6a3d2cda0098fb162feb08f1c3380183bb (patch) | |
tree | 4056eb53cbb604c1f25710d123e7de1b7386ece8 /x11-base | |
parent | Add metadata. (Manifest recommit) (diff) | |
download | gentoo-2-f32a1d6a3d2cda0098fb162feb08f1c3380183bb.tar.gz gentoo-2-f32a1d6a3d2cda0098fb162feb08f1c3380183bb.tar.bz2 gentoo-2-f32a1d6a3d2cda0098fb162feb08f1c3380183bb.zip |
Major refactoring of code. No end-user difference, so no bump.
Diffstat (limited to 'x11-base')
-rw-r--r-- | x11-base/xorg-x11/ChangeLog | 6 | ||||
-rw-r--r-- | x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild | 1009 |
2 files changed, 533 insertions, 482 deletions
diff --git a/x11-base/xorg-x11/ChangeLog b/x11-base/xorg-x11/ChangeLog index e0cbbe6b7e15..042c81bdd6f0 100644 --- a/x11-base/xorg-x11/ChangeLog +++ b/x11-base/xorg-x11/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-base/xorg-x11 # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.54 2004/06/14 15:25:25 fmccor Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.55 2004/06/14 19:57:56 spyderous Exp $ + + 14 Jun 2004; Donnie Berkholz <spyderous@gentoo.org>; + xorg-x11-6.7.0-r1.ebuild: + Major refactoring of code. No end-user difference, so no bump. 14 Jun 2004; Ferris McCormick <fmccor@gentoo.org> xorg-x11-6.7.0-r1.ebuild: Marked stable for sparc (Bug 53226). diff --git a/x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild b/x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild index 5c6cec4029f1..2739405feda1 100644 --- a/x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild +++ b/x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild,v 1.7 2004/06/14 15:25:25 fmccor Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.7.0-r1.ebuild,v 1.8 2004/06/14 19:57:56 spyderous Exp $ # This is a snapshot of the XORG-RELEASE-1 branch. @@ -161,22 +161,7 @@ PROVIDE="virtual/x11 DESCRIPTION="An X11 implementation maintained by the X.Org Foundation" -pkg_setup() { - # Whether to drop in external render, xrender and xft from freedesktop.org - # NOTE: The freedesktop versions are the CORRECT upstream versions to use. - # WARNING: Remember to add the external stuff to SRC_URI when in use. - EXT_XFT_XRENDER="no" - - # Whether to drop in external drivers - # NOTE: Remember SRC_URI and DRIVER_VER - # For savage, remember app-arch/unzip in DEPEND - EXT_SAVAGE="no" - EXT_SIS="no" - - FILES_DIR="${WORKDIR}/files" - PATCHDIR="${WORKDIR}/patch" - EXCLUDED="${PATCHDIR}/excluded" - +cflag_setup() { # Set up CFLAGS filter-flags "-funroll-loops" @@ -212,6 +197,26 @@ pkg_setup() { # # <azarah@gentoo.org> (13 Oct 2002) strip-flags +} + +pkg_setup() { + # Whether to drop in external render, xrender and xft from freedesktop.org + # NOTE: The freedesktop versions are the CORRECT upstream versions to use. + # WARNING: Remember to add the external stuff to SRC_URI when in use. + EXT_XFT_XRENDER="no" + + # Whether to drop in external drivers + # NOTE: Remember SRC_URI and DRIVER_VER + # For savage, remember app-arch/unzip in DEPEND + EXT_SAVAGE="no" + EXT_SIS="no" + + FILES_DIR="${WORKDIR}/files" + PATCHDIR="${WORKDIR}/patch" + EXCLUDED="${PATCHDIR}/excluded" + + # Set up CFLAG-related things + cflag_setup # Set up CC variable, we use it later gcc-getCC @@ -237,158 +242,7 @@ pkg_setup() { fi } -src_unpack() { - - # Unpack source and patches - ebegin "Unpacking source" - unpack X11R${PV}-src1.tar.gz - unpack X11R${PV}-src2.tar.gz - unpack X11R${PV}-src3.tar.gz - unpack X11R${PV}-src4.tar.gz - unpack X11R${PV}-src5.tar.gz - eend 0 - - if use doc - then - ebegin "Unpacking documentation" - unpack X11R${PV}-src6.tar.gz - unpack X11R${PV}-src7.tar.gz - eend 0 -fi - - ebegin "Unpacking Gentoo files and patches" - unpack ${P}-files-${FILES_VER}.tar.bz2 > /dev/null - unpack ${P}-patches-${PATCH_VER}.tar.bz2 > /dev/null - eend 0 - - # Unpack TaD's gentoo cursors - ebegin "Unpacking Gentoo cursors" - unpack gentoo-cursors-tad-${XCUR_VER}.tar.bz2 > /dev/null - eend 0 - - # Unpack extra fonts stuff from Mandrake - ebegin "Unpacking fonts" - if use nls - then - unpack gemini-koi8-u.tar.bz2 > /dev/null - fi - unpack eurofonts-X11.tar.bz2 > /dev/null - unpack xfsft-encodings-${XFSFT_ENC_VER}.tar.bz2 > /dev/null - eend 0 - - # 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 - - if [ "${EXT_SAVAGE}" = "yes" ] - then - 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 - fi - - if [ "${EXT_SIS}" = "yes" ] - then - 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 - fi - - 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 -f 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 -f Xft/Makefile* - touch Xft/config.h - eend 0 - cd ${S} - fi - - einfo "Excluding patches..." - # These have been applied upstream - if [ ! "${EXT_SAVAGE}" = "yes" ] - then - patch_exclude 1770 1771 1772 1773 - fi - - # This patch is just plain broken. Results in random failures. - patch_exclude 0120*parallel-make - - # Hardened patches (both broken) - patch_exclude 9960_all_4.3.0-exec-shield-GNU - patch_exclude 9961_all_4.3.0-libGL-exec-shield - - # We dont have an implementation for S/390's yet... - if use !s390 - then - patch_exclude 7500 - fi - - if [ "${EXT_XFT_XRENDER}" = "yes" ] - then - patch_exclude 1075 - fi - - # if use !gatos - # then - patch_exclude 9841_all_4.3.0-gatos-mesa - # fi - - 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`" -a "${TDFX_RISKY}" = "yes" ] - then - patch_exclude 5850 - else - patch_exclude 5851 - fi - einfo "Done excluding patches" - - # Bulk patching - based on patch name - # Will create excluded stuff once it's needed - cd ${WORKDIR} - EPATCH_SUFFIX="patch" \ - epatch ${PATCHDIR} - cd ${S} - +host_def_setup() { ebegin "Setting up config/cf/host.def" cd ${S}; cp ${FILES_DIR}/site.def config/cf/host.def || die echo "#define XVendorString \"Gentoo Linux (The X.Org Foundation ${PV}, revision ${PR}-${PATCH_VER})\"" \ @@ -649,6 +503,165 @@ fi # End the host.def definitions here eend 0 +} + +patch_setup() { + einfo "Excluding patches..." + # These have been applied upstream + if [ ! "${EXT_SAVAGE}" = "yes" ] + then + patch_exclude 1770 1771 1772 1773 + fi + + # This patch is just plain broken. Results in random failures. + patch_exclude 0120*parallel-make + + # Hardened patches (both broken) + patch_exclude 9960_all_4.3.0-exec-shield-GNU + patch_exclude 9961_all_4.3.0-libGL-exec-shield + + # We dont have an implementation for S/390's yet... + if use !s390 + then + patch_exclude 7500 + fi + + if [ "${EXT_XFT_XRENDER}" = "yes" ] + then + patch_exclude 1075 + fi + + # if use !gatos + # then + patch_exclude 9841_all_4.3.0-gatos-mesa + # fi + + 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`" -a "${TDFX_RISKY}" = "yes" ] + then + patch_exclude 5850 + else + patch_exclude 5851 + fi + einfo "Done excluding patches" +} + +src_unpack() { + + # Unpack source and patches + ebegin "Unpacking source" + unpack X11R${PV}-src1.tar.gz + unpack X11R${PV}-src2.tar.gz + unpack X11R${PV}-src3.tar.gz + unpack X11R${PV}-src4.tar.gz + unpack X11R${PV}-src5.tar.gz + eend 0 + + if use doc + then + ebegin "Unpacking documentation" + unpack X11R${PV}-src6.tar.gz + unpack X11R${PV}-src7.tar.gz + eend 0 +fi + + ebegin "Unpacking Gentoo files and patches" + unpack ${P}-files-${FILES_VER}.tar.bz2 > /dev/null + unpack ${P}-patches-${PATCH_VER}.tar.bz2 > /dev/null + eend 0 + + # Unpack TaD's gentoo cursors + ebegin "Unpacking Gentoo cursors" + unpack gentoo-cursors-tad-${XCUR_VER}.tar.bz2 > /dev/null + eend 0 + + # Unpack extra fonts stuff from Mandrake + ebegin "Unpacking fonts" + if use nls + then + unpack gemini-koi8-u.tar.bz2 > /dev/null + fi + unpack eurofonts-X11.tar.bz2 > /dev/null + unpack xfsft-encodings-${XFSFT_ENC_VER}.tar.bz2 > /dev/null + eend 0 + + # 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 + + if [ "${EXT_SAVAGE}" = "yes" ] + then + 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 + fi + + if [ "${EXT_SIS}" = "yes" ] + then + 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 + fi + + 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 -f 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 -f Xft/Makefile* + touch Xft/config.h + eend 0 + cd ${S} + fi + + patch_setup + + # Bulk patching - based on patch name + # Will create excluded stuff once it's needed + cd ${WORKDIR} + EPATCH_SUFFIX="patch" \ + epatch ${PATCHDIR} + cd ${S} + + host_def_setup cd ${S} if use doc @@ -691,42 +704,7 @@ src_compile() { } -src_install() { - - unset MAKE_OPTS - - 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} 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 X.org X11 SDK..." - make install.sdk DESTDIR=${D} || die - fi - - 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} - - # 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 - +pkgconfig_install() { # upstream still doesn't generate this -- move back into external stuff # once they do # Generate xrender.pc using 'EOF' style here document with no expansion @@ -750,25 +728,16 @@ src_install() { # This one needs to be in /usr/lib insinto /usr/lib/pkgconfig doins ${D}/usr/X11R6/lib/pkgconfig/{xcursor,xft}.pc -# pending upstream fix -# if [ "${EXT_XFT_XRENDER}" = "yes" ] -# then - doins ${D}/usr/X11R6/lib/pkgconfig/xrender.pc -# fi + # pending upstream fix + # 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 - +backward_compat_setup() { # Backwards compatibility for /usr/share move G_FONTDIRS="100dpi 75dpi Speedo TTF Type1 encodings local misc util" @@ -780,88 +749,9 @@ src_install() { dosym ${ROOT}/usr/share/man /usr/X11R6/man dosym ${ROOT}/usr/share/doc/${PF} /usr/X11R6/lib/X11/doc +} - # 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 - - # Install example config file - newins ${S}/programs/Xserver/hw/xfree86/xorg.conf xorg.conf.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 - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/lib" \ - ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-10x20.bdf | \ - gzip -9 > ${D}/usr/share/fonts/misc/Xlat9-10x20-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}/lib/*.la - - # Backwards compat, FHS, etc. - dosym ../../usr/X11R6/bin/Xorg /etc/X11/X - - # Fix perms - fperms 755 /usr/X11R6/lib/X11/xkb/geometry/sgi - fperms 755 /usr/X11R6/bin/dga - +compose_files_setup() { # 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) @@ -893,29 +783,13 @@ src_install() { -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 +etc_files_install() { + insinto /etc/X11 - 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 + # Install example config file + newins ${S}/programs/Xserver/hw/xfree86/xorg.conf xorg.conf.example exeinto /etc/X11 # new session management script @@ -947,10 +821,9 @@ src_install() { newexe ${FILES_DIR}/xfs.start xfs insinto /etc/conf.d newins ${FILES_DIR}/xfs.conf.d xfs +} - # we want libGLU.so* in /usr/lib - mv ${D}/usr/X11R6/lib/libGLU.* ${D}/usr/lib - +setup_dynamic_libgl() { # next section is to setup the dynamic libGL stuff ebegin "Moving libGL and friends for dynamic switching" dodir /usr/lib/opengl/${PN}/{lib,extensions,include} @@ -981,11 +854,9 @@ src_install() { 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/${PN}/default/index.theme - +strip_execs() { 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! @@ -1013,18 +884,9 @@ src_install() { strip --strip-debug ${x} || : fi done +} - # Install TaD's gentoo cursors - insinto /usr/share/cursors/${PN}/gentoo/cursors - doins ${WORKDIR}/cursors/gentoo/cursors/* - insinto /usr/share/cursors/${PN}/gentoo-blue/cursors - doins ${WORKDIR}/cursors/gentoo-blue/cursors/* - insinto /usr/share/cursors/${PN}/gentoo-silver/cursors - doins ${WORKDIR}/cursors/gentoo-silver/cursors/* - - # Remove xterm app-defaults, since we don't install xterm - rm ${D}/etc/X11/app-defaults/{UXTerm,XTerm,XTerm-color} - +setup_config_files() { # 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/xorg.conf.example @@ -1068,17 +930,203 @@ src_install() { done } +src_install() { + + unset MAKE_OPTS + + 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} 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 X.org X11 SDK..." + make install.sdk DESTDIR=${D} || die + fi + + 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} + + # 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 + + pkgconfig_install + + 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 + + backward_compat_setup + + # 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 + + # 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 + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/lib" \ + ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-10x20.bdf | \ + gzip -9 > ${D}/usr/share/fonts/misc/Xlat9-10x20-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}/lib/*.la + + # Backwards compat, FHS, etc. + dosym ../../usr/X11R6/bin/Xorg /etc/X11/X + + # Fix perms + fperms 755 /usr/X11R6/lib/X11/xkb/geometry/sgi + fperms 755 /usr/X11R6/bin/dga + + compose_files_setup + + # 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 + + etc_files_install + + # we want libGLU.so* in /usr/lib + mv ${D}/usr/X11R6/lib/libGLU.* ${D}/usr/lib + + setup_dynamic_libgl + + # Make the core cursor the default. People seem not to like whiteglass + # for some reason. + dosed 's:whiteglass:core:' /usr/share/cursors/${PN}/default/index.theme + + strip_execs + + # Install TaD's gentoo cursors + insinto /usr/share/cursors/${PN}/gentoo/cursors + doins ${WORKDIR}/cursors/gentoo/cursors/* + insinto /usr/share/cursors/${PN}/gentoo-blue/cursors + doins ${WORKDIR}/cursors/gentoo-blue/cursors/* + insinto /usr/share/cursors/${PN}/gentoo-silver/cursors + doins ${WORKDIR}/cursors/gentoo-silver/cursors/* + + # Remove xterm app-defaults, since we don't install xterm + rm ${D}/etc/X11/app-defaults/{UXTerm,XTerm,XTerm-color} + + setup_config_files +} + pkg_preinst() { - # 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> 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/lib/X11/fonts/${G_FONTDIR} ] then rm -rf ${ROOT}/usr/X11R6/lib/X11/fonts/${G_FONTDIR} fi + + # clean out old fonts.* and encodings.dir files, as we + # will regenerate them + find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'fonts.*' \ + -exec rm -f {} \; + find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'encodings.dir' \ + -exec rm -f {} \; done if [ -L ${ROOT}/etc/X11/app-defaults ] @@ -1120,172 +1168,117 @@ pkg_preinst() { rm -rf ${ROOT}/usr/lib/opengl/${PN}/* fi - # clean out old fonts.* and encodings.dir files, as we - # will regenerate them - for G_FONTDIR in ${G_FONTDIRS} - do - find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'fonts.*' \ - -exec rm -f {} \; - find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'encodings.dir' \ - -exec rm -f {} \; - done - # make sure we do not have any stale files lying around # that could break things. rm -f ${ROOT}/usr/X11R6/lib/libGL* } -pkg_postinst() { - - env-update +font_setup() { + # These cause ttmkfdir to segfault :/ + rm -f ${ROOT}/usr/share/fonts/encodings/iso8859-6.8x.enc.gz + rm -f ${ROOT}/usr/share/fonts/encodings/iso8859-6.16.enc.gz - if [ "${ROOT}" = "/" ] - then - local x="" - - umask 022 - - # These cause ttmkfdir to segfault :/ - rm -f ${ROOT}/usr/share/fonts/encodings/iso8859-6.8x.enc.gz - rm -f ${ROOT}/usr/share/fonts/encodings/iso8859-6.16.enc.gz - - # ******************************************************************** - # A note about fonts and needed files: - # - # 1) Create /usr/share/fonts/encodings/encodings.dir - # - # 2) Create fonts.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 - LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/lib" \ - ${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 + # ******************************************************************** + # A note about fonts and needed files: + # + # 1) Create /usr/share/fonts/encodings/encodings.dir + # + # 2) Create fonts.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 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 + 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 - 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 + eend 0 - ebegin "Generating Xft cache..." + 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 XftCache files if there are truetype + # Only generate .scale 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 + ${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 "Fixing permissions..." - find ${ROOT}/usr/share/fonts/ -type f -name 'font.*' \ - -exec chmod 0644 {} \; - eend 0 + 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 - # 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 + 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 - # Switch to the xorg implementation. - # Use new opengl-update that will not reset user selected - # OpenGL interface ... - echo - 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} - fi - fi + 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 - 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 + # 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 - # 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 + ebegin "Fixing permissions..." + find ${ROOT}/usr/share/fonts/ -type f -name 'font.*' \ + -exec chmod 0644 {} \; + eend 0 - chown root:root ${x} - chmod 1777 ${x} - done + # 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 +} +print_info() { if use 3dfx then echo @@ -1334,6 +1327,60 @@ pkg_postinst() { sleep 10 } +pkg_postinst() { + + env-update + + if [ "${ROOT}" = "/" ] + then + local x="" + + umask 022 + + font_setup + + # Switch to the xorg implementation. + # Use new opengl-update that will not reset user selected + # OpenGL interface ... + echo + 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} + fi + 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 + + # 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 + + print_info +} + pkg_postrm() { # Fix problematic links |