Gentoo Archives: gentoo-commits

From: "Caleb Tennis (caleb)" <caleb@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-libs/qt-qt3support: qt-qt3support-4.4.0_rc1.ebuild
Date: Fri, 21 Dec 2007 19:36:33
Message-Id: E1J5nfU-0003IB-7w@stork.gentoo.org
1 caleb 07/12/21 19:36:24
2
3 Modified: qt-qt3support-4.4.0_rc1.ebuild
4 Log:
5 Make use of new eclass
6 (Portage version: 2.1.3.16)
7
8 Revision Changes Path
9 1.6 x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild?rev=1.6&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild?rev=1.6&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild?r1=1.5&r2=1.6
14
15 Index: qt-qt3support-4.4.0_rc1.ebuild
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild,v
18 retrieving revision 1.5
19 retrieving revision 1.6
20 diff -u -r1.5 -r1.6
21 --- qt-qt3support-4.4.0_rc1.ebuild 20 Dec 2007 22:07:50 -0000 1.5
22 +++ qt-qt3support-4.4.0_rc1.ebuild 21 Dec 2007 19:36:23 -0000 1.6
23 @@ -1,11 +1,11 @@
24 # Copyright 1999-2007 Gentoo Foundation
25 # Distributed under the terms of the GNU General Public License v2
26 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild,v 1.5 2007/12/20 22:07:50 mr_bones_ Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-qt3support/qt-qt3support-4.4.0_rc1.ebuild,v 1.6 2007/12/21 19:36:23 caleb Exp $
28
29 -inherit eutils flag-o-matic toolchain-funcs multilib
30 +inherit qt4-build
31
32 SRCTYPE="preview-opensource-src"
33 -DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
34 +DESCRIPTION="The Qt3 support module for the Qt toolkit."
35 HOMEPAGE="http://www.trolltech.com/"
36
37 MY_PV=${PV/_rc/-tp}
38 @@ -19,136 +19,54 @@
39
40 IUSE="debug accessibility"
41
42 -RDEPEND="=x11-libs/qt-4.4.0_rc1"
43 +RDEPEND="~x11-libs/qt-gui-${PV}
44 + ~x11-libs/qt-sql-${PV}"
45
46 DEPEND="${RDEPEND}"
47
48 pkg_setup() {
49 - QTBASEDIR=/usr/$(get_libdir)/qt4
50 - QTPREFIXDIR=/usr
51 - QTBINDIR=/usr/bin
52 - QTLIBDIR=/usr/$(get_libdir)/qt4
53 - QTPCDIR=/usr/$(get_libdir)/pkgconfig
54 - QTDATADIR=/usr/share/qt4
55 - QTDOCDIR=/usr/share/doc/${PF}
56 - QTHEADERDIR=/usr/include/qt4
57 - QTPLUGINDIR=${QTLIBDIR}/plugins
58 - QTSYSCONFDIR=/etc/qt4
59 - QTTRANSDIR=${QTDATADIR}/translations
60 - QTEXAMPLESDIR=${QTDATADIR}/examples
61 - QTDEMOSDIR=${QTDATADIR}/demos
62 -}
63 -
64 -src_unpack() {
65 -
66 - unpack ${A}
67 - cd "${S}"
68 -
69 - # Don't let the user go too overboard with flags. If you really want to, uncomment
70 - # out the line below and give 'er a whirl.
71 - strip-flags
72 - replace-flags -O3 -O2
73 -
74 - if [[ $( gcc-fullversion ) == "3.4.6" && gcc-specs-ssp ]] ; then
75 - ewarn "Appending -fno-stack-protector to CFLAGS/CXXFLAGS"
76 - append-flags -fno-stack-protector
77 - fi
78 -
79 - # Override the creation of qmake and copy over the one from the system. This speeds up compilation time a lot.
80 - epatch "${FILESDIR}"/configure.patch
81 - cp ${QTBINDIR}/qmake "${S}"/bin/qmake
82 -
83 - if use accessibility && !built_with_use =x11-libs/qt-4* accessibility; then
84 + if use accessibility && !built_with_use =x11-libs/qt-gui-4* accessibility; then
85 eerror "Attempting to build qt3support with accessibility use flag without support in Qt4."
86 eerror "You must either turn off this use flag or re-emerge x11-libs/qt with accessibility support."
87 die
88 fi
89 +
90 + if !built_with_use =x11-libs/qt-core-4* qt3support; then
91 + eerror "In order for the qt-qt3support package to install, you must set the \"qt3support\" use flag, then"
92 + eerror "re-emerge the following packages: x11-libs/qt-core, x11-libs/qt-gui, x11-libs/qt-sql."
93 + die
94 + fi
95 }
96
97 -src_compile() {
98 - export PATH="${S}/bin:${PATH}"
99 - export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
100 +src_unpack() {
101 + qt4-build_src_unpack
102
103 - [ $(get_libdir) != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
104 + skip_qmake_build_patch
105 + skip_project_generation_patch
106 + install_binaries_to_buildtree
107 +}
108
109 - # Disable visibility explicitly if gcc version isn't 4
110 - if [[ "$(gcc-major-version)" != "4" ]]; then
111 - myconf="${myconf} -no-reduce-exports"
112 - fi
113 +src_compile() {
114 + local myconf=$(standard_configure_options)
115
116 # Add a switch that will attempt to use recent binutils to reduce relocations. Should be harmless for other
117 # cases. From bug #178535
118 - myconf="${myconf} -fast -reduce-relocations -qt3support"
119 - use debug && myconf="${myconf} -debug -no-separate-debug-info" || myconf="${myconf} -release -no-separate-debug-info"
120 use accessibility && myconf="${myconf} -accessibility" || myconf="${myconf} -no-accessibility"
121
122 - myconf="${myconf} -nomake examples -nomake demos"
123 -
124 - myconf="-stl -verbose -largefile -confirm-license \
125 - -no-rpath \
126 - -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR} -datadir ${QTDATADIR} \
127 - -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} -plugindir ${QTPLUGINDIR} \
128 - -sysconfdir ${QTSYSCONFDIR} -translationdir ${QTTRANSDIR} \
129 - -examplesdir ${QTEXAMPLESDIR} -demosdir ${QTDEMOSDIR} ${myconf}"
130 + myconf="${myconf} -qt3support"
131
132 echo ./configure ${myconf}
133 ./configure ${myconf} || die
134
135 - # Edit the .qmake.cache file
136 - sed -i -e "s:QMAKE_MOC:\#QMAKE_MOC:g" "${S}"/.qmake.cache
137 - sed -i -e "s:QMAKE_UIC:\#QMAKE_UIC:g" "${S}"/.qmake.cache
138 - sed -i -e "s:QMAKE_RCC:\#QMAKE_RCC:g" "${S}"/.qmake.cache
139 -
140 - cd "${S}"/src/qt3support
141 - qmake "LIBS+=-L${QTLIBDIR}" && emake || die
142 -
143 - cd "${S}"/tools/designer/src/plugins/widgets
144 - qmake "LIBS+=-L${QTLIBDIR}" && emake || die
145 -
146 - cd "${S}"/tools/qtconfig
147 - qmake "LIBS+=-L${QTLIBDIR}" && emake || die
148 -
149 - cd "${S}"/src/tools/uic3
150 - qmake "LIBS+=-L${QTLIBDIR}" && emake || die
151 + build_directories src/qt3support tools/designer/src/plugins/widgets tools/qtconfig src/tools/uic3
152 }
153
154 src_install() {
155 - export PATH="${S}/bin:${PATH}"
156 - export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
157 -
158 - cd "${S}"/src/qt3support
159 - emake INSTALL_ROOT="${D}" install || die
160 -
161 - cd "${S}"/tools/designer/src/plugins/widgets
162 - emake INSTALL_ROOT="${D}" install || die
163 + install_directories src/qt3support tools/designer/src/plugins/widgets tools/qtconfig src/tools/uic3
164
165 - cd "${S}"/tools/qtconfig
166 - emake INSTALL_ROOT="${D}" install || die
167 -
168 - cd "${S}"/src/tools/uic3
169 - emake INSTALL_ROOT="${D}" install || die
170 -
171 - sed -i -e "s:${S}/lib:${QTLIBDIR}:g" "${D}"/${QTLIBDIR}/*.la
172 - sed -i -e "s:${S}/lib:${QTLIBDIR}:g" "${D}"/${QTLIBDIR}/*.prl
173 - sed -i -e "s:${S}/lib:${QTLIBDIR}:g" "${D}"/${QTLIBDIR}/pkgconfig/*.pc
174 -
175 - # pkgconfig files refer to WORKDIR/bin as the moc and uic locations. Fix:
176 - sed -i -e "s:${S}/bin:${QTBINDIR}:g" "${D}"/${QTLIBDIR}/pkgconfig/*.pc
177 -
178 - # Move .pc files into the pkgconfig directory
179 - dodir ${QTPCDIR}
180 - mv "${D}"/${QTLIBDIR}/pkgconfig/*.pc "${D}"/${QTPCDIR}
181 + fix_library_files
182 }
183
184 -pkg_postinst()
185 -{
186 - # Need to add qt3support to QT_CONFIG line
187 - sed -i -e "s:qt3support ::g" ${QTDATADIR}/mkspecs/qconfig.pri
188 - sed -i -e "s:QT_CONFIG += :QT_CONFIG += qt3support :g" ${QTDATADIR}/mkspecs/qconfig.pri
189 -}
190 +# Don't postinst qt3support into qconfig.pri here, it's handled in qt-core by way of the use flag.
191 +
192
193 -pkg_postrm()
194 -{
195 - # Need to add qt3support to QT_CONFIG line
196 - sed -i -e "s:qt3support ::g" ${QTDATADIR}/mkspecs/qconfig.pri
197 -}
198
199
200
201 --
202 gentoo-commits@g.o mailing list