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" |
: ${HOMEPAGE="http://xorg.freedesktop.org"} |
63 |
SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
: ${SRCFILE="${PNAME}-${PVER}.tar.bz2"} |
64 |
|
: ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} |
65 |
|
|
66 |
#XORG_MIRROR="http://ftp.x.org/pub" |
#XORG_MIRROR="http://ftp.x.org/pub" |
67 |
XORG_MIRROR="http://xorg.freedesktop.org/archive" |
XORG_MIRROR="http://xorg.freedesktop.org/archive" |
68 |
|
|
69 |
|
if [[ -n ${PCATEGORIE} ]] && [[ -z ${PCAT} ]] |
70 |
|
then |
71 |
|
PCAT="${PCATEGORIE}" |
72 |
|
fi |
73 |
|
|
74 |
# get the right subdir |
# get the right subdir |
75 |
case ${PCATEGORIE} in |
case ${PCAT} in |
76 |
app-doc) URISUBDIR="doc" ;; |
app-doc) URISUBDIR="doc" ;; |
77 |
media-fonts) URISUBDIR="font" ;; |
media-fonts) URISUBDIR="font" ;; |
78 |
x11-apps) URISUBDIR="app" ;; |
x11-apps) URISUBDIR="app" ;; |
79 |
x11-base) URISUBDIR="xserver" ;; |
x11-base) URISUBDIR="xserver" ;; |
80 |
x11-drivers) URISUBDIR="driver" ;; |
x11-drivers) URISUBDIR="driver" ;; |
81 |
x11-libs) URISUBDIR="lib" ;; |
x11-libs) |
82 |
x11-misc) case ${PNAME} in |
case ${PNAME} in |
83 |
xbitmaps|xkbdata|xkeyboard-config) URISUBDIR="data" ;; |
glamor-egl) URISUBDIR="driver" ;; |
84 |
*) URISUBDIR="util" ;; |
*) URISUBDIR="lib" ;; |
85 |
esac |
esac |
86 |
|
;; |
87 |
|
x11-misc) |
88 |
|
case ${PNAME} in |
89 |
|
xbitmaps|xkbdata) URISUBDIR="data" ;; |
90 |
|
xkeyboard-config) URISUBDIR="data/xkeyboard-config" ;; |
91 |
|
*) URISUBDIR="util" ;; |
92 |
|
esac |
93 |
;; |
;; |
94 |
x11-proto) URISUBDIR="proto" ;; |
x11-proto) URISUBDIR="proto" ;; |
95 |
x11-themes) URISUBDIR="data" ;; |
x11-themes) URISUBDIR="data" ;; |
96 |
x11-wm) URISUBDIR="app" ;; |
x11-wm) URISUBDIR="app" ;; |
97 |
esac |
esac |
98 |
|
|
99 |
SRC_URI=( |
SRC_URI=( |
100 |
# ${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} |
|
101 |
${XORG_MIRROR}/individual/${URISUBDIR}/${SRCFILE} |
${XORG_MIRROR}/individual/${URISUBDIR}/${SRCFILE} |
102 |
mirror://${PNAME}/${SRCFILE} |
mirror://${PNAME}/${SRCFILE} |
103 |
) |
) |
104 |
|
|
105 |
# add default deps |
UP2DATE="updatecmd_xorg ${PNAME}" |
|
DEPEND="${DEPEND} |
|
|
>= sys-apps/man-1.6" |
|
106 |
|
|
107 |
|
# add default deps |
108 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
109 |
>= dev-util/pkgconfig-0.20 |
>= dev-util/pkgconfig-0.20 |
110 |
>= x11-misc/util-macros-1" |
>= x11-misc/util-macros-1" |
130 |
# default input driver dependencies |
# default input driver dependencies |
131 |
if is_xorg_input_driver |
if is_xorg_input_driver |
132 |
then |
then |
133 |
|
: ${DESCRIPTION="Xorg input driver for ${PNAME/xf86-input-/} devices."} |
134 |
|
|
135 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
136 |
|
>= x11-libs/libXi-1.7 |
137 |
|
>= x11-libs/libXtst-1.1 |
138 |
>= x11-base/xorg-server-1" |
>= x11-base/xorg-server-1" |
139 |
|
|
140 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
146 |
# default video driver dependencies |
# default video driver dependencies |
147 |
if is_xorg_video_driver |
if is_xorg_video_driver |
148 |
then |
then |
149 |
|
: ${DESCRIPTION="Xorg video driver for ${PNAME/xf86-video-/} devices."} |
150 |
|
|
151 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
152 |
>= x11-base/xorg-server-1" |
>= x11-base/xorg-server-1" |
153 |
|
|
162 |
|
|
163 |
xorg_src_prepare() |
xorg_src_prepare() |
164 |
{ |
{ |
|
# check for old xorg installations |
|
|
is_old_xorg_installed |
|
|
|
|
165 |
munpack ${SRCFILE} || die |
munpack ${SRCFILE} || die |
166 |
} |
} |
167 |
|
|
209 |
mmake || die |
mmake || die |
210 |
} |
} |
211 |
|
|
212 |
|
xorg_src_check() |
213 |
|
{ |
214 |
|
cd ${SRCDIR} |
215 |
|
mmake -k check || die |
216 |
|
} |
217 |
|
|
218 |
xorg_src_install() |
xorg_src_install() |
219 |
{ |
{ |
220 |
cd ${SRCDIR} |
cd ${SRCDIR} |
227 |
fi |
fi |
228 |
} |
} |
229 |
|
|
230 |
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 |
|