--- trunk/core/include/xorg.sminc 2009/05/02 14:32:32 1335 +++ trunk/include/xorg.sminc 2014/06/20 08:50:14 21408 @@ -1,4 +1,4 @@ -# $Header: /magellan-cvs/smage/include/xorg.sminc,v 1.18 2008/02/16 11:26:47 niro Exp $ +# $Id$ # xorg global smage2 functions # must: X11_dir (defaults to /usr in sminc) @@ -52,34 +52,6 @@ return 1 } -# 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 -} - # default vars X11_DIR="/usr" @@ -87,29 +59,54 @@ INHERITS="${INHERITS} xorg" # pkg setup -SRCFILE="${PNAME}-${PVER}.tar.bz2" -SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" +: ${HOMEPAGE="http://xorg.freedesktop.org"} +: ${SRCFILE="${PNAME}-${PVER}.tar.bz2"} +: ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} #XORG_MIRROR="http://ftp.x.org/pub" XORG_MIRROR="http://xorg.freedesktop.org/archive" +if [[ -n ${PCATEGORIE} ]] && [[ -z ${PCAT} ]] +then + PCAT="${PCATEGORIE}" +fi + +# get the right subdir +case ${PCAT} in + app-doc) URISUBDIR="doc" ;; + media-fonts) URISUBDIR="font" ;; + x11-apps) URISUBDIR="app" ;; + x11-base) URISUBDIR="xserver" ;; + x11-drivers) URISUBDIR="driver" ;; + x11-libs) + case ${PNAME} in + glamor-egl) URISUBDIR="driver" ;; + *) URISUBDIR="lib" ;; + esac + ;; + x11-misc) + case ${PNAME} in + xbitmaps|xkbdata) URISUBDIR="data" ;; + xkeyboard-config) URISUBDIR="data/xkeyboard-config" ;; + *) URISUBDIR="util" ;; + esac + ;; + x11-proto) URISUBDIR="proto" ;; + x11-themes) URISUBDIR="data" ;; + x11-wm) URISUBDIR="app" ;; +esac + SRC_URI=( - ${XORG_MIRROR}/individual/app/${SRCFILE} - ${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} + ${SRC_URI[*]} + ${XORG_MIRROR}/individual/${URISUBDIR}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) +UP2DATE="updatecmd_xorg ${PNAME}" + # add default deps DEPEND="${DEPEND} - >= sys-apps/man-1.6" + >= virtual/man" SDEPEND="${SDEPEND} >= dev-util/pkgconfig-0.20 @@ -137,6 +134,8 @@ if is_xorg_input_driver then DEPEND="${DEPEND} + >= x11-libs/libXi-1.7 + >= x11-libs/libXtst-1.1 >= x11-base/xorg-server-1" SDEPEND="${SDEPEND} @@ -162,9 +161,6 @@ xorg_src_prepare() { - # check for old xorg installations - is_old_xorg_installed - munpack ${SRCFILE} || die } @@ -212,6 +208,12 @@ mmake || die } +xorg_src_check() +{ + cd ${SRCDIR} + mmake -k check || die +} + xorg_src_install() { cd ${SRCDIR} @@ -224,17 +226,4 @@ fi } -xorg_preinstall() -{ - # 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 +export_inherits xorg src_prepare src_compile src_check src_install