~ubuntu-branches/ubuntu/maverick/luatex/maverick

« back to all changes in this revision

Viewing changes to build.sh

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-12-25 09:47:05 UTC
  • mfrom: (1.1.9 upstream) (4.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091225094705-y33rpflo8t4u9nag
Tags: 0.50.0-1
* new upstream release
* disable fix-hurd-ftbfs patch, included upstream
* disable upstram-fixes, included upstream
* disable ubuntu_libpoppler-0.11, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#      --parallel  : make -j 2 -l 3.0
10
10
#      --nostrip   : do not strip binary
11
11
#      --mingw     : crosscompile for mingw32 from i-386linux
 
12
#      --ppc       : crosscompile for ppc
12
13
      
13
14
 
14
15
# try to find gnu make; we may need it
28
29
ONLY_MAKE=FALSE
29
30
STRIP_LUATEX=TRUE
30
31
MINGWCROSS=FALSE
31
 
PPCCROSS=FALSE
 
32
MACCROSS=FALSE
32
33
JOBS_IF_PARALLEL=2
33
34
MAX_LOAD_IF_PARALLEL=3.0
34
35
 
35
 
while [ "$1" != "" ] ; do
36
 
  if [ "$1" = "--make" ] ;
37
 
  then ONLY_MAKE=TRUE ;
38
 
  elif [ "$1" = "--nostrip" ] ;
39
 
  then STRIP_LUATEX=FALSE ;
40
 
  elif [ "$1" = "--mingw" ] ;
41
 
  then MINGWCROSS=TRUE ;
42
 
  elif [ "$1" = "--ppc" ] ;
43
 
  then PPCCROSS=TRUE ;
44
 
  elif [ "$1" = "--parallel" ] ;
45
 
  then MAKE="$MAKE -j $JOBS_IF_PARALLEL -l $MAX_LOAD_IF_PARALLEL" ;
46
 
  fi ;
47
 
  shift ;
 
36
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
 
37
 
 
38
until [ -z "$1" ]; do
 
39
  case "$1" in
 
40
    --make     ) ONLY_MAKE=TRUE     ;;
 
41
    --nostrip  ) STRIP_LUATEX=FALSE ;;
 
42
    --mingw    ) MINGWCROSS=TRUE    ;;
 
43
    --parallel ) MAKE="$MAKE -j $JOBS_IF_PARALLEL -l $MAX_LOAD_IF_PARALLEL" ;;
 
44
    --arch=*   ) MACCROSS=TRUE; ARCH=`echo $1 | sed 's/--arch=\(.*\)/\1/' ` ;;
 
45
    *          ) echo "ERROR: invalid build.sh parameter: $1"; exit 1       ;;
 
46
  esac
 
47
  shift
48
48
done
 
49
 
49
50
#
50
51
STRIP=strip
51
52
LUATEXEXE=luatex
52
53
 
53
 
if [ `uname` = "Darwin" ] ; 
54
 
then
55
 
   export MACOSX_DEPLOYMENT_TARGET=10.4
56
 
fi;
 
54
case `uname` in
 
55
  MINGW32*    ) LUATEXEXE=luatex.exe ;;
 
56
esac
57
57
 
58
58
B=build
59
59
CONFHOST=
65
65
  LUATEXEXE=luatex.exe
66
66
  OLDPATH=$PATH
67
67
  PATH=/usr/mingw32/bin:$PATH
 
68
  CFLAGS="-mtune=pentiumpro -msse2 -g -O2 $CFLAGS"
 
69
  CXXFLAGS="-mtune=pentiumpro -msse2 -g -O2 $CXXFLAGS"
68
70
  CONFHOST="--host=mingw32 --build=i686-linux-gnu "
 
71
  export CFLAGS CXXFLAGS
69
72
fi
70
73
 
71
 
if [ "$PPCCROSS" = "TRUE" ]
 
74
if [ "$MACCROSS" = "TRUE" ]
72
75
then
73
 
  B=ppc
74
 
  CFLAGS="-arch ppc $CFLAGS"
75
 
  XCFLAGS="-arch ppc $XCFLAGS"
76
 
  CXXFLAGS="-arch ppc $CXXFLAGS"
77
 
  LDFLAGS="-arch ppc $LDFLAGS" 
 
76
  # make sure that architecture parameter is valid
 
77
  case $ARCH in
 
78
    i386 | x86_64 | ppc | ppc64 ) ;;
 
79
    * ) echo "ERROR: architecture $ARCH is not supported"; exit 1;;
 
80
  esac
 
81
  B=build-$ARCH
 
82
  CFLAGS="-arch $ARCH $CFLAGS"
 
83
  XCFLAGS="-arch $ARCH $XCFLAGS"
 
84
  CXXFLAGS="-arch $ARCH $CXXFLAGS"
 
85
  LDFLAGS="-arch $ARCH $LDFLAGS" 
78
86
  export CFLAGS CXXFLAGS LDFLAGS XCFLAGS  
79
87
fi
80
88
 
182
190
 
183
191
# show the results
184
192
ls -l "$B"/texk/web2c/$LUATEXEXE
185