Magellan Linux

Diff of /smage/trunk/include/xorg.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

smage/branches/alx-0_6_0/include/xorg.sminc revision 2428 by niro, Wed Jun 15 19:00:27 2011 UTC smage/trunk/include/xorg.sminc revision 5113 by niro, Tue Sep 24 09:01:24 2013 UTC
# Line 1  Line 1 
1  # $Header: /magellan-cvs/smage/include/xorg.sminc,v 1.18 2008/02/16 11:26:47 niro Exp $  # $Id$
2  # xorg global smage2 functions  # xorg global smage2 functions
3    
4  # must: X11_dir (defaults to /usr in sminc)  # must: X11_dir (defaults to /usr in sminc)
# Line 52  is_xorg_driver() Line 52  is_xorg_driver()
52   return 1   return 1
53  }  }
54    
 # check if old <=Xorg-6.9 is installed; aborts installation  
 is_old_xorg_installed()  
 {  
  local RED="\033[1;6m\033[31m"  
  local DEF="\033[0m"  
   
  if [ -e /usr/X11R6 ] && [[ $(readlink /usr/X11R6) != ../usr ]]  
  then  
  echo  
  echo -e ${RED}" !!! Remove all old <=xorg-6.9 installations first."${DEF}  
  echo -e ${RED}" !!! You also need to check all packages which are installed to /usr/X11R6"${DEF}  
  echo  
   
  # print a pkg list if magequery supports this  
  if [[ -n $(/sbin/magequery -h | grep -- -f) ]]  
  then  
  echo "Please check following packages:"  
  /sbin/magequery -f /usr/X11R6 | while read pkg  
  do  
  echo -e " ${RED}*${DEF} ${pkg}"  
  done  
  echo  
  fi  
   
  die "/usr/X11R6 directory exists ..."  
  fi  
 }  
   
55  # default vars  # default vars
56  X11_DIR="/usr"  X11_DIR="/usr"
57    
# Line 87  X11_DIR="/usr" Line 59  X11_DIR="/usr"
59  INHERITS="${INHERITS} xorg"  INHERITS="${INHERITS} xorg"
60    
61  # pkg setup  # pkg setup
62  SRCFILE="${PNAME}-${PVER}.tar.bz2"  : ${SRCFILE="${PNAME}-${PVER}.tar.bz2"}
63  SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"  : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"}
64    
65  #XORG_MIRROR="http://ftp.x.org/pub"  #XORG_MIRROR="http://ftp.x.org/pub"
66  XORG_MIRROR="http://xorg.freedesktop.org/archive"  XORG_MIRROR="http://xorg.freedesktop.org/archive"
67    
68    if [[ -n ${PCATEGORIE} ]] && [[ -z ${PCAT} ]]
69    then
70     PCAT="${PCATEGORIE}"
71    fi
72    
73  # get the right subdir  # get the right subdir
74  case ${PCATEGORIE} in  case ${PCAT} in
75   app-doc) URISUBDIR="doc" ;;   app-doc) URISUBDIR="doc" ;;
76   media-fonts) URISUBDIR="font" ;;   media-fonts) URISUBDIR="font" ;;
77   x11-apps) URISUBDIR="app" ;;   x11-apps) URISUBDIR="app" ;;
# Line 113  case ${PCATEGORIE} in Line 90  case ${PCATEGORIE} in
90  esac  esac
91    
92  SRC_URI=(  SRC_URI=(
93  # ${XORG_MIRROR}/individual/app/${SRCFILE}   ${SRC_URI[*]}
 # ${XORG_MIRROR}/individual/data/${SRCFILE}  
 # ${XORG_MIRROR}/individual/doc/${SRCFILE}  
 # ${XORG_MIRROR}/individual/driver/${SRCFILE}  
 # ${XORG_MIRROR}/individual/font/${SRCFILE}  
 # ${XORG_MIRROR}/individual/lib/${SRCFILE}  
 # ${XORG_MIRROR}/individual/proto/${SRCFILE}  
 # ${XORG_MIRROR}/individual/testdir/${SRCFILE}  
 # ${XORG_MIRROR}/individual/util/${SRCFILE}  
 # ${XORG_MIRROR}/individual/xserver/${SRCFILE}  
94   ${XORG_MIRROR}/individual/${URISUBDIR}/${SRCFILE}   ${XORG_MIRROR}/individual/${URISUBDIR}/${SRCFILE}
95   mirror://${PNAME}/${SRCFILE}   mirror://${PNAME}/${SRCFILE}
96  )  )
97    
98  # add default deps  # add default deps
99  #DEPEND="${DEPEND}  #DEPEND="${DEPEND}
100  # >= sys-apps/man-1.6"  # >= virtual/man"
101    
102  SDEPEND="${SDEPEND}  SDEPEND="${SDEPEND}
103   >= dev-util/pkgconfig-0.20   >= dev-util/pkgconfig-0.20
# Line 138  SDEPEND="${SDEPEND} Line 106  SDEPEND="${SDEPEND}
106  # font dependencies  # font dependencies
107  if is_xorg_font  if is_xorg_font
108  then  then
109   SDEPEND="${DEPEND}   DEPEND="${DEPEND}
110   >= x11-apps/mkfontscale-1   >= x11-apps/mkfontscale-1
111   >= x11-apps/mkfontdir-1   >= x11-apps/mkfontdir-1
112   >= media-fonts/font-alias-1"   >= media-fonts/font-alias-1"
113    
114   # encodings are run-time needed to rebuild the font.dirs files !!   # encodings are run-time needed to rebuild the font.dirs files !!
115   # so don't use SDEPEND but DEPEND here!   # so don't use SDEPEND but DEPEND here!
116   SDEPEND="${DEPEND}   DEPEND="${DEPEND}
117   >= media-fonts/encodings-1"   >= media-fonts/encodings-1"
118    
119   XORG_FONT_PKG=yes   XORG_FONT_PKG=yes
# Line 182  fi Line 150  fi
150    
151  xorg_src_prepare()  xorg_src_prepare()
152  {  {
  # check for old xorg installations  
  is_old_xorg_installed  
   
153   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
154  }  }
155    
# Line 232  xorg_src_compile() Line 197  xorg_src_compile()
197   mmake || die   mmake || die
198  }  }
199    
200    xorg_src_check()
201    {
202     cd ${SRCDIR}
203     mmake -k check || die
204    }
205    
206  xorg_src_install()  xorg_src_install()
207  {  {
208   cd ${SRCDIR}   cd ${SRCDIR}
# Line 244  xorg_src_install() Line 215  xorg_src_install()
215   fi   fi
216  }  }
217    
218  xorg_preinstall()  export_inherits xorg src_prepare src_compile src_check src_install
 {  
  # check for old xorg installations  
  is_old_xorg_installed  
   
 # run this in postinstall to cover --src-install builds  
 # ( the is now package-dir at this moment, cause its not already builded :)  
 # if [[ -n ${XORG_FONT_PKG} ]]  
 # then  
 # xorg_discover_font_dirs  
 # fi  
 }  
   
 export_inherits xorg src_prepare src_compile src_install preinstall  

Legend:
Removed from v.2428  
changed lines
  Added in v.5113