x11-libs/qt: delete old extraversions, rebase to current portage ebuilds.
[gentoo-soor-overlay.git] / x11-libs / qt / qt-3.3.8-r4.ebuild
Commit [+]AuthorDateLineData
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +02001# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3e95c2c5 Leonardo Valeri Manera2008-04-14 02:19:27 +02003# $Header: $
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +02004
1cf9c730 Leonardo Valeri Manera2008-04-14 04:17:53 +02005EAPI="1"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +02006inherit eutils flag-o-matic toolchain-funcs
7
8SRCTYPE="free"
3e95c2c5 Leonardo Valeri Manera2008-04-14 02:19:27 +02009QT_COPY_SNAP="1.1"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +020010DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
11HOMEPAGE="http://www.trolltech.com/"
12
13RESTRICT="primaryuri"
14
15IMMQT_P="qt-x11-immodule-unified-qt3.3.8-20070321-gentoo"
16
3e95c2c5
LVM
Leonardo Valeri Manera2008-04-14 02:19:27 +020017SRC_URI="mirror://gentoo/qt-x11-${SRCTYPE}-${PV}.tar.gz
18 ftp://ftp.trolltech.com/qt/source/qt-x11-${SRCTYPE}-${PV}.tar.gz
2b75063d Leonardo Valeri Manera2008-04-14 02:40:19 +020019 qt-copy? ( http://jyujin.de/~creidiki/qt-copy/qt-copy-${PV}-patches-${QT_COPY_SNAP}.tar.lzma )
3e95c2c5
LVM
Leonardo Valeri Manera2008-04-14 02:19:27 +020020 immqt? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )
21 immqt-bc? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +020022LICENSE="|| ( QPL-1.0 GPL-2 )"
23
24SLOT="3"
2e0c54a6 Leonardo Valeri Manera2008-04-18 08:34:40 +020025KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +020026IUSE="cups debug doc examples firebird gif ipv6 mysql nas nis odbc opengl postgres qt-copy sqlite xinerama immqt immqt-bc"
27
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +020028RDEPEND="media-libs/jpeg
29 media-libs/freetype:2
30 >=media-libs/libmng-1.0.9
31 media-libs/libpng:1.2
32 sys-libs/zlib
33 virtual/xft
34 x11-libs/libXcursor
35 x11-libs/libXi
36 x11-libs/libXrandr
37 x11-libs/libSM
38 cups? ( net-print/cups )
39 firebird? ( dev-db/firebird )
40 mysql? ( virtual/mysql )
41 nas? ( >=media-libs/nas-1.5 )
42 opengl? ( virtual/opengl virtual/glu )
43 postgres? ( dev-db/libpq )
44 xinerama? ( x11-libs/libXinerama )"
45DEPEND="${RDEPEND}
1cf9c730
LVM
Leonardo Valeri Manera2008-04-14 04:17:53 +020046 x11-proto/inputproto
47 x11-proto/xextproto
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +020048 qt-copy? ( app-arch/lzma-utils )
49 xinerama? ( x11-proto/xineramaproto )
1cf9c730 Leonardo Valeri Manera2008-04-14 04:17:53 +020050 immqt? ( x11-proto/xineramaproto )
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +020051 immqt-bc? ( x11-proto/xineramaproto )"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +020052PDEPEND="odbc? ( ~dev-db/qt-unixODBC-$PV )"
53
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +020054S="${WORKDIR}"/qt-x11-${SRCTYPE}-${PV}
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +020055
56QTBASE=/usr/qt/3
57
58pkg_setup() {
59 if use immqt && use immqt-bc ; then
60 ewarn
61 ewarn "immqt and immqt-bc are exclusive. You cannot set both."
62 ewarn "Please specify either immqt or immqt-bc."
63 ewarn
64 die
65 elif use immqt ; then
66 ewarn
67 ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
68 ewarn "you have to recompile everything depending on Qt after you install it."
69 ewarn "Be aware."
70 ewarn
71 fi
72
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +020073 export QTDIR="${S}"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +020074
75 CXX=$(tc-getCXX)
76 if [[ ${CXX/g++/} != ${CXX} ]]; then
77 PLATCXX="g++"
78 elif [[ ${CXX/icpc/} != ${CXX} ]]; then
79 PLATCXX="icc"
80 else
81 die "Unknown compiler ${CXX}."
82 fi
83
84 case ${CHOST} in
85 *-freebsd*|*-dragonfly*)
86 PLATNAME="freebsd" ;;
87 *-openbsd*)
88 PLATNAME="openbsd" ;;
89 *-netbsd*)
90 PLATNAME="netbsd" ;;
91 *-darwin*)
92 PLATNAME="darwin" ;;
93 *-linux-*|*-linux)
94 PLATNAME="linux" ;;
95 *)
96 die "Unknown CHOST, no platform choosed."
97 esac
98
99 # probably this should be '*-64' for 64bit archs
100 # in a fully multilib environment (no compatibility symlinks)
101 export PLATFORM="${PLATNAME}-${PLATCXX}"
102}
103
104src_unpack() {
105 unpack ${A}
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200106 cd "${S}"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200107
108 sed -i -e 's:read acceptance:acceptance=yes:' configure
109
110 # Do not link with -rpath. See bug #75181.
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200111 find "${S}"/mkspecs -name qmake.conf | xargs \
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200112 sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
113
114 # Patch for uic includehint errors (aseigo patch)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200115 epatch "${FILESDIR}"/${P}-uic-fix.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200116
117 # Patch for mysql unload crash (Bug #171883)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200118 epatch "${FILESDIR}"/${P}-mysql-unload-crash.diff
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200119
120 # KDE related patches
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +0200121 epatch "${FILESDIR}"/0001-dnd_optimization.patch
122 epatch "${FILESDIR}"/0002-dnd_active_window_fix.patch
123 epatch "${FILESDIR}"/0038-dragobject-dont-prefer-unknown.patch
124 epatch "${FILESDIR}"/0044-qscrollview-windowactivate-fix.diff
125 epatch "${FILESDIR}"/0047-fix-kmenu-widget.diff
126 epatch "${FILESDIR}"/0048-qclipboard_hack_80072.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200127
128 # possible rce, CVE-2007-3388
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200129 epatch "${FILESDIR}"/0081-format-string-fixes.diff
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200130
131 # Bug #192472
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200132 epatch "${FILESDIR}"/${P}-unicode-off-by-one.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200133
134 # ulibc patch (bug #100246)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200135 epatch "${FILESDIR}"/qt-ulibc.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200136
137 # xinerama patch: http://ktown.kde.org/~seli/xinerama/
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200138 epatch "${FILESDIR}"/${P}-seli-xinerama.patch
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200139
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200140 epatch "${FILESDIR}"/utf8-bug-qt3.diff
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200141
142 # Visibility patch, apply only on GCC 4.1 and later for safety
143 # [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]] && \
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200144 epatch "${FILESDIR}"/${P}-visibility.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200145
146 if use immqt || use immqt-bc ; then
147 epatch ../${IMMQT_P}.diff
148 sh make-symlinks.sh || die "make symlinks failed"
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +0200149
150 epatch "${FILESDIR}"/${P}-immqt+gcc-4.3.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200151 fi
152
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +0200153 if use mips; then
154 epatch "${FILESDIR}"/${P}-mips.patch
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200155 fi
156
157 # Apply QT Copy patches:
1cf9c730 Leonardo Valeri Manera2008-04-14 04:17:53 +0200158 if use qt-copy; then
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +0200159 EPATCH_MULTI_MSG="Applying QT-copy patches ..." \
160 EPATCH_FORCE="yes" EPATCH_SUFFIX="" epatch \
161 "${WORKDIR}"/qt-copy-${PV}-patches-${QT_COPY_SNAP}
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200162 fi
163
164 # known working flags wrt #77623
165 use sparc && export CFLAGS="-O1" && export CXXFLAGS="${CFLAGS}"
166 # set c/xxflags and ldflags
167 strip-flags
168 append-flags -fno-strict-aliasing
169
170 if [[ $( gcc-fullversion ) == "3.4.6" && gcc-specs-ssp ]] ; then
171 ewarn "Appending -fno-stack-protector to CFLAGS/CXXFLAGS"
172 append-flags -fno-stack-protector
173 fi
174
175 sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
3e95c2c5
LVM
Leonardo Valeri Manera2008-04-14 02:19:27 +0200176 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
177 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200178 -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
179 -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
180 -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
181 -e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200182 "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200183
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200184 if [[ $(get_libdir) != "lib" ]] ; then
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200185 sed -i -e "s:/lib$:/$(get_libdir):" \
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200186 "${S}"/mkspecs/${PLATFORM}/qmake.conf || die
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200187 fi
188}
189
190src_compile() {
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200191 export SYSCONF="${D}"${QTBASE}/etc/settings
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200192
193 # Let's just allow writing to these directories during Qt emerge
194 # as it makes Qt much happier.
195 addwrite "${QTBASE}/etc/settings"
196 addwrite "${HOME}/.qt"
197
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200198 [[ $(get_libdir) != "lib" ]] && myconf="${myconf} -L/usr/$(get_libdir)"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200199
200 # unixODBC support is now a PDEPEND on dev-db/qt-unixODBC; see bug 14178.
201 use nas && myconf="${myconf} -system-nas-sound"
202 use nis && myconf="${myconf} -nis" || myconf="${myconf} -no-nis"
203 use gif && myconf="${myconf} -qt-gif" || myconf="${myconf} -no-gif"
204 use mysql && myconf="${myconf} -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf="${myconf} -no-sql-mysql"
205 use postgres && myconf="${myconf} -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf="${myconf} -no-sql-psql"
206 use firebird && myconf="${myconf} -plugin-sql-ibase -I/opt/firebird/include" || myconf="${myconf} -no-sql-ibase"
207 use sqlite && myconf="${myconf} -plugin-sql-sqlite" || myconf="${myconf} -no-sql-sqlite"
208 use cups && myconf="${myconf} -cups" || myconf="${myconf} -no-cups"
209 use opengl && myconf="${myconf} -enable-module=opengl" || myconf="${myconf} -disable-opengl"
210 use debug && myconf="${myconf} -debug" || myconf="${myconf} -release -no-g++-exceptions"
211 use xinerama && myconf="${myconf} -xinerama" || myconf="${myconf} -no-xinerama"
212
213 myconf="${myconf} -system-zlib"
214
215 use ipv6 && myconf="${myconf} -ipv6" || myconf="${myconf} -no-ipv6"
216 use immqt-bc && myconf="${myconf} -inputmethod"
217 use immqt && myconf="${myconf} -inputmethod -inputmethod-ext"
218
219 if use ppc-macos ; then
220 myconf="${myconf} -no-sql-ibase -no-sql-mysql -no-sql-psql -no-cups -lresolv -shared"
221 myconf="${myconf} -I/usr/X11R6/include -L/usr/X11R6/lib"
222 myconf="${myconf} -L${S}/lib -I${S}/include"
223 sed -i -e "s,#define QT_AOUT_UNDERSCORE,," mkspecs/${PLATFORM}/qplatformdefs.h || die
224 fi
225
226 export YACC='byacc -d'
227 tc-export CC CXX
228 export LINK="$(tc-getCXX)"
229
230 ./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
231 -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
232 -system-libpng -xft -platform ${PLATFORM} -xplatform \
233 ${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
234 -fast -no-sql-odbc ${myconf} -dlopen-opengl || die
235
236 emake src-qmake src-moc sub-src || die
237
238 export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
239 export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
240
241 emake sub-tools || die
242
243 if use examples; then
244 emake sub-tutorial sub-examples || die
245 fi
246
247 # Make the msg2qm utility (not made by default)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200248 cd "${S}"/tools/msg2qm
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200249 ../../bin/qmake
250 emake
251
252 # Make the qembed utility (not made by default)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200253 cd "${S}"/tools/qembed
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200254 ../../bin/qmake
255 emake
256
257}
258
259src_install() {
260 # binaries
261 into ${QTBASE}
262 dobin bin/*
263 dobin tools/msg2qm/msg2qm
264 dobin tools/qembed/qembed
265
266 # libraries
267 if use ppc-macos; then
268 # dolib is broken on BSD because of missing readlink(1)
269 dodir ${QTBASE}/$(get_libdir)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200270 cp -fR lib/*.{dylib,la,a} "${D}"/${QTBASE}/$(get_libdir) || die
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200271
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200272 cd "${D}"/${QTBASE}/$(get_libdir)
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200273 for lib in libqt-mt* ; do
274 ln -s ${lib} ${lib/-mt/}
275 done
276 else
277 dolib.so lib/lib{editor,qassistantclient,designercore}.a
278 dolib.so lib/libqt-mt.la
279 dolib.so lib/libqt-mt.so.${PV} lib/libqui.so.1.0.0
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200280 cd "${D}"/${QTBASE}/$(get_libdir)
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200281
282 for x in libqui.so ; do
283 ln -s $x.1.0.0 $x.1.0
284 ln -s $x.1.0 $x.1
285 ln -s $x.1 $x
286 done
287
288 # version symlinks - 3.3.5->3.3->3->.so
289 ln -s libqt-mt.so.${PV} libqt-mt.so.3.3
290 ln -s libqt-mt.so.3.3 libqt-mt.so.3
291 ln -s libqt-mt.so.3 libqt-mt.so
292
293 # libqt -> libqt-mt symlinks
294 ln -s libqt-mt.so.${PV} libqt.so.${PV}
295 ln -s libqt-mt.so.3.3 libqt.so.3.3
296 ln -s libqt-mt.so.3 libqt.so.3
297 ln -s libqt-mt.so libqt.so
298 fi
299
300 # plugins
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200301 cd "${S}"
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200302 local plugins=$(find plugins -name "lib*.so" -print)
303 for x in ${plugins}; do
304 exeinto ${QTBASE}/$(dirname ${x})
305 doexe ${x}
306 done
307
308 # Past this point just needs to be done once
309 is_final_abi || return 0
310
311 # includes
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200312 cd "${S}"
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200313 dodir ${QTBASE}/include/private
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +0200314 cp include/* "${D}"/${QTBASE}/include/
315 cp include/private/* "${D}"/${QTBASE}/include/private/
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200316
317 # prl files
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200318 sed -i -e "s:${S}:${QTBASE}:g" "${S}"/lib/*.prl
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200319 insinto ${QTBASE}/$(get_libdir)
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200320 doins "${S}"/lib/*.prl
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200321
322 # pkg-config file
323 insinto ${QTBASE}/$(get_libdir)/pkgconfig
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200324 doins "${S}"/lib/*.pc
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200325
326 # List all the multilib libdirs
327 local libdirs
328 for libdir in $(get_all_libdirs); do
329 libdirs="${libdirs}:${QTBASE}/${libdir}"
330 done
331
332 # environment variables
333 if use ppc-macos; then
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200334 cat <<EOF > "${T}"/45qt3
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200335PATH=${QTBASE}/bin
336ROOTPATH=${QTBASE}/bin
337DYLD_LIBRARY_PATH=${libdirs:1}
338QMAKESPEC=${PLATFORM}
339MANPATH=${QTBASE}/doc/man
340PKG_CONFIG_PATH=${QTBASE}/$(get_libdir)/pkgconfig
341EOF
342 else
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200343 cat <<EOF > "${T}"/45qt3
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200344PATH=${QTBASE}/bin
345ROOTPATH=${QTBASE}/bin
346LDPATH=${libdirs:1}
347QMAKESPEC=${PLATFORM}
348MANPATH=${QTBASE}/doc/man
349PKG_CONFIG_PATH=${QTBASE}/$(get_libdir)/pkgconfig
350EOF
351 fi
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200352 cat <<EOF > "${T}"/50qtdir3
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200353QTDIR=${QTBASE}
354EOF
355
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200356 cat <<EOF > "${T}"/50-qt3-revdep
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200357SEARCH_DIRS="${QTBASE}"
358EOF
359
360 insinto /etc/revdep-rebuild
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200361 doins "${T}"/50-qt3-revdep
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200362
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200363 doenvd "${T}"/45qt3 "${T}"/50qtdir3
e63b63f0 Leonardo Valeri Manera2008-04-14 00:05:09 +0200364
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200365 if [[ "${SYMLINK_LIB}" = "yes" ]]; then
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200366 dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
367 fi
368
369 insinto ${QTBASE}/tools/designer
370 doins -r tools/designer/templates
371
372 insinto ${QTBASE}
373 doins -r translations
374
375 keepdir ${QTBASE}/etc/settings
376
377 if use doc; then
378 insinto ${QTBASE}
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200379 doins -r "${S}"/doc
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200380 fi
381
382 if use examples; then
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200383 find "${S}"/examples "${S}"/tutorial -name Makefile | \
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200384 xargs sed -i -e "s:${S}:${QTBASE}:g"
385
77f9888f
LVM
Leonardo Valeri Manera2008-05-12 01:47:02 +0200386 cp -r "${S}"/examples "${D}"${QTBASE}/
387 cp -r "${S}"/tutorial "${D}"${QTBASE}/
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200388 fi
389
390 # misc build reqs
391 insinto ${QTBASE}/mkspecs
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200392 doins -r "${S}"/mkspecs/${PLATFORM}
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200393
394 sed -e "s:${S}:${QTBASE}:g" \
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200395 "${S}"/.qmake.cache > "${D}"${QTBASE}/.qmake.cache
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200396
397 dodoc FAQ README README-QT.TXT changes*
398 if use immqt || use immqt-bc ; then
77f9888f Leonardo Valeri Manera2008-05-12 01:47:02 +0200399 dodoc "${S}"/README.immodule
e63b63f0
LVM
Leonardo Valeri Manera2008-04-14 00:05:09 +0200400 fi
401}
402
403pkg_postinst() {
404 echo
405 elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
406 elog "or widgets for the Qt designer) are no longer recognized. If this situation"
407 elog "occurs you should recompile the packages providing these plugins,"
408 elog "and you should also make sure that Qt and its plugins were compiled with the"
409 elog "same version of gcc. Packages that may need to be rebuilt are, for instance,"
410 elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
411 elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
412 echo
413
414 if use qt-copy ; then
415 echo
416 ewarn "Do NOT report bugs to Gentoo's bugzilla when built with qt-copy!!!"
417 fi
418}