Add a patch to allow stardict2 to build on gcc 4.x.

Submitted by:	Hu Dong <hoodng at hotmail dot com>
PR:		ports/119947
This commit is contained in:
Xin LI 2008-01-26 21:33:52 +00:00
parent 4f8ea59bfc
commit a6834817f9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=206255
4 changed files with 44 additions and 10 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= stardict PORTNAME= stardict
PORTVERSION= 2.4.8 PORTVERSION= 2.4.8
PORTREVISION= 4 PORTREVISION= 5
CATEGORIES= textproc CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME} MASTER_SITE_SUBDIR= ${PORTNAME}
@ -20,7 +20,6 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib" LIBS="-L${LOCALBASE}/lib"
USE_GMAKE= yes USE_GMAKE= yes
USE_GCC= 3.4
USE_X_PREFIX= yes USE_X_PREFIX= yes
USE_BZIP2= yes USE_BZIP2= yes
USE_GNOME= gnomehack gnomeprefix USE_GNOME= gnomehack gnomeprefix

View file

@ -1,5 +1,5 @@
--- src/mainwin.h.orig Tue Sep 23 18:19:44 2003 --- ./src/mainwin.h.orig 2006-06-29 22:29:34.000000000 -0700
+++ src/mainwin.h Tue Jan 18 02:23:04 2005 +++ ./src/mainwin.h 2008-01-26 13:26:47.532687040 -0800
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
TEXT_WIN_PATTERN_NOT_FOUND, TEXT_WIN_PATTERN_NOT_FOUND,
TEXT_WIN_TIPS, // when the word entry is empty,it will show tip TEXT_WIN_TIPS, // when the word entry is empty,it will show tip
@ -8,4 +8,22 @@
+ TEXT_WIN_TREEDICT + TEXT_WIN_TREEDICT
}; };
enum ListWinListWordType enum ListWinListWordType {
@@ -68,8 +68,6 @@
static void on_main_menu_about_activate(GtkMenuItem *menuitem, TopWin *oTopWin);
static void on_main_menu_quit_activate(GtkMenuItem *menuitem, TopWin *oTopWin);
- static void ClipboardReceivedCallback(GtkClipboard *clipboard, const gchar *text, gpointer data);
-
void LoadHistory(void);
void SaveHistory(void);
public:
@@ -79,6 +77,8 @@
TopWin();
~TopWin();
+ static void ClipboardReceivedCallback(GtkClipboard *clipboard, const gchar *text, gpointer data);
+
void Create(GtkWidget *vbox);
void Destroy(void);
void SetText(const gchar *word, bool notify=true);

View file

@ -7,7 +7,7 @@
PORTNAME= stardict PORTNAME= stardict
PORTVERSION= 2.4.8 PORTVERSION= 2.4.8
PORTREVISION= 4 PORTREVISION= 5
CATEGORIES= textproc CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME} MASTER_SITE_SUBDIR= ${PORTNAME}
@ -20,7 +20,6 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib" LIBS="-L${LOCALBASE}/lib"
USE_GMAKE= yes USE_GMAKE= yes
USE_GCC= 3.4
USE_X_PREFIX= yes USE_X_PREFIX= yes
USE_BZIP2= yes USE_BZIP2= yes
USE_GNOME= gnomehack gnomeprefix USE_GNOME= gnomehack gnomeprefix

View file

@ -1,5 +1,5 @@
--- src/mainwin.h.orig Tue Sep 23 18:19:44 2003 --- ./src/mainwin.h.orig 2006-06-29 22:29:34.000000000 -0700
+++ src/mainwin.h Tue Jan 18 02:23:04 2005 +++ ./src/mainwin.h 2008-01-26 13:26:47.532687040 -0800
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
TEXT_WIN_PATTERN_NOT_FOUND, TEXT_WIN_PATTERN_NOT_FOUND,
TEXT_WIN_TIPS, // when the word entry is empty,it will show tip TEXT_WIN_TIPS, // when the word entry is empty,it will show tip
@ -8,4 +8,22 @@
+ TEXT_WIN_TREEDICT + TEXT_WIN_TREEDICT
}; };
enum ListWinListWordType enum ListWinListWordType {
@@ -68,8 +68,6 @@
static void on_main_menu_about_activate(GtkMenuItem *menuitem, TopWin *oTopWin);
static void on_main_menu_quit_activate(GtkMenuItem *menuitem, TopWin *oTopWin);
- static void ClipboardReceivedCallback(GtkClipboard *clipboard, const gchar *text, gpointer data);
-
void LoadHistory(void);
void SaveHistory(void);
public:
@@ -79,6 +77,8 @@
TopWin();
~TopWin();
+ static void ClipboardReceivedCallback(GtkClipboard *clipboard, const gchar *text, gpointer data);
+
void Create(GtkWidget *vbox);
void Destroy(void);
void SetText(const gchar *word, bool notify=true);