From owner-svn-ports-all@FreeBSD.ORG Wed Nov 13 15:49:25 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97DD7FEE; Wed, 13 Nov 2013 15:49:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 87A282ACC; Wed, 13 Nov 2013 15:49:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rADFnP17086655; Wed, 13 Nov 2013 15:49:25 GMT (envelope-from rakuco@svn.freebsd.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rADFnPCn086654; Wed, 13 Nov 2013 15:49:25 GMT (envelope-from rakuco@svn.freebsd.org) Message-Id: <201311131549.rADFnPCn086654@svn.freebsd.org> From: Raphael Kubo da Costa Date: Wed, 13 Nov 2013 15:49:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r333701 - head/science/openbabel/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 15:49:25 -0000 Author: rakuco Date: Wed Nov 13 15:49:25 2013 New Revision: 333701 URL: http://svnweb.freebsd.org/changeset/ports/333701 Log: Add upstream patch to fix the build with libc++. The original commit has been slightly tuned so that it builds with the code in the latest stable release. Approved by: makc (maintainer) Added: head/science/openbabel/files/patch-git_c3abbdda (contents, props changed) Added: head/science/openbabel/files/patch-git_c3abbdda ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/openbabel/files/patch-git_c3abbdda Wed Nov 13 15:49:25 2013 (r333701) @@ -0,0 +1,84 @@ +This is the git commit below, with the change to include/openbabel/shared_ptr.h +properly adapted since it originally depends on commit ce178cbb. + +commit c3abbddae78e654df9322ad1020ff79dd6332946 +Author: Matt Swain +Date: Thu Oct 31 15:25:53 2013 +0000 + + Detect libc++ as this is now the default in OS X Mavericks + +diff --git a/include/openbabel/obmolecformat.h b/include/openbabel/obmolecformat.h +index 46ec724..c004313 100644 +--- include/openbabel/obmolecformat.h ++++ include/openbabel/obmolecformat.h +@@ -23,7 +23,10 @@ GNU General Public License for more details. + #include + #endif + +-#if __GNUC__ == 4 && __GNUC_MINOR__ >= 1 ++#include // detect std::lib ++#ifdef _LIBCPP_VERSION ++ #include ++#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 1 + #include + #elif defined(USE_BOOST) + #include +@@ -141,6 +144,8 @@ public: + + #ifdef _MSC_VER + typedef stdext::hash_map NameIndexType; ++#elif defined(_LIBCPP_VERSION) ++ typedef std::unordered_map NameIndexType; + #elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(__APPLE_CC__)) || defined (USE_BOOST) + typedef std::tr1::unordered_map NameIndexType; + #else +diff --git a/include/openbabel/shared_ptr.h b/include/openbabel/shared_ptr.h +index 5d20254..378856a 100644 +--- include/openbabel/shared_ptr.h ++++ include/openbabel/shared_ptr.h +@@ -22,9 +22,17 @@ GNU General Public License for more details. + #else + #include + #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev +- #include ++ #ifdef _LIBCPP_VERSION ++ #include ++ #else ++ #include ++ #endif ++ #endif ++ #ifdef _LIBCPP_VERSION ++ using std::shared_ptr; ++ #else ++ using std::tr1::shared_ptr; + #endif +- using std::tr1::shared_ptr; + #endif + + #endif // OB_SHARED_PTR_H +diff --git a/src/ops/unique.cpp b/src/ops/unique.cpp +index 5f7714f..8527fba 100644 +--- src/ops/unique.cpp ++++ src/ops/unique.cpp +@@ -21,7 +21,7 @@ GNU General Public License for more details. + #include + #include + #include +-#ifdef _MSC_VER ++#if defined(_MSC_VER) || defined(_LIBCPP_VERSION) + #include + #elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(__APPLE_CC__)) + #include +@@ -36,7 +36,11 @@ GNU General Public License for more details. + + using namespace std; + #ifndef NO_UNORDERED_MAP +-using std::tr1::unordered_map; ++ #ifdef _LIBCPP_VERSION ++ using std::unordered_map; ++ #else ++ using std::tr1::unordered_map; ++ #endif + #endif + namespace OpenBabel + {