Bug 160465 - app-office/texmaker-1.50 does not compile
Bug#: 160465 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: text-markup@gentoo.org Reported By: jeff@plotzke.com
Component: Applications
URL: 
Summary: app-office/texmaker-1.50 does not compile
Keywords:  
Status Whiteboard: 
Opened: 2007-01-06 14:18 0000
Description:   Opened: 2007-01-06 14:18 0000
When emerging texmaker 1.5:

\\\" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.moc -I.ui -o
.obj/latexeditorview.o latexeditorview.cpp
main.cpp: In constructor `TexmakerApp::TexmakerApp(int, char**)':
main.cpp:39: error: stray '\' in program
main.cpp:39: error: `share' was not declared in this scope
main.cpp:39: error: missing terminating " character
main.cpp:47: error: `texmaker' was not declared in this scope
main.cpp:47: error: expected `,' or `;' before "QString"
main.cpp:48: error: `locale' was not declared in this scope
main.cpp:49: error: `locale' was not declared in this scope
main.cpp:49: warning: unused variable 'locale'
main.cpp:39: warning: unused variable 'share'
main.cpp:47: warning: unused variable 'texmaker'
make: *** [.obj/main.o] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: app-office/texmaker-1.50 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  texmaker-1.50.ebuild, line 48:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if
relevant.


Reproducible: Always

Steps to Reproduce:
1.  emerge texmaker





(emerge --info in attachment)

------- Comment #1 From Jeff Plotzke 2007-01-06 14:19:21 0000 -------
Created an attachment (id=105661) [details]
emerge --info for non-compile

------- Comment #2 From Damian Kolkowski 2007-01-09 17:14:00 0000 -------
Solution:

Add those lines to ebuild:

+src_unpack() {
+       unpack ${A}
+
+       cd ${S}
+       sed -i -e 's/PREFIX"/"\/usr/' *cpp
+}
+

Regards

------- Comment #3 From Damian Kolkowski 2007-01-09 17:15:12 0000 -------
Created an attachment (id=106235) [details]
texmaker-1.50

------- Comment #4 From Emiliano Vavassori 2007-01-13 20:06:14 0000 -------
Created an attachment (id=106845) [details]
Patch for texmaker-1.50.ebuild

The previous solution is like killing an ant with a bazooka.

The most simple solution is to add 'PREFIX=/usr' on the qmake command line. See
BUILD.sh in the main directory of sources tarball.

Another problem for this ebuild is that it doesn't compile with the user
C{,XX}FLAGS. So, the patch attached here also do this.

A third improvement was made adding -spec parameter to qmake line. Since the
ebuild is valid also on freebsd, there was the need for a filter for applying
the correct parameter to qmake.

HTH, please feedback.

------- Comment #5 From Timo Meinen 2007-01-15 00:20:33 0000 -------
Dear Emiliano,

thank you for your patch, unfortunatly it didn't work for me. :-( But the new
ebuild from Damian worked. So, I have a updated texmaker.

Thank you
Timo

------- Comment #6 From Emiliano Vavassori 2007-01-16 15:17:10 0000 -------
Created an attachment (id=107181) [details]
Patch for texmaker-1.50.ebuild

(In reply to comment #5)
> thank you for your patch, unfortunatly it didn't work for me. :-( But the new
> ebuild from Damian worked.

IMO, this bug is related to some strange gcc or qt behaviour. On my machine,
portage ebuild emerges perfectly, but on my girlfriend's machine it does not
and requires the sed fix, also with two different gcc.

Anyway, here is a new patch for (portage) texmaker-1.50.ebuild. It features the
'sed' fix plus the improvements I've already indicated. Also, it installs in
the correct place some other 'doc' files and the svg format icon and use
upstream-provided texmaker.desktop instead of creating a new one on the fly.

HTH, please feedback.

------- Comment #7 From Timo Meinen 2007-01-16 19:02:03 0000 -------
I tested the new patch on my second system and it emerges fine. Thank you.

Timo

------- Comment #8 From Jens Rutschmann 2007-01-22 17:54:24 0000 -------
(In reply to comment #7)
> I tested the new patch on my second system and it emerges fine. Thank you.
> 
> Timo
> 

I can confirm this. After applying the new patch building of texmaker was
successful. Thanks !

------- Comment #9 From Jens-Uwe Peter 2007-02-02 16:26:15 0000 -------
Patch worked also for me. Please commit to portage-tree!

------- Comment #10 From Kalidarn 2007-02-05 10:46:40 0000 -------
USEFLAG needs to be updated and deps:

Source package

Source tarball : texmaker-1.5.tar.bz2
Compilation :
The Qt toolkit (version >= 4.2.2) is required to compile Texmaker.
Unix and MacOsX systems : type "sudo BUILD.sh" in a terminal.
Windows : use the commands "qmake texmaker.pro" and "make". 

http://www.xm1math.net/texmaker/download.html

------- Comment #11 From Alexandre Buisse (RETIRED) 2007-02-08 13:48:58 0000 -------
Fixed in 1.50-r1 with a modified version of the patch, thanks to everyone.