~ubuntu-branches/ubuntu/saucy/faust/saucy

« back to all changes in this revision

Viewing changes to tools/faust2appls/faust2paqt

  • Committer: Package Import Robot
  • Author(s): Mario Lang
  • Date: 2012-04-04 13:52:01 UTC
  • mfrom: (1.1.6) (3.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120404135201-hpsrk87x3hga94tc
Tags: 0.9.46-2
* Fix "ftbfs with GCC-4.7":
  - debian/patches/unistd: Include <unistd.h> where necessary.
    (Closes: #667163)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#                                                                   #
8
8
#####################################################################
9
9
 
 
10
OSCINC=""
 
11
QTDEFS=""
 
12
OSCLIB=""
 
13
 
10
14
 
11
15
#-------------------------------------------------------------------
12
16
# Analyze command arguments :
36
40
  
37
41
    if [ "$p" = -icc ]; then
38
42
        ignore=" "
 
43
    elif [ $p = "-osc" ]; then
 
44
                 OSCINC="INCLUDEPATH+=/usr/local/lib/faust/osclib"
 
45
                 QTDEFS="DEFINES += OSCCTRL"
 
46
                 OSCLIB="-L/usr/local/lib/faust/osclib -lOSCFaust -loscpack"
39
47
    elif [ ${p:0:1} = "-" ]; then
40
48
            OPTIONS="$OPTIONS $p"
41
49
        elif [[ -e "$p" ]]; then
65
73
        SRCDIR=$(dirname "$p")
66
74
 
67
75
    # creates a temporary dir 
68
 
    TDR=$(mktemp -d)
 
76
    TDR=$(mktemp -d faust.XXX)
69
77
        TMP="$TDR/${f%.dsp}"
70
78
    mkdir "$TMP"
71
79
 
75
83
    # compile c++ to binary
76
84
    (
77
85
            cd "$TMP"
78
 
        qmake -project "INCLUDEPATH+=/usr/local/lib/faust/" "LIBS+=-lportaudio" "HEADERS+=/usr/local/lib/faust/faustqt.h"
 
86
        qmake -project "INCLUDEPATH+=$CUR" "INCLUDEPATH+=/usr/local/lib/faust/" "$OSCINC" "LIBS+=-lportaudio $OSCLIB" "HEADERS+=/usr/local/lib/faust/gui/faustqt.h" "$QTDEFS"
79
87
            qmake $SPEC
80
88
        make
81
89
    ) > /dev/null
82
90
 
83
91
    rm -rf "$SRCDIR/${f%.dsp}$EXT"
84
 
    cp "$TMP/${f%.dsp}$EXT" "$SRCDIR/${f%.dsp}$EXT"
85
 
        rm -rf "$TDR"
 
92
    cp -r "$TMP/${f%.dsp}$EXT" "$SRCDIR/${f%.dsp}$EXT"
 
93
    rm -rf "$TDR"
86
94
 
87
95
    # collect binary file name for FaustGIDE
88
96
    BINARIES="$BINARIES$SRCDIR/${f%.dsp}$EXT;"