diff --git a/redhat/dependencies/tqt3/build-examples.sh b/redhat/dependencies/tqt3/build-examples.sh deleted file mode 120000 index 4d654fcc9..000000000 --- a/redhat/dependencies/tqt3/build-examples.sh +++ /dev/null @@ -1 +0,0 @@ -../../../debian/_base/dependencies/tqt3/debian/maintain/build-examples.sh \ No newline at end of file diff --git a/redhat/dependencies/tqt3/build-examples.sh b/redhat/dependencies/tqt3/build-examples.sh new file mode 100644 index 000000000..f62d83b85 --- /dev/null +++ b/redhat/dependencies/tqt3/build-examples.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +BUILDDIR=$PWD +export QTDIR=/usr/share/tqt3 + +# first copy over the libtqt-mt.so build configuration of .qmake.cache +cp /usr/share/tqt3/.qmake.cache ./.qmake.cache + +# Now compile the examples. The themes example +# won't work since ntqconfig.h is not really correct with the +# ifdef's for the TQT_NO_xyz_STYLE, so we use make -k to continue +cd examples; qmake -o Makefile examples.pro; make -k + +# Now compile the tutorial. +cd $BUILDDIR/tutorial; qmake -o Makefile tutorial.pro; make + +# Then the designer examples. +cd $BUILDDIR/tools/designer/examples +for a in `find . -type d -maxdepth 1 -mindepth 1`; do + cd $a && qmake -o Makefile $a.pro; make; cd ..; +done + +# There is a bigger sql example in book/ with more subdirectories: +cd book +for a in `find . -type d -maxdepth 1 -mindepth 1`; do + cd $a && qmake -o Makefile $a.pro; make; cd ..; +done + +# Finally, build the linguist tutorials: +cd $BUILDDIR/tools/linguist/tutorial +for a in `find . -type d -maxdepth 1 -mindepth 1`; do + cd $a && qmake -o Makefile $a.pro; make; cd ..; +done + +# Return to the build directory +cd $BUILDDIR diff --git a/redhat/dependencies/tqt3/tqt3.spec b/redhat/dependencies/tqt3/tqt3.spec index 1944faf47..2d5182c7d 100644 --- a/redhat/dependencies/tqt3/tqt3.spec +++ b/redhat/dependencies/tqt3/tqt3.spec @@ -51,7 +51,6 @@ Source1: build-examples.sh Source2: trinity-tqt3-rpmlintrc BuildRequires: glibc-devel -BuildRequires: gcc-c++ BuildRequires: make BuildRequires: desktop-file-utils @@ -1313,10 +1312,14 @@ echo yes | ./configure \ -shared \ -fast \ -no-exceptions \ +%if "%{?c_compiler}" == "clang" + -platform linux-clang \ +%else %if "%{_lib}" == "lib64" -platform linux-g++-64 \ %else -platform linux-g++ \ +%endif %endif \ %{?with_nis:-nis} %{?!with_nis:-no-nis} \