summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2021-12-31 12:15:57 +0100
committerSlávek Banko <[email protected]>2021-12-31 12:21:45 +0100
commit5363fd55b8fed6a22d63017ff110ddd7dc619c1a (patch)
tree800c4cdcf14dc062f6a0d70746d04fcf508bc16e
parentaf0617f88ea621a3cd8de1c9814f53da4afbefaa (diff)
downloadtdeaddons-5363fd55b8fed6a22d63017ff110ddd7dc619c1a.tar.gz
tdeaddons-5363fd55b8fed6a22d63017ff110ddd7dc619c1a.zip
Add option WITH_GCC_VISIBILITY.
Fix building with hidden visibility. Add missing definitions to config.h.cmake. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 762bfec2c849854fc0247acf8d2f107c27b17940)
-rw-r--r--CMakeLists.txt13
-rw-r--r--config.h.cmake8
-rw-r--r--kate/filetemplates/plugin/filetemplates.cpp10
-rw-r--r--kate/katesort/plugin_sort.cpp10
-rw-r--r--kate/tabbarextension/plugin_katetabbarextension.cpp10
-rw-r--r--konq-plugins/sidebar/metabar/src/metabar.cpp34
-rw-r--r--konq-plugins/webarchiver/webarchivecreator.cpp2
-rw-r--r--noatun-plugins/alarm/wakeup.cpp9
-rw-r--r--noatun-plugins/alsaplayer/alsaplayerui.cpp2
-rw-r--r--noatun-plugins/blurscope/sdlscope.cpp8
-rw-r--r--noatun-plugins/charlatan/charlatanui.cpp2
-rw-r--r--noatun-plugins/dub/dub/dubplaylist.cpp11
-rw-r--r--noatun-plugins/ffrs/ffrs.cpp9
-rw-r--r--noatun-plugins/luckytag/luckytag.cpp7
-rw-r--r--noatun-plugins/lyrics/lyrics.cpp10
-rw-r--r--noatun-plugins/nexscope/noatunplugin.cpp10
-rw-r--r--noatun-plugins/noatunmadness/madness.cpp8
-rw-r--r--noatun-plugins/oblique/oblique.cpp8
-rw-r--r--noatun-plugins/pitchablespeed/pitchablespeed.cpp2
-rw-r--r--noatun-plugins/synaescope/synaescope.cpp2
-rw-r--r--noatun-plugins/tippercanoe/synaescope.cpp9
-rw-r--r--noatun-plugins/tyler/file.cpp65
-rw-r--r--noatun-plugins/tyler/tyler.cpp9
-rw-r--r--noatun-plugins/wavecapture/wavecapture.cpp2
24 files changed, 155 insertions, 105 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0353ce8..6ce10c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,12 +41,13 @@ tde_setup_paths( )
##### optional stuff ############################
-option( WITH_ALL_OPTIONS "Enable all sane optional stuff" OFF )
-option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
-option( WITH_SDL "Enable SDL support" ${WITH_ALL_OPTIONS} )
-option( WITH_BERKELEY_DB "Enable Berkeley DB support" ${WITH_ALL_OPTIONS} )
-option( WITH_XMMS "Enable xmms support" OFF )
-option( WITH_TEST "Build tests" OFF )
+option( WITH_ALL_OPTIONS "Enable all sane optional stuff" OFF )
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
+option( WITH_SDL "Enable SDL support" ${WITH_ALL_OPTIONS} )
+option( WITH_BERKELEY_DB "Enable Berkeley DB support" ${WITH_ALL_OPTIONS} )
+option( WITH_XMMS "Enable xmms support" OFF )
+option( WITH_TEST "Build tests" OFF )
##### options comments ##########################
diff --git a/config.h.cmake b/config.h.cmake
index 59a77ce..09ad4dd 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1,3 +1,11 @@
+#define VERSION "@VERSION@"
+
+// Defined if you have fvisibility and fvisibility-inlines-hidden support.
+#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
// kicker-applets
#cmakedefine HAVE_FCNTL_H 1
diff --git a/kate/filetemplates/plugin/filetemplates.cpp b/kate/filetemplates/plugin/filetemplates.cpp
index 952ee07..6604461 100644
--- a/kate/filetemplates/plugin/filetemplates.cpp
+++ b/kate/filetemplates/plugin/filetemplates.cpp
@@ -81,11 +81,11 @@ class PluginView : public KXMLGUIClient
extern "C"
{
- void* init_katefiletemplates()
- {
- TDEGlobal::locale()->insertCatalogue("katefiletemplates");
- return new KatePluginFactory;
- }
+ KDE_EXPORT void* init_katefiletemplates()
+ {
+ TDEGlobal::locale()->insertCatalogue("katefiletemplates");
+ return new KatePluginFactory;
+ }
}
KatePluginFactory::KatePluginFactory()
diff --git a/kate/katesort/plugin_sort.cpp b/kate/katesort/plugin_sort.cpp
index 904d62e..fa55734 100644
--- a/kate/katesort/plugin_sort.cpp
+++ b/kate/katesort/plugin_sort.cpp
@@ -38,11 +38,11 @@ class PluginView : public KXMLGUIClient
extern "C"
{
- void* init_katesortplugin()
- {
- TDEGlobal::locale()->insertCatalogue("katesort");
- return new KatePluginFactory;
- }
+ KDE_EXPORT void* init_katesortplugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("katesort");
+ return new KatePluginFactory;
+ }
}
KatePluginFactory::KatePluginFactory()
diff --git a/kate/tabbarextension/plugin_katetabbarextension.cpp b/kate/tabbarextension/plugin_katetabbarextension.cpp
index 462161b..4f0682c 100644
--- a/kate/tabbarextension/plugin_katetabbarextension.cpp
+++ b/kate/tabbarextension/plugin_katetabbarextension.cpp
@@ -55,11 +55,11 @@ class PluginView : public KXMLGUIClient
extern "C"
{
- void* init_libkatetabbarextensionplugin()
- {
- TDEGlobal::locale()->insertCatalogue("katetabbarextension");
- return new KatePluginFactory;
- }
+ KDE_EXPORT void* init_libkatetabbarextensionplugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("katetabbarextension");
+ return new KatePluginFactory;
+ }
}
TQObject* KatePluginFactory::createObject(TQObject *parent,
diff --git a/konq-plugins/sidebar/metabar/src/metabar.cpp b/konq-plugins/sidebar/metabar/src/metabar.cpp
index d479417..b2967a1 100644
--- a/konq-plugins/sidebar/metabar/src/metabar.cpp
+++ b/konq-plugins/sidebar/metabar/src/metabar.cpp
@@ -36,24 +36,26 @@ void Metabar::handlePreview(const KFileItemList &items)
}
-extern "C" {
- bool add_konqsidebar_metabar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) {
- Q_UNUSED(param);
-
- map->insert("Type", "Link");
- map->insert("Icon", "metabar");
- map->insert("Name", "Metabar");
- map->insert("Open", "true");
- map->insert("X-TDE-KonqSidebarModule","konqsidebar_metabar");
- fn->setLatin1("metabar%1.desktop");
- return true;
- }
+extern "C"
+{
+ KDE_EXPORT bool add_konqsidebar_metabar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map)
+ {
+ Q_UNUSED(param);
+
+ map->insert("Type", "Link");
+ map->insert("Icon", "metabar");
+ map->insert("Name", "Metabar");
+ map->insert("Open", "true");
+ map->insert("X-TDE-KonqSidebarModule","konqsidebar_metabar");
+ fn->setLatin1("metabar%1.desktop");
+ return true;
+ }
}
extern "C"
{
- void* create_konqsidebar_metabar(TDEInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name)
- {
- return new Metabar(instance,par,widp,desktopname,name);
- }
+ KDE_EXPORT void* create_konqsidebar_metabar(TDEInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name)
+ {
+ return new Metabar(instance,par,widp,desktopname,name);
+ }
}
diff --git a/konq-plugins/webarchiver/webarchivecreator.cpp b/konq-plugins/webarchiver/webarchivecreator.cpp
index baae48b..bbc3859 100644
--- a/konq-plugins/webarchiver/webarchivecreator.cpp
+++ b/konq-plugins/webarchiver/webarchivecreator.cpp
@@ -32,7 +32,7 @@
extern "C"
{
- ThumbCreator * KDE_EXPORT new_creator()
+ KDE_EXPORT ThumbCreator* KDE_EXPORT new_creator()
{
return new WebArchiveCreator;
}
diff --git a/noatun-plugins/alarm/wakeup.cpp b/noatun-plugins/alarm/wakeup.cpp
index 137a3aa..fabec0a 100644
--- a/noatun-plugins/alarm/wakeup.cpp
+++ b/noatun-plugins/alarm/wakeup.cpp
@@ -39,10 +39,13 @@
#include "kminutespinbox.h"
#include "kpercentspinbox.h"
-extern "C" Plugin *create_plugin()
+extern "C"
{
- TDEGlobal::locale()->insertCatalogue("wakeup");
- return new Wakeup();
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("wakeup");
+ return new Wakeup();
+ }
}
Wakeup *Wakeup::wakeme = 0;
diff --git a/noatun-plugins/alsaplayer/alsaplayerui.cpp b/noatun-plugins/alsaplayer/alsaplayerui.cpp
index 6f15b4d..84c92e0 100644
--- a/noatun-plugins/alsaplayer/alsaplayerui.cpp
+++ b/noatun-plugins/alsaplayer/alsaplayerui.cpp
@@ -25,7 +25,7 @@
extern "C"
{
- Plugin * create_plugin()
+ KDE_EXPORT Plugin* create_plugin()
{
TDEGlobal::locale()->insertCatalogue("alsaplayerui");
return new AlsaPlayer;
diff --git a/noatun-plugins/blurscope/sdlscope.cpp b/noatun-plugins/blurscope/sdlscope.cpp
index 9485c1f..1d153a3 100644
--- a/noatun-plugins/blurscope/sdlscope.cpp
+++ b/noatun-plugins/blurscope/sdlscope.cpp
@@ -29,10 +29,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern "C"
{
-Plugin *create_plugin()
-{
- return new SDLScope();
-}
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ return new SDLScope();
+ }
}
SDLScope::SDLScope()
diff --git a/noatun-plugins/charlatan/charlatanui.cpp b/noatun-plugins/charlatan/charlatanui.cpp
index b3e69db..b1ec9ec 100644
--- a/noatun-plugins/charlatan/charlatanui.cpp
+++ b/noatun-plugins/charlatan/charlatanui.cpp
@@ -25,7 +25,7 @@
extern "C"
{
- Plugin * create_plugin()
+ KDE_EXPORT Plugin* create_plugin()
{
TDEGlobal::locale()->insertCatalogue("charlatanui");
return new Charlatan;
diff --git a/noatun-plugins/dub/dub/dubplaylist.cpp b/noatun-plugins/dub/dub/dubplaylist.cpp
index 20537a7..a8e91df 100644
--- a/noatun-plugins/dub/dub/dubplaylist.cpp
+++ b/noatun-plugins/dub/dub/dubplaylist.cpp
@@ -24,11 +24,14 @@
#include "dubplaylist.h"
// plugin interface
-extern "C" Plugin *create_plugin()
+extern "C"
{
- TDEGlobal::locale()->insertCatalogue("dub");
- DubPlaylist* dub = new DubPlaylist;
- return dub;
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("dub");
+ DubPlaylist* dub = new DubPlaylist;
+ return dub;
+ }
}
/** Construct playlist object */
diff --git a/noatun-plugins/ffrs/ffrs.cpp b/noatun-plugins/ffrs/ffrs.cpp
index 1d219fa..ae2a243 100644
--- a/noatun-plugins/ffrs/ffrs.cpp
+++ b/noatun-plugins/ffrs/ffrs.cpp
@@ -14,10 +14,13 @@
#include "ffrs.h"
-extern "C" Plugin *create_plugin()
+extern "C"
{
- TDEGlobal::locale()->insertCatalogue("ffrs");
- return new FFRS();
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("ffrs");
+ return new FFRS();
+ }
}
diff --git a/noatun-plugins/luckytag/luckytag.cpp b/noatun-plugins/luckytag/luckytag.cpp
index d040659..e30ab8d 100644
--- a/noatun-plugins/luckytag/luckytag.cpp
+++ b/noatun-plugins/luckytag/luckytag.cpp
@@ -23,9 +23,12 @@
#include "luckytag.h"
#include "parsedmp3filename.h"
-extern "C" Plugin *create_plugin()
+extern "C"
{
- return new LuckyTagger;
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ return new LuckyTagger;
+ }
}
LuckyTagger::LuckyTagger(void) : Tags(-10)
diff --git a/noatun-plugins/lyrics/lyrics.cpp b/noatun-plugins/lyrics/lyrics.cpp
index df5051d..ad65194 100644
--- a/noatun-plugins/lyrics/lyrics.cpp
+++ b/noatun-plugins/lyrics/lyrics.cpp
@@ -14,11 +14,11 @@
extern "C"
{
- Plugin *create_plugin()
- {
- TDEGlobal::locale()->insertCatalogue("lyrics");
- return new Lyrics();
- }
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("lyrics");
+ return new Lyrics();
+ }
}
Lyrics *lyrics;
diff --git a/noatun-plugins/nexscope/noatunplugin.cpp b/noatun-plugins/nexscope/noatunplugin.cpp
index 25deaf6..cb5f9c6 100644
--- a/noatun-plugins/nexscope/noatunplugin.cpp
+++ b/noatun-plugins/nexscope/noatunplugin.cpp
@@ -8,11 +8,11 @@
extern "C"
{
-Plugin *create_plugin()
-{
- TDEGlobal::locale()->insertCatalogue("nexscope");
- return new NexPlugin();
-}
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("nexscope");
+ return new NexPlugin();
+ }
}
diff --git a/noatun-plugins/noatunmadness/madness.cpp b/noatun-plugins/noatunmadness/madness.cpp
index 32014f6..07a3581 100644
--- a/noatun-plugins/noatunmadness/madness.cpp
+++ b/noatun-plugins/noatunmadness/madness.cpp
@@ -21,10 +21,10 @@ RMS's novel that I'm supposed to put at the top of every story. He's insane.
extern "C"
{
-Plugin *create_plugin()
-{
- return new Madness();
-}
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ return new Madness();
+ }
}
Madness::Madness()
diff --git a/noatun-plugins/oblique/oblique.cpp b/noatun-plugins/oblique/oblique.cpp
index 2c12588..a74ce3b 100644
--- a/noatun-plugins/oblique/oblique.cpp
+++ b/noatun-plugins/oblique/oblique.cpp
@@ -17,13 +17,15 @@
#include <tqtimer.h>
-extern "C" Plugin *create_plugin()
+extern "C"
{
- return new Oblique();
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ return new Oblique();
+ }
}
-
Oblique::Oblique()
: Playlist(0, 0), mSchemaCollection("oblique/schemas")
{
diff --git a/noatun-plugins/pitchablespeed/pitchablespeed.cpp b/noatun-plugins/pitchablespeed/pitchablespeed.cpp
index 5ebaf27..54527bf 100644
--- a/noatun-plugins/pitchablespeed/pitchablespeed.cpp
+++ b/noatun-plugins/pitchablespeed/pitchablespeed.cpp
@@ -25,7 +25,7 @@
extern "C"
{
- Plugin *create_plugin()
+ KDE_EXPORT Plugin* create_plugin()
{
TDEGlobal::locale()->insertCatalogue("pitchablespeed");
return new PitchableSpeed();
diff --git a/noatun-plugins/synaescope/synaescope.cpp b/noatun-plugins/synaescope/synaescope.cpp
index e69e7af..1249953 100644
--- a/noatun-plugins/synaescope/synaescope.cpp
+++ b/noatun-plugins/synaescope/synaescope.cpp
@@ -15,7 +15,7 @@
extern "C"
{
- Plugin *create_plugin()
+ KDE_EXPORT Plugin* create_plugin()
{
TDEGlobal::locale()->insertCatalogue("synaescope");
return new SynaeScope();
diff --git a/noatun-plugins/tippercanoe/synaescope.cpp b/noatun-plugins/tippercanoe/synaescope.cpp
index 6100796..a95658b 100644
--- a/noatun-plugins/tippercanoe/synaescope.cpp
+++ b/noatun-plugins/tippercanoe/synaescope.cpp
@@ -19,10 +19,13 @@
#include "syna.h"
#include "synaescope.h"
-extern "C" Plugin *create_plugin()
+extern "C"
{
- TDEGlobal::locale()->insertCatalogue("tippecanoe");
- return new SynaeScope();
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("tippecanoe");
+ return new SynaeScope();
+ }
}
SynaeScope::SynaeScope()
diff --git a/noatun-plugins/tyler/file.cpp b/noatun-plugins/tyler/file.cpp
index 432a7be..79fb663 100644
--- a/noatun-plugins/tyler/file.cpp
+++ b/noatun-plugins/tyler/file.cpp
@@ -39,43 +39,62 @@ static TQString getSavePath(void)
return dirs.saveLocation("data", "noatun/") + "tylerstates";
}
-extern "C" void save_effect(t_effect *effect)
+extern "C"
{
- TQFile file(getSavePath());
- if(!file.open(IO_WriteOnly))
- return;
+ KDE_EXPORT void save_effect(t_effect *effect)
+ {
+ TQFile file(getSavePath());
+ if(!file.open(IO_WriteOnly))
+ {
+ return;
+ }
- for(unsigned i = 0; i < sizeof(t_effect); i++)
- file.putch( *((byte *)effect + i) );
+ for(unsigned i = 0; i < sizeof(t_effect); i++)
+ {
+ file.putch( *((byte *)effect + i) );
+ }
+ }
}
t_effect effects[100];
int nb_effects=0;
-extern "C" void load_effects()
+extern "C"
{
- TQFile file(getDataPath());
- if(!file.open(IO_ReadOnly))
- exit(1);
-
- unsigned int i;
- nb_effects = 0;
- while(!file.atEnd())
+ KDE_EXPORT void load_effects()
{
- byte* ptr_effect = (byte *)&effects[nb_effects++];
- for(i = 0; i < sizeof(t_effect); i++)
- ptr_effect[i] = file.getch();
+ TQFile file(getDataPath());
+ if(!file.open(IO_ReadOnly))
+ {
+ exit(1);
+ }
+
+ unsigned int i;
+ nb_effects = 0;
+ while(!file.atEnd())
+ {
+ byte* ptr_effect = (byte *)&effects[nb_effects++];
+ for(i = 0; i < sizeof(t_effect); i++)
+ {
+ ptr_effect[i] = file.getch();
+ }
+ }
}
}
-extern "C" void load_random_effect(t_effect *effect)
+extern "C"
{
- if(nb_effects > 0)
+ KDE_EXPORT void load_random_effect(t_effect *effect)
{
- int num_effect = rand() % nb_effects;
- unsigned int i;
+ if(nb_effects > 0)
+ {
+ int num_effect = rand() % nb_effects;
+ unsigned int i;
- for(i = 0; i < sizeof(t_effect) ; i++)
- *((byte*)effect+i)=*((byte*)(&effects[num_effect])+i);
+ for(i = 0; i < sizeof(t_effect) ; i++)
+ {
+ *((byte*)effect+i) = *((byte*)(&effects[num_effect])+i);
+ }
+ }
}
}
diff --git a/noatun-plugins/tyler/tyler.cpp b/noatun-plugins/tyler/tyler.cpp
index 022f22a..d7690bb 100644
--- a/noatun-plugins/tyler/tyler.cpp
+++ b/noatun-plugins/tyler/tyler.cpp
@@ -12,10 +12,13 @@
#include <noatun/app.h>
#include <kdebug.h>
-extern "C" Plugin *create_plugin()
+extern "C"
{
- TDEGlobal::locale()->insertCatalogue("tyler");
- return new Tyler();
+ KDE_EXPORT Plugin* create_plugin()
+ {
+ TDEGlobal::locale()->insertCatalogue("tyler");
+ return new Tyler();
+ }
}
const int Tyler::bufferSize = 512;
diff --git a/noatun-plugins/wavecapture/wavecapture.cpp b/noatun-plugins/wavecapture/wavecapture.cpp
index a138103..8178ba1 100644
--- a/noatun-plugins/wavecapture/wavecapture.cpp
+++ b/noatun-plugins/wavecapture/wavecapture.cpp
@@ -42,7 +42,7 @@
extern "C"
{
- Plugin *create_plugin()
+ KDE_EXPORT Plugin* create_plugin()
{
TDEGlobal::locale()->insertCatalogue("wavecapture");
return new WaveCapture();