diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-09-25 08:05:32 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-09-25 08:05:32 +0800 |
commit | d5561bd0ee61fa169266e7a4eb6910cd27b8a760 (patch) | |
tree | 64a48e8906746db7b1063204ac2d29a1f5638c6c /graphics | |
parent | a5a9805ffa6934c7f8a35773ecb955b8f49bc571 (diff) | |
download | freebsd-ports-gnome-d5561bd0ee61fa169266e7a4eb6910cd27b8a760.tar.gz freebsd-ports-gnome-d5561bd0ee61fa169266e7a4eb6910cd27b8a760.tar.zst freebsd-ports-gnome-d5561bd0ee61fa169266e7a4eb6910cd27b8a760.zip |
graphics/aqsis: switch to C++11 for Boost
PR: 220787
Diffstat (limited to 'graphics')
7 files changed, 354 insertions, 3 deletions
diff --git a/graphics/aqsis/Makefile b/graphics/aqsis/Makefile index 235ebe5ff043..b15773bc36a3 100644 --- a/graphics/aqsis/Makefile +++ b/graphics/aqsis/Makefile @@ -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 diff --git a/graphics/aqsis/files/patch-include_aqsis_tex_filtering_texturesampleoptions.h b/graphics/aqsis/files/patch-include_aqsis_tex_filtering_texturesampleoptions.h new file mode 100644 index 000000000000..fe647ed548e5 --- /dev/null +++ b/graphics/aqsis/files/patch-include_aqsis_tex_filtering_texturesampleoptions.h @@ -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 diff --git a/graphics/aqsis/files/patch-include_aqsis_tex_io_texfileheader.h b/graphics/aqsis/files/patch-include_aqsis_tex_io_texfileheader.h new file mode 100644 index 000000000000..d0d3704213b9 --- /dev/null +++ b/graphics/aqsis/files/patch-include_aqsis_tex_io_texfileheader.h @@ -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); diff --git a/graphics/aqsis/files/patch-libs_core_texturing__old_shadowmap__old.cpp b/graphics/aqsis/files/patch-libs_core_texturing__old_shadowmap__old.cpp new file mode 100644 index 000000000000..90d63d69e4fd --- /dev/null +++ b/graphics/aqsis/files/patch-libs_core_texturing__old_shadowmap__old.cpp @@ -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); diff --git a/graphics/aqsis/files/patch-libs_shadervm_dsoshadeops.cpp b/graphics/aqsis/files/patch-libs_shadervm_dsoshadeops.cpp new file mode 100644 index 000000000000..11de7f4356ed --- /dev/null +++ b/graphics/aqsis/files/patch-libs_shadervm_dsoshadeops.cpp @@ -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 ); diff --git a/graphics/aqsis/files/patch-libs_shadervm_shaderexecenv_shadeops__tmap.cpp b/graphics/aqsis/files/patch-libs_shadervm_shaderexecenv_shadeops__tmap.cpp new file mode 100644 index 000000000000..7f59cf2ef727 --- /dev/null +++ b/graphics/aqsis/files/patch-libs_shadervm_shaderexecenv_shadeops__tmap.cpp @@ -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; + }; + + diff --git a/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp b/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp index c676df9afb31..f168ec7ebd4b 100644 --- a/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp +++ b/graphics/aqsis/files/patch-tools_displays_piqsl_piqsldisplay.cpp @@ -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; |