-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·129 lines (102 loc) · 4.05 KB
/
build.sh
File metadata and controls
executable file
·129 lines (102 loc) · 4.05 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
set -e
export DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SB_VENDOR_BINARIES_CO_ROOT=$DIR
export SB_VENDOR_BUILD_ROOT=$DIR
# Currently, we build both debug and release, which takes a lot longer,
# especially on xulrunner... TODO: make it optional to build debug
rm -rf build
mkdir build
case $OSTYPE in
# linux is easy, as all it requires right now is xulrunner, sqlite, and taglib
# we'll get to a point where this is unnecessary on linux altogether in the future
linux*)
export CXXFLAGS="-fpermissive"
export CFLAGS=$CXXFLAGS
export CCFLAGS=$CXXFLAGS
if [ ! -d "linux-$(uname -m)" ]; then
mkdir -p "linux-$(uname -m)"
mkdir -p "checkout/linux-$(uname -m)"
mkdir "build"
fi
echo -e "Building sqlite...\n"
cd sqlite
autoreconf --force --install
cd ..
make -C sqlite -f Makefile.songbird
strip --strip-all "linux-$(uname -m)/sqlite/release/bin/sqlite3"
strip --strip-debug "linux-$(uname -m)/sqlite/release/lib/libsqlite3.a"
echo -e "Building taglib...\n"
make -C taglib -f Makefile.songbird
strip --strip-debug "linux-$(uname -m)/taglib/release/lib/libtag.a"
echo -e "Building xulrunner 1.9.2...\n"
make -C xulrunner-1.9.2 -f Makefile.songbird xr-all
echo -e "Done! Provided there were no errors, you can \nfind your deps in the linux-$(uname -m) directory. Copy or link it into [nightingale build directory]/dependencies and you're ready to build!\n"
;;
darwin*)
# on OSX, we want 32 bit builds
arch_flags="-m32 -arch i386"
export CFLAGS="$arch_flags"
export CXXFLAGS="$arch_flags"
export CPPFLAGS="$arch_flags"
export LDFLAGS="$arch_flags"
export OBJCFLAGS="$arch_flags"
if [ ! -d "macosx-i686" ]; then
mkdir -p "macosx-i686/mozilla-1.9.2/release/scripts"
cp xulrunner-1.9.2/mozilla/toolkit/crashreporter/tools/symbolstore.py macosx-i686/mozilla-1.9.2/release/scripts
mkdir -p "checkout/macosx-i686"
if [ ! -d "build" ]; then
mkdir "build"
fi
fi
echo -e "Building gettext..."
make CC=gcc CXX=g++ -C gettext -f Makefile.songbird
echo -e "Building glib..."
make CC=gcc CXX=g++ -C glib -f Makefile.songbird
echo -e "Building libidl..."
make CC=gcc CXX=g++ -C libidl -f Makefile.songbird
echo -e "Building flac..."
cd flac
bash autogen.sh
cd ..
make CC=gcc CXX=g++ -C flac -f Makefile.songbird
echo -e "Building libjpeg-turbo..."
make CC=gcc CXX=g++ -C libjpeg-turbo -f Makefile.songbird
echo -e "Building libogg..."
make CC=gcc CXX=g++ -C libogg -f Makefile.songbird
echo -e "Building libtheora..."
make CC=gcc CXX=g++ -C libtheora -f Makefile.songbird
echo -e "Building libtool..."
make CC=gcc CXX=g++ -C libtool -f Makefile.songbird
echo -e "Building libvorbis..."
make CC=gcc CXX=g++ -C libvorbis -f Makefile.songbird
echo -e "Building sqlite..."
cd sqlite
autoreconf --force --install
cd ..
make CC=gcc CXX=g++ -C sqlite -f Makefile.songbird
echo -e "Building taglib..."
make CC=gcc CXX=g++ -C taglib -f Makefile.songbird
echo -e "Building xulrunner and crossing our fingers..."
make CC=gcc CXX=g++ -C xulrunner-1.9.2 -f Makefile.songbird xr-all
echo -e "Building gstreamer bits..."
make CC=gcc CXX=g++ -C gstreamer -f Makefile.songbird
echo -e "Building gst plugins...here's hoping these all build!"
make CC=gcc CXX=g++ -C gst-plugins-base -f Makefile.songbird
make CC=gcc CXX=g++ -C gst-plugins-good -f Makefile.songbird
make CC=gcc CXX=g++ -C gst-plugins-bad -f Makefile.songbird
make CC=gcc CXX=g++ -C gst-plugins-ugly -f Makefile.songbird
echo "Done!"
;;
msys*)
if [ ! -d "windows-i686-msvc8" ]; then
mkdir -p "windows-i686-msvc8"
mkdir -p "checkout/windows-i686-msvc8"
mkdir "build"
fi
make
;;
*)
echo "Lazy buildscript for your OS coming soon."
;;
esac