[Lunar-commits] CVS: moonbase/zbeta/XOrg-test BUILD, NONE, 1.1 CONFIGURE, NONE, 1.1 CONFLICTS, NONE, 1.1 DEPENDS, NONE, 1.1 DETAILS, NONE, 1.1 POST_INSTALL, NONE, 1.1 POST_REMOVE, NONE, 1.1 PRE_BUILD, NONE, 1.1 xsession, NONE, 1.1

Nick Hudson nhudson at lunar-linux.org
Fri Sep 10 04:01:44 UTC 2004


Update of /var/cvs/lunar/moonbase/zbeta/XOrg-test
In directory espresso.lunar-linux.org:/tmp/cvs-serv17575/XOrg-test

Added Files:
	BUILD CONFIGURE CONFLICTS DEPENDS DETAILS POST_INSTALL 
	POST_REMOVE PRE_BUILD xsession 
Log Message:

I am going ahead and putting up a XOrg-test module in zbeta so that people can test and make changes.  Right now its still not compiling, but I am working on that


--- NEW FILE: BUILD ---
(

  install_drm()  {
    DRM_DIR="programs/Xserver/hw/xfree86/os-support/linux/drm/kernel"
    DRM_DEST="/lib/modules/$(uname -r)/kernel/drivers"
    mkdir -p $DRM_DEST
    cp $DRM_DIR/*.o $DRM_DEST 2>/dev/null
    depmod -a
    true
  }

  if [ -e /etc/X11/xinit/xinitrc ]; then
    cp /etc/X11/xinit/xinitrc /etc/X11/xinit/xinitrc.orig
    echo "Your master xinitrc file has been backed up as /etc/X11/xinit/xinitrc.orig"
  fi

  message "Building XOrg takes a very long time."

  bad_flags '-funroll-loops' '-ffast-math'

  # first copy the stored settings over:
  cp $CONFIG_CACHE/host.def config/cf/host.def &&

  # then add stuff on the fly:
  echo  "#define InstallXdmConfig YES"          >> config/cf/host.def &&
  echo  "#define InstallXinitConfig YES"        >> config/cf/host.def &&
  echo  "#define InstallXserverSetUID YES"      >> config/cf/host.def &&
  echo  "#define BuildServersOnly NO"           >> config/cf/host.def &&

  if module_installed Linux-PAM ; then
    echo "#define HasPam YES"                   >> config/cf/host.def &&
    echo "#define HasPamMisc YES"               >> config/cf/host.def 
  fi 

  echo  "#define DefaultCCOptions      $CFLAGS" >> config/cf/host.def &&
  echo  "#define LibraryCDebugFlags    $CFLAGS" >> config/cf/host.def &&
  echo  "#define DefaultCDebugFlags    $CFLAGS" >> config/cf/host.def &&
  echo  "#define OptimizedCDebugFlags  $CFLAGS" >> config/cf/host.def &&
  echo  "#define XVendorString \"Lunar-Linux.org (The X.Org Foundation $VERSION)\"" >> config/cf/host.def &&
  echo  "#define FontDir /usr/share/fonts"      >> config/cf/host.def &&

  if grep -q "Compilation aborted" /usr/include/linux/config.h ; then
    # This must happen or it will cause the module to break
    # claiming "Kernel only header included in userspace"
    devoke_installwatch &&
    cp -rL /usr/src/linux/include/linux/{autoconf.h,config.h} /usr/include/linux &&
    invoke_installwatch
  fi
  
  mkdir -p /usr/src/xc/programs     &&
  make World                            &&
  prepare_install                       &&
  cd $SOURCE_DIRECTORY                  &&
  make install                          &&
  make  install.man                     &&
  install_drm                           &&
  mkdir -p /usr/X11R6/include/GL        &&
  rm     -f  /usr/X11R6/lib/libz.a      &&
  rm     -f /usr/X11R6/include/zlib.h   &&
  rm     -f /usr/X11R6/include/zconf.h  &&
  rm     -f /usr/X11R6/lib/libz.a       &&

  if  [  !  -e                      /etc/skel/.xsession  ];  then
    cp  $SCRIPT_DIRECTORY/xsession  /etc/skel/.xsession
  fi  &&

  if  [  !  -e                    /usr/bin/X11  ];  then
    ln      -sf   /usr/X11R6/bin  /usr/bin/X11
  fi  &&

  if  [  !  -e          /usr/X11  ];  then
    ln      -sf  X11R6  /usr/X11
  fi  &&

  if  [  !  -e                         /usr/include/X11  ];  then
    ln      -sf  ../X11R6/include/X11  /usr/include/X11
  fi  &&

  if  [  !  -e                     /usr/lib/X11  ];  then
    ln      -sf  ../X11R6/lib/X11  /usr/lib/X11
  fi  &&

  if  [  !  -e                     /usr/lib/libMesaGLU.so ];  then
    ln      -sf  /usr/X11R6/lib/libGLU.so.1.3 /usr/lib/libMesaGLU.so
  fi  &&

  if  [  !  -e                /usr/X11R6/lib/libMesaGL.so ];  then
    ln      -sf  /usr/X11R6/lib/libGL.so.1.2 /usr/X11R6/lib/libMesaGL.so
  fi

) > $C_FIFO 2>&1

--- NEW FILE: CONFIGURE ---

optimize $GCCVER
bad_flags '-funroll-loops' '-ffast-math'

build_checklist()  {

  STATUS=$1
  LABEL=$2
  shift  2

  for  ITEM  in  $@;  do
    echo  $ITEM  $LABEL  $STATUS
  done

}


select_card_drivers()  {

  TITLE="Graphics Card Driver Selection Menu"
  HELP="Key:  [X] = on, [ ] = off"

  CHECKLIST="`build_checklist ON   Graphics   $ON_CARD_DRIVERS`
             `build_checklist OFF  Graphics  $OFF_CARD_DRIVERS`"

  if  XF86CardDrivers=`dialog  --backtitle  "$BACKTITLE"  \
                               --title      "$TITLE"      \
                               --stdout                   \
                               --separate-output          \
                               --checklist  "$HELP"       \
                               18 55 10                   \
                               $CHECKLIST`
  then
     ON_CARD_DRIVERS=$XF86CardDrivers
    OFF_CARD_DRIVERS=$CARD_DRIVERS

    for  ITEM  in  $ON_CARD_DRIVERS;  do
      OFF_CARD_DRIVERS=`echo  $OFF_CARD_DRIVERS  |  sed  s/$ITEM//`
    done
  fi

}


select_dridrivers()  {

  TITLE="DRI Driver Selection Menu"
  HELP="Not all XOrg supported graphics cards have DRI.
Key:  [X] = on, [ ] = off"

    CHECKLIST="`build_checklist  ON   DRI   $ON_DRI`
               `build_checklist  OFF  DRI  $OFF_DRI`"

  if  DriDrivers=`dialog  --backtitle  "$BACKTITLE"  \
                          --title      "$TITLE"      \
                          --stdout                   \
                          --separate-output          \
                          --checklist  "$HELP"       \
                          18 55 10                   \
                          $CHECKLIST`
  then
     ON_DRI=$DriDrivers
    OFF_DRI=$DRI

    for  ITEM  in  $ON_DRI;  do
      OFF_DRI=`echo  $OFF_DRI  |  sed  s/$ITEM//`
    done
  fi

}


select_input_drivers()  {

  TITLE="Input Driver Selection Menu"
  HELP="Key:  [X] = on, [ ] = off"

  CHECKLIST="`build_checklist  ON   Input   $ON_INPUT_DRIVERS`
             `build_checklist  OFF  Input  $OFF_INPUT_DRIVERS`"

  if  XInputDrivers=`dialog  --backtitle  "$BACKTITLE"  \
                             --title      "$TITLE"      \
                             --stdout                   \
                             --separate-output          \
                             --checklist  "$HELP"       \
                             18 55 10                   \
                             $CHECKLIST`
  then
     ON_INPUT_DRIVERS=$XInputDrivers
    OFF_INPUT_DRIVERS=$INPUT_DRIVERS

    for  ITEM  in  $ON_INPUT_DRIVERS;  do
      OFF_INPUT_DRIVERS=`echo  $OFF_INPUT_DRIVERS  |  sed  s/$ITEM//`
    done
  fi

}


initialize()  {

  BACKTITLE="Lunar-Linux XOrg host.def Configuration Menu"

   ON_CARD_DRIVERS="vga vesa v4l"
  OFF_CARD_DRIVERS="mga glint nv tga s3virge sis rendition neomagic i740
                    tdfx savage cirrus vmware tseng trident chips apm
                    GlideDriver fbdev i128 ati i810 ark cyrix 
                    siliconmotion AgpGartDrivers DevelDrivers 
                    XF86OSCardDrivers"
      CARD_DRIVERS="$ON_CARD_DRIVERS  $OFF_CARD_DRIVERS"


   ON_DRI=""
  OFF_DRI="gamma TdfxDriDriver mga i810 i830 r128 radeon sis r200 mach64 s3v"
      DRI="$ON_DRI  $OFF_DRI"


   ON_INPUT_DRIVERS="mouse keyboard"
  OFF_INPUT_DRIVERS="acecad calcomp citron digitaledge dmc dynapro elographics
                     fpit hyperpen jamstudio magictouch magellan microtouch
                     mutouch palmax penmount summa tek4957 spaceorb wacom void"
      INPUT_DRIVERS="$ON_INPUT_DRIVERS  $OFF_INPUT_DRIVERS"


  YES_FONT_OPTIONS="BuildFonts MakeLocalFontDir Build75DpiFonts Build100DpiFonts
                    BuildType1Fonts BuildTrueTypeFonts BuildSpeedoFonts
                    GzipFontCompression CompressAllFonts"
   NO_FONT_OPTIONS="BuildCIDFonts BuildCyrillicFonts UseKoi8RForCyrillic
                    BuildLatin2Fonts BuildArabicFonts BuildThaiFonts 
                    BuildGreekFonts BuildHebrewFonts BuildJapaneseFonts
                    BuildKoreanFonts BuildBethMarduthoFonts BuildEthiopicFonts
                    BuildChineseFonts BuildISO8859_2Fonts BuildISO8850_3Fonts
                    BuildISO8859_4Fonts BuildISO8859_9Fonts BuildISO8859_10Fonts
                    BuildISO8859_13Fonts BuildISO8859_14Fonts
                    BuildISO8859_15Fonts BuildISO8859_16Fonts
                    BuildFontServer InstallFSConfig"
      FONT_OPTIONS="$YES_FONT_OPTIONS  $NO_FONT_OPTIONS"

  YES_MISC_OPTIONS="HasShm XnestServer BuildGLULibrary 
                    BuildGlxExt BuildOSMesaLib ThreadedX
                    InstallXinitConfig InstallXdmConfig"
   NO_MISC_OPTIONS="BuildServersOnly BuidlXF86DRM BuildXF86DRI 
                    BuildXinerama LinuxFBDevSupport XVirtualFramebufferServer"
      MISC_OPTIONS="$YES_MISC_OPTIONS  $NO_MISC_OPTIONS"

}


generate_host_def()  {

  echo  "#define HasZlib YES"
  echo  "#define HasFreetype2 YES"
  echo  "#define ForceNormalLib  YES"
  echo  "#define HasExpat  YES"
  echo  "#define UseExpat  YES"
  echo  "#define HasLibpng YES"
  echo  "#define HasLibxml2 YES"
  echo  "#define InstallFontconfigLibrary NO"
  echo  "#define UseFontconfig YES"
  echo  "#define HasFontconfig YES"
  echo  "#define SharedLibXft YES"
  echo  "#define PreferXdmcpIPv6 YES"
  echo  "#define ProPoliceSupport YES"
  

  if module_installed tcl; then
    echo "#define HasTcl    YES"
    echo "#define TclLibDir /usr/lib"
    echo "#define TclIncDir /usr/include"
    echo "#define TclLibName tcl"
  fi

  if  [  -z  "$XF86CardDrivers"  ];  then
    XF86CardDrivers="$ON_CARD_DRIVERS"
  fi

  XF86CardDrivers=`echo  $XF86CardDrivers  |  tr  '
' ' '`
  echo  "#define XF86CardDrivers $XF86CardDrivers"


  if  [  -z  "$DriDrivers"  ];  then
    echo  "#define DriDrivers /**/"
  else
    DriDrivers=`echo  $DriDrivers  |  tr  '
' ' '`
    echo  "#define DriDrivers $DriDrivers"
  fi


  if  [  -z  "$XInputDrivers"  ];  then
    echo  "#define XInputDrivers mouse"
  else
    XInputDrivers=`echo  $XInputDrivers  |  tr  '
' ' '`
    echo  "#define XInputDrivers $XInputDrivers"
  fi


  for  ITEM  in   $YES_FONT_OPTIONS;  do
    echo  "#define $ITEM  YES"
  done

  for  ITEM  in  $NO_FONT_OPTIONS;  do
    echo  "#define $ITEM  NO"
  done

  for  ITEM  in   $YES_MISC_OPTIONS;  do
    echo  "#define $ITEM  YES"
  done

  for  ITEM  in  $NO_MISC_OPTIONS;  do
    echo  "#define $ITEM  NO"
  done

}


save_host_def()  {


  TARGET1="$CONFIG_CACHE/host.def"

  dialog  --backtitle  "$BACKTITLE"                        \
          --msgbox     "Saving Configuration to $TARGET1"  \
          6 40

  generate_host_def  >  "$TARGET1"

}


select_font_options() {

  TITLE="Select Font Options"
  CHECKLIST="`build_checklist  ON   Option  $YES_FONT_OPTIONS`
             `build_checklist  OFF  Option   $NO_FONT_OPTIONS`"
  HELP="Key:  [X] = on, [ ] = off"

  if  ON_FONT_OPTIONS=`dialog  --backtitle  "$BACKTITLE"  \
                               --title      "$TITLE"      \
                               --stdout                   \
                               --separate-output          \
                               --checklist  "$HELP"       \
                               18 55 10                   \
                              $CHECKLIST`
  then
    YES_FONT_OPTIONS=$ON_FONT_OPTIONS
     NO_FONT_OPTIONS=$FONT_OPTIONS

    for  ITEM  in  $YES_FONT_OPTIONS;  do
      NO_FONT_OPTIONS=`echo  $NO_FONT_OPTIONS  |  sed  s/$ITEM//`
    done
  fi

}  


select_misc_options() {

  TITLE="Select Misc Options"
  CHECKLIST="`build_checklist  ON   Option  $YES_MISC_OPTIONS`
             `build_checklist  OFF  Option   $NO_MISC_OPTIONS`"
  HELP="Key:  [X] = on, [ ] = off"

  if  ON_MISC_OPTIONS=`dialog  --backtitle  "$BACKTITLE"  \
                               --title      "$TITLE"      \
                               --stdout                   \
                               --separate-output          \
                               --checklist  "$HELP"       \
                               18 55 10                   \
                               $CHECKLIST`
  then
    YES_MISC_OPTIONS=$ON_MISC_OPTIONS
     NO_MISC_OPTIONS=$MISC_OPTIONS

    for  ITEM  in  $YES_MISC_OPTIONS;  do
      NO_MISC_OPTIONS=`echo  $NO_MISC_OPTIONS  |  sed  s/$ITEM//`
    done
  fi

}


configure_host_def()  {

  initialize

  while  

    COMMAND=`dialog  --backtitle  "$BACKTITLE"                        \
                     --stdout                                         \
                     --title  "Main Menu"                             \
                     --default-item  $COMMAND                         \
                     --nocancel                                       \
                     --menu                                           \
                     ""                                               \
                     18 55 10                                         \
                     "XF86CardDrivers"  "Select Video Card Drivers"   \
                     "DriDrivers"       "Select Direct DRI Drivers"   \
                     "XInputDrivers"    "Select Input Drivers"        \
                     "Fonts"            "Select Font Options"         \
                     "Misc"             "Set other Options"           \
                     "Save"             "Save current configuration"  \
                     "Edit"             "Edit host.def"               \
                     "Exit"             "Done here.  Start building"`
  do

    case  $COMMAND  in
                 Exit)  break                        ;;
                 Save)  save_host_def                ;;
                 Edit)  [  -n   "$EDITOR"  ]         &&
                        $EDITOR  /etc/lunar/local/host.def  ||
                        nano     /etc/lunar/local/host.def  ;;
      XF86CardDrivers)  select_card_drivers          ;;
           DriDrivers)  select_dridrivers            ;;
        XInputDrivers)  select_input_drivers         ;;
                Fonts)  select_font_options          ;;
                 Misc)  select_misc_options          ;;
    esac
  done

}

