diff options
author | Alex Alexander <wired@gentoo.org> | 2010-07-19 19:43:38 +0000 |
---|---|---|
committer | Alex Alexander <wired@gentoo.org> | 2010-07-19 19:43:38 +0000 |
commit | 89fc70d8b1d80dd894061fc9fa348279d5681a5a (patch) | |
tree | 6266c71e5b0abcba2d8281b9cbf3bc634c3edeb8 /dev-util/universalindentgui | |
parent | Stable for PPC (bug #327485). (diff) | |
download | gentoo-2-89fc70d8b1d80dd894061fc9fa348279d5681a5a.tar.gz gentoo-2-89fc70d8b1d80dd894061fc9fa348279d5681a5a.tar.bz2 gentoo-2-89fc70d8b1d80dd894061fc9fa348279d5681a5a.zip |
fixed bug #325811 and bug #326123
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/universalindentgui')
3 files changed, 182 insertions, 1 deletions
diff --git a/dev-util/universalindentgui/ChangeLog b/dev-util/universalindentgui/ChangeLog index d7ef7f9ead83..3acd4219a9d7 100644 --- a/dev-util/universalindentgui/ChangeLog +++ b/dev-util/universalindentgui/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-util/universalindentgui # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/universalindentgui/ChangeLog,v 1.9 2010/05/24 22:03:39 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/universalindentgui/ChangeLog,v 1.10 2010/07/19 19:43:38 wired Exp $ + +*universalindentgui-1.1.0-r3 (19 Jul 2010) + + 19 Jul 2010; Alex Alexander <wired@gentoo.org> + +universalindentgui-1.1.0-r3.ebuild, + +files/universalindentgui-1.1.0-astyle_pwd_fix.patch: + fixed bug #325811 and bug #326123 24 May 2010; Alex Alexander <wired@gentoo.org> universalindentgui-1.1.0-r2.ebuild, diff --git a/dev-util/universalindentgui/files/universalindentgui-1.1.0-astyle_pwd_fix.patch b/dev-util/universalindentgui/files/universalindentgui-1.1.0-astyle_pwd_fix.patch new file mode 100644 index 000000000000..6dfa25196f74 --- /dev/null +++ b/dev-util/universalindentgui/files/universalindentgui-1.1.0-astyle_pwd_fix.patch @@ -0,0 +1,22 @@ +diff -Naur universalindentgui-1.1.0.orig/src/IndentHandler.cpp universalindentgui-1.1.0/src/IndentHandler.cpp +--- universalindentgui-1.1.0.orig/src/IndentHandler.cpp 2009-07-16 13:52:38.000000000 +0200 ++++ universalindentgui-1.1.0/src/IndentHandler.cpp 2010-06-26 20:30:41.000000000 +0200 +@@ -514,6 +514,10 @@ + //indentProcess.setReadChannelMode(QProcess::MergedChannels); + + // Set the directory for the indenter execution ++ QStringList env = indentProcess.environment(); ++ env << "PWD=" + QFileInfo(tempDirctoryStr).absoluteFilePath(); ++ indentProcess.setEnvironment( env ); ++ + indentProcess.setWorkingDirectory( QFileInfo(tempDirctoryStr).absoluteFilePath() ); + + qDebug() << __LINE__ << " " << __FUNCTION__ << ": Will call the indenter in the directory " << indentProcess.workingDirectory() << " using this commandline call: " << indenterCompleteCallString; +@@ -558,6 +562,7 @@ + QApplication::restoreOverrideCursor(); + errorMessageDialog->showMessage(tr("Error calling Indenter"), processReturnString); + } ++ + + // If the indenter returned an error code != 0 show its output. + if ( indentProcess.exitCode() != 0 ) { diff --git a/dev-util/universalindentgui/universalindentgui-1.1.0-r3.ebuild b/dev-util/universalindentgui/universalindentgui-1.1.0-r3.ebuild new file mode 100644 index 000000000000..852a15807afc --- /dev/null +++ b/dev-util/universalindentgui/universalindentgui-1.1.0-r3.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/universalindentgui/universalindentgui-1.1.0-r3.ebuild,v 1.1 2010/07/19 19:43:38 wired Exp $ + +EAPI="2" + +PYTHON_DEPEND="python? 2" + +inherit eutils qt4-r2 python + +DESCRIPTION="Cross platform compatible GUI for several code formatters, beautifiers and indenters." +HOMEPAGE="http://universalindent.sourceforge.net/" +SRC_URI="mirror://sourceforge/universalindent/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug html perl php python ruby xml" + +LANGS="de fr ja ru uk zh_TW" + +for L in $LANGS; do + IUSE="$IUSE linguas_$L" +done + +DEPEND="x11-libs/qt-core:4 + x11-libs/qt-gui:4 + x11-libs/qt-script:4 + x11-libs/qscintilla" +RDEPEND="${DEPEND} + dev-util/indent + dev-util/astyle + dev-util/bcpp + html? ( app-text/htmltidy + perl? ( dev-lang/perl ) ) + perl? ( dev-perl/perltidy ) + php? ( dev-php/PEAR-PHP_Beautifier ) + ruby? ( dev-lang/ruby ) + xml? ( dev-util/xmlindent ) +" + +pkg_setup() { + use python && python_set_active_version 2 +} + +src_prepare() { + # .pro fixes + sed -i "s:lupdate-qt4:lupdate:" UniversalIndentGUI.pro || + die ".pro fix failed" + sed -i "s:lrelease-qt4:lrelease:" UniversalIndentGUI.pro || + die ".pro fix failed" + sed -i "s:ja_jp.qm:ja_JP.qm:" UniversalIndentGUI.pro || + die ".pro lang fix failed" + if use debug; then + sed -i "s:release,:debug,:g" UniversalIndentGUI.pro || + die ".pro debug fix failed" + fi + + # patch .pro file according to our use flags + # basic support + UEXAMPLES="cpp sh" + UINDENTERS="shellindent.awk" + UIGUIFILES="shellindent gnuindent bcpp astyle" + + if use html; then + UEXAMPLES="${UEXAMPLES} html" + UIGUIFILES="${UIGUIFILES} tidy" + if use perl; then + UINDENTERS="${UINDENTERS} hindent" + UIGUIFILES="${UIGUIFILES} hindent" + fi + fi + + if use perl; then + UEXAMPLES="${UEXAMPLES} pl" + UIGUIFILES="${UIGUIFILES} perltidy" + fi + + if use php; then + UEXAMPLES="${UEXAMPLES} php" + UINDENTERS="${UINDENTERS} phpStylist.php" + UIGUIFILES="${UIGUIFILES} php_Beautifier phpStylist" + fi + + if use python; then + UEXAMPLES="${UEXAMPLES} py" + UINDENTERS="${UINDENTERS} pindent.py" + UIGUIFILES="${UIGUIFILES} pindent" + python_convert_shebangs -r 2 . + fi + + if use ruby; then + UEXAMPLES="${UEXAMPLES} rb" + UINDENTERS="${UINDENTERS} rbeautify.rb ruby_formatter.rb" + UIGUIFILES="${UIGUIFILES} rbeautify rubyformatter" + fi + + if use xml; then + UEXAMPLES="${UEXAMPLES} xml" + UIGUIFILES="${UIGUIFILES} xmlindent" + fi + + IFILES="" + for I in ${UINDENTERS}; do + IFILES="${IFILES} indenters/${I}" + chmod +x indenters/${I} + done + for I in ${UIGUIFILES}; do + IFILES="${IFILES} indenters/uigui_${I}.ini" + done + + # apply fixes in .pro file + sed -i "/^unix:indenters.files +=/d" UniversalIndentGUI.pro || + die ".pro patching failed" + sed -i "s:indenters/uigui_\*\.ini:${IFILES}:" UniversalIndentGUI.pro || + die ".pro patching failed" + + for lang in ${LANGS}; do + if [[ ! "${LINGUAS}" =~ "${lang}" ]]; then + [[ ${lang} == "ja" ]] && lang="ja_JP" + sed -i "/_${lang}.ts/d" UniversalIndentGUI.pro || die "failed while disabling $lang" + sed -i "/_${lang}.qm/d" UniversalIndentGUI.pro || die "failed while disabling $lang" + fi + done + + epatch "${FILESDIR}"/"${P}"-gcc45.patch + # bug #325811 + epatch "${FILESDIR}"/"${P}"-astyle_pwd_fix.patch +} + +src_configure() { + eqmake4 UniversalIndentGUI.pro || die "eqmake4 failed" +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "emake install failed" + dodoc *.txt || die "doc installation failed" + doman doc/"${PN}".1.gz || die "man page installation failed" + insinto /usr/share/doc/${PF}/examples + for I in ${UEXAMPLES}; do + doins indenters/example.${I} + done + + doicon resources/universalIndentGUI.png + + make_desktop_entry universalindentgui UniversalIndentGUI universalIndentGUI \ + "Qt;Development" || die "menu installation failed" +} |