[Lunar-commits] CVS: crater/x11/XOrg 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
Thu Mar 25 12:52:54 GMT 2004


Update of /var/cvs/lunar/crater/x11/XOrg
In directory dbguin.lunar-linux.org:/tmp/cvs-serv18320/XOrg

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

Adding a module for XOrg it doesnt compile yet but I am working on it.  Compiles by hand and works fine, just doesnt compile as a module yet 


--- 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 XFree86 takes a very long time."


( 

  echo  "#define  InstallXdmConfig    YES"  >>  config/cf/site.def
  echo  "#define  InstallXinitConfig  YES"  >>  config/cf/site.def

  export CFLAGS=`echo $CFLAGS | sed s/-funroll-loops//`
  export CFLAGS=`echo $CFLAGS | sed s/-ffast-math//`
  export CXXFLAGS=`echo $CXXFLAGS | sed s/-funroll-loops//`
  export CXXFLAGS=`echo $CXXFLAGS | sed s/-ffast-math//`
  export CPPFLAGS=`echo $CPPFLAGS | sed s/-funroll-loops//`
  export CPPFLAGS=`echo $CPPFLAGS | sed s/-ffast-math//`

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

  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
  CFLAGS=`echo $CFLAGS | sed s/-funroll-loops//`
  CFLAGS=`echo $CFLAGS | sed s/-ffast-math//`
echo $CFLAGS


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  Grahpics  $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 trident"
      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 
                    BuildCyrillicFonts BuildCIDFonts
                    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 BuildXF86DRI BuildXF86DRM BuildGLULibrary 
                    BuildGlxExt BuildOSMesaLib ThreadedX
                    InstallXinitConfig InstallXdmConfig"
   NO_MISC_OPTIONS="BuildServersOnly  XnestServer BuildXinerama
                    LinuxFBDevSupport XVirtualFramebufferServer"
      MISC_OPTIONS="$YES_MISC_OPTIONS  $NO_MISC_OPTIONS"

}


generate_host_def()  {

  echo  "#define DefaultCCOptions      $CFLAGS"
  echo  "#define DefaultGcc2i386Opt    $CFLAGS"
  echo  "#define LibraryCDebugFlags    $CFLAGS"
  echo  "#define DefaultCDebugFlags    $CFLAGS"
  echo  "#define OptimizedCDebugFlags  $CFLAGS"
  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"

  if module_installed tk; then
    echo "#define HasTcl    YES"
    echo "#define TclLibDir /usr/lib"
    echo "#define TclIncDir /usr/include"
    echo "#define TclLibName tcl"
    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

}
echo $CFLAGS
message "${MESSAGE_COLOR}**WARNING!!**" 

message "This is alpha software of the Xorg Implementation of the" \
        "older XFree86 X Server.  If you run into any problems, its" \
        "due to that it is under heavy development.  Expect frequent" \
        "updates of this module if you install it!!  Also please" \
        "report anything to the Bug List at http://bugs.lunar-linux.org" 

if    [  -f  $CONFIG_CACHE/host.def  ]
then  message  "Reconfiguration is optional."
fi

echo $CFLAGS   

if    query  "Configure host.def?"  y
then  configure_host_def
fi

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

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

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

--- NEW FILE: DETAILS ---
          MODULE=XOrg
         VERSION=4.3.902-cvs
          SOURCE=$MODULE-cvs20040325-CURRENT.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/xc
   SOURCE_URL[0]=http://www.lunar-linux.org/~nhudson/modules/$MODULE/$SOURCE
      SOURCE_VFY=md5:9810c522158f86fc5dcee68a104a0c1c
        WEB_SITE=http://xorg.freedesktop.org
         ENTERED=20040325
         UPDATED=20040325
           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 ---
rm  -f  $BOOST_LOCK
if    module_installed  NVIDIA;  then  lin  NVIDIA;  fi
if    module_installed  pango;  then  lin  -c  pango;  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 


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

--- NEW FILE: PRE_BUILD ---
default_pre_build                                        &&
mk_source_dir  $SOURCE_DIRECTORY                         &&
unpack         $SOURCE                                   

--- 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