Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 121316 - New Blender Ebuild propose
Summary: New Blender Ebuild propose
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-02 09:43 UTC by Michael Färber
Modified: 2010-04-21 10:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New Blender 2.41 Ebuild (blender-2.41.ebuild,4.37 KB, text/plain)
2006-02-02 09:45 UTC, Michael Färber
Details
New Blender 2.42 Ebuild (blender-2.42.ebuild,3.51 KB, text/plain)
2006-07-18 13:23 UTC, Michael Färber
Details
Modded ebuild (blender-2.42-r1.ebuild,3.86 KB, text/plain)
2006-07-21 17:11 UTC, Reuben Martin
Details
Now including flag "verse" for support for Verse (blender-2.42-r2.ebuild,3.88 KB, text/plain)
2006-09-04 21:55 UTC, Emanuel Greisen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Färber 2006-02-02 09:43:42 UTC
Since December I've been busy writing a new Ebuild for Blender. Its advantages:

- 3 USE flags (blenderplayer, openal, nls) instead of only one in the official Ebuild (nls)
- Different location for the program; instead of installing it in /usr/bin, /usr/share etc. it is installed to /opt/blender, which makes plugins accessible without further installation and probably better matches the file structure proposed by the Blender developers.
- Yafray is not a dependancy anymore, but there is some explaining text to notify users of Yafray (similar to the behaviour of e.g. media-gfx/hugin).
- More comments in the code which should make updating the Ebuild easier

There has already been a long discussion/development thread in the Gentoo Forums: http://forums.gentoo.org/viewtopic-t-412648.html
Since I released the first version of my Ebuild, some people have tested it and found it better than the official one.


So I hope you integrate it in Gentoo Portage, maybe as blender-2.41-r1?
Comment 1 Michael Färber 2006-02-02 09:45:40 UTC
Created attachment 78733 [details]
New Blender 2.41 Ebuild
Comment 2 Luca Barbato gentoo-dev 2006-02-02 11:38:10 UTC
I'm working with upstream about having a better/proper filestructure so, no.

the feature split looks probably ok

about the yafray dep I'm undecided.

give me a week to think, thank you for your hard work in any case =)
Comment 3 Michael Färber 2006-02-02 23:41:02 UTC
Erm ... what does that mean, you are working about having a better/proper filestructure with the upstream? Who is the upstream? The Gentoo developers?

Blender is a program designed to run on many platforms, and tends to want to have all its data in one directory. Forcing Blender to use different directories like /usr/bin, /usr/share/blender is always a hack, because you need patches for the code. There already exists a patch for Blender in Gentoo Portage, but it is broken, and I fear that even if we fix it, it will break again.

The best way would probably be to tell the Blender devs to use a better file structure. I've already made an attempt to propose this to the Blender devs, but they didn't agree with this.


But even if you should decide against /opt/blender, the other parts of the Ebuild are quite valuable. Thanks you look into it!
Comment 4 Luca Barbato gentoo-dev 2006-02-03 01:37:04 UTC
Upstream => Blender developers

If the patch is again incomplete, please open a bug about this issue and hopefully it will be fixed soon, isn't that hard fix the behaviour and isn't any different than what they are doing for macosx or win32...
Comment 5 Matteo Azzali (RETIRED) gentoo-dev 2006-02-14 16:15:10 UTC
there's another issue with the portage ebuild: localization files are put in
/usr/lib/blender/locale/xx/LC_MESSAGES/blender.mo (xx is language code)
but this path should be /usr/share/locale/xx/LC_MESSAGES/blender.mo.
You can test just by trying to localize the interface (inside blender)
before and after doin a:
ln -s /usr/lib/blender/locale/it/LC_MESSAGES/blender.mo /usr/share/locale/it/LC_MESSAGES/blender.mo 

(change it with the language you want)
Comment 6 Matteo Azzali (RETIRED) gentoo-dev 2006-02-15 06:43:01 UTC
Another note: using this ebuild all my issues with scripts are gone (I just pointed my blender config paths to /usr/lib/blender, but that wasn't enough to use 
sculpting mesh script or some other python ones, I was getting errors).

Many thanks for this ebuild, at least blender is working now.
Comment 7 Luca Barbato gentoo-dev 2006-02-15 13:47:00 UTC
Matteo I hopefully fixed the issue you reporte, could you please give me a detailed report about nonworking scripts?
Comment 8 Luke Maurer (Jyrinx) 2006-07-17 03:14:28 UTC
This ebuild worked perfectly for me on AMD64; the official ebuild can't find any scripts, etc.

Hey, Michael - Could you put up an updated one for 2.42? :-)

