[Lunar-commits] CVS: crater/x11/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
Fri Apr 16 04:37:00 GMT 2004


Update of /var/cvs/lunar/crater/x11/xorg-dri
In directory dbguin.lunar-linux.org:/tmp/cvs-serv20565/xorg-dri

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

Adding my very bad hack of a module to crater for now.  Still needs some work like detection of what version kernel is running and some cleanups.  Right now this doesnt compile, so dont try to compile it unless you want to fix things :).  Right now I am getting the following weird ass error when trying to build it:

/usr/include/linux/err_kernel_only.h:1:2: #error Kernel only header included in userspace

If anyone can tell me wtf this means and how to fix it I will buy you a case of beer.


--- NEW FILE: BUILD ---
(
   cp $CONFIG_CACHE/host.def.dri config/cf/host.def &&
   
   echo "Compiling DRI Modules for XOrg" &&
   cd $SOURCE_DIRECTORY/xc/xc            &&
   make World                            &&

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

   cp -r exports/lib/modules/drivers/*_drv.o /usr/X11R6/lib/modules/drivers &&
 
   cp -r exports/lib/*{GL,Mesa}* /usr/X11R6/lib &&
   ldconfig &&
 
   echo "Building DRM"                   &&
   cd $SOURCE_DIRECTORY/drm/linux        &&
   make -f Makefile.linux DRM_MODULES="$DriDrivers" &&

   #This needs to be fixed later, need to add support for what kernel 
   #version, and where to install the kernel modules to in 
   #/lib/modules/$KERNEL

) > $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"
      CARD_DRIVERS="$ON_CARD_DRIVERS  $OFF_CARD_DRIVERS"

  ON_DRI=""
  OFF_DRI="mach64 r128 radeon r200 mga i810 gamma i830 sis tdfx ffb savage"
      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/dri:Mesa
        WEB_SITE=http://dri.freedesktop.org
         ENTERED=20040416
         UPDATED=20040416
           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