[PATCH] textproc/hunspell: Respect CXXFLAGS when linking
Raphael Kubo da Costa
rakuco at FreeBSD.org
Thu May 16 22:36:01 UTC 2013
>Submitter-Id: current-users
>Originator: Raphael Kubo da Costa
>Organization:
>Confidential: no
>Synopsis: [PATCH] textproc/hunspell: Respect CXXFLAGS when linking
>Severity: non-critical
>Priority: low
>Category: ports
>Class: change-request
>Release: FreeBSD 10.0-CURRENT amd64
>Environment:
System: FreeBSD orwell 10.0-CURRENT FreeBSD 10.0-CURRENT #12 r250676M: Thu May 16 00:08:52 EEST
>Description:
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 at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:
--- hunspell-1.3.2_2.patch begins here ---
diff -ruN /usr/ports/textproc/hunspell/Makefile ./Makefile
--- /usr/ports/textproc/hunspell/Makefile 2013-05-06 18:34:17.000000000 +0300
+++ ./Makefile 2013-05-17 01:33:42.000000000 +0300
@@ -1,9 +1,9 @@
# Created by: janos.mohacsi at bsd.hu
-# $FreeBSD: textproc/hunspell/Makefile 317525 2013-05-06 15:34:17Z bapt $
+# $FreeBSD: head/textproc/hunspell/Makefile 317525 2013-05-06 15:34:17Z bapt $
PORTNAME= hunspell
PORTVERSION= 1.3.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= SF/${PORTNAME}/Hunspell/${PORTVERSION}
DIST_SUBDIR= ${PORTNAME}
diff -ruN /usr/ports/textproc/hunspell/files/patch-configure ./files/patch-configure
--- /usr/ports/textproc/hunspell/files/patch-configure 1970-01-01 02:00:00.000000000 +0200
+++ ./files/patch-configure 2013-05-17 01:27:03.000000000 +0300
@@ -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
--- hunspell-1.3.2_2.patch ends here ---
More information about the freebsd-office
mailing list