if [ ! -f $CONFIG_CACHE/host.def ] ; then
  configure_host_def
else
  message "Reconfiguration is optional."
  if query "Configure host.def?" n ; then
    configure_host_def
  fi
fi


--- NEW FILE: CONFLICTS ---
conflicts xfree86 &&
conflicts xfree86-beta

--- NEW FILE: DEPENDS ---
depends  perl    &&
depends  libpng  &&
depends  fontconfig &&

optional_depends "Linux-PAM" "" "" "for Linux-PAM Support" &&
optional_depends "tcl" "" "" "for tcl support" 

--- NEW FILE: DETAILS ---
          MODULE=XOrg-test
         VERSION=6.8.0
          SOURCE=X11R${VERSION}-src1.tar.gz
         SOURCE2=X11R${VERSION}-src2.tar.gz
         SOURCE3=X11R${VERSION}-src3.tar.gz
         SOURCE4=X11R${VERSION}-src4.tar.gz
         SOURCE5=X11R${VERSION}-src5.tar.gz
         SOURCE6=X11R${VERSION}-src6.tar.gz
         SOURCE7=X11R${VERSION}-src7.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/xc
      SOURCE_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE
     SOURCE2_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE2
     SOURCE3_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE3
     SOURCE4_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE4
     SOURCE5_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE5
     SOURCE6_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE6
     SOURCE7_URL=http://freedesktop.org/~xorg/X11R${VERSION}/src/$SOURCE7
