diff options
author | Zhirui Dai | 2023-11-30 11:43:47 -0800 |
---|---|---|
committer | Zhirui Dai | 2023-11-30 11:43:47 -0800 |
commit | e644f109369bf5d9d1fd5dddc61fb851970cae2b (patch) | |
tree | c23c69e7b63dc656673fe9ea34047adfd413a112 | |
parent | 376fcee25624f785573ba4dfae2c678b15bad981 (diff) | |
download | aur-e644f109369bf5d9d1fd5dddc61fb851970cae2b.tar.gz |
fix build
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | vcglib.patch | 96 |
3 files changed, 109 insertions, 7 deletions
@@ -1,7 +1,7 @@ pkgbase = meshlab-git pkgdesc = System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version) - pkgver = 2022.02.r224.g4c321e19d - pkgrel = 2 + pkgver = 2022.02.r226.gca1f5ab1d + pkgrel = 1 url = https://www.meshlab.net arch = i686 arch = x86_64 @@ -34,6 +34,8 @@ pkgbase = meshlab-git provides = meshlab conflicts = meshlab source = meshlab::git+https://github.com/cnr-isti-vclab/meshlab.git#branch=main + source = vcglib.patch + sha256sums = SKIP sha256sums = SKIP pkgname = meshlab-git @@ -20,8 +20,8 @@ _fragment="#${FRAGMENT:-branch=main}" _name="meshlab" pkgname="$_name-git" -pkgver=2022.02.r224.g4c321e19d -pkgrel=2 +pkgver=2022.02.r226.gca1f5ab1d +pkgrel=1 pkgdesc="System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)" arch=('i686' 'x86_64') url="https://www.meshlab.net" @@ -36,11 +36,16 @@ makedepends=('boost' 'cmake' 'eigen' 'ninja' 'git' 'muparser' 'lib3ds' 'openctm- optdepends=('lib3ds: for Autodesk`s 3D-Studio r3 and r4 .3DS file support' 'muparser: for filer_func plugins' 'openctm-tools: for compressed triangle mesh file format') -source=("$_name::git+https://github.com/cnr-isti-vclab/meshlab.git${_fragment}") -sha256sums=('SKIP') +source=( + "$_name::git+https://github.com/cnr-isti-vclab/meshlab.git${_fragment}" + "vcglib.patch" +) +sha256sums=('SKIP' 'SKIP') prepare() { prepare_submodule + cd $srcdir/meshlab/src/vcglib + patch -Np1 -i $srcdir/vcglib.patch } pkgver() { @@ -55,7 +60,6 @@ build() { '-DCMAKE_CXX_COMPILER=g++-12' ) cmake "${_cmake_flags[@]}" -G Ninja -B "${srcdir}/build" -S "${srcdir}/meshlab" -# shellcheck disable=SC2086 # allow MAKEFLAGS to split when passing multiple flags. ninja ${MAKEFLAGS:--j1} -C "${srcdir}/build" } diff --git a/vcglib.patch b/vcglib.patch new file mode 100644 index 000000000000..b203837169b4 --- /dev/null +++ b/vcglib.patch @@ -0,0 +1,96 @@ +diff --git a/wrap/io_trimesh/import_ply.h b/wrap/io_trimesh/import_ply.h +index 2da70ab4..96126627 100644 +--- a/wrap/io_trimesh/import_ply.h ++++ b/wrap/io_trimesh/import_ply.h +@@ -1031,6 +1031,7 @@ public: + // Parsing texture names + m.textures.clear(); + m.normalmaps.clear(); ++ const size_t linesize=1024; + + for(size_t co=0;co<pf.comments.size();++co) + { +@@ -1048,8 +1049,8 @@ public: + for(int i=0;i<n;i++) + if( bufstr[i]!=' ' && bufstr[i]!='\t' && bufstr[i]>32 && bufstr[i]<125 ) bufclean.push_back(bufstr[i]); + +- char buf2[255]; +- ply::interpret_texture_name( bufclean.c_str(),filename,buf2 ); ++ char buf2[linesize]; ++ ply::interpret_texture_name( bufclean.c_str(),filename,buf2,linesize ); + m.textures.push_back( std::string(buf2) ); + } + /*if( !strncmp(c,NFILE,strlen(NFILE)) ) +diff --git a/wrap/ply/plylib.cpp b/wrap/ply/plylib.cpp +index 78bb2ccd..772c62f0 100644 +--- a/wrap/ply/plylib.cpp ++++ b/wrap/ply/plylib.cpp +@@ -3652,8 +3652,9 @@ int PlyFile::Read( void * mem ) + + return 0; + } +- +-void interpret_texture_name(const char*a, const char*fn, char*output){ ++// this function is used to interpret the texture name in the ply header substituting "<this>" with the filename ++// of the ply file itself. This is used to allow to rename the ply file without having to change the texture name inside the ply file ++void interpret_texture_name(const char*a, const char*fn, char*output, size_t linesize){ + int ia=0,io=0; + output[0]=0; + while (a[ia]!=0){ +@@ -3685,7 +3686,8 @@ void interpret_texture_name(const char*a, const char*fn, char*output){ + + // 3) append + output[io]=0; +- sprintf(output,"%s%s",output,fn2); ++ // replace sprintf(output,"%s%s",output,fn2); ++ snprintf(output, linesize, "%s%s",output,fn2); + io=strlen(output); + ia+=6; //skip the "<this>" + continue; +diff --git a/wrap/ply/plylib.h b/wrap/ply/plylib.h +index a068ac4c..20c58ac4 100644 +--- a/wrap/ply/plylib.h ++++ b/wrap/ply/plylib.h +@@ -350,7 +350,7 @@ protected: + PlyElement * FindElement( const char * name ); + }; + +-void interpret_texture_name(const char*a, const char*fn, char*output); ++void interpret_texture_name(const char*a, const char*fn, char*output, size_t linesize); + + } // end namespace ply + } // end namespace vcg +diff --git a/wrap/ply/plystuff.h b/wrap/ply/plystuff.h +index e799d29a..6e13e117 100644 +--- a/wrap/ply/plystuff.h ++++ b/wrap/ply/plystuff.h +@@ -27,29 +27,6 @@ of Greg Turk and on the work of Claudio Rocchini + + ****************************************************************************/ + +-/**************************************************************************** +- History +- +-$Log: not supported by cvs2svn $ +-Revision 1.6 2007/06/25 15:24:00 cignoni +-removed a possibly useless static kw +- +-Revision 1.5 2006/04/11 09:48:04 zifnab1974 +-changes needed for compilation on linux 64b with gcc 3.4.5 +- +-Revision 1.4 2005/12/02 00:00:53 cignoni +-Moved and corrected interpret_texture_name from plystuff.h to plylib.cpp +- +-Revision 1.3 2005/03/18 00:14:40 cignoni +-removed small gcc compiling issues +- +-Revision 1.2 2005/03/15 11:46:52 cignoni +-Cleaning of the automatic bbox caching support for ply files. First working version. +- +- +-*/ +- +-//****************** Gestione cache ***************** + + #ifndef __VCG_PLYLIB_STUFF + #define __VCG_PLYLIB_STUFF |