Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 372507

Summary: patches for media-libs/opencollada (was: opencollada ebuild request)
Product: Gentoo Linux Reporter: tman <cornicx>
Component: New packagesAssignee: Jonathan Scruggs (RETIRED) <dracwyrm>
Status: RESOLVED FIXED    
Severity: normal CC: fordfrog, graphics+disabled, pchrist, roamingangel, simon.haegler, sping
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://code.google.com/p/opencollada/source/checkout
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 585724    
Attachments: opencollada-9999.ebuild
opencollada-comment-assert.patch
/var/log/portage/media-libs:opencollada-9999:20110831-054142.log
opencollada-9999.ebuild
opencollada-optional_input_set_141.patch
opencollada-optional_input_set_150.patch
opencollada-utf_include.patch
opencollada-libbuffer.patch
opencollada-recursive_header.patch
opencollada-9999.ebuild
opencollada-9999.ebuild

Description tman 2011-06-21 19:44:04 UTC
we need opencollada  in portage, because blender have some function to support this but it require this libs.

it would be nice if someone could be mercy and  add this into portage, to improve the supported function of  blender-2.5x . 


thanks


http://opencollada.org/download.html


Reproducible: Always
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-06-27 09:00:11 UTC
Am I the only one who can't see a Linux port in the download page?
Comment 2 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-06-27 09:09:23 UTC
I'm not sure how blender handles collada files, but probably it bundles an XML library like libexpat, or one of the two collada libraries available(one is opencollada, the other is collada-dom or something with similar name from the official collada site/wiki). I don't have time to check myself, so please, check exactly how blender supports collada. We need more information to process this bug. Btw, I see a "collada" use flag in blender's ebuilds. Dont' they enable the collada functionality you want? I resolve this bug as NEEDINFO. Please reopen when you have submitted more information.
Comment 3 tman 2011-06-27 11:06:45 UTC
http://opencollada.org/faq.html

there is the source code..
Comment 4 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-06-29 12:20:43 UTC
Reassigned to @maintainer-wanted. 

@graphics: Guys, I'm CCing you in case you're interested or have something to say. Feel free to remove your herd from this bug.
Comment 5 Shannon 2011-06-29 20:15:48 UTC
Created attachment 278647 [details]
opencollada-9999.ebuild

Here is an ebuild for the svn version. As mentioned above there doesn't seem to be an easy way to get a packaged version for Linux.

This is my first ebuild from scratch. I used it to enable collada support in Blender. I'm not up for being a maintainer but I will stick around and help where I can.
Comment 6 Shannon 2011-06-29 20:33:14 UTC
Created attachment 278651 [details, diff]
opencollada-comment-assert.patch

There is an assert that doesn't have the proper header included. It seems there was an automatic conversion of asserts at one point, and this one was included when it should not have been.
Comment 7 tman 2011-06-29 23:21:58 UTC
@Shannon

thanks u. i hope the dev could be mercy and ad as soon as blender svn in to portage and support it offical. this piece of software is really worth :)



