From eb243c1da0d9b5c76e0f4a82479888c4c0b3adb3 Mon Sep 17 00:00:00 2001 From: X512 <45505339+X547@users.noreply.github.com> Date: Tue, 26 May 2020 03:23:16 +0900 Subject: [PATCH] partio: fix and enable x86 32 bit build (#4668) --- media-libs/partio/partio-1.1.0.recipe | 20 ++++++----- .../partio/patches/partio-1.1.0.patchset | 34 +++++++++++++++++-- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/media-libs/partio/partio-1.1.0.recipe b/media-libs/partio/partio-1.1.0.recipe index fa70300b5..c9c65da1c 100644 --- a/media-libs/partio/partio-1.1.0.recipe +++ b/media-libs/partio/partio-1.1.0.recipe @@ -14,17 +14,18 @@ interface HOMEPAGE="https://www.disneyanimation.com/technology/partio.html" COPYRIGHT="2010-2012 Disney Enterprises" LICENSE="BSD (3-clause)" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/wdas/partio/archive/v$portVersion.tar.gz" CHECKSUM_SHA256="133f386f076bd6958292646b6ba0e3db6d1e37bde3b8a6d1bc4b7809d693999d" PATCHES="partio-$portVersion.patchset" -ARCHITECTURES="!x86_gcc2 ?x86 x86_64" -SECONDARY_ARCHITECTURES="?x86" +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. commandSuffix=$secondaryArchSuffix commandBinDir=$binDir + if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= commandBinDir=$prefix/bin @@ -65,7 +66,7 @@ BUILD_PREREQUIRES=" cmd:make cmd:pkg_config$secondaryArchSuffix # cmd:python - cmd:swig + cmd:swig$secondaryArchSuffix " defineDebugInfoPackage partio$secondaryArchSuffix \ @@ -78,8 +79,9 @@ BUILD() { mkdir -p build cd build - cmake .. \ - $cmakeDirArgs \ + mkdir -p install + cmake -LA .. \ + -DCMAKE_INSTALL_PREFIX="$PWD/install" \ -Wno-dev make $jobArgs @@ -90,9 +92,9 @@ INSTALL() cd build make install - mkdir -p $includeDir - mv $prefix/include/* $includeDir/ - rm -rf $prefix/include $prefix/test + mkdir -p $commandBinDir && cp install/bin/* $commandBinDir + mkdir -p $libDir && cp install/lib/* $libDir + mkdir -p $includeDir && cp install/include/* $includeDir prepareInstalledDevelLib libpartio diff --git a/media-libs/partio/patches/partio-1.1.0.patchset b/media-libs/partio/patches/partio-1.1.0.patchset index a7017b9a4..3305cf6b2 100644 --- a/media-libs/partio/patches/partio-1.1.0.patchset +++ b/media-libs/partio/patches/partio-1.1.0.patchset @@ -1,8 +1,11 @@ -From 5152135d177013139162ea09e389c907f649f573 Mon Sep 17 00:00:00 2001 +From 243d16f1f15310e279408d87bc76fab012d46f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Wed, 10 Jan 2018 09:12:51 +0100 Subject: Install path fix +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e331c9c..9c592ca 100644 @@ -18,5 +21,32 @@ index e331c9c..9c592ca 100644 ## Search for useful libraries find_package(GLUT REQUIRED) -- -2.15.1 +2.24.1 + +From 32bdb4e2973eba6f35c4982a94f87ec1a2a59bc7 Mon Sep 17 00:00:00 2001 +From: X512 +Date: Fri, 31 Jan 2020 03:36:52 +0900 +Subject: CharArrayLen: fix build + +--- + src/lib/io/MC.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lib/io/MC.cpp b/src/lib/io/MC.cpp +index 7125954..7460c0b 100644 +--- a/src/lib/io/MC.cpp ++++ b/src/lib/io/MC.cpp +@@ -105,8 +105,8 @@ bool ReadAttrHeader(std::istream& input, Attribute_Header& attribute){ + + int CharArrayLen(char** charArray){ + int i = 0; +- if(charArray != false){ +- while(charArray[i] != '\0'){ ++ if(charArray){ ++ while(charArray[i]){ + i++; + } + } +-- +2.24.1