(BTW, I don't think it's worth fighting the upstream devs regarding directory structure; they've got it how they like it, and I'd say it's probably better just to use /opt/blender.)
Comment 9 Luca Barbato gentoo-dev 2006-07-17 04:26:34 UTC
I'm working with upstream towards a compliant directory structure, sadly I hadn't much time to develop it lately.
Comment 10 Michael Färber 2006-07-18 13:23:01 UTC
Created attachment 92154 [details]
New Blender 2.42 Ebuild

As the new official Ebuild for Blender 2.42 still has some problems, I've decided to make a new unofficial Ebuild for it. Enjoy!

Regarding the statement that the upstream developers would try to improve the file structure: I think as long as they are making new features like mad, they won't care about such a "minor" thing like file structures. I've already asked them about it some time ago, but they didn't want to - although I have looked at the source code and have seen that it wouldn't have been much work.
Comment 11 Reuben Martin 2006-07-21 17:05:58 UTC
I'm posting a modification of the 2.42 ebuild posted here.

Changes:
-Installs using the same directory layout as the standard ebuild. (i.e. nothing put in /opt)


Added features:
-Adds support for the fmod USE flag
-Builds with the users CXXFLAGS
-Installs files needed to compile 3rd party plugins
Comment 12 Reuben Martin 2006-07-21 17:11:48 UTC
Created attachment 92462 [details]
Modded ebuild
Comment 13 Emanuel Greisen 2006-09-04 21:55:47 UTC
Created attachment 96034 [details]
Now including flag "verse" for support for Verse

Just an additional use flag "verse" making it possible to compile Verse into blender.
Comment 14 patrick 2007-02-27 20:55:47 UTC
Well, now 2.43 is released and so I thought I'd bump this one instead of opening a new one, because I guess the directory structure problem still exists.
Comment 15 Andreas Plesch 2007-02-28 01:23:05 UTC
I had the directory structure problem with blender-2.42a-r1 and the official ebuild. It took me a day to figure out how the oblique blender structure works and to find a somewhat unsatisfactory solution for it.

Blender has a concept of a blender home dir, called homedir. Its default place is compiled into the executable, presumably. For gentoo it should be /usr/share/blender because that is where scripts and other config data are installed but it is not. In fact, homedir is empty when looked up with the python function Blender.Get('homedir'). Apparently it cannot be overridden by an environmental variable such as $BLENDERHOME, perhaps for cross-platform reasons.

However, if ~/.blender exists, blender makes that the homedir. So a simple workaround is to say

cp -r /usr/share/blender ~/.blender

Indeed, this then makes scripts (plugins) work as expected since the default scriptsdir and datadir (for configuration data) are constructed from the homedir by appending "scripts" and "scripts/bpydata".

This is somewhat unsatisfactory because the default installation should be accessible to all users on a machine without configuration, eg. without copying things. On the other hand, the datadir is expected by some scripts to be writeable. This requires anyways that the whole scripts tree is in the users home because of the way the default paths are constructed.

Now, blender has also the concept of user maintained scripts. The configuration panel in the gui actually sets the location of those scripts, called uscriptsdir and udatadir, not the system (default) scripts. 

So I made a ~/.blender/uscripts/bpydata directory for this purpose and set the configuraton python path accordingly. This should make it possible to maintain user scripts independently from system scripts.

Perhaps a worthwile addition to the ebuild script is to add the copy step above, to all user home dirs. Or maybe not. Perhaps an elog with a message to an additional manual step is required ? So the sysadmin can decide if he wants to do something to user home dirs ?

Andreas
Comment 16 Yohan 2007-11-05 17:37:27 UTC
(In reply to comment #0)
> Since December I've been busy writing a new Ebuild for Blender. Its advantages:
> 
> - 3 USE flags (blenderplayer, openal, nls) instead of only one in the official
> Ebuild (nls)
> - Different location for the program; instead of installing it in /usr/bin,
> /usr/share etc. it is installed to /opt/blender, which makes plugins accessible
> without further installation and probably better matches the file structure
> proposed by the Blender developers.
> - Yafray is not a dependancy anymore, but there is some explaining text to
> notify users of Yafray (similar to the behaviour of e.g. media-gfx/hugin).
> - More comments in the code which should make updating the Ebuild easier
> 
> There has already been a long discussion/development thread in the Gentoo
> Forums: http://forums.gentoo.org/viewtopic-t-412648.html
> Since I released the first version of my Ebuild, some people have tested it and
> found it better than the official one.
> 
> 
> So I hope you integrate it in Gentoo Portage, maybe as blender-2.41-r1?
> 

I would suggest to include yafray in IUSE as dependency, for users to choose.

Regards,
hoyanf
Comment 17 Luca Barbato gentoo-dev 2008-04-14 11:47:06 UTC
some of the request got already there, I'm not sure if is enough for you.
Comment 18 Luca Barbato gentoo-dev 2010-04-21 10:52:04 UTC
Should be fixed since long time