Bug 196143 - [patch] mail/libmapi - build fix for non c++11 systems (e.g., base compiler on freebsd 9.3)
Summary: [patch] mail/libmapi - build fix for non c++11 systems (e.g., base compiler o...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koop Mast
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-19 21:19 UTC by John Hein
Modified: 2015-01-15 12:21 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (kwm)


Attachments
specify c++11 lib for libmapi 2.1 build (429 bytes, text/plain)
2014-12-19 21:19 UTC, John Hein
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2014-12-19 21:19:29 UTC
Created attachment 150791 [details]
specify c++11 lib for libmapi 2.1 build

mail/libmapi-2.1 has two problems on freebsd systems that don't have a default compiler that support newer c++ standards used by libmapi:

The Makefile has "CXX11FLAGS=-std=c++0x".  When you build on 9.x, you
get:

 .
 .
   Linking libmapi.so.2.0
   Compiling libmapi++/src/attachment.cpp with -fPIC
   cc1plus: error: unrecognized command line option "-std=c++0x"
 .
 .


Adding USES=compiler:c++0x fixes that problem, but libmapi 2.1 also
needs a c++ library that has shared_ptr:

 .
 .
In file included from ./libmapi++/attachment.h:29:
./libmapi++/message.h:47:16: error: no type named 'shared_ptr' in namespace 'std'
                typedef std::shared_ptr<attachment>             attachment_shared_ptr;
 .
 .


USES=compiler:c++11-lib fixes both issues.


Patch attached.


See also http://beefy1.isc.freebsd.org/bulk/84i386-default/latest/logs/errors/libmapi-2.1_2.log
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-19 21:19:29 UTC
Auto-assigned to maintainer kwm@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-01-14 18:05:59 UTC
A commit references this bug:

Author: antoine
Date: Wed Jan 14 18:04:58 UTC 2015
New revision: 377031
URL: https://svnweb.freebsd.org/changeset/ports/377031

Log:
  MFH: r376507

  Unbreak libmapi on 9.x and 8.x.

  Libmapi uses -std=c++0x however we need to add c++11-lib or else there
  will be link errors.

  PR:		196143
  Submitted by:	John Hein <z7dr6ut7gs@snkmail.com>

Changes:
_U  branches/2015Q1/
  branches/2015Q1/mail/libmapi/Makefile