From owner-freebsd-multimedia@FreeBSD.ORG Sun Jul 14 07:43:09 2013 Return-Path: Delivered-To: multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 608B3FDA for ; Sun, 14 Jul 2013 07:43:09 +0000 (UTC) (envelope-from raivo@lehma.com) Received: from bounce-out.neti.ee (bounce-out.neti.ee [194.126.101.104]) by mx1.freebsd.org (Postfix) with ESMTP id DA508866 for ; Sun, 14 Jul 2013 07:43:08 +0000 (UTC) Received: from smtp-out.neti.ee (vm-relay2.estpak.ee [88.196.174.133]) by Bounce1.estpak.ee (Postfix) with ESMTP id CE3B6DB34 for ; Sun, 14 Jul 2013 10:43:06 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by vm-relay2.estpak.ee (Postfix) with ESMTP id 0E286722 for ; Sun, 14 Jul 2013 10:43:00 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at vm-relay2.estpak.ee Received: from smtp-out.neti.ee ([127.0.0.1]) by localhost (vm-relay2.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q70hprva7HqG for ; Sun, 14 Jul 2013 10:42:57 +0300 (EEST) Received: from mail.neti.ee (neti-relayhost2.estpak.ee [88.196.174.199]) by vm-relay2.estpak.ee (Postfix) with ESMTP id 675F4420 for ; Sun, 14 Jul 2013 10:42:57 +0300 (EEST) Received-SPF: None (no SPF record) identity=mailfrom; client-ip=90.191.161.67; helo=hullu.lehma.com; envelope-from=raivo@lehma.com; receiver=multimedia@freebsd.org X-SMTP-Auth-NETI-Businessmail: no Received: from hullu.lehma.com (67.161.191.90.dyn.estpak.ee [90.191.161.67]) by NETI-Relayhost2.estpak.ee (Postfix) with ESMTPS id 4B72424 for ; Sun, 14 Jul 2013 10:42:57 +0300 (EEST) Received: from [IPv6:2001:16d8:ff00:8536:44a3:f238:411f:877d] (unknown [IPv6:2001:16d8:ff00:8536:44a3:f238:411f:877d]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: raivo) by hullu.lehma.com (Postfix) with ESMTPSA id D38C6135 for ; Sun, 14 Jul 2013 10:42:56 +0300 (EEST) From: Raivo Hool Content-Type: multipart/mixed; boundary="Apple-Mail=_455AE90E-941A-4A29-A512-A2FFB9B79B01" Subject: FreeBSD Port: multimedia/mkvtoolnix Message-Id: Date: Sun, 14 Jul 2013 10:42:51 +0300 To: multimedia@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-Mailer: Apple Mail (2.1508) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jul 2013 07:43:09 -0000 --Apple-Mail=_455AE90E-941A-4A29-A512-A2FFB9B79B01 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I have a patch to enable building mkvtoolnix with clang and libc++, thus = avoiding pulling in gcc 4.6+. Works with at least 9.1-STABLE and = 9.2-PRE, but probably on anything with a new enough libc++. This implies CXXFLAGS+=3D-std=3Dc++11 -stdlib=3Dlibc++ -Wno-error I have also sent this upstream, so if they accept it, there'll be no = more any need for it in FreeBSD, but some conditional logic in the = Makefile (which I am unqualified to cook up) would probably still apply. Raivo --Apple-Mail=_455AE90E-941A-4A29-A512-A2FFB9B79B01 Content-Disposition: attachment; filename=patch-src-common-logger.cpp Content-Type: application/octet-stream; name="patch-src-common-logger.cpp" Content-Transfer-Encoding: 7bit --- src/common/logger.cpp.orig 2013-06-27 23:02:44.000000000 +0300 +++ src/common/logger.cpp 2013-07-14 10:13:25.026646733 +0300 @@ -12,6 +12,7 @@ #include #include +#include #include "common/logger.h" #include "common/fs_sys_helpers.h" @@ -20,7 +21,11 @@ logger_cptr logger_c::s_default_logger; +#if defined( _LIBCPP_VERSION ) +static auto s_program_start_time = std::chrono::system_clock::now(); +#else static auto s_program_start_time = std::chrono::high_resolution_clock::now(); +#endif logger_c::logger_c(bfs::path const &file_name) : m_file_name(file_name) @@ -41,9 +46,17 @@ mm_text_io_c out(new mm_file_io_c(m_file_name.string(), bfs::exists(m_file_name) ? MODE_WRITE : MODE_CREATE)); out.setFilePointer(0, seek_end); - auto now = std::chrono::high_resolution_clock::now(); + #if defined( _LIBCPP_VERSION ) + auto now = std::chrono::system_clock::now(); + #else + auto now = std::chrono::high_resolulution_clock::now(); + #endif auto diff = now - s_program_start_time; + #if defined( _LIBCPP_VERSION ) + auto tnow = std::chrono::system_clock::to_time_t(now); + #else auto tnow = std::chrono::high_resolution_clock::to_time_t(now); + #endif // 2013-03-02 15:42:32 char timestamp[30]; --Apple-Mail=_455AE90E-941A-4A29-A512-A2FFB9B79B01--