aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2013-10-22 12:10:35 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2013-10-22 12:10:35 +0000
commit6e0d02ef3d7215fcbb2ccd02d46c61973915dbf3 (patch)
tree58b1da817a5be5fddc7b1cf88e0af43c58c9fbcd
parent0e14460b39ed85541b535bd31436da3e734b93cd (diff)
downloadports-6e0d02ef3d7215fcbb2ccd02d46c61973915dbf3.tar.gz
ports-6e0d02ef3d7215fcbb2ccd02d46c61973915dbf3.zip
- Fix linker problem by removing libtool dependency. The combination of
USE_AUTOTOOLS, USE_GCC and C++ is broken because /usr/local/bin/libtool has hardcoded the linker it was built with. So on FreeBSD 10 it tries to link gcc compiled C++ code with clang which does not work. - Remove USE_GCC and fix build with clang with two new patches. [1] - Fix build with libc++ by removing -lstdc++ from linker flags. The compiler automatically adds the right runtime library. - Add LICENSE. - Convert gnomehack to pathfix. - Remove references to PTHREAD_LIBS and PTHREAD_CFLAGS. - Support staging. - Remove an old patch that's no longer needed. PR: ports/164618 [1] Submitted by: Paul Ambrose <ambrosehua@gmail.com> [1] Approved by: maintainer timeout (2 weeks)
Notes
Notes: svn path=/head/; revision=331255
-rw-r--r--textproc/scim/Makefile28
-rw-r--r--textproc/scim/files/patch-configure14
-rw-r--r--textproc/scim/files/patch-extras-gtk2_immodule-gtkimcontextscim.cpp11
-rw-r--r--textproc/scim/files/patch-src-scim_helper_manager_server.cpp21
4 files changed, 42 insertions, 32 deletions
diff --git a/textproc/scim/Makefile b/textproc/scim/Makefile
index fc5d24f628e3..1605bae08cf2 100644
--- a/textproc/scim/Makefile
+++ b/textproc/scim/Makefile
@@ -3,37 +3,29 @@
PORTNAME= scim
PORTVERSION= 1.4.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= SF
MAINTAINER= lx@FreeBSD.org
COMMENT= Smart Common Input Method platform
-USE_GNOME= gnomehack gnomehier gtk20 intlhack
+LICENSE= LGPL21
-USE_AUTOTOOLS= libtool
-USE_GCC= any
+USE_GNOME= gnomehier gtk20 intlhack
USE_XORG= x11 xpm
USE_LDCONFIG= yes
-USES= gettext gmake iconv pkgconfig
+USES= gettext gmake iconv pathfix pkgconfig
GNU_CONFIGURE= yes
-CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
- PTHREAD_LIBS="${PTHREAD_LIBS}"
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
CPPFLAGS+= -I${LOCALBASE}/include -D__STDC_ISO_10646__
LDFLAGS+= -L${LOCALBASE}/lib -lintl ${ICONV_LIB}
post-patch:
- ${REINPLACE_CMD} -e '/^libscim@SCIM_EPOCH@_la_LDFLAGS/s|=|= ${PTHREAD_LIBS}|' \
- ${WRKSRC}/src/Makefile.in
-
-post-install:
- @${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
- @${CAT} ${PKGMESSAGE}
- @${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
+ @${REINPLACE_CMD} 's/-lstdc++//' \
+ ${WRKSRC}/extras/gtk2_immodule/Makefile.in \
+ ${WRKSRC}/extras/setup/Makefile.in \
+ ${WRKSRC}/src/Makefile.in \
+ ${WRKSRC}/tests/Makefile.in
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/textproc/scim/files/patch-configure b/textproc/scim/files/patch-configure
deleted file mode 100644
index e71b173a67aa..000000000000
--- a/textproc/scim/files/patch-configure
+++ /dev/null
@@ -1,14 +0,0 @@
---- configure.old Tue Jun 26 11:51:09 2007
-+++ configure Tue Jun 26 11:51:34 2007
-@@ -36877,10 +36877,7 @@
-
- fi
- GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
-- GTK_LIBDIR=`$PKG_CONFIG --variable=libdir gtk+-2.0`
-- if test -z "$GTK_LIBDIR)"; then
-- GTK_LIBDIR="$libdir"
-- fi
-+ GTK_LIBDIR="$libdir"
- GTK_IM_MODULEDIR=$GTK_LIBDIR/gtk-2.0/immodules
-
-
diff --git a/textproc/scim/files/patch-extras-gtk2_immodule-gtkimcontextscim.cpp b/textproc/scim/files/patch-extras-gtk2_immodule-gtkimcontextscim.cpp
new file mode 100644
index 000000000000..841b1a3c53d4
--- /dev/null
+++ b/textproc/scim/files/patch-extras-gtk2_immodule-gtkimcontextscim.cpp
@@ -0,0 +1,11 @@
+--- extras/gtk2_immodule/gtkimcontextscim.cpp.orig 2008-11-02 07:43:15.000000000 +0100
++++ extras/gtk2_immodule/gtkimcontextscim.cpp 2013-10-08 18:16:29.000000000 +0200
+@@ -1710,7 +1710,7 @@
+ // And set manual to false.
+ if (!check_socket_frontend ()) {
+ std::cerr << "Launching a SCIM daemon with Socket FrontEnd...\n";
+- char *new_argv [] = { static_cast<char*> ("--no-stay"), 0 };
++ char *new_argv [] = { const_cast<char*> ("--no-stay"), 0 };
+ scim_launch (true,
+ config_module_name,
+ (load_engine_list.size () ? scim_combine_string_list (load_engine_list, ',') : "all"),
diff --git a/textproc/scim/files/patch-src-scim_helper_manager_server.cpp b/textproc/scim/files/patch-src-scim_helper_manager_server.cpp
new file mode 100644
index 000000000000..83ca61fe0523
--- /dev/null
+++ b/textproc/scim/files/patch-src-scim_helper_manager_server.cpp
@@ -0,0 +1,21 @@
+--- src/scim_helper_manager_server.cpp.orig 2008-11-02 07:42:38.000000000 +0100
++++ src/scim_helper_manager_server.cpp 2013-10-08 17:37:59.000000000 +0200
+@@ -95,9 +95,8 @@
+ // so I added a workaround: have an array of modules and unload them all together in the end only.
+ // TODO Need to figure out what's going on with this issue.
+
+- HelperModule module[mod_list.size ()];
+-
+ if (mod_list.size ()) {
++ HelperModule *module = new HelperModule[mod_list.size ()];
+
+ for (size_t i = 0; i < mod_list.size (); ++i) {
+
+@@ -120,6 +119,7 @@
+ for (size_t i = 0; i < mod_list.size (); ++i) {
+ module[i].unload ();
+ }
++ delete[] module;
+ }
+ }
+