#      SOURCE_VFY=sha1:
#     SOURCE2_VFY=sha1:
#     SOURCE3_VFY=sha1:
#     SOURCE4_VFY=sha1:
#     SOURCE5_VFY=sha1:
#     SOURCE6_VFY=sha1:
#     SOURCE7_VFY=sha1:
        WEB_SITE=http://xorg.freedesktop.org
         ENTERED=20040325
         UPDATED=20040910
           SHORT="XOrg is the Open Source Public Implementation of X11"
cat << EOF
What is XOrg?
The XOrg Foundation, (a.k.a. X.org) has changed to an Open Source model 
to maintain the official Public Implementation of X11.
EOF

--- NEW FILE: POST_INSTALL ---
if    module_installed  NVIDIA;  then  lin  NVIDIA;  fi
if    module_installed  fontconfig; then lin -c fontconfig; fi

if ! grep -q '. /etc/profile' /etc/X11/xdm/Xsession; then
  sedit 2s:#:.\ /etc/profile: /etc/X11/xdm/Xsession
fi

# run xfs only on unix socket:
if [ -f /etc/X11/fs/config ] ; then
  if ! grep -q "no-listen = tcp" /etc/X11/fs/config ; then
    cat >> /etc/X11/fs/config <<EOF

# more secure: do not listen on tcp ports
no-listen = tcp

