ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/qt.spec
Revision: 1.18
Committed: Sun Oct 21 08:12:24 2007 UTC (17 years, 6 months ago) by elmer
Branch: MAIN
CVS Tags: pe20071023-170p6-amd64, forTony_001, pe20071021a-ports
Changes since 1.17: +7 -0 lines
Log Message:
Add fontconfig 32bit-on-64bit workaround also for gcc412 build. (This needs
cleanup.)

File Contents

# User Rev Content
1 muzaffar 1.17 ### RPM external qt 3.3.6-CMS8
2 eulisse 1.1 ## INITENV UNSET QMAKESPEC
3     ## INITENV SET QTDIR %i
4 elmer 1.15 %define qttype %(echo %realversion | sed 's/[-0-9.]*//')
5     %define qtversion %(echo %realversion | sed 's/-.*//')
6 eulisse 1.1 %if "%qttype" == ""
7     %ifos darwin
8     %define type mac
9     %else
10     %define type x11
11     %endif
12     %else
13     %define type %{qttype}
14     %endif
15    
16     %if "%type" == "x11"
17     %define sourcepkg 1
18     %else
19     %define sourcepkg 0
20     %endif
21    
22     # Requires: zlib, ...
23     Source0: ftp://ftp.trolltech.com/qt/source/%n-mac-free-%{qtversion}.tar.bz2
24     Source1: ftp://ftp.trolltech.com/qt/source/%n-x11-free-%{qtversion}.tar.bz2
25 elmer 1.7 Patch0: qt-mkspecs-qmake.conf
26     Patch1: qt-mkspecs-qplatformdefs.h
27     Patch2: qt-src-kernel-qaccessible_mac.cpp
28     Patch3: qt-src-qt_install.pri
29 elmer 1.15 Patch4: qt-mkspecs-qmake.conf_2
30 eulisse 1.1
31     %prep
32     %setup -T -b %sourcepkg -n %n-%type-free-%{qtversion}
33 elmer 1.12 #%ifos darwin
34     #%patch1 -p0
35     #%patch2 -p0
36     #%patch3 -p0
37     #%endif
38 elmer 1.15 # The kludge supports the libfontconfig kludge described below
39     %if "%cmsplatf" == "slc4_ia32_gcc345"
40     %patch4 -p1
41     %endif
42 elmer 1.18 %if "%cmsplatf" == "slc4_ia32_gcc412"
43     %patch4 -p1
44     %endif
45 eulisse 1.1
46     %build
47     unset QMAKESPEC || true
48     export QTDIR=$PWD
49     export PATH=$QTDIR/bin:$PATH
50     export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
51     export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
52 eulisse 1.3
53     case $(uname -m) in
54     x86_64)
55     export CONFIG_ARGS="-platform linux-g++-64"
56     esac
57    
58     echo yes | ./configure -prefix %i -thread -stl $CONFIG_ARGS
59 eulisse 1.1 # install_framework is hosed
60     perl -p -i -e 's/^install_framework:/install_framework:\ninstall_framework_no:/' src/Makefile
61 elmer 1.15 # The following is a kludge around the fact that the fact that the
62     # /usr/lib/libfontconfig.so soft link (for 32-bit lib) is missing
63     # on the 64-bit machines
64     %if "%cmsplatf" == "slc4_ia32_gcc345"
65     mkdir -p %{_builddir}/lib
66     ln -s /usr/lib/libfontconfig.so.1 %{_builddir}/%n-%type-free-%{qtversion}/lib/libfontconfig.so
67     %endif
68 elmer 1.18 %if "%cmsplatf" == "slc4_ia32_gcc412"
69     mkdir -p %{_builddir}/lib
70     ln -s /usr/lib/libfontconfig.so.1 %{_builddir}/%n-%type-free-%{qtversion}/lib/libfontconfig.so
71     %endif
72 elmer 1.15
73 eulisse 1.2 make %makeprocesses
74 muzaffar 1.17
75     %install
76     make install
77    
78     # SCRAM ToolBox toolfile
79     mkdir -p %i/etc/scram.d
80     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
81     <doc type=BuildSystem::ToolDoc version=1.0>
82     <Tool name=%n version=%v>
83     <info url="http://www.trolltech.com/products/qt.html"></info>
84     <LIB name=qt-mt>
85     <Client>
86     <Environment name=QT_BASE default="%i"></Environment>
87     <Environment name=LIBDIR default="$QT_BASE/lib"></Environment>
88     <Environment name=INCLUDE default="$QT_BASE/include"></Environment>
89     </Client>
90     <Flags CPPDEFINES="QT_ALTERNATE_QTSMANIP QT_CLEAN_NAMESPACE QT_THREAD_SUPPORT">
91     <Runtime name=PATH value="$QT_BASE/bin" type=path>
92     <use name=X11>
93     <use name=opengl>
94     <use name=zlib>
95     </Tool>
96     EOF_TOOLFILE
97    
98 eulisse 1.11 %post
99     %{relocateConfig}lib/libqt-mt.la
100 muzaffar 1.17 %{relocateConfig}etc/scram.d/%n
101 eulisse 1.11