「利用者:Xgl asyliax/build-freebsd」の版間の差分

提供: wiki
移動先: 案内検索
(Created page with "=Building Blender 2.5x on FreeBSD= Instructions detailing how to build Blender 2.5x on FreeBSD, currently for FreeBSD 8.2 i386/amd64 ''Note that this article is a work in progre...")
 
(1版 をインポートしました)
 
(相違点なし)

2018年6月29日 (金) 04:42時点における最新版

Building Blender 2.5x on FreeBSD

Instructions detailing how to build Blender 2.5x on FreeBSD, currently for FreeBSD 8.2 i386/amd64

Note that this article is a work in progress. All materials presented here apply only to FreeBSD 8.2 and more specifically to the i386/amd64 architectures, until otherwise specified.

If you already have FreeBSD 8.2 installed

Adding Dependencies

First you'll need to become root so you can get the additional libraries Blender is going to need in order to compile correctly using the most common settings.

> su type in root password

Now to make things easier, we'll get a program called portmaster. This is not required for building Blender, but it will make getting the dependencies easier and save you time.

# pkg_add -r portmaster

Just to be sure you can use portmaster after pkg_add returns, we'll do a quick rehash.

# rehash

Then try to get all the dependencies. This step is going to take a bit of time...

# portmaster audio/freealut audio/lame audio/libsamplerate audio/libsndfile audio/openal-soft devel/cmake devel/gettext devel/gmake devel/sdl12 devel/subversion graphics/glew graphics/ilmbase graphics/jpeg graphics/libGL graphics/libGLU graphics/OpenEXR graphics/openjpeg graphics/png graphics/tiff lang/gcc44 lang/python32 multimedia/ffmpeg multimedia/x264 multimedia/xvid print/freetype2 x11/libXi

During this step's execution you will be asked to make several choices about which options you'd like to compile these ports with. Blender has been successfully compiled and run by accepting all the default values on all screens asking for you to make a choice.

During the initial configuration of all the ports you can quickly accept the defaults on each screen by pressing , , ↵ Enter. Nothing special about that key sequence, it's just a quick way of getting focus to the OK button and hitting ↵ Enter on it.

If you are not using IPv6 for internet access, you could uncheck the IPv6 options along the way if you'd like. Blender compilation does not require them by any means. This would mean you could arrow up and/or down to the IPv6 options for a few ports such as the following:

  • python26
  • apr-ipv6-devrandom-gdbm-db42
  • python31 or python32
  • gpac-libgpac

At this point, portmaster will ask you to press Y to proceed. Go ahead and press Y.

During the fetching, compiling, and installing process, portmaster may occasionally ask you if you'd like to delete various .tbz files it has fetched. It's probably safe to delete them, but in the chance you'd want to reinstall those ports later, it will save you from having to re-fetch them if you leave them in /usr/ports/distfiles/.

Once all the compiling is set and done, you should have all the dependencies for compiling Blender.

If all went well so far, you can press CtrlD to exit the superuser prompt and be returned to the regular user's shell.

Getting Blender Sources

Now we need to make a directory to put Blender's source files into, and then actually get the sources into that directory.

> cd ~
> mkdir blender-svn
> cd blender-svn
> svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender

You'll see a bunch of files get fetched by subversion which is the program we executed by typing svn in that last command and eventually be returned to the shell prompt once again.

Compiling Blender

Now we'll need to make a directory to compile Blender in. Since we are still in our ~/blender-svn/ directory, and we now have sources under ~/blender-svn/blender/ we can just do the following:

> mkdir build
> cd build

Now it's time to build Blender. We'll be using cmake to do this. It should be straight forward.

> cmake ../blender

Now we need to make Blender. This is done with:

> make -j2

The -j2 switch tells make to run 2 threads. You should set the number after the -j to the number of cores in your system + 1. Examples:

  • Single core processor: > make -j2
  • Dual core processor: > make -j3
  • Quad core processor: > make -j5

You'll see quite a bit of output, and eventually be returned to your shell prompt.

At this point, we simply need to install Blender with:

> make install

Performing that step will ensure the correct transfer of Python files and such to the directories where Blender is going to expect them.

You should be able to test your new Blender by running:

> bin/blender

or

> cd bin
> ./blender

Updating Blender once you've already successfully built before

You can update your copy of Blender to the latest and greatest version at any time using the following:

> cd ~
> cd blender-svn/blender
> svn up
> cd ../build
> make -jN     (were N is number of cores + 1)
> make install

Then your Blender should be up to date. :)

Enjoy!