Bug 89956

Summary: JJ: KPresenter doesn't compile if arts is not present and --without-arts is used in configure
Product: [Applications] calligrastage Reporter: Laurence Withers <l>
Component: generalAssignee: Laurent Montel <montel>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nicolasg
Priority: NOR    
Version: 1.3.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: backported patch

Description Laurence Withers 2004-09-21 15:00:21 UTC
Version:           1.3.3 (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
OS:                Linux

Note: this is *not* a dup of http://bugs.kde.org/show_bug.cgi?id=76311

I've configured KOffice without arts support (i.e. ./configure --without-arts),
but KPresenter doesn't compile because it can't find the arts header files (of
course, arts is not installed at all).

It's fair enough if KPresenter absolutely 100% requires arts, but in that case
the configure flag --without-arts should disable compilation of KPresenter
altogether.
Comment 1 Nicolas Goutte 2004-09-21 17:29:45 UTC
As I have already compiled KOffice with --without-arts, it should work but perhaps only for KOffice CVS HEAD and not for KOffice 1.3.x (yet).

So let's try to make it a "Junior Job".

Have a nice day!
Comment 2 Nicolas Goutte 2004-10-02 01:23:55 UTC
Indeed, only KOffice CVS HEAD has the needed code not compile correctly without arts. So somebody would have to port it back to KOffice 1.3.x to allow it there too.

Have a nice day!
Comment 3 Jan Jitse Venselaar 2004-10-05 21:31:42 UTC
Created attachment 7789 [details]
backported patch

I've ported the patch for the CVS HEAD, very simple, only the patch for the
Makefile had to be changed, but I'm unsure on how to test if it really works.

I have a full KDE 3.3 installation, but that includes arts, how can I test if
it works without arts, or is that necessary at all?
Comment 4 Nicolas Goutte 2004-10-06 01:20:58 UTC
CVS commit by goutte: 

Allow KPresenter to be compiled --without-arts (Backport)
CCMAIL:89956@bugs.kde.org
(I am not closing the bug, as I cannot test either.)


  M +5 -1      Makefile.am   1.208.2.2
  M +14 -0     kpresenter_sound_player.cc   1.4.2.1


--- koffice/kpresenter/Makefile.am  #1.208.2.1:1.208.2.2
@@ -50,6 +50,10 @@
         imageEffectDia.cc imageEffectBase.ui
 
+if include_ARTS
+ARTSKDE = -lartskde
+endif
+
 libkpresenterpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
-libkpresenterpart_la_LIBADD = autoformEdit/libaf.la $(LIB_KOFFICEUI) $(LIB_KOTEXT) -lkspell $(LIBKOSPELL) -lartskde -lkdefx
+libkpresenterpart_la_LIBADD = autoformEdit/libaf.la $(LIB_KOFFICEUI) $(LIB_KOTEXT) -lkspell $(LIBKOSPELL) $(ARTSKDE) -lkdefx
 libkpresenterpart_la_METASOURCES = AUTO
 

--- koffice/kpresenter/kpresenter_sound_player.cc  #1.4:1.4.2.1
@@ -28,7 +28,11 @@ Boston, MA 02111-1307, USA.
 */
 
+#include <config.h>
+
+#ifndef WITHOUT_ARTS
 #include <kartsdispatcher.h>
 #include <kplayobjectfactory.h>
 #include <soundserver.h>
+#endif
 
 #include <kdebug.h>
@@ -44,8 +48,10 @@ public:
     KPresenterSoundPlayerPrivate( QString fileName ) : fileName( fileName ) {};
 
+#ifndef WITHOUT_ARTS
     KArtsDispatcher m_dispatche;
     Arts::SoundServerV2 m_soundServer;
     KPlayObjectFactory *m_factory;
     KPlayObject        *m_player;
+#endif
 };
 
@@ -55,13 +61,17 @@ KPresenterSoundPlayer::KPresenterSoundPl
     d = new KPresenterSoundPlayerPrivate( fileName );
 
+#ifndef WITHOUT_ARTS
     d->m_soundServer = Arts::Reference( "global:Arts_SoundServerV2" );
     d->m_factory = new KPlayObjectFactory( d->m_soundServer );
     d->m_player = 0;
+#endif
 }
 
 KPresenterSoundPlayer::~KPresenterSoundPlayer()
 {
+#ifndef WITHOUT_ARTS
     delete d->m_player;
     delete d->m_factory;
+#endif
     delete d;
 }
@@ -75,10 +85,13 @@ void KPresenterSoundPlayer::play( const 
 void KPresenterSoundPlayer::stop()
 {
+#ifndef WITHOUT_ARTS
     delete d->m_player;
     d->m_player = 0;
+#endif
 }
 
 void KPresenterSoundPlayer::play()
 {
+#ifndef WITHOUT_ARTS
     if ( d->m_soundServer.isNull() )
         return;
@@ -93,4 +106,5 @@ void KPresenterSoundPlayer::play()
             d->m_player->play();
     }
+#endif
 }
 


Comment 5 Caleb Tennis 2005-01-19 01:32:51 UTC
1.3.5 has been working great without arts on Gentoo now for some time.  Closing.