Bug 178696 - [PATCH] textproc/hunspell: Respect CXXFLAGS when linking
Summary: [PATCH] textproc/hunspell: Respect CXXFLAGS when linking
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-16 23:40 UTC by Raphael Kubo da Costa
Modified: 2013-06-11 22:50 UTC (History)
1 user (show)

See Also:


Attachments
hunspell-1.3.2_2.patch (1.42 KB, patch)
2013-05-16 23:40 UTC, Raphael Kubo da Costa
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa freebsd_committer freebsd_triage 2013-05-16 23:40:00 UTC
hunspell's configure script seems to have been generated with a very old version of libtool. Specifically, it does not uses CFLAGS instead of CXXFLAGS when performing some tests related to the C++ compiler.

This ends up making it add '-lstdc++' to the linker's command line even if one sets CXXFLAGS to -stdlib=libc++. The attached patch fixes the problem by "backporting" the appropriate libtool.m4 change to the configure script.

Port maintainer (office@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: ports)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-16 23:40:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->office

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-06-11 22:44:29 UTC
Author: rakuco
Date: Tue Jun 11 21:44:16 2013
New Revision: 320649
URL: http://svnweb.freebsd.org/changeset/ports/320649

Log:
  Respect CXXFLAGS when linking.
  
  hunspell's configure script seems to have been generated with a very old
  version of libtool. Specifically, it does not uses CFLAGS instead of
  CXXFLAGS when performing some tests related to the C++ compiler.
  
  This ends up making it add '-lstdc++' to the linker's command line even if
  one sets CXXFLAGS to -stdlib=libc++. The attached patch fixes the problem by
  "backporting" the appropriate libtool.m4 change to the configure script.
  
  PR:		ports/178696
  Approved by:	maintainer timeout (office@, 28 days)

Added:
  head/textproc/hunspell/files/patch-configure   (contents, props changed)
Modified:
  head/textproc/hunspell/Makefile

Modified: head/textproc/hunspell/Makefile
==============================================================================
--- head/textproc/hunspell/Makefile	Tue Jun 11 21:36:24 2013	(r320648)
+++ head/textproc/hunspell/Makefile	Tue Jun 11 21:44:16 2013	(r320649)
@@ -3,7 +3,7 @@
 
 PORTNAME=	hunspell
 PORTVERSION=	1.3.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	textproc
 MASTER_SITES=	SF/${PORTNAME}/Hunspell/${PORTVERSION}
 DIST_SUBDIR=	${PORTNAME}

Added: head/textproc/hunspell/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/hunspell/files/patch-configure	Tue Jun 11 21:44:16 2013	(r320649)
@@ -0,0 +1,26 @@
+--- configure.orig	2013-05-17 01:18:45.000000000 +0300
++++ configure	2013-05-17 01:26:35.000000000 +0300
+@@ -11880,6 +11880,7 @@
+ 
+   # Allow CC to be a program name with arguments.
+   lt_save_CC=$CC
++  lt_save_CFLAGS=$CFLAGS
+   lt_save_LD=$LD
+   lt_save_GCC=$GCC
+   GCC=$GXX
+@@ -11897,6 +11898,7 @@
+   fi
+   test -z "${LDCXX+set}" || LD=$LDCXX
+   CC=${CXX-"c++"}
++  CFLAGS=$CXXFLAGS
+   compiler=$CC
+   compiler_CXX=$CC
+   for cc_temp in $compiler""; do
+@@ -14618,6 +14620,7 @@
+   fi # test -n "$compiler"
+ 
+   CC=$lt_save_CC
++  CFLAGS=$lt_save_CFLAGS
+   LDCXX=$LD
+   LD=$lt_save_LD
+   GCC=$lt_save_GCC
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2013-06-11 22:44:37 UTC
State Changed
From-To: open->closed

Committed in r320649.