diff options
author | Alex Dahl | 2017-09-24 18:03:01 -0400 |
---|---|---|
committer | Alex Dahl | 2017-09-24 18:03:01 -0400 |
commit | a12c5f5bd78b48d6af5e3e73a32aa6e68656aba1 (patch) | |
tree | 46609ade7e38ad35903ab7d3883c80d4bf7a6cee | |
parent | 7f79954561f9b59fa0f7a43c6135e8fdb8edfb40 (diff) | |
download | aur-a12c5f5bd78b48d6af5e3e73a32aa6e68656aba1.tar.gz |
Updated package
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | CMakeLists.txt.patch | 24 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | SeExprv3.patch | 243 |
4 files changed, 19 insertions, 266 deletions
@@ -1,6 +1,6 @@ pkgbase = partio-git pkgdesc = Particle IO and manipulation library (git version) - pkgver = 1.1.0.r73.g7f3e0d1 + pkgver = 1.1.0.r91.g2774ef3 pkgrel = 4 url = http://www.disneyanimation.com/technology/partio.html arch = i686 @@ -19,11 +19,9 @@ pkgbase = partio-git source = git+https://github.com/wdas/partio.git source = CMakeLists.txt.patch source = py_CMakeLists.txt.patch - source = SeExprv3.patch md5sums = SKIP - md5sums = 2f7a6ddc41a5b7d9134820f877b0d2b3 + md5sums = 74e654e43cf9e9aacd9ac57c0e0e671c md5sums = 306cacec7af0af3adb7876c288881062 - md5sums = 92029f98bc024ed5034a299590906f1d pkgname = partio-git diff --git a/CMakeLists.txt.patch b/CMakeLists.txt.patch index f506c4632e64..9dc1d0b82503 100644 --- a/CMakeLists.txt.patch +++ b/CMakeLists.txt.patch @@ -1,18 +1,18 @@ diff --git /partio/CMakeLists.txt /partio/CMakeLists.txt -index fdab418..c6a5a4b 100644 +index 92c1da0..6021a97 100644 --- /partio/CMakeLists.txt +++ /partio/CMakeLists.txt -@@ -103,11 +103,11 @@ SET( PARTIO_LIBRARIES partio ${ZLIB_LIBRARY} ) - # make it so partio can be found - INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/lib ) +@@ -100,11 +100,11 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/lib ) --SET(SEEXPR_BASE "c:/aselle/seexpr-inst" CACHE STRING "path to SeExpr") -+SET(SEEXPR_BASE "/usr" CACHE STRING "path to SeExpr") - SET(SEEXPR_INCLUDE_PATH ${SEEXPR_BASE}/include) - SET(SEEXPR_LIBDIR ${CMAKE_INSTALL_LIBDIR}) - SET(SEEXPR_LINK_PATH ${SEEXPR_BASE}/${SEEXPR_LIBDIR}) --SET(SEEXPR_LIBS "SeExpr") -+SET(SEEXPR_LIBS "SeExpr2") + if (${PARTIO_SE_ENABLED}) + add_definitions(-DPARTIO_SE_ENABLED=1) +- SET(SEEXPR_BASE "c:/aselle/seexpr-inst" CACHE STRING "path to SeExpr") ++ SET(SEEXPR_BASE "/usr" CACHE STRING "path to SeExpr") + SET(SEEXPR_INCLUDE_PATH ${SEEXPR_BASE}/include) + SET(SEEXPR_LIBDIR ${CMAKE_INSTALL_LIBDIR}) + SET(SEEXPR_LINK_PATH ${SEEXPR_BASE}/${SEEXPR_LIBDIR}) +- SET(SEEXPR_LIBS "SeExpr") ++ SET(SEEXPR_LIBS "SeExpr2") + endif () - ## Traverse subdirectories @@ -1,7 +1,7 @@ # Maintainer: Alex Dahl <adahl1@umbc.edu> pkgname=partio-git -pkgver=1.1.0.r73.g7f3e0d1 -pkgrel=4 +pkgver=1.1.0.r91.g2774ef3 +pkgrel=1 pkgdesc="Particle IO and manipulation library (git version)" arch=(i686 x86_64) url="http://www.disneyanimation.com/technology/partio.html" @@ -13,8 +13,8 @@ optdepends=('python2: Python interface support' makedepends=('cmake>=2.4.6' 'git') provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") -source=('git+https://github.com/wdas/partio.git' 'CMakeLists.txt.patch' 'py_CMakeLists.txt.patch' 'SeExprv3.patch') -md5sums=('SKIP' '2f7a6ddc41a5b7d9134820f877b0d2b3' '306cacec7af0af3adb7876c288881062' '92029f98bc024ed5034a299590906f1d') +source=('git+https://github.com/wdas/partio.git' 'CMakeLists.txt.patch' 'py_CMakeLists.txt.patch') +md5sums=('SKIP' '74e654e43cf9e9aacd9ac57c0e0e671c' '306cacec7af0af3adb7876c288881062') pkgver() { cd "$srcdir/${pkgname%-git}" @@ -24,8 +24,6 @@ pkgver() { prepare() { cd "$srcdir" - # Path PartioSe for SeExpr v3 until source fixed - patch -p1 -i "$srcdir/SeExprv3.patch" # Fix SeExpr dependency and remove tests patch -p1 -i "$srcdir/CMakeLists.txt.patch" # Change Python version to 2 to work with SeExpr @@ -36,7 +34,7 @@ build() { cd "$srcdir/${pkgname%-git}" mkdir -p build cd ./build - cmake -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev .. + cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev .. make } diff --git a/SeExprv3.patch b/SeExprv3.patch deleted file mode 100644 index 56f185977a45..000000000000 --- a/SeExprv3.patch +++ /dev/null @@ -1,243 +0,0 @@ -diff --git /partio/src/lib/PartioSe.h /partio/src/lib/PartioSe.h -index 44a434d..02e92ac 100644 ---- /partio/src/lib/PartioSe.h -+++ /partio/src/lib/PartioSe.h -@@ -33,13 +33,17 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - #include <Partio.h> --#include <SeExpression.h> -+#include <SeExpr2/Expression.h> - #include <map> - - namespace Partio{ - -+using Vec3d = SeExpr2::Vec<double,3>; -+ -+using Vec3dRef= SeExpr2::Vec<double,3,true>; -+ - template<class T> --class AttribVar:public SeExprVarRef -+class AttribVar:public SeExpr2::ExprVarRef - { - Partio::ParticlesDataMutable* parts; - Partio::ParticleAttribute attr; -@@ -48,11 +52,11 @@ class AttribVar:public SeExprVarRef - public: - AttribVar(Partio::ParticlesDataMutable* parts, - Partio::ParticleAttribute attr,int& currentIndex) -- :parts(parts),attr(attr),currentIndex(currentIndex),clampedCount(std::min(attr.count,3)) -+ :SeExpr2::ExprVarRef(SeExpr2::TypeVec(1).Varying()),parts(parts),attr(attr),currentIndex(currentIndex),clampedCount(std::min(attr.count,3)) - {} - - bool isVec(){return attr.count!=1;} -- void eval(const SeExprVarNode* node,SeVec3d& result){ -+ void eval(double* result) { - const T* ptr=parts->data<T>(attr,currentIndex); - //std::cerr<<"in eval for "<<attr.name<<" count is "<<clampedCount<<" cur "<<currentIndex<<std::endl; - for(int k=0;k<clampedCount;k++){ -@@ -63,22 +67,36 @@ public: - result[k]=0; - } - } -+ void eval(const char** resultStr) {} -+ /// void eval(const SeExpr2::ExprVarNode* node,Vec3d& result){ -+ /// const T* ptr=parts->data<T>(attr,currentIndex); -+ /// //std::cerr<<"in eval for "<<attr.name<<" count is "<<clampedCount<<" cur "<<currentIndex<<std::endl; -+ /// for(int k=0;k<clampedCount;k++){ -+ /// result[k]=ptr[k]; -+ /// } -+ /// // set any remaining fields (i.e. if clampedCount is 2) -+ /// for(int k=clampedCount;k<3;k++){ -+ /// result[k]=0; -+ /// } -+ /// } - }; - --struct SimpleVar:public SeExprVarRef{ -+struct SimpleVar:public SeExpr2::ExprVarRef{ - double val; -- SimpleVar():val(0){} -+ SimpleVar():SeExpr2::ExprVarRef(SeExpr2::TypeVec(1).Varying()), val(0){} - bool isVec(){return false;} -- void eval(const SeExprVarNode* node,SeVec3d& result){ -- result[0]=result[1]=result[2]=val; -- } -+ void eval(double* result) {result[0] = val;} -+ void eval(const char** resultStr) {} -+ /// void eval(const SeExprVarNode* node,Vec3d& result){ -+ /// result[0]=result[1]=result[2]=val; -+ /// } - }; - - /// Class that maps back to the partio data - template<class T> class VarToPartio; - - /// NOTE: This class is experimental and may be deleted/modified in future versions --class PartioSe:public SeExpression{ -+class PartioSe:public SeExpr2::Expression{ - bool isPaired; - int currentIndex; - Partio::ParticleAttribute pairH1,pairH2; -@@ -98,7 +116,8 @@ class PartioSe:public SeExpression{ - mutable SimpleVar indexVar,countVar,timeVar; - - public: -- typedef SeExpression::LocalVarTable::const_iterator LocalVarTableIterator; -+ typedef std::map<std::string, SeExpr2::ExprVarRef*> LocalVarTable; -+ typedef LocalVarTable::const_iterator LocalVarTableIterator; - - PartioSe(Partio::ParticlesDataMutable* parts,const char* expr); - PartioSe(Partio::ParticlesDataMutable* partsPairing,Partio::ParticlesDataMutable* parts,const char* expr); -@@ -110,7 +129,7 @@ public: - void run(int i); - bool runRange(int istart,int iend); - void setTime(float val); -- SeExprVarRef* resolveVar(const std::string& s) const; -+ SeExpr2::ExprVarRef* resolveVar(const std::string& s) const; - private: - PartioSe(const PartioSe&); - PartioSe& operator=(const PartioSe&); -diff --git /partio/src/lib/PartioSe.cpp /partio/src/lib/PartioSe.cpp -index cd99686..ebefb43 100644 ---- /partio/src/lib/PartioSe.cpp -+++ /partio/src/lib/PartioSe.cpp -@@ -40,13 +40,13 @@ namespace Partio{ - template<class T> class VarToPartio - { - Partio::ParticlesDataMutable* parts; -- const SeExprLocalVarRef* local; -+ SeExpr2::ExprVarRef* local; - Partio::ParticleAttribute attr; - int& currentIndex; - int clampedCount; - - public: -- VarToPartio(Partio::ParticlesDataMutable* parts,const SeExprLocalVarRef* local, -+ VarToPartio(Partio::ParticlesDataMutable* parts, SeExpr2::ExprVarRef* local, - Partio::ParticleAttribute attr,int& currentIndex) - :parts(parts),local(local),attr(attr),currentIndex(currentIndex), - clampedCount(std::min(3,attr.count)) -@@ -55,8 +55,11 @@ public: - - void mapBack(){ - T* ptr=parts->dataWrite<T>(attr,currentIndex); -+ double* tmp=new double[clampedCount]; -+ local->eval(tmp); - for(int k=0;k<clampedCount;k++){ -- ptr[k]=local->val[k]; -+ /// ptr[k]=local->val[k]; -+ ptr[k]=tmp[k]; - } - if(clampedCount == 1) for(int k=clampedCount;k<attr.count;k++) - ptr[k]=ptr[clampedCount-1]; -@@ -84,7 +87,7 @@ void PartioSe::addSet(const char* suffix,Partio::ParticlesDataMutable* parts,int - } - - PartioSe::PartioSe(Partio::ParticlesDataMutable* parts,Partio::ParticlesDataMutable* partsPairing,const char* expression) --:SeExpression(expression),parts(parts),partsPairing(partsPairing),isPaired(true) -+:SeExpr2::Expression(expression),parts(parts),partsPairing(partsPairing),isPaired(true) - { - parts->attributeInfo("p1",pairH1); - parts->attributeInfo("p2",pairH2); -@@ -95,41 +98,41 @@ PartioSe::PartioSe(Partio::ParticlesDataMutable* parts,Partio::ParticlesDataMuta - // checkout what we build - isValid(); - // go through local variables and look for exports -- const SeExpression::LocalVarTable& vars=getLocalVars(); -- typedef SeExpression::LocalVarTable::const_iterator LocalVarTableIterator; -- for(LocalVarTableIterator it=vars.begin(),itend=vars.end();it != itend;++it){ -- //std::cerr<<"assignment of "<<it->first<<std::endl; -- size_t idx=it->first.rfind("_"); -- std::string realName=it->first; -- int whichNum; -- if(idx != std::string::npos){ -- realName=it->first.substr(0,idx); -- whichNum=atoi(it->first.substr(idx+1).c_str()); -- //std::cerr<<"adding as stripped pairing "<<realName<<" which "<<whichNum<<std::endl; -- if(whichNum != 1 && whichNum != 2){ -- std::cerr<<"Expect _1 and _2 on the end of particle variables got "<<whichNum<<std::endl;; -- }else{ -- int *idxPtr=whichNum == 1 ? &pairIndex1 : &pairIndex2; -- addExport(realName,it,partsPairing,*idxPtr); -- } -- }else{ -- //std::cerr<<"adding as normal pairing "<<realName<<std::endl; -- addExport(realName,it,parts,currentIndex); -- } -- } -+ /// const LocalVarTable& vars=getLocalVars(); -+ /// typedef LocalVarTable::const_iterator LocalVarTableIterator; -+ /// for(LocalVarTableIterator it=vars.begin(),itend=vars.end();it != itend;++it){ -+ /// //std::cerr<<"assignment of "<<it->first<<std::endl; -+ /// size_t idx=it->first.rfind("_"); -+ /// std::string realName=it->first; -+ /// int whichNum; -+ /// if(idx != std::string::npos){ -+ /// realName=it->first.substr(0,idx); -+ /// whichNum=atoi(it->first.substr(idx+1).c_str()); -+ /// //std::cerr<<"adding as stripped pairing "<<realName<<" which "<<whichNum<<std::endl; -+ /// if(whichNum != 1 && whichNum != 2){ -+ /// std::cerr<<"Expect _1 and _2 on the end of particle variables got "<<whichNum<<std::endl;; -+ /// }else{ -+ /// int *idxPtr=whichNum == 1 ? &pairIndex1 : &pairIndex2; -+ /// addExport(realName,it,partsPairing,*idxPtr); -+ /// } -+ /// }else{ -+ /// //std::cerr<<"adding as normal pairing "<<realName<<std::endl; -+ /// addExport(realName,it,parts,currentIndex); -+ /// } -+ /// } - } - - PartioSe::PartioSe(Partio::ParticlesDataMutable* parts,const char* expression) --:SeExpression(expression),parts(parts),partsPairing(0),isPaired(false) -+:SeExpr2::Expression(expression),parts(parts),partsPairing(0),isPaired(false) - { - addSet("",parts,currentIndex); - isValid(); -- const SeExpression::LocalVarTable& vars=getLocalVars(); -- typedef SeExpression::LocalVarTable::const_iterator LocalVarTableIterator; -- for(LocalVarTableIterator it=vars.begin(),itend=vars.end();it != itend;++it){ -- //std::cerr<<"assignment of "<<it->first<<std::endl; -- addExport(it->first,it,parts,currentIndex); -- } -+ /// const SeExpression::LocalVarTable& vars=getLocalVars(); -+ /// typedef SeExpression::LocalVarTable::const_iterator LocalVarTableIterator; -+ /// for(LocalVarTableIterator it=vars.begin(),itend=vars.end();it != itend;++it){ -+ /// //std::cerr<<"assignment of "<<it->first<<std::endl; -+ /// addExport(it->first,it,parts,currentIndex); -+ /// } - - } - -@@ -138,9 +141,9 @@ void PartioSe::addExport(const std::string& name,LocalVarTableIterator it,Partio - bool isParticleAttr=parts->attributeInfo(name.c_str(),attr); - if(isParticleAttr){ - if(attr.type==Partio::FLOAT || attr.type==Partio::VECTOR){ -- floatVarToPartio.push_back(new VarToPartio<float>(parts,&it->second,attr,setIndex)); -+ floatVarToPartio.push_back(new VarToPartio<float>(parts,it->second,attr,setIndex)); - }else if(attr.type==Partio::INT || attr.type==Partio::INDEXEDSTR){ -- intVarToPartio.push_back(new VarToPartio<int>(parts,&it->second,attr,setIndex)); -+ intVarToPartio.push_back(new VarToPartio<int>(parts,it->second,attr,setIndex)); - }else{ - std::cerr<<"unknown particle attribute type "<<attr.name<<std::endl; - } -@@ -175,7 +178,7 @@ void PartioSe::run(int i){ - std::cerr<<"Index "<<currentIndex<<" Referenced particle index "<<pairIndex1<<" is out of bounds"<<std::endl; - } - } -- SeVec3d value=evaluate(); -+ /// SeExpr2::Vec3d value=evaluate(); - // map data into the particles again - for(IntVarToPartio::iterator it=intVarToPartio.begin(),itend=intVarToPartio.end(); - it!=itend;++it) -@@ -223,7 +226,7 @@ bool PartioSe::runRandom(){ - return true; - } - --SeExprVarRef* PartioSe::resolveVar(const std::string& s) const{ -+SeExpr2::ExprVarRef* PartioSe::resolveVar(const std::string& s) const{ - { - IntVarMap::iterator it=intVars.find(s); - if(it != intVars.end()) return it->second; |