/
PRE_BUILD
54 lines (43 loc) · 2.29 KB
/
PRE_BUILD
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
if module_installed qt4 ; then
lrm --upgrade qt4
fi &&
default_pre_build
# Seems their boost fix was incomplete. There are still a few modules like avogadro
# that still have trouble with boost_join.
sedit "193i pp.macros[\"BOOST_LEXICAL_CAST_INCLUDED\"];" src/tools/moc/main.cpp &&
# This lives in /usr/bin/
sedit "s:/bin/ls:/usr/bin/ls:g" src/corelib/global/global.pri src/3rdparty/webkit/Source/WebCore/loader/FTPDirectoryParser.h src/3rdparty/webkit/Source/$
# By ommitting the --prefix switch from the configure and performing this sedit we can remove
# the group of sedit to repoint moc, uic and rcc locations to /usr/bin.
sedit "s:/usr/local/Trolltech/:$MODULE_PREFIX/share/$MODULE/Trolltech/:g" configure &&
# Needed so it can find some of the source libs during make.
export LD_LIBRARY_PATH=$SOURCE_DIRECTORY/lib:${LD_LIBRARY_PATH} &&
if [[ -d /opt/lunar/qt ]] ; then
ld_remove /opt/lunar/qt/lib
fi &&
if [[ -d /usr/lib/$MODULE ]] ; then
ld_remove /usr/lib/$MODULE
fi &&
if [[ $LICENSE_TYPE == "y" ]] ; then
LICENSE_TYPE="-opensource"
else
LICENSE_TYPE="-commercial"
fi &&
sedit "s/-O2/$CFLAGS/" mkspecs/common/gcc-base.conf &&
sedit "s:-Wl,-rpath,::" mkspecs/common/gcc-base-unix.conf &&
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf &&
# Temporary. Make failes if no jit. Will revisit on next bump. Found by keios.
OPTS+=" -scripttools -no-declarative-debug -release -optimized-qmake" &&
./configure -confirm-license "${LICENSE_TYPE}" \
-bindir "${MODULE_PREFIX}/bin" \
-libdir "${MODULE_PREFIX}/lib/$MODULE" \
-docdir "${MODULE_PREFIX}/share/$MODULE" \
-headerdir "${MODULE_PREFIX}/include/$MODULE" \
-plugindir "${MODULE_PREFIX}/lib/$MODULE/plugins" \
-importdir "${MODULE_PREFIX}/share/doc/$MODULE" \
-datadir "${MODULE_PREFIX}/share/$MODULE" \
-translationdir "${MODULE_PREFIX}/share/$MODULE" \
-sysconfdir "/etc/xdg" \
-examplesdir "${MODULE_PREFIX}/share/doc/$MODULE" \
-demosdir "${MODULE_PREFIX}/share/doc/$MODULE" \
$OPTS