[Xfce4-commits] <xfce4-weather-plugin:master> Build plugin as a module (bug #9152).

Harald Judt noreply at xfce.org
Wed Jul 25 09:42:01 CEST 2012


Updating branch refs/heads/master
         to 77546c193fb1307c76981e8f41687687344b24f2 (commit)
       from 94c7c6e88ed7caf1ed8fec608558050274064a84 (commit)

commit 77546c193fb1307c76981e8f41687687344b24f2
Author: Landry Breuil <landry at xfce.org>
Date:   Wed Jul 25 09:34:46 2012 +0200

    Build plugin as a module (bug #9152).

 panel-plugin/Makefile.am                           |   32 ++++++++++----------
 panel-plugin/weather.c                             |    2 +-
 .../{weather.desktop.in.in => weather.desktop.in}  |    3 +-
 po/POTFILES.in                                     |    2 +-
 4 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index ed06da1..f1fe387 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -4,12 +4,11 @@ INCLUDES =								\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
 	-DG_LOG_DOMAIN=\"weather\"
 
-plugin_PROGRAMS =							\
-	xfce4-weather-plugin
+plugin_LTLIBRARIES = libweather.la
 
-plugindir = $(libexecdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
-xfce4_weather_plugin_SOURCES =						\
+libweather_la_SOURCES =						\
 	weather.c							\
 	weather.h							\
 	weather-config.c						\
@@ -31,14 +30,14 @@ xfce4_weather_plugin_SOURCES =						\
 	weather-translate.c						\
 	weather-translate.h
 
-xfce4_weather_plugin_CFLAGS =						\
+libweather_la_CFLAGS =						\
 	$(LIBXFCE4PANEL_CFLAGS)						\
 	$(LIBXFCE4UI_CFLAGS)						\
 	$(LIBXFCE4UTIL_CFLAGS)						\
 	$(GTK_CFLAGS)							\
 	$(LIBXML_CFLAGS)
 
-xfce4_weather_plugin_LDADD =						\
+libweather_la_LIBADD =						\
 	$(LIBXFCE4PANEL_LIBS)						\
 	$(LIBXFCE4UTIL_LIBS)						\
 	$(LIBXFCE4UI_LIBS)						\
@@ -46,19 +45,20 @@ xfce4_weather_plugin_LDADD =						\
 	$(LIBXML_LIBS)							\
 	$(LIBRESOLV)
 
-desktopdir = $(datadir)/xfce4/panel-plugins
-desktop_in_in_files = weather.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
-%.desktop.in: %.desktop.in.in
-	sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
+libweather_la_LDFLAGS = \
+	-avoid-version \
+	-module \
+	-no-undefined \
+	-export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+	$(PLATFORM_LDFLAGS)
+
+desktopdir = $(datadir)/xfce4/panel/plugins
+desktop_in_files = weather.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST =								\
-	$(desktop_in_in_files)
+EXTRA_DIST = $(desktop_in_files)
 
-CLEANFILES =								\
-	$(desktop_in_files)						\
-	$(desktop_DATA)
+CLEANFILES = $(desktop_DATA)
 
 # vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 5eb81f3..7777b24 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -1188,4 +1188,4 @@ weather_construct (XfcePanelPlugin *plugin)
   update_weatherdata (data);
 }
 
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (weather_construct);
+XFCE_PANEL_PLUGIN_REGISTER (weather_construct);
diff --git a/panel-plugin/weather.desktop.in.in b/panel-plugin/weather.desktop.in
similarity index 64%
rename from panel-plugin/weather.desktop.in.in
rename to panel-plugin/weather.desktop.in
index 6c39f68..fa40e0a 100644
--- a/panel-plugin/weather.desktop.in.in
+++ b/panel-plugin/weather.desktop.in
@@ -3,4 +3,5 @@ Type=X-XFCE-PanelPlugin
 _Name=Weather Update
 _Comment=Show current weather conditions
 Icon=xfce4-weather
-X-XFCE-Exec=@libexecdir@/xfce4/panel-plugins/xfce4-weather-plugin
+X-XFCE-Internal=FALSE
+X-XFCE-Module=weather
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3f2884b..c834059 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -19,4 +19,4 @@ panel-plugin/weather-summary.h
 panel-plugin/weather-translate.c
 panel-plugin/weather-translate.h
 
-panel-plugin/weather.desktop.in.in
+panel-plugin/weather.desktop.in


More information about the Xfce4-commits mailing list