From afdcc2624aec2f5aaaf00aa211455ba54eaf0703 Mon Sep 17 00:00:00 2001 From: hugo Date: Sun, 14 Feb 2010 21:08:28 +0000 Subject: [PATCH] Finalise installation X.org, reste a tester... --- dependencies | 7 +- packages-list | 15 +- stage1/create-config-files | 3 +- stage3/cis-libusb | 25 ++- stage3/packages-update | 5 + stage3/stage3-install | 5 + {stage3 => stage4}/bootscripts/dbus | 0 {stage3 => stage4}/bootscripts/hald | 0 {stage3 => stage4}/cis-dbus | 15 +- stage4/cis-glib | 36 ++++ {stage3 => stage4}/cis-hal | 19 +- stage4/cis-lesstif | 33 ++++ stage4/cis-mesalib | 29 +++ stage4/configure-fonts | 15 ++ stage3/cis-xfree86 => stage4/configure-xorg | 190 ++++---------------- stage4/packages-update | 26 ++- stage4/stage4-install | 88 ++++++++- sysinfos | 4 +- 18 files changed, 318 insertions(+), 197 deletions(-) rename {stage3 => stage4}/bootscripts/dbus (100%) rename {stage3 => stage4}/bootscripts/hald (100%) rename {stage3 => stage4}/cis-dbus (77%) create mode 100755 stage4/cis-glib rename {stage3 => stage4}/cis-hal (79%) create mode 100755 stage4/cis-lesstif create mode 100755 stage4/cis-mesalib create mode 100755 stage4/configure-fonts rename stage3/cis-xfree86 => stage4/configure-xorg (53%) diff --git a/dependencies b/dependencies index 5a1b1cb..aae337f 100644 --- a/dependencies +++ b/dependencies @@ -33,7 +33,9 @@ ${FUSE}: ${UDEV} ${EVINCE}: ${POPPLER} ${LIBGNOMEUI} ${GNOME_ICON_THEME} ${GNOME_DOC_UTILS} ${TETEX_SRC} ${ESPGS} ${T1LIB} -${DBUS_GLIB}: ${DBUS} +${DBUS}: ${EXPAT} ${LIBXML2} ${XORG_LIBS} +${GLIB}: ${PCRE} +${DBUS_GLIB}: ${DBUS} ${GLIB} ${EXPAT} ${EGGDBUS}: ${DBUS_GLIB} ${GOBJECT_INSTROSPECTION}: ${GLIB} ${LIBFFI} ${POLKIT}: ${GOBJECT_INSTROSPECTION} ${EGGDBUS} @@ -83,5 +85,8 @@ ${DOCBOOK_UTILS}: ${DOCBOOK_DSSSL} ${SGML_SPM} ${LIBXML2}: ${PYTHON} ${DOCBOOK_XML}: ${LIBXML2} ${DOCBOOK_XSL}: ${LIBXML2} +${LIBXSLT}: ${LIBXML2} +${XMLTO}: ${LIBXSLT} ${DOCBOOK_XML} ${DOCBOOK_XSL} ${EMACS}: ${GTK} + diff --git a/packages-list b/packages-list index 743bc38..ddc6ad8 100644 --- a/packages-list +++ b/packages-list @@ -108,7 +108,7 @@ GHOSTSCRIPT_FONTS_OTHER="ghostscript-fonts-other-6.0" GNASH=" gnash-0.8.5" GIMP="gimp-2.6.6" GUTENPRINT="gutenprint-5.2.3" -GLIB="glib-2.22.3" +GLIB="glib-2.22.4" GTK="gtk+-2.14.7" GTK_ENGINES="gtk-engines-2.18.4" GLITZ="glitz-0.5.6" @@ -205,7 +205,8 @@ GMP="gmp-4.3.1" GUILE="guile-1.8.7" GZIP="gzip-1.3.12" -HAL="hal-0.5.9.1" +HAL="hal-0.5.12" +HAL_INFO="hal-info-20090414" HELP2MAN="help2man-1.36.4" HICOLOR_ICON_THEME="hicolor-icon-theme-0.11" HTTPD="httpd-2.2.8" # Apache @@ -234,7 +235,7 @@ KVM="kvm-84" LAME="lame-3.97" LCMS="lcms-1.18a" LESS="less-436" -LESSTIF="lesstif-0.95.0" +LESSTIF="lesstif-0.95.2" LFS_BOOTSCRIPTS="lfs-bootscripts-20070813" LIBA52="a52dec-0.7.4" LIBART="libart_lgpl-2.3.20" @@ -270,7 +271,8 @@ LIBSNDFILE="libsndfile-1.0.18pre18" LIBSOUP="libsoup-2.4.1" LIBXML2="libxml2-2.7.6" LIBXSLT="libxslt-1.1.26" -LIBUSB="libusb-0.1.10a" +LIBUSB="libusb-1.0.2" +LIBUSB_COMPAT="libusb-compat-0.1.3" LIBGPHOTO2="libgphoto2-2.1.99" LIBXKLAVIER="libxklavier-2.91" LIBOIL="liboil-0.3.15" @@ -279,6 +281,7 @@ LIBTASN1="libtasn1-2.2" LIBTHEORA="libtheora-1.0" LIBSPF2="libspf2-1.2.5" LIBNOTIFY="libnotify-0.4.4" +LIBPTHREAD_STUBS="libpthread-stubs-0.1" LIBWNCK="libwnck-2.16.1" LILYPOND="lilypond-2.12.2" LTSP_UTILS="ltsp-utils-0.25-0" @@ -408,6 +411,7 @@ UML_UTILITIES="uml_utilities_20070815" UNRAR="unrar-3.7.8" UNZIP="unzip-5.52" UPSTART="upstart-0.6.3" +USBUTILS="usbutils-0.86" UTIL_LINUX_NG="util-linux-ng-2.16.1" UW_IMAP="imap-2004g" @@ -430,11 +434,14 @@ XORG_UTIL=util-7.5-2 LIBXAU=libXau-1.0.5 LIBXDMCP=libXdmcp-1.0.3 XBITMAPS=xbitmaps-1.1.0 +LIBDRM=libdrm-2.4.14 +MESALIB=MesaLib-7.6 XCURSOR_THEMES=xcursor-themes-1.0.2 XKEYBOARD_CONFIG=xkeyboard-config-1.7 LUIT=luit-1.0.4 XORG_SERVER=xorg-server-1.7.1 +XMLTO="xmlto-0.0.23" XMLTOMAN="xmltoman-0.4" XVIDCORE="xvidcore-1.2.2" XZ_UTILS="xz-4.999.9beta" diff --git a/stage1/create-config-files b/stage1/create-config-files index ef723b5..1dad392 100755 --- a/stage1/create-config-files +++ b/stage1/create-config-files @@ -29,7 +29,8 @@ devpts /dev/pts devpts gid=4,mode=620 0 0 shm /dev/shm tmpfs defaults 0 0 EOF -echo "Creating basic /etc/profile" +echo "Creating basic /etc/profile and /etc/profile.d" +install -v -m755 -d ${LFS}/etc/profile.d cat > ${LFS}/etc/profile << "EOF" #!/bin/sh # /etc/profile diff --git a/stage3/cis-libusb b/stage3/cis-libusb index dd62041..0d047a8 100755 --- a/stage3/cis-libusb +++ b/stage3/cis-libusb @@ -2,30 +2,37 @@ set -o errexit # First argument of this script is the package name. +# Remaining arguments are additional configure options. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + # Applying patches (if any) -apply_patches ${1} +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${1} +cd ${LFS_TMP}/${PACKAGE} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --disable-build-docs + ${CONFIGURE_OPTS} make make install +ldconfig -hv_groupadd -g 14 usb +cat > /etc/udev/rules.d/23-usb.rules << "EOF" +# Set group ownership for raw USB devices +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" +EOF # Checking if string exists -if ! grep "/proc/bus/usb" /etc/fstab 1> /dev/null 2>&1; then - echo "usbfs /proc/bus/usb usbfs ddevgid=14,devmode=0660 0 0" >> /etc/fstab -fi - -ldconfig +#if ! grep "/proc/bus/usb" /etc/fstab 1> /dev/null 2>&1; then +# echo "usbfs /proc/bus/usb usbfs ddevgid=14,devmode=0660 0 0" >> /etc/fstab +#fi exit $? diff --git a/stage3/packages-update b/stage3/packages-update index f18b9b2..d2bb945 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -22,6 +22,9 @@ lpkg 2 ${INETUTILS} # These packages are only for stage3 fpkg_gnu ${WHICH} fpkg ${PCIUTILS} ftp://ftp.kernel.org/pub/software/utils/pciutils +fpkg_sf ${LIBUSB} +fpkg_sf ${LIBUSB_COMPAT} libusb +fpkg ${USBUTILS} ${SOURCEFORGE_URL}/project/linux-usb/usbutils fpkg ${REISERFSPROGS} http://www.kernel.org/pub/linux/utils/fs/reiserfs fpkg ${NET_TOOLS} http://www.tazenda.demon.co.uk/phil/net-tools fpkg ${DHCP} ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history @@ -76,6 +79,7 @@ fpkg_sf ${PERL_MOD_PDL} pdl fpkg ${PERL_MOD_XML_WRITER} "http://www.cpan.org/modules/by-module/XML" fpkg ${PERL_MOD_XML_PARSER} "http://www.cpan.org/modules/by-module/XML" +fpkg_gnome ${INTLTOOL} fpkg ${PYTHON} "http://www.python.org/ftp/python/$(get_pkg_ver ${PYTHON})" ARCH_EXT=tgz fpkg ${SGML_COMMON} "http://gd.tuwien.ac.at/hci/kde/devel/docbook/SOURCES" @@ -92,6 +96,7 @@ fpkg ${LIBXSLT} "http://xmlsoft.org/sources" fpkg_hv ${DOCBOOK_XML} fpkg_sf ${DOCBOOK_XSL} "docbook" fpkg_sf ${XMLTOMAN} +fpkg ${XMLTO} "https://fedorahosted.org/releases/x/m/xmlto" fpkg_mis ${LIBJPEG} "jpegsrc.v$(get_pkg_ver ${LIBJPEG})" "http://www.ijg.org/files" fpkg_mis ${LIBOPENJPEG} "openjpeg_v$(get_pkg_ver ${LIBOPENJPEG} | sed 's!\.!_!g')" "http://www.openjpeg.org" diff --git a/stage3/stage3-install b/stage3/stage3-install index 556e764..0c30f5f 100755 --- a/stage3/stage3-install +++ b/stage3/stage3-install @@ -26,6 +26,9 @@ export SCRDIR=$(pwd) ipkg_cust ${NANO} cis-nano --enable-color --enable-multibuffer ipkg_ac ${WHICH} ipkg_cust ${PCIUTILS} cis-pciutils +ipkg_cust ${LIBUSB} cis-libusb +ipkg_ac ${LIBUSB_COMPAT} +ipkg_ac ${USBUTILS} --disable-zlib ipkg_cust ${REISERFSPROGS} cis-reiserfsprogs ipkg_cust ${NET_TOOLS} cis-net-tools ipkg_cust ${DHCP} cis-dhcp @@ -90,6 +93,7 @@ ipkg_pm ${PERL_MOD_PDL} ipkg_pm ${PERL_MOD_XML_WRITER} ipkg_pm ${PERL_MOD_XML_PARSER} +ipkg_ac ${INTLTOOL} ipkg_ac ${PYTHON} "--enable-shared" # DocBook @@ -106,6 +110,7 @@ ipkg_ac_nb ${LIBXSLT} ipkg_cust ${DOCBOOK_XML} cis-docbook-xml ipkg_cust ${DOCBOOK_XSL} cis-docbook-xsl ipkg_cust ${XMLTOMAN} cis-xmltoman +ipkg_ac ${XMLTO} # Graphic libraries ipkg_ac ${LIBJPEG} "--enable-static --enable-shared" diff --git a/stage3/bootscripts/dbus b/stage4/bootscripts/dbus similarity index 100% rename from stage3/bootscripts/dbus rename to stage4/bootscripts/dbus diff --git a/stage3/bootscripts/hald b/stage4/bootscripts/hald similarity index 100% rename from stage3/bootscripts/hald rename to stage4/bootscripts/hald diff --git a/stage3/cis-dbus b/stage4/cis-dbus similarity index 77% rename from stage3/cis-dbus rename to stage4/cis-dbus index bb1abf8..a627331 100755 --- a/stage3/cis-dbus +++ b/stage4/cis-dbus @@ -2,24 +2,31 @@ set -o errexit # First argument of this script is the package name. +# Remaining arguments are additional configure options. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + # Applying patches (if any) -apply_patches ${1} +apply_patches ${PACKAGE} hv_groupadd -g 18 messagebus hv_useradd -c D-BUS-Message-Daemon-User -d /dev/null \ -u 18 -g messagebus -s /bin/false messagebus -cd ${LFS_TMP}/${1}-build -../${1}/configure \ +cd ${LFS_TMP}/${PACKAGE}-build +../${PACKAGE}/configure \ --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var + --libexecdir=/usr/lib/dbus-1.0 \ + --localstatedir=/var \ + ${CONFIGURE_OPTS} make make install ldconfig diff --git a/stage4/cis-glib b/stage4/cis-glib new file mode 100755 index 0000000..188b797 --- /dev/null +++ b/stage4/cis-glib @@ -0,0 +1,36 @@ +#!/bin/sh +set -o errexit + +# First argument of this script is the package name. +# Remaining arguments are additional configure options. + +# Reading system configuration informations, functions and package versions. +source ../sysinfos +source ../functions +source ../packages-list + +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + +# Applying patches (if any) +apply_patches ${PACKAGE} + +cd ${LFS_TMP}/${PACKAGE}-build +../${PACKAGE}/configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + ${CONFIGURE_OPTS} +make +make install +ldconfig + +chmod -v 755 /usr/bin/gtester-report + +cat > /etc/profile.d/glib2-locale.sh << "EOF" +# Use the current locale charset for filenames +# in applications using GLib +export G_FILENAME_ENCODING=@locale +EOF + +exit $? diff --git a/stage3/cis-hal b/stage4/cis-hal similarity index 79% rename from stage3/cis-hal rename to stage4/cis-hal index 9a0bc7e..e113236 100755 --- a/stage3/cis-hal +++ b/stage4/cis-hal @@ -1,32 +1,39 @@ -#!/bin/sh +1#!/bin/sh set -o errexit # First argument of this script is the package name. +# Remaining arguments are additional configure options. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + # Applying patches (if any) -apply_patches ${1} +apply_patches ${PACKAGE} hv_groupadd -g 19 haldaemon hv_useradd -c HAL-Daemon-User -d /dev/null -u 19 \ -g haldaemon -s /bin/false haldaemon -cd ${LFS_TMP}/${1}-build -../${1}/configure \ +cd ${LFS_TMP}/${PACKAGE}-build +../${PACKAGE}/configure \ --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/hal \ --localstatedir=/var \ - --with-hwdata=/usr/share/pciutils/pci.ids + --disable-policy-kit \ + ${CONFIGURE_OPTS} make make install -install -v -m755 -d /var/run/hald ldconfig +install -v -m755 -d /var/run/hald + # Bootscript install -v -m740 ${SCRDIR}/bootscripts/hald /etc/rc.d/init.d diff --git a/stage4/cis-lesstif b/stage4/cis-lesstif new file mode 100755 index 0000000..f6ada8a --- /dev/null +++ b/stage4/cis-lesstif @@ -0,0 +1,33 @@ +#!/bin/sh +set -o errexit + +# First argument of this script is the package name. +# Remaining arguments are additional configure options. + +# Reading system configuration informations, functions and package versions. +source ../sysinfos +source ../functions +source ../packages-list + +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + +# Applying patches (if any) +apply_patches ${PACKAGE} + +cd ${LFS_TMP}/${PACKAGE} +./configure \ + --prefix=${XORG_PREFIX} \ + ${CONFIGURE_OPTS} +sed -i "s@libdir)/X11/mwm@sysconfdir)/mwm@" clients/Motif-2.1/mwm/Makefile +make rootdir=/usr/share/doc/${PACKAGE} +make rootdir=/usr/share/doc/${PACKAGE} install +ldconfig + +# Applicatons that utilize Xorg libraries often, and incorrectly, expect to find configuration +# files in $XORG_PREFIX/lib/X11. While still the root user, create a compatibility symlink with +# the following command: +ln -v -sf /etc/X11/mwm ${XORG_PREFIX}/lib/X11 + +exit $? diff --git a/stage4/cis-mesalib b/stage4/cis-mesalib new file mode 100755 index 0000000..150bef7 --- /dev/null +++ b/stage4/cis-mesalib @@ -0,0 +1,29 @@ +#!/bin/sh +set -o errexit + +# First argument of this script is the package name. +# Remaining arguments are additional configure options. + +# Reading system configuration informations, functions and package versions. +source ../sysinfos +source ../functions +source ../packages-list + +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + +# Applying patches (if any) +apply_patches ${PACKAGE} + +cd ${LFS_TMP}/${PACKAGE} +# Mesa builds with debugging symbols. Remove the -g switch from both CFLAGS and CXXFLAGS with this command: +sed 's@FLAGS=\"-g@FLAGS=\"@' -i configure +./configure --prefix=${XORG_PREFIX} \ + --sysconfdir=/etc \ + ${XORG_CONFIG} \ + ${CONFIGURE_OPTS} +make +make install + +exit $? diff --git a/stage4/configure-fonts b/stage4/configure-fonts new file mode 100755 index 0000000..be9b458 --- /dev/null +++ b/stage4/configure-fonts @@ -0,0 +1,15 @@ +#!/bin/sh +set -o errexit + +# First argument of this script is the package name. + +# Reading system configuration informations, functions and package versions. +source ../sysinfos +source ../functions +source ../packages-list + +install -v -d -m755 /usr/share/fonts +ln -svfT ${XORG_PREFIX}/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF +ln -svfT ${XORG_PREFIX}/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF + +exit $? diff --git a/stage3/cis-xfree86 b/stage4/configure-xorg similarity index 53% rename from stage3/cis-xfree86 rename to stage4/configure-xorg index fe95b2c..2ed5f33 100755 --- a/stage3/cis-xfree86 +++ b/stage4/configure-xorg @@ -1,146 +1,37 @@ #!/bin/sh set -o errexit -# First argument of this script is the package name +# First argument of this script is the package name. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} - -# Xfree86 may have a problem with sys/kd.h installed with some recent versions of -# Glibc. This has recently been fixed in LFS SVN. Execute the following commands -# to work around a broken kd.h file. The grep command is to ensure the modification -# is only made if it is needed: -grep "__undef_LINUX" \ - /usr/include/sys/kd.h 2>&1 > /dev/null || \ - sed -i.bak '/X.h/i #include ' \ - programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c - -# When building XFree86, you should create a shadow directory of symbolic links for the compiled code: -make -C config/util -f Makefile.ini lndir - -# Now create the shadow tree: -cd ../${1}-build -../${1}/config/util/lndir ../${1} - -# Creating host.def -# Although XFree86 will compile without a host.def file, the following file is -# recommended for customizing the installation. -cat > config/cf/host.def << "EOF" -/* host.def */ -/* System Related Information. */ -#define DefaultGcc2i386Opt -O2 -fomit-frame-pointer -march=_MACHINE_ARCHITECTURE_ - -/* The following definitions are normally set properly by XFree86's scripts. - * You can uncomment them if you want to make sure. */ -#define HasMTRRSupport YES /* Enabled in kernel see kernel docs */ -#define HasMMXSupport YES /* Any i586 or above */ -#define HasKatmaiSupport YES /* PIII SSE instuctions */ -#define Has3DNowSupport NO /* AMD instructions */ - -/* This setting reduces compile time a little by omitting rarely used input - * devices. You can find the complete list in config/cf/xfree86.cf */ -#define XInputDrivers mouse void - -/* VIDEO DRIVERS */ -#define XF86CardDrivers vesa vga _XF86_CARD_DRIVER_ - -/* FONT SERVER AND LIBRARY SETTINGS */ -/* These setting should be set by default, but we are making sure. */ -#define BuildFontServer YES /* Need for GhostScript Print Server */ -#define SharedLibFont YES -#define CompressAllFonts YES -#define GzipFontCompression YES - -/* These setting ensure we use our libraries */ -#define HasFreetype2 YES -#define HasFontconfig YES -#define HasExpat YES -#define HasLibpng YES -#define HasZlib YES -#define HasNCurses YES - -/* The font path can be redefined in the XF86Config file */ -#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/75dpi/,\ -$(FONTDIR)/100dpi/,$(FONTDIR)/Type1,$(FONTDIR)/local,\ -$(FONTDIR)/TrueType,$(FONTDIR)/CID,$(FONTDIR)/Speedo - -/* INTERNATIONAL FONTS. Change to YES if you need any of them. These are - * the defaults. */ -#define BuildCyrillicFonts NO -#define BuildArabicFonts NO -#define BuildISO8859_6Fonts NO -#define BuildGreekFonts NO -#define BuildISO8859_7Fonts NO -#define BuildHebrewFonts NO -#define BuildISO8859_8Fonts NO -#define BuildKOI8_RFonts NO -#define BuildJapaneseFonts NO -#define BuildJISX0201Fonts NO -#define BuildKoreanFonts NO -#define BuildChineseFonts NO - -/* DOCUMENTATION SETTINGS */ -/* These setting are the defaults. */ -#define BuildLinuxDocHtml NO /* X Docs in Html format */ -#define BuildLinuxDocPS NO /* X Docs in PostScript format */ -#define BuildAllSpecsDocs NO /* Various docs */ -#define BuildHtmlManPages NO -/* Linux Distribution Information - Not essential that it is totally right.*/ -#define LinuxDistribution hvlinux - -/* Disabling IPv6 support, as it causes a problem with xdm. */ -#define BuildIPv6 NO - -/* GENERAL SETTINGS: You generally want to leave these alone when - * building X on an LFS system */ -#define GccWarningOptions -pipe -#define TermcapLibrary -lncurses -#define XprtServer YES /* Needed by realplayer */ -#define XnestServer YES -#define XAppLoadDir EtcX11Directory/app-defaults -#define VarLibDir /var/lib -#define XFree86Devel NO -#define FSUseSyslog YES -#define ThreadedX YES -#define HasPam NO -#define SystemManDirectory /usr/share/man -#define HasLibCrypt YES -#define InstallXinitConfig YES -#define InstallXdmConfig YES -#define ForceNormalLib YES -#define BuildSpecsDocs NO -EOF +# Many package are still trying to find X in /usr/X11R6. +# Until then, you can create a symbolic link to satisfy the /usr/X11R6 +# requirement so that you won't be inconvenienced with a package build +# failure due to this known issue. +#ln -scfT ${XORG_PREFIX} /usr/X11R6 + +# Packages in Xorg store their configuration files in $XORG_PREFIX/lib/X11 +# by default. This is strictly against FHS guidelines. Correct the +# installation /etc/X11 and create symlinks in the original location: +mkdir -p /etc/X11 +for file in ${XORG_PREFIX}/{lib/X11/xinit,share/X11/{app-defaults,twm}}; do + mv -v $file /etc/X11/ 2> /dev/null + ln -v -s /etc/X11/$(basename $file) $file +done -sed -i -e "s!_MACHINE_ARCHITECTURE_!${MACHINE_ARCHITECTURE}!g" config/cf/host.def -sed -i -e "s!_XF86_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" config/cf/host.def -sed -i 's:^.*asm.*$:# define PAGE_MASK (~(getpagesize() - 1)):' \ - ../${1}/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c -sed -i -e "s@^#include @/* & */@" \ - `grep -lr linux/config.h ../${1}` -echo "make World" -make World +exit 1 -echo "make install" -make install -echo "make install.man" -make install.man -ldconfig -ln -svfT /usr/X11R6/bin /usr/bin/X11 -ln -svfT /usr/X11R6/lib/X11 /usr/lib/X11 -ln -svfT /usr/X11R6/include/X11 /usr/include/X11 -cat > /etc/X11/XF86Config << "EOF" -# XF86Config + +cat > /etc/X11/xorg.conf << "EOF" +# xorg.conf # # ********************************************************************** # Files section. @@ -255,11 +146,11 @@ EndSection EOF # The ! character is the SED delimiter -sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/XF86Config -sed -i -e "s!_VIDEO_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" /etc/X11/XF86Config -sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/XF86Config -sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/XF86Config -sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/XF86Config +sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/xorg.conf +sed -i -e "s!_VIDEO_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" /etc/X11/xorg.conf +sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/xorg.conf +sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/xorg.conf +sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/xorg.conf cat > /etc/skel/.xinitrc << "EOF" # ~/.xinitrc @@ -362,17 +253,14 @@ chmod 755 /etc/skel/.xsession cp /etc/skel/.{xinitrc,Xdefaults,xsession} /root cp /etc/skel/.{xinitrc,Xdefaults,xsession} /home/${REGUSER} -var_add_path "PATH" /etc/profile "/usr/X11R6/bin" - -var_add_path "PKG_CONFIG_PATH" /etc/profile "/usr/X11R6/lib/pkgconfig" -var_export "PKG_CONFIG_PATH" /etc/profile +##var_add_path "PATH" /etc/profile "/usr/X11R6/bin" +#var_add_path "PKG_CONFIG_PATH" /etc/profile "/usr/X11R6/lib/pkgconfig" +#var_export "PKG_CONFIG_PATH" /etc/profile +#var_add_path "MANPATH" /etc/profile "/usr/X11R6/man" +#var_export "MANPATH" /etc/profile +#var_add_shadow "ENV_SUPATH" /etc/login.defs "/usr/X11R6/bin" +#string_add "/usr/X11R6/lib" /etc/ld.so.conf -var_add_path "MANPATH" /etc/profile "/usr/X11R6/man" -var_export "MANPATH" /etc/profile - -var_add_shadow "ENV_SUPATH" /etc/login.defs "/usr/X11R6/bin" - -string_add "/usr/X11R6/lib" /etc/ld.so.conf if [ "x${INST_TYPE}" = "xltsp-server" ]; then # Enable remote xdm login for LTSP clients @@ -382,16 +270,10 @@ if [ "x${INST_TYPE}" = "xltsp-server" ]; then chmod 444 /etc/X11/xdm/Xaccess fi -# When needed, XFree86 creates the directory /tmp/.ICE-unix if it does not -# exist. If this directory is not owned by root, XFree86 delays startup by a -# few seconds and also appends a warning to the logfile. This also affects -# startup of other applications. To improve performance, it is advisable to -# manually create the directory before XFree86 uses it. -# startup script. -#cat >> /etc/sysconfig/createfiles <> /etc/sysconfig/createfiles << "EOF" +/tmp/.ICE-unix dir 1777 root root +EOF exit $? - diff --git a/stage4/packages-update b/stage4/packages-update index 831f943..6067149 100755 --- a/stage4/packages-update +++ b/stage4/packages-update @@ -48,12 +48,24 @@ for module in ${XORG_MODULES_LIST}; do popd >> ${LFS_LOG_FILE} done -fpkg ${LIBXAU} ${XORG_URL}/lib -fpkg ${LIBXDMCP} ${XORG_URL}/lib -fpkg ${XBITMAPS} ${XORG_URL}/data -fpkg ${XCURSOR_THEMES} ${XORG_URL}/data -fpkg ${XKEYBOARD_CONFIG} http://xlibs.freedesktop.org/xkbdesc -fpkg ${LUIT} ${XORG_URL}/app -fpkg ${XORG_SERVER} ${XORG_URL}/xserver +fpkg ${LIBXAU} ${XORG_URL}/lib +fpkg ${LIBXDMCP} ${XORG_URL}/lib +fpkg_sf ${LESSTIF} +fpkg ${XBITMAPS} ${XORG_URL}/data +fpkg ${LIBPTHREAD_STUBS} http://xcb.freedesktop.org/dist +fpkg ${LIBDRM} http://dri.freedesktop.org/libdrm +fpkg ${MESALIB} ftp://ftp.freedesktop.org/pub/mesa/$(get_pkg_ver ${MESALIB}) +fpkg ${XCURSOR_THEMES} ${XORG_URL}/data +fpkg ${XKEYBOARD_CONFIG} http://xlibs.freedesktop.org/xkbdesc +fpkg ${LUIT} ${XORG_URL}/app +fpkg ${PIXMAN} "http://cairographics.org/releases" + +fpkg_gnome ${GLIB} +fpkg ${DBUS} "http://dbus.freedesktop.org/releases/dbus" +fpkg ${DBUS_GLIB} "http://dbus.freedesktop.org/releases/dbus-glib" +fpkg ${HAL} http://hal.freedesktop.org/releases +fpkg ${HAL_INFO} http://hal.freedesktop.org/releases + +fpkg ${XORG_SERVER} ${XORG_URL}/xserver exit $? diff --git a/stage4/stage4-install b/stage4/stage4-install index 0bffeb0..3443df7 100755 --- a/stage4/stage4-install +++ b/stage4/stage4-install @@ -28,18 +28,88 @@ export XORG_CONFIG="\ --mandir=${XORG_PREFIX}/share/man \ --localstatedir=/var" -MOD_NAME=$(get_pkg_name ${XORG_PROTO}) - LFS_PKG_DIR_ORIG=${LFS_PKG_DIR} -# build packages -for package in $(grep -v '^#' ${LFS_PKG_DIR}/${XORG_PROTO}.wget); do - LFS_PKG_DIR=${LFS_PKG_DIR_ORIG}/${MOD_NAME} - SUBMOD="$(echo ${package} | sed 's!\.tar\.bz2$!!')" - ##echo PKG=$SUBMOD - ipkg_ac ${SUBMOD} ${XORG_CONFIG} -done +# Install all submodules in a module +# +# Arg #1: module name and version +# Arg #2: optional configure arguments +install_xorg_modules() +{ + local MODULE=${1} + shift + local CONFIGURE_OPTS=${*} + + local MODULE_NAME=$(get_pkg_name ${MODULE}) + + local MY_XORG_CONFIG + + for package in $(grep -v '^#' ${LFS_PKG_DIR}/${MODULE}.wget); do + LFS_PKG_DIR=${LFS_PKG_DIR_ORIG}/${MODULE_NAME} + SUBMOD="$(echo ${package} | sed 's!\.tar\.bz2$!!')" + + # Special configure options for specific packages + case ${SUBMOD} in + libXfont-[0-9]* ) + MY_XORG_CONFIG="--disable-devel-docs" + ;; + libX11-[0-9]* ) + MY_XORG_CONFIG="--without-xcb" + ;; + xf86-video-s3-[0-9]* | xf86-video-xgi-[0-9]* ) + #for file in `grep -Rl "xf86Version.h" *`; do + # sed 's@xf86Version.h@xorgVersion.h@g' -i "$file" + #done + #;; + esac + + ipkg_ac ${SUBMOD} ${XORG_CONFIG} ${MY_XORG_CONFIG} ${CONFIGURE_OPTS} + done + + LFS_PKG_DIR=${LFS_PKG_DIR_ORIG} +} + +install_xorg_modules ${XORG_PROTO} +install_xorg_modules ${XORG_UTIL} +ipkg_ac ${LIBXAU} ${XORG_CONFIG} +ipkg_ac ${LIBXDMCP} ${XORG_CONFIG} +install_xorg_modules ${XORG_LIB} +ipkg_cust ${LESSTIF} cis-lesstif "\ + --sysconfdir=/etc/X11 \ + --disable-debug \ + --disable-build-tests \ + --enable-production \ + --with-xdnd \ + --x-includes=$XORG_PREFIX/include \ + --x-libraries=$XORG_PREFIX/lib" +ipkg_ac ${XBITMAPS} ${XORG_CONFIG} +ipkg_ac ${LIBPTHREAD_STUBS} +ipkg_ac ${LIBDRM} --enable-udev +ipkg_cust ${MESALIB} cis-mesalib --enable-motif +install_xorg_modules ${XORG_APP} +ipkg_ac ${XCURSOR_THEMES} ${XORG_CONFIG} +install_xorg_modules ${XORG_FONT} +rscr once "Configuring fonts" configure-fonts +ipkg_ac ${XKEYBOARD_CONFIG} ${XORG_CONFIG} --with-xkb-rules-symlink=xorg +ipkg_ac ${LUIT} ${XORG_CONFIG} +ipkg_ac ${PIXMAN} + +ipkg_cust ${DBUS} cis-dbus +ipkg_cust ${GLIB} cis-glib --with-pcre=system +ipkg_ac ${DBUS_GLIB} "--disable-tests --disable-dependency-tracking --libexecdir=/usr/lib/dbus-1.0/dbus-1" +ipkg_cust ${HAL} cis-hal +ipkg_ac ${HAL_INFO} + +ipkg_ac ${XORG_SERVER} ${XORG_CONFIG} "\ + --with-module-dir=${XORG_PREFIX}/lib/X11/modules \ + --with-xkb-output=/var/lib/xkb \ + --enable-install-setuid" + +install_xorg_modules ${XORG_DRIVER} --with-xorg-module-dir=${XORG_PREFIX}/lib/X11/modules + +rscr once "Configuring X.org" configure-xorg +exit 1 #source /etc/profile diff --git a/sysinfos b/sysinfos index 9b78a6f..3a93cc4 100644 --- a/sysinfos +++ b/sysinfos @@ -15,7 +15,7 @@ INST_TYPE="ltsp-server" REGUSER="hugo" # Destination path where to install new Linux-HV system -LFS="/mnt/hvlinux-x86_64" +LFS="" # Destination partition where to install new Linux-HV system LFS_PARTITION="/dev/sda8" @@ -30,7 +30,7 @@ SWAP_PARTITION="/dev/sda2" # architecture. Default is x86 32-bits architecture (i686). # x86 (i686) # x86_64 (AMD Athlon 64) -HVL_TARGET="x86_64" +HVL_TARGET="x86" # Used for setting '-march=xxx' option in CFLAGS and CPPFLAGS MACHINE_ARCHITECTURE="athlon-xp" -- 2.20.1