blob: 546dfe3782cb6f1a085c4b07fc8ee01681ec5f38 (
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
|
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.1 2002/08/21 12:59:17 kent Exp $
# $PEACE: INSTALL,v 1.1 2002/08/21 02:02:27 kent Exp $
PKGNAME=$1
STAGE=$2
SED=/usr/bin/sed
LN=/bin/ln
MKDIR=/bin/mkdir
CROSSINC=${PKG_PREFIX}/cross/i386-netbsdpe/include
case ${STAGE} in
PRE-INSTALL)
;;
POST-INSTALL)
${SED} "s/^extern const/__declspec(dllimport) extern const/g" /usr/include/ctype.h > ${CROSSINC}/ctype.h
${SED} "s/^extern FILE/__declspec(dllimport) extern FILE/" /usr/include/stdio.h > ${CROSSINC}/stdio.h
${SED} "s/^extern size_t __mb_cur_max/__declspec(dllimport) extern size_t __mb_cur_max/" /usr/include/stdlib.h > ${CROSSINC}/stdlib.h
${SED} "s/^extern __aconst char/__declspec(dllimport) extern __aconst char/" /usr/include/time.h > ${CROSSINC}/time.h
${SED} "s/^extern/__declspec(dllimport) extern/g" /usr/include/unistd.h > ${CROSSINC}/unistd.h
${MKDIR} ${CROSSINC}/i386
${SED} "s/_BSD_WCHAR_T_[ ]*int/_BSD_WCHAR_T_ unsigned short/" /usr/include/i386/ansi.h > ${CROSSINC}/i386/ansi.h
cd ${CROSSINC} && ${LN} -sf i386 machine
${MKDIR} ${CROSSINC}/sys
${SED} "s/FSHIFT/SYS_PARAM_FSHIFT/g" /usr/include/sys/param.h > ${CROSSINC}/sys/param.h
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0
|