blob: c164f231e53876848d42684c36c094ad261b61d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# $NetBSD: INSTALL,v 1.11 2004/04/30 19:44:21 tv Exp $
FONT_PROGS="@FONT_PROGS@"
X11BASE=@X11BASE@
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
X11_SITEDEF=${X11BASE}/lib/X11/config/site.def
SITEDEF=${PKG_PREFIX}/lib/X11/config/site.def
X11_SV4LIB=${X11BASE}/lib/X11/config/sv4Lib.tmpl
SV4LIB=${PKG_PREFIX}/lib/X11/config/sv4Lib.tmpl
SV4LIB_SUBST_SED="-e s/^ / /"
SITEDEF_SUBST_SED="-e s/\#endif.*VendorCF.*/\#include <host.def>\\
&/"
case ${STAGE} in
POST-INSTALL)
${ECHO_N} "Symlinking font programs..."
for prog in ${FONT_PROGS}; do
if [ -f ${X11BASE}/bin/$prog -a \
${PKG_PREFIX} != ${X11BASE} ]; then
${LN} -fs ${X11BASE}/bin/$prog \
${PKG_PREFIX}/bin/$prog
fi
done
${ECHO} "done."
;;
VIEW-INSTALL)
if [ ${PKG_PREFIX} = ${X11BASE} -o -s ${HOSTDEF} ]; then
${ECHO_N} "Updating ${HOSTDEF}..."
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
else
${ECHO_N} "Creating ${HOSTDEF}..."
if [ -f ${X11_HOSTDEF} ]; then
${CP} -f ${X11_HOSTDEF} ${HOSTDEF}.bak
else
${CP} -f /dev/null ${HOSTDEF}.bak
fi
fi
( ${ECHO} '#include <xpkgwedge.def>'; \
${GREP} -v xpkgwedge ${HOSTDEF}.bak; \
) > ${HOSTDEF}
${RM} -f ${HOSTDEF}.bak
${ECHO} "done."
case `uname`:${X11BASE} in
*:*openwin)
${ECHO_N} "Patching OpenWindows templates..."
${SED} "${SITEDEF_SUBST_SED}" ${X11_SITEDEF} > ${SITEDEF}
${SED} "${SV4LIB_SUBST_SED}" ${X11_SV4LIB} > ${SV4LIB}
${ECHO} "done."
;;
Interix:/usr/X11R6)
${ECHO_N} "Patching Interix templates..."
${SED} -e "1i\\
#include <host.def>
" -e "/CcCmd/d;/ProjectRoot/d" ${X11_SITEDEF} > ${SITEDEF}
${ECHO} "done."
;;
esac
;;
esac
|