btw in which category should i add it in my local overlay?
Comment 8 Shannon 2011-06-29 23:31:45 UTC
(In reply to comment #7)

> btw in which category should i add it in my local overlay?

media-libs

That's also the dependency in the blender ebuild I posted in blender-2.5 svn (bug #276338).
Comment 9 tman 2011-08-31 05:57:07 UTC
Created attachment 285119 [details]
/var/log/portage/media-libs:opencollada-9999:20110831-054142.log

error and dont compile anymore
Comment 10 Shannon 2011-09-07 18:28:22 UTC
Created attachment 285795 [details]
opencollada-9999.ebuild

This ebuild includes some new patches.

It also moves the headers from "/usr/include/opencollada/COLLADA*/include" to just "/usr/include/opencollada/COLLADA*/". It then adds a symlink to ./ to ./include. There are a couple of buildsystems that check in these different places. This seemed the best answer.
Comment 11 Shannon 2011-09-07 18:30:40 UTC
Created attachment 285797 [details, diff]
opencollada-optional_input_set_141.patch

I came across this patch somewhere and the description seemed important to add. I don't remember where or why now but here it is.
Comment 12 Shannon 2011-09-07 18:31:15 UTC
Created attachment 285799 [details, diff]
opencollada-optional_input_set_150.patch

Same as above
Comment 13 Shannon 2011-09-07 18:32:45 UTC
Created attachment 285801 [details, diff]
opencollada-utf_include.patch

This adds a forgotten include.
Comment 14 Shannon 2011-09-07 18:39:38 UTC
Created attachment 285805 [details, diff]
opencollada-libbuffer.patch

Revision 846 seems to be using nonstandard type and functions found only on Windows. I'm not sure that the changes I made are 100% accurate, but it's what I found by Googling.

There is also a function commented out because I read that if the OS is Unicode enabled, then fopen and related functions will also be Unicode enabled.

This was just a shot in the dark to get it to compile. If someone can correct it please do.
Comment 15 tman 2011-09-09 13:07:48 UTC
 * Applying opencollada-libbuffer.patch ...
 * 
 * Installation of a symlink is blocked by a directory:
 *   '/usr/include/opencollada/GeneratedSaxParser/include'
 * This symlink will be merged with a different name:
 *   '/usr/include/opencollada/GeneratedSaxParser/include.backup.0000'
 * 
 * 
 * Installation of a symlink is blocked by a directory:
 *   '/usr/include/opencollada/COLLADAFramework/include'
 * This symlink will be merged with a different name:
 *   '/usr/include/opencollada/COLLADAFramework/include.backup.0000'
 * 
 * 
 * Installation of a symlink is blocked by a directory:
 *   '/usr/include/opencollada/COLLADAStreamWriter/include'
 * This symlink will be merged with a different name:
 *   '/usr/include/opencollada/COLLADAStreamWriter/include.backup.0000'
 * 
 * 
 * Installation of a symlink is blocked by a directory:
 *   '/usr/include/opencollada/COLLADABaseUtils/include'
 * This symlink will be merged with a different name:
 *   '/usr/include/opencollada/COLLADABaseUtils/include.backup.0000'
 * 
 * 
 * Installation of a symlink is blocked by a directory:
 *   '/usr/include/opencollada/COLLADASaxFrameworkLoader/include'
 * This symlink will be merged with a different name:
 *   '/usr/include/opencollada/COLLADASaxFrameworkLoader/include.backup.0000'
 * 
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
Comment 16 Shannon 2011-09-09 17:05:12 UTC
(In reply to comment #15)

I don't get any of that on my two systems. One is Gentoo, one is Funtoo; but both are ~amd64. 

I would try:
    emerge -C opencollada
    rm -rf /usr/include/opencollada
    emerge opencollada

You might want to check if anything is left in the directory after unmerging. It could be something added manually, left by a botched uninstall, or added by another package.
Comment 17 tman 2011-09-09 18:33:48 UTC
thanks @shannon, indeed this solve the problem es in run through
Comment 18 tman 2011-09-13 19:13:33 UTC
n file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:30:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLString.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverPrerequisites.h:32:0: warning: ignoring #pragma warning 
Linking CXX static library /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/lib/libMathMLSolver.a
In file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:64:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLSerializationVisitor.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h: In member function ‘virtual void MathML::AST::IVisitor::visit(const MathML::AST::INode*)’:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h:99:11: warning: enumeration value ‘USERDEFINED’ not handled in switch
[ 12%] Built target MathMLSolver_static
[ 12%] Building CXX object Externals/MathMLSolver/CMakeFiles/MathMLSolver_shared.dir/src/MathMLSymbolTable.cpp.o
In file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:30:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLSymbolTable.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverPrerequisites.h:32:0: warning: ignoring #pragma warning 
In file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:64:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLString.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h: In member function ‘virtual void MathML::AST::IVisitor::visit(const MathML::AST::INode*)’:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h:99:11: warning: enumeration value ‘USERDEFINED’ not handled in switch
[ 12%] Building CXX object Externals/MathMLSolver/CMakeFiles/MathMLSolver_shared.dir/src/MathMLSolverFunctionExtensions.cpp.o
In file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:30:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLSolverFunctionExtensions.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverPrerequisites.h:32:0: warning: ignoring #pragma warning 
In file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:64:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLSymbolTable.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h: In member function ‘virtual void MathML::AST::IVisitor::visit(const MathML::AST::INode*)’:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h:99:11: warning: enumeration value ‘USERDEFINED’ not handled in switch
In file included from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/MathMLSolverStableHeaders.h:64:0,
                 from /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/src/MathMLSolverFunctionExtensions.cpp:1:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h: In member function ‘virtual void MathML::AST::IVisitor::visit(const MathML::AST::INode*)’:
/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/Externals/MathMLSolver/include/AST/MathMLASTVisitor.h:99:11: warning: enumeration value ‘USERDEFINED’ not handled in switch
Linking CXX shared library /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999/lib/libMathMLSolver.so
[ 12%] Built target MathMLSolver_shared
make: *** [all] Error 2
 * ERROR: media-libs/opencollada-9999 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =media-libs/opencollada-9999',
 * the complete build log and the output of 'emerge -pqv =media-libs/opencollada-9999'.
 * This ebuild is from a repository named 'lokal'
 * The complete build log is located at '/var/log/portage/media-libs:opencollada-9999:20110913-190453.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/opencollada-9999/temp/environment'.
 * S: '/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999'

>>> Failed to emerge media-libs/opencollada-9999, Log file:
Comment 19 Shannon 2011-09-13 23:46:06 UTC
Created attachment 286395 [details, diff]
opencollada-recursive_header.patch

(In reply to comment #18)

There is a recursive reference in COLLADABaseUtils/include/Math/COLLADABUMathMatrix4.h to COLLADABUMathUtils.h. They both include each other.
Comment 20 Shannon 2011-09-13 23:46:53 UTC
Created attachment 286397 [details]
opencollada-9999.ebuild

Added recursive header patch.
Comment 21 Simon Haegler 2011-10-17 17:26:53 UTC
hi, the opencollada library received a quite a few upstream fixes, this is basically enough:

inherit eutils cmake-utils subversion

DESCRIPTION="OpenCOLLADA is a stream based reader and writer library for COLLADA files"
HOMEPAGE="http://www.opencollada.org/"
LICENSE="MIT"

ESVN_REPO_URI="http://opencollada.googlecode.com/svn/trunk"
ESVN_PROJECT="opencollada-trunk"

SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND=">=dev-libs/libxml2-2.7.8-r1"
RDEPEND="${DEPEND}"

src_install() {
	cmake-utils_src_install
	dobin ${CMAKE_BUILD_DIR}/bin/OpenCOLLADAValidator
}
Comment 22 tman 2011-11-01 06:34:27 UTC
>> Emerging (1 of 4) media-libs/opencollada-9999 from lokal
>>> Unpacking source...
 * subversion update start -->
 *      repository: http://opencollada.googlecode.com/svn/trunk
Updating '.':
At revision 863.
 *    working copy: /usr/portage/distfiles/svn-src/opencollada-trunk/trunk

>>> Source unpacked in /var/tmp/portage/media-libs/opencollada-9999/work
>>> Preparing source in /var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999 ...
 * apply patches -->
 * Applying opencollada-utf_include.patch ...

 * Failed Patch: opencollada-utf_include.patch !
 *  ( /usr/portage/local/local-overlay/media-libs/opencollada/files/opencollada-utf_include.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-libs/opencollada-9999/temp/opencollada-utf_include.patch.out

 * ERROR: media-libs/opencollada-9999 failed (prepare phase):
 *   Failed Patch: opencollada-utf_include.patch!
 * 
 * Call stack:
 *     ebuild.sh, line   91:  Called src_prepare
 *   environment, line 2919:  Called subversion_src_prepare
 *   environment, line 3269:  Called subversion_bootstrap
 *   environment, line 3102:  Called epatch '/usr/portage/local/local-overlay/media-libs/opencollada/files/opencollada-utf_include.patch'
 *   environment, line 1617:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of 'emerge --info =media-libs/opencollada-9999',
 * the complete build log and the output of 'emerge -pqv =media-libs/opencollada-9999'.
 * This ebuild is from a repository named 'lokal'
 * The complete build log is located at '/var/log/portage/media-libs:opencollada-9999:20111101-063341.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/opencollada-9999/temp/environment'.
 * S: '/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999'

>>> Failed to emerge media-libs/opencollada-9999, Log file:

>>>  '/var/log/portage/media-libs:opencollada-9999:20111101-063341.log'

 * Messages for package media-libs/opencollada-9999:

 * Package:    media-libs/opencollada-9999
 * Repository: lokal
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   preserve-libs sandbox
 * subversion update start -->
 *      repository: http://opencollada.googlecode.com/svn/trunk
 *    working copy: /usr/portage/distfiles/svn-src/opencollada-trunk/trunk
 * apply patches -->
 * Applying opencollada-utf_include.patch ...
 * Failed Patch: opencollada-utf_include.patch !
 *  ( /usr/portage/local/local-overlay/media-libs/opencollada/files/opencollada-utf_include.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-libs/opencollada-9999/temp/opencollada-utf_include.patch.out
 * ERROR: media-libs/opencollada-9999 failed (prepare phase):
 *   Failed Patch: opencollada-utf_include.patch!
 * 
 * Call stack:
 *     ebuild.sh, line   91:  Called src_prepare
 *   environment, line 2919:  Called subversion_src_prepare
 *   environment, line 3269:  Called subversion_bootstrap
 *   environment, line 3102:  Called epatch '/usr/portage/local/local-overlay/media-libs/opencollada/files/opencollada-utf_include.patch'
 *   environment, line 1617:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of 'emerge --info =media-libs/opencollada-9999',
 * the complete build log and the output of 'emerge -pqv =media-libs/opencollada-9999'.
 * This ebuild is from a repository named 'lokal'
 * The complete build log is located at '/var/log/portage/media-libs:opencollada-9999:20111101-063341.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/opencollada-9999/temp/environment'.
 * S: '/var/tmp/portage/media-libs/opencollada-9999/work/opencollada-9999'
Comment 23 Shannon 2011-11-04 14:48:16 UTC
Created attachment 291659 [details]
opencollada-9999.ebuild

I apologize, I actually worked on this, but forgot to upload the file. 

Anyway, upstream did a bunch of work and added an install command. When I tried it, it still needed the ld search path fixed. But I may have forgotten to update my environment.
Comment 24 Sebastian Pipping gentoo-dev 2012-01-16 18:35:14 UTC
Comment on attachment 285801 [details, diff]
opencollada-utf_include.patch

Patch included in upstream revision 859, marking as obsolete.
Comment 25 Sebastian Pipping gentoo-dev 2012-01-16 18:40:32 UTC
Comment on attachment 285805 [details, diff]
opencollada-libbuffer.patch

Patch applied upstream, at least parts of it.  Obsoleting.
Comment 26 Sebastian Pipping gentoo-dev 2012-01-16 18:46:09 UTC
By now a snapshot of opencollada revision 864 is in the Gentoo main tree.

It seems that these patches are not included with that:
- opencollada-recursive_header.patch
- opencollada-optional_input_set_141.patch
- opencollada-optional_input_set_150.patch

It would be great if somebody could advise about these patches.
Are they needed?  What do the fix from a high level perspective?  Thanks!
Comment 27 Amy Liffey gentoo-dev 2016-06-12 18:46:00 UTC
Already added by upstream in 2012. Both versions in tree contains them.