You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-i18n/im-freewnn/files/im-freewnn-gentoo.patch

113 lines
2.4 KiB

--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-moduledir = ${libdir}/gtk-2.0/2.4.0/immodules
+moduledir = ${libdir}/gtk-2.0/${GTK_BINARY_VERSION}/immodules
## Makefile.am for gtk+/modules/input
if PLATFORM_WIN32
no_undefined = -no-undefined
@@ -6,11 +6,11 @@
SUBDIRS = po
-INCLUDES = @GTK_DEP_CFLAGS@ -I/usr/include/wnn -DIM_LOCALEDIR=\"${datadir}/locale\"
+INCLUDES = @GTK_DEP_CFLAGS@ -DIM_LOCALEDIR=\"${datadir}/locale\"
DEPS =
-LDADDS = @GTK_DEP_LIBS@ -lcrypt
+LDADDS = @GTK_DEP_LIBS@
EXTRA_DIST= \
im-freewnn.spec
@@ -38,7 +38,7 @@
candwin.h \
candwin.c
-im_freewnn_la_LIBADD = $(LDADDS) -lcrypt
+im_freewnn_la_LIBADD = $(LDADDS)
module_LTLIBRARIES = \
im-freewnn.la
--- a/configure.in
+++ b/configure.in
@@ -21,8 +21,10 @@
GTK_DEP_CFLAGS=`pkg-config gtk+-2.0 --cflags`
GTK_DEP_LIBS=`pkg-config gtk+-2.0 --libs`
+GTK_BINARY_VERSION=`pkg-config gtk+-2.0 --variable=gtk_binary_version`
AC_SUBST(GTK_DEP_CFLAGS)
AC_SUBST(GTK_DEP_LIBS)
+AC_SUBST(GTK_BINARY_VERSION)
LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
LT_CURRENT=2
@@ -48,11 +50,9 @@
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
dnl FreeWnn check
-ldflags_backup="$LDFLAGS"
-LDFLAGS="$LDFLAGS -lcrypt"
AC_CHECK_HEADER(wnn/jlib.h,,)
+AC_CHECK_LIB(crypt, crypt,,)
AC_CHECK_LIB(wnn, jl_open_lang,,)
-LDFLAGS="$ldflags_backup"
AC_OUTPUT([
Makefile
--- a/freewnn-modewin.h
+++ b/freewnn-modewin.h
@@ -23,7 +23,7 @@
#include <gtk/gtk.h>
-#include <jllib.h>
+#include <wnn/jllib.h>
#include "freewnn-register-win.h"
#include "freewnn-config.h"
--- a/freewnn-register-win.c
+++ b/freewnn-register-win.c
@@ -18,7 +18,7 @@
*
*/
-#include <jllib.h>
+#include <wnn/jllib.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
--- a/freewnn-register-win.h
+++ b/freewnn-register-win.h
@@ -22,7 +22,7 @@
#define _FREEWNN_REGIST_WIN
#include <gtk/gtk.h>
-#include <jllib.h>
+#include <wnn/jllib.h>
typedef struct _FreeWnnRegisterWin FreeWnnRegisterWin;
--- a/freewnn-utils.h
+++ b/freewnn-utils.h
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include <jllib.h>
+#include <wnn/jllib.h>
#include <glib.h>
w_char* char2wchar(unsigned char* str);
--- a/im-freewnn.h
+++ b/im-freewnn.h
@@ -26,7 +26,7 @@
#include <gtk/gtk.h>
#include <gtk/gtkimmodule.h>
-#include <jllib.h>
+#include <wnn/jllib.h>
#include "freewnn-modewin.h"
#include "freewnn-utils.h"