Skip to content

Commit

Permalink
qt4: Fixing up the BUILD and PRE_BUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
stumbles committed Sep 23, 2014
1 parent 0d53bf5 commit 72537ea
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion qt4-apps/merkaartor/DEPENDS
Expand Up @@ -7,4 +7,4 @@ optional_depends gpsd "GPSDLIB=1" "GPSDLIB=0" "enable GPS readings"
optional_depends zbar "ZBAR=1" "ZBAR=0" "extract coordinates from barcodes"

optional_depends libproxy "LIBPROXY=1" "LIBPROXY=0" "automatical proxy detection"
optional_depends webkit "NOUSEWEBKIT=0" "NOUSEWEBKIT=1" "build webkit plugins"
optional_depends webkitgtk3 "NOUSEWEBKIT=0" "NOUSEWEBKIT=1" "build webkit plugins"
49 changes: 0 additions & 49 deletions qt4-apps/qt4/BUILD
@@ -1,53 +1,4 @@

# 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/WebCore/loader/FTPDirectoryParser.cpp &&

# 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 &&

default_make &&

# Still need the bin dir here for those modules like google-gadgets-for-linux that
Expand Down
49 changes: 49 additions & 0 deletions qt4-apps/qt4/PRE_BUILD
Expand Up @@ -3,3 +3,52 @@ if module_installed qt4 ; then
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

0 comments on commit 72537ea

Please sign in to comment.