[Lunar-commits] CVS: moonbase/zbeta/xorg-dri BUILD, NONE, 1.1 CONFIGURE, NONE, 1.1 DEPENDS, NONE, 1.1 DETAILS, NONE, 1.1 POST_INSTALL, NONE, 1.1 PRE_BUILD, NONE, 1.1

Nick Hudson nhudson at lunar-linux.org
Mon Apr 26 02:33:57 GMT 2004


Update of /var/cvs/lunar/moonbase/zbeta/xorg-dri
In directory dbguin.lunar-linux.org:/tmp/cvs-serv16751/xorg-dri

Added Files:
	BUILD CONFIGURE DEPENDS DETAILS POST_INSTALL PRE_BUILD 
Log Message:

Adding a xorg-dri module to zbeta, this will fetch and build dri and drm code from cvs and build the selected drm/dri modules for the XOrg Xserver


--- NEW FILE: BUILD ---
(
   cp $CONFIG_CACHE/host.def.dri xc/xc/config/cf/host.def &&
   
   # This must happen or it will cause the module to break
   # claiming "Kernel only header included in userspace"
   cp -rL /usr/src/linux/include/linux/{autoconf.h,config.h} /usr/include/linux &&

   echo "Compiling DRI Modules for XOrg" &&
   cd $SOURCE_DIRECTORY/xc/xc            &&
   make World                            &&

   echo "Installing new DRI Libs and Modules" &&
   cp -rL exports/lib/modules/dri/*.so /usr/X11R6/lib/modules/dri &&
   cp -rL exports/lib/modules/extensions/lib{glx,GLcore,dri}.a /usr/X11R6/lib/modules/extensions &&
   cp -rL exports/lib/modules/linux/libdrm.a /usr/X11R6/lib/modules/linux &&

   cp -rL exports/lib/modules/drivers/*_drv.o /usr/X11R6/lib/modules/drivers &&
 
   cp -rL exports/lib/*{GL,Mesa}* /usr/X11R6/lib &&
   cd /usr/X11R6/lib &&

# ldconfig will bitch about how these are not symbolic links if they
# arn't removed
   rm libGL.so.1 libOSMesa.so.4 &&

   ldconfig &&
 
   echo "Building DRM"                   &&
   cd $SOURCE_DIRECTORY/drm/linux        &&
   make   				 &&
   mkdir -p /lib/modules/`uname -r`/kernel/drivers/ &&
   cd $SOURCE_DIRECTORY/drm/linux        &&
   cp -L *.ko /lib/modules/`uname -r`/kernel/drivers/ &&
   depmod -a

) > $C_FIFO 2>&1
   

--- NEW FILE: CONFIGURE ---
optimize $GCCVER
  CFLAGS=`echo $CFLAGS | sed s/-funroll-loops//`
  CFLAGS=`echo $CFLAGS | sed s/-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

}

initialize()  {

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

  ON_CARD_DRIVERS=""
  OFF_CARD_DRIVERS="ati tdfx i810 mga glint vga sis savage via matrox"
      CARD_DRIVERS="$ON_CARD_DRIVERS  $OFF_CARD_DRIVERS"

  ON_DRI=""
  OFF_DRI="mach64 r128 radeon r200 mga i810 gamma i830 sis tdfx ffb savage via matrox"
      DRI="$ON_DRI  $OFF_DRI"

}

generate_host_def()  {
  
  echo  "#define XFree86CustomVersion \"DRI trunk\""
  echo  "#define DefaultCCOptions      $CFLAGS"
  echo  "#define DefaultGcc2i386Opt    $CFLAGS"
  echo  "#define LibraryCDebugFlags    $CFLAGS"
  echo  "#define DefaultCDebugFlags    $CFLAGS"
  echo  "#define OptimizedCDebugFlags  $CFLAGS"
  echo  "#define MesaSrcDir            $SOURCE_DIRECTORY/Mesa"
  echo  "#define DRMSrcDir             $SOURCE_DIRECTORY/drm"
  echo  "#define BuildXFree86ConfigTools YES"
  echo  "#define NormalLibGlx          NO"
  echo  "#define BuildXF86DRI          YES"
  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 NormalLibExpat        YES"
  echo  "#define XF86AFB               NO"
  echo  "#define XnestServer           NO"
  echo  "#define XVirtualFramebufferServer NO"
  echo  "#define BuildServersOnly      YES" 
  echo  "#define BuildXvLibrary        YES"
  echo  "#define BuildXvMCLibrary      YES"
  echo  "#define BuildLibrariesForXServers NO"
  echo  "#define BuildLibrariesForConfigTools NO"
  echo  "#define BuildGLXLibrary       YES"
  echo  "#define BuildXDriInfo         YES"
  echo  "#define BuildXdmcpLib         YES"
  echo  "#define BuildXInputLib        NO"
  echo  "#define BuildXIE              NO"
  echo  "#define BuildPexExt           NO"
  echo  "#define XprtServer            NO"
  echo  "#define SharedLibFont         NO"
  echo  "#define XInputDrivers         mouse"
  echo  "#if DoLoadableServer"
  echo  "#undef XF1Bpp"
  echo  "#undef XF4Bpp"
  echo  "#define XF1Bpp                NO"
  echo  "#define XF4Bpp                NO"
  echo  "#endif"
  
  if  [  -z  "$XF86CardDrivers"  ];  then
    XF86CardDrivers="$ON_CARD_DRIVERS"
  fi
  
  XF86CardDrivers=`echo  $XF86CardDrivers  |  tr  '
' ' '`
  echo  "#define XF86CardDrivers $XF86CardDrivers"

  if  [  -z  "$DriDrivers"  ];  then
    DriDrivers="$ON_DRI"
  fi

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

}

save_host_def()  {
                                                                                
                                                                                
  TARGET1="$CONFIG_CACHE/host.def.dri"
                                                                                
  dialog  --backtitle  "$BACKTITLE"                        \
          --msgbox     "Saving Configuration to $TARGET1"  \
          6 40
                                                                                
  generate_host_def  >  "$TARGET1"
                                                                                
}

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"   \
                     "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.dri  ||
                        nano     /etc/lunar/local/host.def.dri  ;;
      XF86CardDrivers)  select_card_drivers          ;;
           DriDrivers)  select_dridrivers            ;;
    esac
  done
                                                                                
}
echo $CFLAGS

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





--- NEW FILE: DEPENDS ---
depends XOrg

--- NEW FILE: DETAILS ---
          MODULE=xorg-dri
         VERSION=dri-cvs
          SOURCE=$MODULE-$VERSION.tar.bz2
         SOURCE2=$MODULE-drm-$VERSION.tar.bz2
         SOURCE3=$MODULE-mesa-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE
   SOURCE_URL[0]=cvs://:pserver:anonymous@dri.freedesktop.org:/cvs/dri:xc
  SOURCE2_URL[0]=cvs://:pserver:anonymous@dri.freedesktop.org:/cvs/dri:drm
  SOURCE3_URL[0]=cvs://:pserver:anonymous@dri.freedesktop.org:/cvs/mesa:Mesa
        WEB_SITE=http://dri.freedesktop.org
         ENTERED=20040416
         UPDATED=20040423
           SHORT="Direct Rendering Infructure modules for the XOrg Xserver"
cat << EOF
Direct Rendering Infructure modules for the XOrg Xserver
EOF

--- NEW FILE: POST_INSTALL ---
echo "To make DRI work properly you must add the following to your"
echo "/etc/X11/xorg.conf file"
echo ""
echo "Section Module"
echo "Load  "glx""
echo "Load  "dri""
echo "EndSection"
echo ""
echo "Section "DRI""
echo "Mode 0666"
echo "EndSection"
echo ""
echo "For more information please visit http://dri.sf.net"

--- NEW FILE: PRE_BUILD ---
default_pre_build 
mk_source_dir  $SOURCE_DIRECTORY 
cd $SOURCE_DIRECTORY
unpack $SOURCE
unpack $SOURCE2
unpack $SOURCE3



More information about the Lunar-commits mailing list