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-opengl: qt-opengl-4.4.0_rc1.ebuild
Date: Fri, 21 Dec 2007 19:14:41
Message-Id: E1J5nKJ-00037M-VA@stork.gentoo.org
1 caleb 07/12/21 19:14:31
2
3 Modified: qt-opengl-4.4.0_rc1.ebuild
4 Log:
5 Revised to use qt4-build eclass
6 (Portage version: 2.1.3.16)
7
8 Revision Changes Path
9 1.3 x11-libs/qt-opengl/qt-opengl-4.4.0_rc1.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-opengl/qt-opengl-4.4.0_rc1.ebuild?rev=1.3&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-opengl/qt-opengl-4.4.0_rc1.ebuild?rev=1.3&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-opengl/qt-opengl-4.4.0_rc1.ebuild?r1=1.2&r2=1.3
14
15 Index: qt-opengl-4.4.0_rc1.ebuild
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/x11-libs/qt-opengl/qt-opengl-4.4.0_rc1.ebuild,v
18 retrieving revision 1.2
19 retrieving revision 1.3
20 diff -u -r1.2 -r1.3
21 --- qt-opengl-4.4.0_rc1.ebuild 20 Dec 2007 22:07:26 -0000 1.2
22 +++ qt-opengl-4.4.0_rc1.ebuild 21 Dec 2007 19:14:31 -0000 1.3
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-opengl/qt-opengl-4.4.0_rc1.ebuild,v 1.2 2007/12/20 22:07:26 mr_bones_ Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-opengl/qt-opengl-4.4.0_rc1.ebuild,v 1.3 2007/12/21 19:14:31 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 OpenGL module for the Qt toolkit."
35 HOMEPAGE="http://www.trolltech.com/"
36
37 MY_PV=${PV/_rc/-tp}
38 @@ -19,120 +19,49 @@
39
40 IUSE="debug"
41
42 -RDEPEND="=x11-libs/qt-4.4.0_rc1
43 +RDEPEND="~x11-libs/qt-gui-4.4.0_rc1
44 ( virtual/opengl virtual/glu )"
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 + qt4-build_src_unpack
83
84 + skip_qmake_build_patch
85 + skip_project_generation_patch
86 + install_binaries_to_buildtree
87 }
88
89 src_compile() {
90 - export PATH="${S}/bin:${PATH}"
91 - export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
92 -
93 - [ $(get_libdir) != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
94 + local myconf=$(standard_configure_options)
95 + myconf="${myconf} -opengl"
96
97 - # Disable visibility explicitly if gcc version isn't 4
98 - if [[ "$(gcc-major-version)" != "4" ]]; then
99 - myconf="${myconf} -no-reduce-exports"
100 + if built_with_use ~x11-libs/qt-core-${PV} qt3support; then
101 + myconf="${myconf} -qt3support"
102 + else
103 + myconf="${myconf} -no-qt3support"
104 fi
105
106 - # Add a switch that will attempt to use recent binutils to reduce relocations. Should be harmless for other
107 - # cases. From bug #178535
108 - myconf="${myconf} -fast -reduce-relocations -opengl"
109 - use debug && myconf="${myconf} -debug -no-separate-debug-info" || myconf="${myconf} -release -no-separate-debug-info"
110 -
111 - myconf="${myconf} -nomake examples -nomake demos"
112 -
113 - myconf="-stl -verbose -largefile -confirm-license \
114 - -no-rpath \
115 - -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR} -datadir ${QTDATADIR} \
116 - -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} -plugindir ${QTPLUGINDIR} \
117 - -sysconfdir ${QTSYSCONFDIR} -translationdir ${QTTRANSDIR} \
118 - -examplesdir ${QTEXAMPLESDIR} -demosdir ${QTDEMOSDIR} ${myconf}"
119 -
120 echo ./configure ${myconf}
121 ./configure ${myconf} || die
122
123 - # Edit the .qmake.cache file
124 - sed -i -e "s:QMAKE_MOC:\#QMAKE_MOC:g" "${S}"/.qmake.cache
125 - sed -i -e "s:QMAKE_UIC:\#QMAKE_UIC:g" "${S}"/.qmake.cache
126 - sed -i -e "s:QMAKE_RCC:\#QMAKE_RCC:g" "${S}"/.qmake.cache
127 -
128 - cd "${S}"/src/opengl
129 - qmake "LIBS+=-L${QTLIBDIR}" && emake || die
130 -
131 - # Currently commented out of the TT's Qt build
132 - # cd "${S}"/tools/designer/src/plugins/tools/view3d
133 - # qmake "LIBS+=-L${QTLIBDIR}" && emake || die
134 + build_directories src/opengl
135 + # Not building tools/designer/src/plugins/tools/view3d as it's commented out of the build in the source
136 }
137
138 src_install() {
139 - export PATH="${S}/bin:${PATH}"
140 - export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
141 -
142 - cd "${S}"/src/opengl
143 - emake INSTALL_ROOT="${D}" install || die
144 -
145 - # cd "${S}"/tools/designer/src/plugins/tools/view3d
146 - # emake INSTALL_ROOT="${D}" install || die
147 -
148 - sed -i -e "s:${S}/lib:${QTLIBDIR}:g" "${D}"/${QTLIBDIR}/*.la
149 - sed -i -e "s:${S}/lib:${QTLIBDIR}:g" "${D}"/${QTLIBDIR}/*.prl
150 - sed -i -e "s:${S}/lib:${QTLIBDIR}:g" "${D}"/${QTLIBDIR}/pkgconfig/*.pc
151 -
152 - # pkgconfig files refer to WORKDIR/bin as the moc and uic locations. Fix:
153 - sed -i -e "s:${S}/bin:${QTBINDIR}:g" "${D}"/${QTLIBDIR}/pkgconfig/*.pc
154 + install_directories src/opengl
155
156 - # Move .pc files into the pkgconfig directory
157 - dodir ${QTPCDIR}
158 - mv "${D}"/${QTLIBDIR}/pkgconfig/*.pc "${D}"/${QTPCDIR}
159 + fix_library_files
160 }
161
162 pkg_postinst()
163 {
164 - # Need to add opengl to QT_CONFIG line
165 - sed -i -e "s:opengl ::g" ${QTDATADIR}/mkspecs/qconfig.pri
166 - sed -i -e "s:QT_CONFIG += :QT_CONFIG += opengl :g" ${QTDATADIR}/mkspecs/qconfig.pri
167 + qconfig_add_option opengl
168 }
169
170 pkg_postrm()
171 {
172 - # Need to add opengl to QT_CONFIG line
173 - sed -i -e "s:opengl ::g" ${QTDATADIR}/mkspecs/qconfig.pri
174 + qconfig_remove_option opengl
175 }
176
177
178
179 --
180 gentoo-commits@g.o mailing list