Commit 63d2c0b5 authored by Lucian Langa's avatar Lucian Langa
Browse files

Commit on behalf of Fridrich Strba

svn path=/trunk/; revision=498
parent 57eaedb5
2009-04-08 Fridrich Strba <fridrich.strba@bluewin.ch>
Cross-compilation from Linux to Windows support by Fridrich Strba
<fridrich.strba@bluewin.ch>
* Makefile.in:
* configure.ac:
* server.mk:
* src/GNOME_Evolution_RSS.server.in.in:
* src/Makefile.am:
* src/misc.c (gen_crc):
* src/org-gnome-evolution-rss.eplug.xml:
* src/rss-config-factory.c:
* src/rss-icon-factory.c:
* src/rss.c (strcasestr), (rss_finalize):
* src/rss.h:
check for sys/wait.h, define SOEXT as dll, define missing function
strcasestr, define new image paths
2009-04-07 Lucian Langa <lucilanga@gnome.org>
* src/rss-config-factory.c (e_plugin_lib_get_configure_widget): force
......
......@@ -145,6 +145,7 @@ HAVE_RENDERKIT = @HAVE_RENDERKIT@
HAVE_WEBKIT = @HAVE_WEBKIT@
HAVE_XULRUNNER = @HAVE_XULRUNNER@
ICON_DIR = @ICON_DIR@
IMAGESDIR_IN_SERVER_FILE = @IMAGESDIR_IN_SERVER_FILE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
......@@ -197,6 +198,8 @@ MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NMEDIT = @NMEDIT@
NO_UNDEFINED = @NO_UNDEFINED@
NO_UNDEFINED_LIBS = @NO_UNDEFINED_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
......@@ -206,6 +209,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR_IN_SERVER_FILE = @PLUGINDIR_IN_SERVER_FILE@
PLUGIN_INSTALL_DIR = @PLUGIN_INSTALL_DIR@
POFILES = @POFILES@
POSUB = @POSUB@
......@@ -275,6 +279,7 @@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
privdatadir = @privdatadir@
privlibdir = @privlibdir@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
......
......@@ -5,6 +5,8 @@ AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_MAINTAINER_MODE
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
......@@ -229,6 +231,8 @@ dnl ********************
SOUP_VERSION=`$PKG_CONFIG --modversion libsoup$SOUP`
SOUP_VERSION=`echo $SOUP_VERSION|$AWK -F . '{print $1 * 1000000 + $2 * 1000 + $3}'`
AC_SUBST(SOUP_VERSION)
LIBSOUP_LIBS=`$PKG_CONFIG --libs libsoup$SOUP`
AC_SUBST(LIBSOUP_LIBS)
dnl ***********
dnl D-BUS stuff
......@@ -274,6 +278,36 @@ AC_SUBST(privdatadir)
gladedir="$privdatadir/glade"
AC_SUBST(gladedir)
privlibdir='${libdir}'/evolution/$EVOLUTION_EXEC_VERSION
AC_SUBST(privlibdir)
dnl Win32
AC_MSG_CHECKING([for Win32])
case "$host" in
*-mingw*)
os_win32=yes
NO_UNDEFINED='-no-undefined'
NO_UNDEFINED_LIBS='$(EVOLUTION_RSS_EPLUGIN_LIBS) -levolution-mail -lemiscwidgets'
SOEXT='.dll'
PLUGINDIR_IN_SERVER_FILE="../../../lib/evolution/$EVOLUTION_EXEC_VERSION/plugins"
IMAGESDIR_IN_SERVER_FILE="../../../share/evolution/$EVOLUTION_EXEC_VERSION/images"
;;
*) os_win32=no
NO_UNDEFINED=''
NO_UNDEFINED_LIBS=''
SOEXT='.so'
PLUGINDIR_IN_SERVER_FILE="$PLUGIN_INSTALL_DIR"
IMAGESDIR_IN_SERVER_FILE="$ICON_DIR"
;;
esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
AC_SUBST(NO_UNDEFINED)
AC_SUBST(NO_UNDEFINED_LIBS)
AC_SUBST(SOEXT)
AC_SUBST(PLUGINDIR_IN_SERVER_FILE)
AC_SUBST(IMAGESDIR_IN_SERVER_FILE)
# Generated files from automake
AC_CONFIG_FILES([
Makefile
......
......@@ -126,6 +126,7 @@ HAVE_RENDERKIT = @HAVE_RENDERKIT@
HAVE_WEBKIT = @HAVE_WEBKIT@
HAVE_XULRUNNER = @HAVE_XULRUNNER@
ICON_DIR = @ICON_DIR@
IMAGESDIR_IN_SERVER_FILE = @IMAGESDIR_IN_SERVER_FILE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
......@@ -178,6 +179,8 @@ MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NMEDIT = @NMEDIT@
NO_UNDEFINED = @NO_UNDEFINED@
NO_UNDEFINED_LIBS = @NO_UNDEFINED_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
......@@ -187,6 +190,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR_IN_SERVER_FILE = @PLUGINDIR_IN_SERVER_FILE@
PLUGIN_INSTALL_DIR = @PLUGIN_INSTALL_DIR@
POFILES = @POFILES@
POSUB = @POSUB@
......@@ -256,6 +260,7 @@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
privdatadir = @privdatadir@
privlibdir = @privlibdir@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
......
%.server.in: %.server.in.in
sed -e 's|\@PLUGIN_INSTALL_DIR\@|$(PLUGIN_INSTALL_DIR)|' \
-e 's|\@ICON_DIR\@|$(ICON_DIR)|' \
sed -e 's|\@PLUGINDIR_IN_SERVER_FILE\@|$(PLUGINDIR_IN_SERVER_FILE)|' \
-e 's|\@IMAGESDIR_IN_SERVER_FILE\@|$(IMAGESDIR_IN_SERVER_FILE)|' \
-e 's|\@VERSION\@|$(EVOLUTION_EXEC_VERSION)|' \
-e 's|\@EXEEXT\@|$(EXEEXT)|' \
-e 's|\@SOEXT\@|$(SOEXT)|' $< > $@
......
......@@ -2,7 +2,7 @@
<oaf_server iid="OAFIID:GNOME_Evolution_RSS_Factory:@VERSION@"
type="shlib"
location="@PLUGIN_INSTALL_DIR@/liborg-gnome-evolution-rss@SOEXT@">
location="@PLUGINDIR_IN_SERVER_FILE@/liborg-gnome-evolution-rss@SOEXT@">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/ObjectFactory:1.0"/>
......@@ -27,7 +27,7 @@
_value="Manage your RDF,RSS,ATOM feeds here"/>
<oaf_attribute name="evolution2:config_item:icon_name" type="string"
value="@ICON_DIR@/rss.png"/>
value="@IMAGESDIR_IN_SERVER_FILE@/rss.png"/>
<oaf_attribute name="evolution2:config_item:priority" type="string" value="5"/>
......
......@@ -47,6 +47,7 @@ RSS_MENU = \
-e "s%+GETTEXT_PACKAGE+%$(GETTEXT_PACKAGE)%" \
-e "s%+LOCALEDIR+%$(LOCALEDIR)%" \
-e "s%+VERSION+%$(VERSION)%" \
-e "s%+SOEXT+%$(SOEXT)%" \
-e "s%+URL+%http://gnome.eu.org/evo/index.php/Evolution_RSS_Reader_Plugin%" \
$< > $@
......@@ -74,7 +75,7 @@ SOURCES+= gecko-utils.cpp
endif
liborg_gnome_evolution_rss_la_SOURCES = $(SOURCES)
liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) -lsoup-2.4
liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) $(LIBSOUP_LIBS) $(NO_UNDEFINED_LIBS) $(NO_UNDEFINED)
#$(GECKO_RPATH)
evolution_import_rss_SOURCES = evolution-import-rss.c
......
......@@ -183,6 +183,7 @@ HAVE_RENDERKIT = @HAVE_RENDERKIT@
HAVE_WEBKIT = @HAVE_WEBKIT@
HAVE_XULRUNNER = @HAVE_XULRUNNER@
ICON_DIR = @ICON_DIR@
IMAGESDIR_IN_SERVER_FILE = @IMAGESDIR_IN_SERVER_FILE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
......@@ -235,6 +236,8 @@ MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NMEDIT = @NMEDIT@
NO_UNDEFINED = @NO_UNDEFINED@
NO_UNDEFINED_LIBS = @NO_UNDEFINED_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
......@@ -244,6 +247,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR_IN_SERVER_FILE = @PLUGINDIR_IN_SERVER_FILE@
PLUGIN_INSTALL_DIR = @PLUGIN_INSTALL_DIR@
POFILES = @POFILES@
POSUB = @POSUB@
......@@ -313,6 +317,7 @@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
privdatadir = @privdatadir@
privlibdir = @privlibdir@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
......@@ -354,7 +359,7 @@ plugin_DATA = org-gnome-evolution-rss.eplug \
plugin_LTLIBRARIES = liborg-gnome-evolution-rss.la
SOURCES = rss.c $(am__append_2)
liborg_gnome_evolution_rss_la_SOURCES = $(SOURCES)
liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) -lsoup-2.4
liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) $(LIBSOUP_LIBS) $(NO_UNDEFINED_LIBS) $(NO_UNDEFINED)
#$(GECKO_RPATH)
evolution_import_rss_SOURCES = evolution-import-rss.c
evolution_import_rss_LDFLAGS = $(DBUS_LIBS)
......@@ -851,6 +856,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-errorDATA \
-e "s%+GETTEXT_PACKAGE+%$(GETTEXT_PACKAGE)%" \
-e "s%+LOCALEDIR+%$(LOCALEDIR)%" \
-e "s%+VERSION+%$(VERSION)%" \
-e "s%+SOEXT+%$(SOEXT)%" \
-e "s%+URL+%http://gnome.eu.org/evo/index.php/Evolution_RSS_Reader_Plugin%" \
$< > $@
......
......@@ -19,6 +19,8 @@
#ifndef __MISC_C_
#define __MISC_C_
#include <libedataserver/md5-utils.h>
int
getNumericConfValue(gpointer a)
{
......@@ -247,11 +249,11 @@ markup_decode (gchar *str)
return temp;
}
u_int32_t
uint32_t
gen_crc(const char *msg)
{
register unsigned long crc, poly;
u_int32_t crc_tab[256];
uint32_t crc_tab[256];
int i,j;
poly = 0xEDB88320L;
......
......@@ -3,7 +3,7 @@
<e-plugin
type="shlib"
id="org.gnome.cooly.plugin.rss"
location="+PLUGIN_INSTALL_DIR+/liborg-gnome-evolution-rss.so"
location="+PLUGIN_INSTALL_DIR+/liborg-gnome-evolution-rss+SOEXT+"
domain="+GETTEXT_PACKAGE+"
localedir="+LOCALEDIR+"
version="+VERSION+"
......
......@@ -23,6 +23,7 @@
#include <string.h>
#include <stdio.h>
#include <glib.h>
#include "rss.h"
......
/* Evoution RSS Reader Plugin
* Copyright (C) 2007-2009 Lucian Langa <cooly@gnome.eu.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <rss-icon-factory.h>
#include <rss.h>
typedef struct {
char *stock_id;
char *icon;
......
......@@ -65,7 +65,9 @@ int rss_verbose_debug = 0;
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#ifndef _WIN32
#include <sys/wait.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
......@@ -2126,6 +2128,18 @@ search_rss(char *buffer, int len)
return NULL;
}
#ifdef _WIN32
char *strcasestr(const char *a, const char *b)
{
char *a2=g_ascii_strdown(a,-1), *b2=g_ascii_strdown(b,-1), *r=strstr(a2,b2);
if(r)
r=a+(r-a2);
g_free(a2);
g_free(b2);
return r;
}
#endif
gboolean
setup_feed(add_feed *feed)
{
......@@ -3776,8 +3790,8 @@ rss_finalize(void)
gconf_client_get_int(rss_gconf,
GCONF_KEY_HTML_RENDER,
NULL));
/*#ifdef HAVE_GECKO
//really find a better way to deal with this//
#ifdef HAVE_GECKO
/*/really find a better way to deal with this//
//I do not know how to shutdown gecko (gtk_moz_embed_pop_startup)
//crash in nsCOMPtr_base::assign_with_AddRef
#ifdef HAVE_BUGGY_GECKO
......@@ -3785,8 +3799,7 @@ rss_finalize(void)
system("killall -SIGTERM evolution");
#else*/
gecko_shutdown();
/*#endif
#endif*/
#endif
}
guint
......
......@@ -31,7 +31,9 @@
#define DEFAULT_TTL 1800
/* ms between status updates to the gui */
#ifndef _WIN32
#define STATUS_TIMEOUT (250)
#endif
#define NETWORK_MIN_TIMEOUT (60)
#define NETWORK_TIMEOUT (180000)
......@@ -284,7 +286,7 @@ gchar *buffer = NULL;
guint ftotal;
guint farticle;
u_int32_t gen_crc(const char *msg);
uint32_t gen_crc(const char *msg);
gboolean create_user_pass_dialog(gchar *url);
static void start_check_cb (GtkWidget *widget, gpointer data);
static void err_destroy (GtkWidget *widget, guint response, gpointer data);
......@@ -331,7 +333,21 @@ static void custom_feed_timeout(void);
void gio_finish_feed (GObject *object, GAsyncResult *res, gpointer user_data);
gchar *encode_rfc2047(gchar *str);
CamelFolder *check_feed_folder(gchar *folder_name);
gboolean setup_feed(add_feed *feed);
#ifdef _WIN32
char *strcasestr(const char *a, const char *b);
const char *_e_get_gladedir (void) G_GNUC_CONST;
const char *_e_get_imagesdir (void) G_GNUC_CONST;
#undef EVOLUTION_GLADEDIR
#define EVOLUTION_GLADEDIR _e_get_gladedir ()
#undef EVOLUTION_ICONDIR
#define EVOLUTION_ICONDIR _e_get_imagesdir ()
#endif
typedef struct FEED_FOLDERS {
gchar *oname; //original folder name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment