/[gentoo-x86]/dev-util/qt-creator/qt-creator-2.5.1.ebuild
Gentoo

Contents of /dev-util/qt-creator/qt-creator-2.5.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Aug 10 00:44:31 2012 UTC (9 months, 1 week ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/qt-creator/qt-creator-2.5.1.ebuild,v 1.1 2012/07/27 08:35:52 pesa Exp $
4
5 EAPI=4
6
7 LANGS="cs de es fr hu it ja pl ru sl uk zh_CN"
8
9 inherit multilib eutils flag-o-matic qt4-r2
10
11 MY_P=${PN}-${PV/_/-}-src
12
13 DESCRIPTION="Lightweight IDE for C++ development centering around Qt"
14 HOMEPAGE="http://qt.nokia.com/products/developer-tools"
15 SRC_URI="http://get.qt.nokia.com/qtcreator/${MY_P}.tar.gz"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
20
21 QTC_PLUGINS=(autotools:autotoolsprojectmanager bazaar cmake:cmakeprojectmanager
22 cvs fakevim git madde mercurial perforce subversion valgrind)
23 IUSE="+botan-bundled debug doc examples ${QTC_PLUGINS[@]%:*}"
24
25 QT_PV="4.7.4:4"
26
27 CDEPEND="
28 >=x11-libs/qt-assistant-${QT_PV}[doc?]
29 >=x11-libs/qt-core-${QT_PV}[private-headers(+),ssl]
30 >=x11-libs/qt-declarative-${QT_PV}[private-headers(+)]
31 >=x11-libs/qt-gui-${QT_PV}[private-headers(+)]
32 >=x11-libs/qt-script-${QT_PV}[private-headers(+)]
33 >=x11-libs/qt-sql-${QT_PV}
34 >=x11-libs/qt-svg-${QT_PV}
35 debug? ( >=x11-libs/qt-test-${QT_PV} )
36 !botan-bundled? ( =dev-libs/botan-1.8* )
37 "
38 DEPEND="${CDEPEND}
39 !botan-bundled? ( virtual/pkgconfig )
40 "
41 RDEPEND="${CDEPEND}
42 >=sys-devel/gdb-7.2[python]
43 examples? ( >=x11-libs/qt-demo-${QT_PV} )
44 "
45 PDEPEND="
46 autotools? ( sys-devel/autoconf )
47 bazaar? ( dev-vcs/bzr )
48 cmake? ( dev-util/cmake )
49 cvs? ( dev-vcs/cvs )
50 git? ( dev-vcs/git )
51 mercurial? ( dev-vcs/mercurial )
52 subversion? ( dev-vcs/subversion )
53 valgrind? ( dev-util/valgrind )
54 "
55
56 S=${WORKDIR}/${MY_P}
57
58 src_prepare() {
59 qt4-r2_src_prepare
60
61 # disable unwanted plugins
62 for plugin in "${QTC_PLUGINS[@]#[+-]}"; do
63 if ! use ${plugin%:*}; then
64 einfo "Disabling ${plugin%:*} plugin"
65 sed -i -e "/^[[:space:]]\+plugin_${plugin#*:}/d" src/plugins/plugins.pro \
66 || die "failed to disable ${plugin} plugin"
67 fi
68 done
69
70 if use perforce; then
71 echo
72 ewarn "You have enabled the perforce plugin."
73 ewarn "In order to use it, you need to manually download the perforce client from"
74 ewarn " http://www.perforce.com/perforce/downloads/index.html"
75 echo
76 fi
77
78 # fix translations
79 sed -i -e "/^LANGUAGES/s:=.*:= ${LANGS}:" \
80 share/qtcreator/translations/translations.pro || die
81
82 if ! use botan-bundled; then
83 # identify system botan and pkg-config file
84 local botan_version=$(best_version dev-libs/botan | cut -d '-' -f3 | cut -d '.' -f1,2)
85 local lib_botan=$(pkg-config --libs botan-${botan_version})
86 einfo "Major version of system's botan library to be used: ${botan_version}"
87
88 # drop bundled libBotan. Bug #383033
89 rm -rf "${S}"/src/libs/3rdparty/botan || die
90 # remove references to bundled botan
91 sed -i -e "s:botan::" "${S}"/src/libs/3rdparty/3rdparty.pro || die
92 for x in testrunner parsertests modeldemo; do
93 sed -i -e "/botan.pri/d" "${S}"/tests/valgrind/memcheck/${x}.pro || die
94 done
95 sed -i -e "/botan.pri/d" "${S}"/src/libs/utils/utils_dependencies.pri || die
96 sed -i -e "/botan.pri/d" "${S}"/tests/manual/preprocessor/preprocessor.pro || die
97 # link to system botan
98 sed -i -e "/LIBS/s:$: ${lib_botan}:" "${S}"/qtcreator.pri || die
99 sed -i -e "s:-lBotan:${lib_botan}:" "${S}"/tests/manual/appwizards/appwizards.pro || die
100 # append botan refs to compiler flags
101 append-flags $(pkg-config --cflags --libs botan-${botan_version})
102 fi
103 }
104
105 src_configure() {
106 eqmake4 qtcreator.pro \
107 IDE_LIBRARY_BASENAME="$(get_libdir)" \
108 IDE_PACKAGE_MODE=true
109 }
110
111 src_compile() {
112 emake
113 use doc && emake docs
114 }
115
116 src_install() {
117 emake INSTALL_ROOT="${ED}usr" install
118
119 # Install documentation
120 if use doc; then
121 insinto /usr/share/doc/${PF}
122 doins share/doc/qtcreator/qtcreator{,-dev}.qch
123 docompress -x /usr/share/doc/${PF}/qtcreator{,-dev}.qch
124 fi
125
126 # Install icon & desktop file
127 doicon src/plugins/coreplugin/images/logo/128/qtcreator.png
128 make_desktop_entry qtcreator 'Qt Creator' qtcreator 'Qt;Development;IDE'
129
130 # Remove unneeded translations
131 local lang
132 for lang in ${LANGS}; do
133 if ! has ${lang} ${LINGUAS}; then
134 rm "${ED}"usr/share/qtcreator/translations/qtcreator_${lang}.qm \
135 || eqawarn "Failed to remove ${lang} translation"
136 fi
137 done
138 }

  ViewVC Help
Powered by ViewVC 1.1.13