File: patch-for-solaris

package info (click to toggle)
skalibs 2.7.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,552 kB
  • sloc: ansic: 16,934; sh: 764; makefile: 143
file content (29 lines) | stat: -rwxr-xr-x 720 bytes parent folder | download
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
#!/usr/xpg4/bin/sh

patchit () {
  if head -n 1 $1 | grep -qF -- -e ; then
    echo '#!/usr/xpg4/bin/sh -e' > $1.tmp
  else
    echo '#!/usr/xpg4/bin/sh' > $1.tmp
  fi
  tail -n +2 $1 >> $1.tmp
  mv -f $1.tmp $1
  chmod 0755 $1
}

# Solaris doesn't understand POSIX.1-2008 either.
sed -e 's/XOPEN_SOURCE=700/XOPEN_SOURCE=600/' < configure > configure.tmp
mv -f configure.tmp configure

patchit ./configure
patchit ./tools/install.sh
patchit ./tools/gen-deps.sh
patchit ./tools/gen-types.sh
patchit ./tools/gen-types-internal.sh
patchit ./tools/gen-bits.sh
patchit ./tools/gen-bits-internal.sh

echo 'SHELL := /usr/xpg4/bin/sh' > Makefile.tmp
echo >> Makefile.tmp
cat Makefile >> Makefile.tmp
mv -f Makefile.tmp Makefile