source: scripts/untested/blfs-scripts/blfs-qt.sh@ 61c0e64

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 61c0e64 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 3.7 KB
Line 
1#!/bin/sh
2
3### qt ###
4
5cd ${SRC}
6LOG=qt-blfs.log
7
8SELF=`basename ${0}`
9set_buildenv
10set_libdirname
11setup_multiarch
12
13if [ "Y" = "${QT_INSTALL_SELF_CONTAINED}" ]; then
14 # for now, install to /opt
15 qtprefix="/opt/qt-${QT_VER}"
16 qtheaderdir="${qtprefix}/include"
17 extra_conf="${extra_conf} -libdir ${qtprefix}/${libdirname}"
18 # TODO: probably only want to do this if BIARCH, but hey
19 # plugins should probably go under libdir
20 # This stops the plugins from each arch getting clobbering
21 extra_conf="${extra_conf} -plugindir ${qtprefix}/${libdirname}/plugins"
22 headerdir=
23else
24 qtprefix="/usr"
25 qtheaderdir="${qtprefix}/include/qt"
26 extra_conf="${extra_conf} -docdir ${qtprefix}/share/doc/qt"
27 extra_conf="${extra_conf} -headerdir ${qtprefix}/include/qt"
28 extra_conf="${extra_conf} -libdir ${qtprefix}/${libdirname}"
29 extra_conf="${extra_conf} -plugindir ${qtprefix}/${libdirname}/qt/plugins"
30 extra_conf="${extra_conf} -datadir ${qtprefix}/share/qt"
31 extra_conf="${extra_conf} -translationdir ${qtprefix}/share/qt/translations"
32 extra_conf="${extra_conf} -sysconfdir /etc/qt"
33fi
34
35unpack_tarball qt-${QT_VER}
36cd ${PKGDIR}
37
38# Here we have to handle lib / lib64 , and also handle multilib compilers
39if [ "Y" = "${BIARCH}" ]; then
40 platform="linux-g++"
41 if [ "${libdirname}" = "lib64" ]; then platform="linux-g++-64" ; fi
42fi
43
44sed -i "s@\(gcc\|g++\)@& ${ARCH_CFLAGS} ${TGT_CFLAGS}@g" \
45 mkspecs/${platform}/qmake.conf
46
47extra_conf="${extra_conf} -platform ${platform}"
48
49max_log_init qt ${QT_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
50echo "yes" | ./configure \
51 -prefix ${qtprefix} ${extra_conf} \
52 -no-exceptions -thread -plugin-imgfmt-png \
53 -system-libpng -system-libmng -system-zlib -system-libjpeg \
54 -system-nas-sound -qt-gif \
55 >> ${LOGFILE} 2>&1 &&
56echo " o Configure OK" &&
57
58min_log_init ${BUILDLOGS} &&
59make \
60 >> ${LOGFILE} 2>&1 &&
61echo " o Build OK" &&
62
63if [ "Y" = "${MULTIARCH}" ]; then
64 # Preserve any existing configurations for the other
65 # qt platform during install
66 case ${platform} in
67 linux-g++ )
68 if [ -d ${qtprefix}/mkspecs/linux-g++-64 ];then
69 mv ${qtprefix}/mkspecs/linux-g++-64 \
70 ${qtprefix}/mkspecs/linux-g++-64-ORIG
71 fi
72 linux-g++-64 )
73 if [ -d ${qtprefix}/mkspecs/linux-g++ ];then
74 mv ${qtprefix}/mkspecs/linux-g++ \
75 ${qtprefix}/mkspecs/linux-g++-ORIG
76 fi
77 esac
78fi
79
80min_log_init ${INSTLOGS} &&
81make install \
82 >> ${LOGFILE} 2>&1 &&
83echo " o ALL OK" || barf
84
85if [ "Y" = "${MULTIARCH}" ]; then
86 case ${platform} in
87 linux-g++ )
88 if [ -d ${qtprefix}/mkspecs/linux-g++-64-ORIG ];then
89 rm -rf ${qtprefix}/mkspecs/linux-g++-64
90 mv ${qtprefix}/mkspecs/linux-g++-64-ORIG \
91 ${qtprefix}/mkspecs/linux-g++-64
92 fi
93 linux-g++-64 )
94 if [ -d ${qtprefix}/mkspecs/linux-g++-ORIG ];then
95 rm -rf ${qtprefix}/mkspecs/linux-g++
96 mv ${qtprefix}/mkspecs/linux-g++-ORIG \
97 ${qtprefix}/mkspecs/linux-g++
98 fi
99 esac
100fi
101
102if [ "Y" = "${QT_INSTALL_SELF_CONTAINED}" ]; then
103 ln -sfn qt-${QT_VER} /opt/qt
104 cp -r doc/man ${qtprefix}/doc
105 cp -r examples ${qtprefix}/doc
106else
107 cp -r doc/man ${qtprefix}/share
108 cp -r examples ${qtprefix}/share/doc/qt
109fi
110
111ln -s libqt-mt.so ${qtprefix}/${libdirname}/libqt.so &&
112rm ${qtprefix}/bin/qmake &&
113install -m755 -oroot -groot qmake/qmake ${qtprefix}/bin
114
115if [ "Y" = "${MULTIARCH}" ]; then
116 use_wrapper ${qtprefix}/bin/{qmake,uic,moc,qtconfig}
117
118 # There is one header file (qconfig.h) which will be different
119 # between 32 and 64 bit ( stores things such as size of long long
120 # for the given architecture ). Here we move it to a subdir and
121 # create a stub header
122 create_stub_hdrs ${qtincludedir}/qconfig.h
123fi
Note: See TracBrowser for help on using the repository browser.