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) |
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 |
|
|
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" ;; |
79 |
x11-drivers) URISUBDIR="driver" ;; |
x11-drivers) URISUBDIR="driver" ;; |
80 |
x11-libs) URISUBDIR="lib" ;; |
x11-libs) URISUBDIR="lib" ;; |
81 |
x11-misc) case ${PNAME} in |
x11-misc) case ${PNAME} in |
82 |
xbitmaps|xkbdata|xkeyboard-config) URISUBDIR="data" ;; |
xbitmaps|xkbdata) URISUBDIR="data" ;; |
83 |
|
xkeyboard-config) URISUBDIR="data/xkeyboard-config" ;; |
84 |
*) URISUBDIR="util" ;; |
*) URISUBDIR="util" ;; |
85 |
esac |
esac |
86 |
;; |
;; |
90 |
esac |
esac |
91 |
|
|
92 |
SRC_URI=( |
SRC_URI=( |
93 |
|
${SRC_URI[*]} |
94 |
# ${XORG_MIRROR}/individual/app/${SRCFILE} |
# ${XORG_MIRROR}/individual/app/${SRCFILE} |
95 |
# ${XORG_MIRROR}/individual/data/${SRCFILE} |
# ${XORG_MIRROR}/individual/data/${SRCFILE} |
96 |
# ${XORG_MIRROR}/individual/doc/${SRCFILE} |
# ${XORG_MIRROR}/individual/doc/${SRCFILE} |
107 |
|
|
108 |
# add default deps |
# add default deps |
109 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
110 |
>= sys-apps/man-1.6" |
>= virtual/man" |
111 |
|
|
112 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
113 |
>= dev-util/pkgconfig-0.20 |
>= dev-util/pkgconfig-0.20 |
210 |
mmake || die |
mmake || die |
211 |
} |
} |
212 |
|
|
213 |
|
xorg_src_check() |
214 |
|
{ |
215 |
|
cd ${SRCDIR} |
216 |
|
mmake -k check || die |
217 |
|
} |
218 |
|
|
219 |
xorg_src_install() |
xorg_src_install() |
220 |
{ |
{ |
221 |
cd ${SRCDIR} |
cd ${SRCDIR} |
230 |
|
|
231 |
xorg_preinstall() |
xorg_preinstall() |
232 |
{ |
{ |
|
# check for old xorg installations |
|
|
is_old_xorg_installed |
|
|
|
|
233 |
# run this in postinstall to cover --src-install builds |
# run this in postinstall to cover --src-install builds |
234 |
# ( the is now package-dir at this moment, cause its not already builded :) |
# ( the is now package-dir at this moment, cause its not already builded :) |
235 |
# if [[ -n ${XORG_FONT_PKG} ]] |
# if [[ -n ${XORG_FONT_PKG} ]] |
236 |
# then |
# then |
237 |
# xorg_discover_font_dirs |
# xorg_discover_font_dirs |
238 |
# fi |
# fi |
239 |
|
return 0 |
240 |
} |
} |
241 |
|
|
242 |
export_inherits xorg src_prepare src_compile src_install preinstall |
export_inherits xorg src_prepare src_compile src_check src_install preinstall |