EOF
  fi
fi

if   !   [  -d  /usr/lib/pkgconfig  ]
then  mkdir -p /usr/lib/pkgconfig
fi 

ln -sf /usr/X11R6/lib/pkgconfig/xft.pc /usr/lib/pkgconfig        &&
ln -sf /usr/X11R6/lib/pkgconfig/fontconfig.pc /usr/lib/pkgconfig &&

message "Running fc-cache please be patient" &&
/usr/X11R6/bin/fc-cache -f 

message "Somethings are diffrent than XFree86, xf86config=xorgconfig" 
message "xf86cfg=xorgcfg and /etc/X11/XF86Config=/etc/X11/xorg.conf"

--- NEW FILE: POST_REMOVE ---
lrm xserver

--- NEW FILE: PRE_BUILD ---
validate_source_dir $SOURCE_DIRECTORY   &&
mk_source_dir       $SOURCE_DIRECTORY   &&
unpack              $SOURCE             
unpack              $SOURCE2            &&
unpack              $SOURCE3            &&
unpack              $SOURCE4            &&
unpack              $SOURCE5            &&
unpack              $SOURCE6            &&
unpack              $SOURCE7            

--- NEW FILE: xsession ---
#!/bin/sh

if    [  -e /usr/bin/xscreensaver  ];  then  
                     xscreensaver -no-splash &
fi

if    [  -x /usr/bin/enlightenment  ]
then  exec           enlightenment

elif  [  -x /opt/lunar/kde/3/bin/startkde  ]
then  exec  /opt/lunar/kde/3/bin/startkde

elif  [  -x /opt/lunar/kde/2/bin/startkde  ]
then  exec  /opt/lunar/kde/2/bin/startkde

elif  [  -x /usr/bin/wmaker  ]
then  [  -d ~/GNUstep        ]  ||
                     wmaker.inst
      exec           wmaker

elif  [  -x /usr/bin/icewm  ]
then  exec           icewm

elif  [  -x /usr/bin/blackbox  ]
then  exec           blackbox

elif  [  -x /usr/bin/fvwm2  ]
then  exec           fvwm2

elif  [  -x /usr/bin/gnome-session ]
then  exec           gnome-session 

fi



More information about the Lunar-commits mailing list