misc/libfreetype/builds/atari/gen-purec-patch.sh
author sheepluva
Wed, 05 Jun 2013 16:28:30 +0200
changeset 9137 d987230b85ed
parent 5172 88f2e05288ba
permissions -rw-r--r--
fixed all engine compilation hints and notes (that I could see)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
#!/bin/sh
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
TOP_DIR=.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
OBJ_DIR=.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
for x in "$@"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
do
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
  case x"$x" in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
  x--srcdir=* | x--topdir=* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
    TOP_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
  x--builddir=* | x--objdir=* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
    OBJ_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
  esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
done
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
mkdir -p ${OBJ_DIR}/builds/atari/tmp/orig
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
( cd ${TOP_DIR} && find . -name '*.[CHch]' -type f | fgrep -v builds/atari/tmp | cpio -o ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
( cd ${OBJ_DIR}/builds/atari/tmp/orig && cpio -idum )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
cp ${TOP_DIR}/builds/atari/deflinejoiner.awk ${OBJ_DIR}/builds/atari/tmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
pushd ${OBJ_DIR}/builds/atari/tmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  cp -pr orig purec
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  for f in `cd orig && find . -type f`
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  do
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
    echo filter $f
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
    env LANG=C awk -f deflinejoiner.awk < orig/$f > purec/$f
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  done
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  echo '#define FT2_BUILD_LIBRARY'  >  purec/include/ft2build.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  echo '#include "ATARI.H"'         >> purec/include/ft2build.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  env LANG=C awk -f deflinejoiner.awk < orig/include/ft2build.h >> purec/include/ft2build.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  env LANG=C diff -ur orig purec > ../purec.diff
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
popd
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
rm -rf ${OBJ_DIR}/builds/atari/tmp