Date: Mon, 25 Sep 2017 00:05:32 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r450558 - in head/graphics/aqsis: . files Message-ID: <201709250005.v8P05WKH026951@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Mon Sep 25 00:05:32 2017 New Revision: 450558 URL: https://svnweb.freebsd.org/changeset/ports/450558 Log: graphics/aqsis: switch to C++11 for Boost PR: 220787 Added: head/graphics/aqsis/files/patch-include_aqsis_tex_filtering_texturesampleoptions.h (contents, props changed) head/graphics/aqsis/files/patch-include_aqsis_tex_io_texfileheader.h (contents, props changed) head/graphics/aqsis/files/patch-libs_core_texturing__old_shadowmap__old.cpp (contents, props changed) head/graphics/aqsis/files/patch-libs_shadervm_dsoshadeops.cpp (contents, props changed) head/graphics/aqsis/files/patch-libs_shadervm_shaderexecenv_shadeops__tmap.cpp (contents, props changed) Modified: head/graphics/aqsis/Makefile (contents, props changed) head/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp (contents, props changed) Modified: head/graphics/aqsis/Makefile ============================================================================== --- head/graphics/aqsis/Makefile Mon Sep 25 00:05:05 2017 (r450557) +++ head/graphics/aqsis/Makefile Mon Sep 25 00:05:32 2017 (r450558) @@ -20,13 +20,14 @@ LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR \ libtiff.so:graphics/tiff RUN_DEPENDS= bash:shells/bash -BROKEN= fails to build against Boost with C++11 features, see bug 220787 BROKEN_sparc64= Fails to build: cannot link with boost LDFLAGS+= -L${LOCALBASE}/lib USE_LDCONFIG= yes -USES= cmake:outsource desktop-file-utils shared-mime-info shebangfix +USES= cmake:outsource compiler:c++11-lib desktop-file-utils \ + shared-mime-info shebangfix +USE_CXXSTD= gnu++11 SHEBANG_FILES= examples/*/*/*.sh \ tools/neqsus/houdini/post.sh \ distribution/linux/*.sh Added: head/graphics/aqsis/files/patch-include_aqsis_tex_filtering_texturesampleoptions.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/aqsis/files/patch-include_aqsis_tex_filtering_texturesampleoptions.h Mon Sep 25 00:05:32 2017 (r450558) @@ -0,0 +1,149 @@ +In file included from libs/tex/filtering/dummytexturesampler.cpp:38: +In file included from libs/tex/filtering/dummytexturesampler.h:41: +In file included from include/aqsis/tex/filtering/itexturesampler.h:46: +include/aqsis/tex/filtering/texturesampleoptions.h:239:31: error: ISO C++11 does not allow access declarations; use using declarations instead + CqTextureSampleOptionsBase::sBlur; + ^ + using +include/aqsis/tex/filtering/texturesampleoptions.h:240:31: error: ISO C++11 does not allow access declarations; use using declarations instead + CqTextureSampleOptionsBase::tBlur; + ^ + using +include/aqsis/tex/filtering/texturesampleoptions.h:241:31: error: ISO C++11 does not allow access declarations; use using declarations instead + CqTextureSampleOptionsBase::sWidth; + ^ + using +[...] + +--- include/aqsis/tex/filtering/texturesampleoptions.h.orig 2012-08-24 12:26:50 UTC ++++ include/aqsis/tex/filtering/texturesampleoptions.h +@@ -236,37 +236,37 @@ class CqTextureSampleOptions : private CqTextureSample + CqTextureSampleOptions(); + + // Accessors from CqTextureSampleOptionsBase +- CqTextureSampleOptionsBase::sBlur; +- CqTextureSampleOptionsBase::tBlur; +- CqTextureSampleOptionsBase::sWidth; +- CqTextureSampleOptionsBase::tWidth; +- CqTextureSampleOptionsBase::minWidth; +- CqTextureSampleOptionsBase::truncAmount; +- CqTextureSampleOptionsBase::logTruncAmount; +- CqTextureSampleOptionsBase::filterType; +- CqTextureSampleOptionsBase::startChannel; +- CqTextureSampleOptionsBase::numChannels; +- CqTextureSampleOptionsBase::sWrapMode; +- CqTextureSampleOptionsBase::tWrapMode; ++ using CqTextureSampleOptionsBase::sBlur; ++ using CqTextureSampleOptionsBase::tBlur; ++ using CqTextureSampleOptionsBase::sWidth; ++ using CqTextureSampleOptionsBase::tWidth; ++ using CqTextureSampleOptionsBase::minWidth; ++ using CqTextureSampleOptionsBase::truncAmount; ++ using CqTextureSampleOptionsBase::logTruncAmount; ++ using CqTextureSampleOptionsBase::filterType; ++ using CqTextureSampleOptionsBase::startChannel; ++ using CqTextureSampleOptionsBase::numChannels; ++ using CqTextureSampleOptionsBase::sWrapMode; ++ using CqTextureSampleOptionsBase::tWrapMode; + + // Modifiers from CqTextureSampleOptionsBase +- CqTextureSampleOptionsBase::setBlur; +- CqTextureSampleOptionsBase::setSBlur; +- CqTextureSampleOptionsBase::setTBlur; +- CqTextureSampleOptionsBase::setWidth; +- CqTextureSampleOptionsBase::setSWidth; +- CqTextureSampleOptionsBase::setTWidth; +- CqTextureSampleOptionsBase::setMinWidth; +- CqTextureSampleOptionsBase::setTruncAmount; +- CqTextureSampleOptionsBase::setFilterType; +- CqTextureSampleOptionsBase::setStartChannel; +- CqTextureSampleOptionsBase::setNumChannels; +- CqTextureSampleOptionsBase::setWrapMode; +- CqTextureSampleOptionsBase::setSWrapMode; +- CqTextureSampleOptionsBase::setTWrapMode; ++ using CqTextureSampleOptionsBase::setBlur; ++ using CqTextureSampleOptionsBase::setSBlur; ++ using CqTextureSampleOptionsBase::setTBlur; ++ using CqTextureSampleOptionsBase::setWidth; ++ using CqTextureSampleOptionsBase::setSWidth; ++ using CqTextureSampleOptionsBase::setTWidth; ++ using CqTextureSampleOptionsBase::setMinWidth; ++ using CqTextureSampleOptionsBase::setTruncAmount; ++ using CqTextureSampleOptionsBase::setFilterType; ++ using CqTextureSampleOptionsBase::setStartChannel; ++ using CqTextureSampleOptionsBase::setNumChannels; ++ using CqTextureSampleOptionsBase::setWrapMode; ++ using CqTextureSampleOptionsBase::setSWrapMode; ++ using CqTextureSampleOptionsBase::setTWrapMode; + + // Other stuff from CqTextureSampleOptionsBase +- CqTextureSampleOptionsBase::fillFromFileHeader; ++ using CqTextureSampleOptionsBase::fillFromFileHeader; + + //-------------------------------------------------- + // Plain-texture specific sample options +@@ -307,37 +307,37 @@ class CqShadowSampleOptions : private CqTextureSampleO + CqShadowSampleOptions(); + + // Accessors from CqTextureSampleOptionsBase +- CqTextureSampleOptionsBase::sBlur; +- CqTextureSampleOptionsBase::tBlur; +- CqTextureSampleOptionsBase::sWidth; +- CqTextureSampleOptionsBase::tWidth; +- CqTextureSampleOptionsBase::minWidth; +- CqTextureSampleOptionsBase::truncAmount; +- CqTextureSampleOptionsBase::logTruncAmount; +- CqTextureSampleOptionsBase::filterType; +- CqTextureSampleOptionsBase::startChannel; +- CqTextureSampleOptionsBase::numChannels; +- CqTextureSampleOptionsBase::sWrapMode; +- CqTextureSampleOptionsBase::tWrapMode; ++ using CqTextureSampleOptionsBase::sBlur; ++ using CqTextureSampleOptionsBase::tBlur; ++ using CqTextureSampleOptionsBase::sWidth; ++ using CqTextureSampleOptionsBase::tWidth; ++ using CqTextureSampleOptionsBase::minWidth; ++ using CqTextureSampleOptionsBase::truncAmount; ++ using CqTextureSampleOptionsBase::logTruncAmount; ++ using CqTextureSampleOptionsBase::filterType; ++ using CqTextureSampleOptionsBase::startChannel; ++ using CqTextureSampleOptionsBase::numChannels; ++ using CqTextureSampleOptionsBase::sWrapMode; ++ using CqTextureSampleOptionsBase::tWrapMode; + + // Modifiers from CqTextureSampleOptionsBase +- CqTextureSampleOptionsBase::setBlur; +- CqTextureSampleOptionsBase::setSBlur; +- CqTextureSampleOptionsBase::setTBlur; +- CqTextureSampleOptionsBase::setWidth; +- CqTextureSampleOptionsBase::setSWidth; +- CqTextureSampleOptionsBase::setTWidth; +- CqTextureSampleOptionsBase::setMinWidth; +- CqTextureSampleOptionsBase::setTruncAmount; +- CqTextureSampleOptionsBase::setFilterType; +- CqTextureSampleOptionsBase::setStartChannel; +- CqTextureSampleOptionsBase::setNumChannels; +- CqTextureSampleOptionsBase::setWrapMode; +- CqTextureSampleOptionsBase::setSWrapMode; +- CqTextureSampleOptionsBase::setTWrapMode; ++ using CqTextureSampleOptionsBase::setBlur; ++ using CqTextureSampleOptionsBase::setSBlur; ++ using CqTextureSampleOptionsBase::setTBlur; ++ using CqTextureSampleOptionsBase::setWidth; ++ using CqTextureSampleOptionsBase::setSWidth; ++ using CqTextureSampleOptionsBase::setTWidth; ++ using CqTextureSampleOptionsBase::setMinWidth; ++ using CqTextureSampleOptionsBase::setTruncAmount; ++ using CqTextureSampleOptionsBase::setFilterType; ++ using CqTextureSampleOptionsBase::setStartChannel; ++ using CqTextureSampleOptionsBase::setNumChannels; ++ using CqTextureSampleOptionsBase::setWrapMode; ++ using CqTextureSampleOptionsBase::setSWrapMode; ++ using CqTextureSampleOptionsBase::setTWrapMode; + + // Other stuff from CqTextureSampleOptionsBase +- CqTextureSampleOptionsBase::fillFromFileHeader; ++ using CqTextureSampleOptionsBase::fillFromFileHeader; + + //-------------------------------------------------- + // Shadow-specific sample options Added: head/graphics/aqsis/files/patch-include_aqsis_tex_io_texfileheader.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/aqsis/files/patch-include_aqsis_tex_io_texfileheader.h Mon Sep 25 00:05:32 2017 (r450558) @@ -0,0 +1,137 @@ +In file included from libs/tex/io/tiffoutputfile.cpp:38: +In file included from libs/tex/io/tiffoutputfile.h:43: +In file included from include/aqsis/tex/io/itexoutputfile.h:46: +In file included from include/aqsis/tex/buffers/mixedimagebuffer.h:44: +/usr/include/c++/v1/map:629:15: error: object of type + 'std::__1::pair<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>' cannot be assigned + because its copy assignment operator is implicitly deleted + {__nc = __v.__cc; return *this;} + ^ +/usr/include/c++/v1/__tree:1645:35: note: in instantiation of member function + 'std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>::operator=' + requested here + __cache->__value_ = *__first; + ^ +/usr/include/c++/v1/__tree:1575:9: note: in instantiation of function template specialization + 'std::__1::__tree<std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>, + std::__1::__map_value_compare<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>, + std::__1::less<Aqsis::CqTexFileHeader::CqTypeInfoHolder>, true>, + std::__1::allocator<std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + boost::any> > + >::__assign_multi<std::__1::__tree_const_iterator<std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + boost::any>, + std::__1::__tree_node<std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + boost::any>, void *> *, long> >' requested here + __assign_multi(__t.begin(), __t.end()); + ^ +/usr/include/c++/v1/map:912:21: note: in instantiation of member function + 'std::__1::__tree<std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>, + std::__1::__map_value_compare<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>, + std::__1::less<Aqsis::CqTexFileHeader::CqTypeInfoHolder>, true>, + std::__1::allocator<std::__1::__value_type<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + boost::any> > >::operator=' requested here + __tree_ = __m.__tree_; + ^ +include/aqsis/tex/io/texfileheader.h:74:7: note: + in instantiation of member function 'std::__1::map<Aqsis::CqTexFileHeader::CqTypeInfoHolder, + boost::any, std::__1::less<Aqsis::CqTexFileHeader::CqTypeInfoHolder>, + std::__1::allocator<std::__1::pair<const Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any> + > >::operator=' requested here +class CqTexFileHeader + ^ +/usr/include/c++/v1/utility:325:5: note: copy assignment operator is implicitly deleted because + 'pair<Aqsis::CqTexFileHeader::CqTypeInfoHolder, boost::any>' has a user-declared move + constructor + pair(pair&&) = default; + ^ + +--- include/aqsis/tex/io/texfileheader.h.orig 2012-08-24 12:26:50 UTC ++++ include/aqsis/tex/io/texfileheader.h +@@ -43,6 +43,9 @@ + + #include <iostream> + #include <map> ++#if __cplusplus >= 201103L ++#include <typeindex> ++#endif + + #include <boost/any.hpp> + #include <boost/shared_ptr.hpp> +@@ -74,9 +77,13 @@ namespace Aqsis { + class CqTexFileHeader + { + private: ++#if __cplusplus < 201103L + class CqTypeInfoHolder; + /// Underlying map type. + typedef std::map<CqTypeInfoHolder, boost::any> TqAttributeMap; ++#else ++ typedef std::map<std::type_index, boost::any> TqAttributeMap; ++#endif + typedef TqAttributeMap::const_iterator const_iterator; + public: + +@@ -180,6 +187,7 @@ class CqTexFileHeader + }; + + ++#if __cplusplus < 201103L + //============================================================================== + // Implementation details + //============================================================================== +@@ -200,6 +208,7 @@ class CqTexFileHeader::CqTypeInfoHolder + return m_typeInfo.before(rhs.m_typeInfo) != 0; + } + }; ++#endif + + //------------------------------------------------------------------------------ + // CqTexFileHeader +@@ -261,13 +270,21 @@ inline void CqTexFileHeader::setTimestamp() + template<typename AttrTagType> + inline void CqTexFileHeader::set(const typename AttrTagType::type& value) + { ++#if __cplusplus < 201103L + m_attributeMap[CqTypeInfoHolder(typeid(AttrTagType))] = value; ++#else ++ m_attributeMap[std::type_index(typeid(AttrTagType))] = value; ++#endif + } + + template<typename AttrTagType> + void CqTexFileHeader::erase() + { ++#if __cplusplus < 201103L + m_attributeMap.erase(CqTypeInfoHolder(typeid(AttrTagType))); ++#else ++ m_attributeMap.erase(std::type_index(typeid(AttrTagType))); ++#endif + } + + template<typename AttrTagType> +@@ -280,7 +297,11 @@ inline typename AttrTagType::type& CqTexFileHeader::fi + template<typename AttrTagType> + inline const typename AttrTagType::type& CqTexFileHeader::find() const + { ++#if __cplusplus < 201103L + const_iterator iter = m_attributeMap.find(CqTypeInfoHolder(typeid(AttrTagType))); ++#else ++ const_iterator iter = m_attributeMap.find(std::type_index(typeid(AttrTagType))); ++#endif + if(iter == m_attributeMap.end()) + { + AQSIS_THROW_XQERROR(XqInternal, EqE_BadFile, "Requested attribute \"" +@@ -310,7 +331,11 @@ inline typename AttrTagType::type* CqTexFileHeader::fi + template<typename AttrTagType> + inline const typename AttrTagType::type* CqTexFileHeader::findPtr() const + { ++#if __cplusplus < 201103L + const_iterator iter = m_attributeMap.find(CqTypeInfoHolder(typeid(AttrTagType))); ++#else ++ const_iterator iter = m_attributeMap.find(std::type_index(typeid(AttrTagType))); ++#endif + if(iter == m_attributeMap.end()) + return 0; + return & boost::any_cast<const typename AttrTagType::type&>(iter->second); Added: head/graphics/aqsis/files/patch-libs_core_texturing__old_shadowmap__old.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/aqsis/files/patch-libs_core_texturing__old_shadowmap__old.cpp Mon Sep 25 00:05:32 2017 (r450558) @@ -0,0 +1,16 @@ +libs/core/texturing_old/shadowmap_old.cpp: In member function 'void Aqsis::CqShadowMapOld::LoadZFile()': +libs/core/texturing_old/shadowmap_old.cpp:179:13: error: no match for 'operator!=' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'long int') + if ( file != NULL ) + ^ + +--- libs/core/texturing_old/shadowmap_old.cpp.orig 2012-08-24 12:26:50 UTC ++++ libs/core/texturing_old/shadowmap_old.cpp +@@ -176,7 +176,7 @@ void CqShadowMapOld::LoadZFile() + { + std::ifstream file( m_strName.c_str(), std::ios::in | std::ios::binary ); + +- if ( file != NULL ) ++ if ( file ) + { + // Save a file type and version marker + TqPchar origHeader = tokenCast(ZFILE_HEADER); Added: head/graphics/aqsis/files/patch-libs_shadervm_dsoshadeops.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/aqsis/files/patch-libs_shadervm_dsoshadeops.cpp Mon Sep 25 00:05:32 2017 (r450558) @@ -0,0 +1,15 @@ +libs/shadervm/dsoshadeops.cpp:150:44: error: cast from pointer to smaller type 'char' loses information + while( ( pShadeOp->m_opspec )[0] != (char) NULL ) + ^~~~~~~~~~~ + +--- libs/shadervm/dsoshadeops.cpp.orig 2012-08-24 12:26:50 UTC ++++ libs/shadervm/dsoshadeops.cpp +@@ -147,7 +147,7 @@ CqDSORepository::getShadeOpMethods(CqString* pShadeOpN + { + //We have an appropriate named shadeop table + SqShadeOp *pShadeOp = (SqShadeOp*) pTableSymbol; +- while( ( pShadeOp->m_opspec )[0] != (char) NULL ) ++ while( ( pShadeOp->m_opspec )[0] != '\0' ) + { + SqDSOExternalCall *pDSOCall = NULL; + pDSOCall = parseShadeOpTableEntry( handle, pShadeOp ); Added: head/graphics/aqsis/files/patch-libs_shadervm_shaderexecenv_shadeops__tmap.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/aqsis/files/patch-libs_shadervm_shaderexecenv_shadeops__tmap.cpp Mon Sep 25 00:05:32 2017 (r450558) @@ -0,0 +1,16 @@ +libs/shadervm/shaderexecenv/shadeops_tmap.cpp:257:56: error: ISO C++11 does not allow access declarations; use using declarations instead + CqSampleOptionExtractorBase<CqTextureSampleOptions>::extractVarying; + ^ + using + +--- libs/shadervm/shaderexecenv/shadeops_tmap.cpp.orig 2012-08-24 12:26:50 UTC ++++ libs/shadervm/shaderexecenv/shadeops_tmap.cpp +@@ -254,7 +254,7 @@ class CqSampleOptionExtractor + extractUniformAndCacheVarying(paramList, numParams, opts); + } + +- CqSampleOptionExtractorBase<CqTextureSampleOptions>::extractVarying; ++ using CqSampleOptionExtractorBase<CqTextureSampleOptions>::extractVarying; + }; + + Modified: head/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp ============================================================================== --- head/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp Mon Sep 25 00:05:05 2017 (r450557) +++ head/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp Mon Sep 25 00:05:32 2017 (r450558) @@ -1,6 +1,23 @@ +tools/displays/piqsl/piqsldisplay.cpp:400:35: error: non-constant-expression cannot be narrowed from type 'TqInt' (aka 'int') to 'unsigned int' in initializer list [-Wc++11-narrowing] + PtDspyDevFormat fmt = {name, typeID}; + ^~~~~~ +tools/displays/piqsl/piqsldisplay.cpp:400:35: note: insert an explicit cast to silence this issue + PtDspyDevFormat fmt = {name, typeID}; + ^~~~~~ + static_cast<unsigned int>( ) + --- tools/displays/piqsl/piqsldisplay.cpp.orig 2012-08-24 12:26:50 UTC +++ tools/displays/piqsl/piqsldisplay.cpp -@@ -450,8 +450,8 @@ extern "C" PtDspyError DspyImageData(PtD +@@ -397,7 +397,7 @@ extern "C" PtDspyError DspyImageOpen(PtDspyImageHandle + TqInt typeID = g_mapNameToType[typeName]; + char* name = new char[strlen(formatName)+1]; + strcpy(name, formatName); +- PtDspyDevFormat fmt = {name, typeID}; ++ PtDspyDevFormat fmt = {name, static_cast<unsigned>(typeID)}; + outFormat.push_back(fmt); + formatNode = formatNode->NextSiblingElement("Format"); + iformat++; +@@ -450,8 +450,8 @@ extern "C" PtDspyError DspyImageData(PtDspyImageHandle TiXmlElement* bucketDataXML = new TiXmlElement("BucketData"); std::stringstream base64Data;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709250005.v8P05WKH026951>