diff options
author | Marcus von Appen <mva@FreeBSD.org> | 2009-03-22 15:43:29 +0000 |
---|---|---|
committer | Marcus von Appen <mva@FreeBSD.org> | 2009-03-22 15:43:29 +0000 |
commit | 9ffff5b620a870125d43b5c89a92812a5b5dbb64 (patch) | |
tree | 74e0be38af0dac2c4e340e4aa71885a73e9344de /graphics | |
parent | 8da4df5b889a8cd55124e2ec8b73eb3bcaec32a2 (diff) | |
download | ports-9ffff5b620a870125d43b5c89a92812a5b5dbb64.tar.gz ports-9ffff5b620a870125d43b5c89a92812a5b5dbb64.zip |
OPTIONise blender to make it more flexible.
Avoid static linking blender where appropriate.
Approved by: miwi (mentor)
Notes
Notes:
svn path=/head/; revision=230674
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/blender/Makefile | 154 | ||||
-rw-r--r-- | graphics/blender/files/patch-extern_Makefile | 14 | ||||
-rw-r--r-- | graphics/blender/files/patch-source_Makefile | 31 | ||||
-rw-r--r-- | graphics/blender/files/patch-source_blender_ftfont_intern_FTF_TTFont.h | 14 | ||||
-rw-r--r-- | graphics/blender/files/patch-user-def.mk | 16 | ||||
-rw-r--r-- | graphics/blender/pkg-plist | 2 |
6 files changed, 190 insertions, 41 deletions
diff --git a/graphics/blender/Makefile b/graphics/blender/Makefile index 45794bd185fb..f46b4c83f21a 100644 --- a/graphics/blender/Makefile +++ b/graphics/blender/Makefile @@ -6,6 +6,7 @@ PORTNAME= blender PORTVERSION= 2.48a +PORTREVISION= 1 CATEGORIES= graphics games MASTER_SITES= http://download.blender.org/source/ \ http://mirror.cs.umn.edu/blender.org/source/ \ @@ -16,14 +17,10 @@ COMMENT= 3D modeling/rendering/animation/gaming package BUILD_DEPENDS= ${LOCALBASE}/lib/libode.a:${PORTSDIR}/devel/ode LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ - freetype.9:${PORTSDIR}/print/freetype2 \ png.5:${PORTSDIR}/graphics/png \ tiff.4:${PORTSDIR}/graphics/tiff \ - IlmImf.6:${PORTSDIR}/graphics/OpenEXR \ - alut.1:${PORTSDIR}/audio/freealut\ - openal.0:${PORTSDIR}/audio/openal \ - avutil.1:${PORTSDIR}/multimedia/ffmpeg \ - GLEW.1:${PORTSDIR}/graphics/glew + GLEW.1:${PORTSDIR}/graphics/glew \ + IlmThread.6:${PORTSDIR}/graphics/ilmbase USE_XORG= x11 xext xmu xi USE_PYTHON= 2.5+ @@ -43,33 +40,99 @@ LANG= ar bg ca cs de el es fi fr hr hr_HR it ja ko nl pl pt_BR ro \ LANG= ar bg ca cs de el es fi fr hr hr_HR it ja ko nl pl pt_BR ro \ ru sr sr@Latn sv uk zh_CN -OPTIONS= OCFLAGS "Enable optimized CFLAGS" off \ - NLS "Native language support" on +OPTIONS= DDS "DDS file format support" on \ + FFMPEG "Audio and video support using ffmpeg" on \ + FREETYPE "Improved font rendering support" on \ + ICONV "Iconv support for localisation (only with NLS)" off \ + KETSJI "Build GameEngine and BlenderPlayer" off \ + NLS "Native language support" on \ + OCFLAGS "Optimized Cflags" off \ + OPENAL "3D sound support using OpenAL" off \ + OPENEXR "High dynamic-range (HDR) support using OpenEXR" on \ + OPENMP "Parallel processing support" off \ + VERSE "Shared networking support using Verse" on .include <bsd.port.pre.mk> -MAKE_ENV+= NAN_CPPFLAGS="-I${LOCALBASE}/include/freetype2 \ - -I${LOCALBASE}/include \ - -I${LOCALBASE}/include/OpenEXR \ - -I${PYTHON_INCLUDEDIR}/" -MAKE_ENV+= NAN_FREETYPE="${LOCALBASE}/" -MAKE_ENV+= NAN_OPENEXR="${LOCALBASE}/" -MAKE_ENV+= NAN_OPENAL="${LOCALBASE}/" +MAKE_ENV+= NAN_FMOD="${LOCALBASE}/" MAKE_ENV+= NAN_PYTHON="${LOCALBASE}/" MAKE_ENV+= NAN_PYTHON_VERSION=${PYTHON_VER} -MAKE_ENV+= NAN_FMOD="${LOCALBASE}/" MAKE_ENV+= NAN_JPEG="${LOCALBASE}/" MAKE_ENV+= NAN_PNG="${LOCALBASE}/" MAKE_ENV+= NAN_ZLIB="${LOCALBASE}/" MAKE_ENV+= NAN_ODE="${LOCALBASE}/" MAKE_ENV+= NAN_GLEW="${LOCALBASE}/" +MAKE_ENV+= NAN_JUST_BLENDERDYNAMIC="true" +MAKE_ENV+= WITH_BF_DYNAMICOPENGL="true" + CFLAGS+= "-I${LOCALBASE}/include" +NANCPPFLAGS= + +.if !defined(WITHOUT_DDS) +MAKE_ENV+= WITH_DDS="true" +.else +MAKE_ENV+= WITH_DDS="false" +.endif + +.if defined(WITHOUT_FFMPEG) +MAKE_ENV+= WITH_FFMPEG="false" +.else +MAKE_ENV+= WITH_FFMPEG="true" +MAKE_ENV+= NAN_USE_FFMPEG_CONFIG="true" +MAKE_ENV+= NAN_FFMPEG="${LOCALBASE}/" +LIB_DEPENDS+= avutil.1:${PORTSDIR}/multimedia/ffmpeg +.endif + +.if defined(WITHOUT_FREETYPE) +MAKE_ENV+= WITH_FREETYPE2="false" +.else +MAKE_ENV+= WITH_FREETYPE2="true" +MAKE_ENV+= NAN_FREETYPE="${LOCALBASE}/" +MAKE_ENV+= NAN_FTGL="${LOCALBASE}/" +NANCPPFLAGS+= "-I${LOCALBASE}/include/freetype2" +LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 +LIB_DEPENDS+= ftgl.2:${PORTSDIR}/graphics/ftgl +.endif + +.if defined(WITH_KETSJI) +.if ${ARCH} == "amd64" +BROKEN= GameEngine and BlenderPlayer cannot be build on amd64 +.endif +MAKE_ENV+= NAN_NO_KETSJI="false" +MAKE_ENV+= NAN_USE_BULLET="true" +MAKE_ENV+= WITH_BF_BLENDERGAMEENGINE="true" +MAKE_ENV+= WITH_BF_BLENDERPLAYER="true" +PLIST_SUB+= KETSJI="" +.else +MAKE_ENV+= NAN_NO_KETSJI="true" +MAKE_ENV+= WITH_BF_BLENDERGAMEENGINE="false" +MAKE_ENV+= WITH_BF_BLENDERPLAYER="false" +PLIST_SUB+= KETSJI="@comment " +.endif .if !defined(WITHOUT_NLS) USE_GETTEXT= yes MAKE_ENV+= INTERNATIONAL="true" + +# Iconv support? +.if defined(WITH_ICONV) +USE_ICONV= yes +MAKE_ENV+= WITH_ICONV="true" +.else +MAKE_ENV+= WITH_ICONV="false" +.endif + +.if defined(WITHOUT_FREETYPE) +# Implies Freetype2 - ignore the without knob. +MAKE_ENV+= WITH_FREETYPE2="true" +MAKE_ENV+= NAN_FREETYPE="${LOCALBASE}/" +LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 +LIB_DEPENDS+= ftgl.2:${PORTSDIR}/graphics/ftgl +.endif + PLIST_SUB+= NLS="" .else +MAKE_ENV+= WITH_ICONV="false" PLIST_SUB+= NLS="@comment " .endif @@ -77,16 +140,45 @@ PLIST_SUB+= NLS="@comment " CFLAGS+= -O3 -ffast-math .endif -.if ${ARCH} == "amd64" -MAKE_ENV+= NAN_NO_KETSJI="true" -MAKE_ENV+= WITH_BF_BLENDERGAMEENGINE="false" -MAKE_ENV+= WITH_BF_BLENDERPLAYER="false" +.if defined(WITH_OPENAL) +MAKE_ENV+= NAN_NO_OPENAL="false" +MAKE_ENV+= NAN_OPENAL="${LOCALBASE}/" +LIB_DEPENDS+= openal.0:${PORTSDIR}/audio/openal \ + alut.1:${PORTSDIR}/audio/freealut .else -MAKE_ENV+= WITH_BF_BLENDERGAMEENGINE="true" -MAKE_ENV+= WITH_BF_OPENAL="true" -MAKE_ENV+= WITH_BF_BLENDERPLAYER="true" +MAKE_ENV+= NAN_NO_OPENAL="true" .endif +.if defined(WITHOUT_OPENEXR) +MAKE_ENV+= WITH_OPENEXR="false" +.else +MAKE_ENV+= WITH_OPENEXR="true" +MAKE_ENV+= NAN_OPENEXR="${LOCALBASE}/" +LIB_DEPENDS+= IlmImf.6:${PORTSDIR}/graphics/OpenEXR +NANCPPFLAGS+= "-I${LOCALBASE}/include/OpenEXR" +.endif + +.if defined(WITH_OPENMP) +.if ${OSVERSION} < 700000 +BROKEN= OpenMP support is not available for FreeBSD 6.x and below +.else +MAKE_ENV+= WITH_BF_OPENMP="true" +.endif +.else +MAKE_ENV+= WITH_BF_OPENMP="false" +.endif + +.if defined(WITHOUT_VERSE) +MAKE_ENV+= WITH_VERSE="false" +PLIST_SUB+= VERSE="@comment " +.else +MAKE_ENV+= WITH_VERSE="true" +PLIST_SUB+= VERSE="" +.endif + +MAKE_ENV+= NAN_CPPFLAGS="-I${LOCALBASE}/include -I${PYTHON_INCLUDEDIR} \ + ${NANCPPFLAGS}" + .if ${ARCH} == "sparc64" BROKEN= Fails to link .endif @@ -95,6 +187,16 @@ pre-configure: @${REINPLACE_CMD} -e 's|2.5|${PYTHON_VER}|' \ ${WRKSRC}/source/nan_definitions.mk +.if defined(WITHOUT_FFMPEG) + @${REINPLACE_CMD} -e 's|%%FFMPEGCFLAGS%%||;s|%%FFMPEGLIBS%%||;' \ + ${WRKSRC}/user-def.mk +.else + @${REINPLACE_CMD} -e \ + 's|%%FFMPEGCFLAGS%%|$$\(shell pkg-config --cflags libavcodec libavformat\)|; \ + s|%%FFMPEGLIBS%%|$$\(shell pkg-config --libs libavcodec libavformat\)|;' \ + ${WRKSRC}/user-def.mk +.endif + @${REINPLACE_CMD} -e \ 's|gcc|${CC}|; \ s|g++|${CXX}|; \ @@ -115,6 +217,12 @@ pre-configure: do-install: @${INSTALL_SCRIPT} ${WRKDIR}/blender ${PREFIX}/bin/blender @${INSTALL_PROGRAM} ${WRKSRC}/obj/freebsd-${OSREL}-${ARCH}/bin/blender ${PREFIX}/bin/blender-bin +.if defined(WITH_KETSJI) + @${INSTALL_PROGRAM} ${WRKSRC}/obj/freebsd-${OSREL}-${ARCH}/bin/blenderplayer ${PREFIX}/bin/blenderplayer +.endif +.if !defined(WITHOUT_VERSE) + @${INSTALL_PROGRAM} ${WRKSRC}/obj/freebsd-${OSREL}-${ARCH}/bin/verse ${PREFIX}/bin/verse +.endif @${MKDIR} ${DATADIR} @${CP} -R ${WRKSRC}/release/scripts ${DATADIR} diff --git a/graphics/blender/files/patch-extern_Makefile b/graphics/blender/files/patch-extern_Makefile index c40c3da1a9a5..cd0ac36e187b 100644 --- a/graphics/blender/files/patch-extern_Makefile +++ b/graphics/blender/files/patch-extern_Makefile @@ -1,11 +1,15 @@ ---- extern/Makefile.orig 2009-01-21 08:09:59.000000000 +0100 -+++ extern/Makefile 2009-01-21 08:10:30.000000000 +0100 -@@ -30,7 +30,7 @@ +--- extern/Makefile.orig 2008-10-22 18:38:21.000000000 +0200 ++++ extern/Makefile 2009-03-20 23:17:59.000000000 +0100 +@@ -30,11 +30,7 @@ SOURCEDIR = extern DIR = $(OCGDIR)/extern -DIRS = qhull/src solid glew/src +- +-ifeq ($(WITH_FREETYPE2), true) +- DIRS += bFTGL/src +-endif +DIRS = qhull/src solid - ifeq ($(WITH_FREETYPE2), true) - DIRS += bFTGL/src + ifeq ($(WITH_FFMPEG), true) + ifeq ($(NAN_FFMPEG), $(LCGDIR)/ffmpeg) diff --git a/graphics/blender/files/patch-source_Makefile b/graphics/blender/files/patch-source_Makefile index b13ab06620b0..0cdd4b3ba6a0 100644 --- a/graphics/blender/files/patch-source_Makefile +++ b/graphics/blender/files/patch-source_Makefile @@ -1,11 +1,36 @@ ---- source/Makefile.orig 2009-01-21 08:14:52.000000000 +0100 -+++ source/Makefile 2008-10-14 19:45:24.000000000 +0200 +--- source/Makefile.orig 2008-10-22 18:36:53.000000000 +0200 ++++ source/Makefile 2009-03-21 10:27:55.000000000 +0100 @@ -106,7 +106,7 @@ COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a COMLIB += $(NAN_JPEG)/lib/libjpeg.a COMLIB += $(OCGDIR)/blender/gpu/$(DEBUG_DIR)libgpu.a -COMLIB += $(NAN_GLEW)/lib/libglew.a -+COMLIB += $(NAN_GLEW)/lib/libGLEW.a ++COMLIB += $(NAN_GLEW)/lib/libGLEW.so ifneq ($(NAN_NO_KETSJI),true) COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a +@@ -190,11 +190,11 @@ + COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib + endif + else +- COMLIB += $(NAN_FTGL)/lib/libftgl.a ++ COMLIB += $(NAN_FTGL)/lib/libftgl.so + ifeq ($(OS), irix) + COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a + else +- COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a ++ COMLIB += $(NAN_FREETYPE)/lib/libfreetype.so + endif + endif + endif +@@ -353,8 +353,8 @@ + NAN_SND_LIBS += $(DUMMYSOUND) + NAN_SND_LIBS += $(OPENALSOUND) + NAN_SND_LIBS += $(SDLSOUND) +- NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a +- ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a) ++ NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.so ++ ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.so) + NAN_SND_LIBS += $(ALUT) + NAN_SND_LIBS += $(SOUNDSYSTEM) + else diff --git a/graphics/blender/files/patch-source_blender_ftfont_intern_FTF_TTFont.h b/graphics/blender/files/patch-source_blender_ftfont_intern_FTF_TTFont.h new file mode 100644 index 000000000000..1cdc910bb317 --- /dev/null +++ b/graphics/blender/files/patch-source_blender_ftfont_intern_FTF_TTFont.h @@ -0,0 +1,14 @@ +--- source/blender/ftfont/intern/FTF_TTFont.h.orig 2009-03-20 23:55:22.000000000 +0100 ++++ source/blender/ftfont/intern/FTF_TTFont.h 2009-03-21 00:22:43.000000000 +0100 +@@ -34,8 +34,9 @@ + #ifndef __FTF_TRUETYPE_FONT_H + #define __FTF_TRUETYPE_FONT_H + +-#include "FTGLPixmapFont.h" +-#include "FTGLTextureFont.h" ++#include <GL/gl.h> ++#include <GL/glu.h> ++#include <ftgl.h> + + #include <stdio.h> + //#include <iconv.h> diff --git a/graphics/blender/files/patch-user-def.mk b/graphics/blender/files/patch-user-def.mk index 07af5c9cacfa..4f79206faaef 100644 --- a/graphics/blender/files/patch-user-def.mk +++ b/graphics/blender/files/patch-user-def.mk @@ -1,6 +1,6 @@ ---- user-def.mk.orig 2009-01-19 09:28:02.000000000 +0100 -+++ user-def.mk 2009-01-19 09:31:01.000000000 +0100 -@@ -0,0 +1,30 @@ +--- user-def.mk.orig 2009-03-07 12:58:21.000000000 +0100 ++++ user-def.mk 2009-03-07 13:30:16.000000000 +0100 +@@ -0,0 +1,26 @@ +export NAN_DEBUG= + +export TYPE := $(shell echo `uname -s`) @@ -8,16 +8,14 @@ +# Allow 64bit compiles. +export NAN_YESIAMSTUPID=true + -+export WITH_ICONV = false -+export WITH_FFMPEG = false +export NAN_PYTHON ?= /usr/local +export NAN_PYTHON_VERSION ?= 2.5 +export NAN_OPENAL ?= /usr/local +export NAN_FMOD ?= /usr/local ++export NAN_FTGL ?= /usr/local +export NAN_JPEG ?= /usr/local +export NAN_PNG ?= /usr/local +export NAN_GLEW ?= /usr/local -+export WITH_OPENEXR = true +export NAN_OPENEXR ?= /usr/local +export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a \ + $(NAN_OPENEXR)/lib/libHalf.a \ @@ -26,8 +24,6 @@ +export NAN_ODE ?= /usr/local +export NAN_MESA = /export/scratch/crap/Mesa-6.2.1 +export NAN_NSPR = /export/scratch/blender/src/nspr-4.2.2/mozilla/nsprpub/dist -+export WITH_FREETYPE2 = true -+export NAN_NO_STATIC = true -+export NAN_NO_PLUGIN = true +export NAN_FREETYPE ?= /usr/local -+export WITH_VERSE = true ++export NAN_FFMPEGLIBS = %%FFMPEGLIBS%% ++export NAN_FFPMEGCFLAGS = %%FFMPEGCFLAGS%% diff --git a/graphics/blender/pkg-plist b/graphics/blender/pkg-plist index d95dc282a216..7f65cf766535 100644 --- a/graphics/blender/pkg-plist +++ b/graphics/blender/pkg-plist @@ -1,5 +1,7 @@ bin/blender bin/blender-bin +%%KETSJI%%bin/blenderplayer +%%VERSE%%bin/verse %%DATADIR%%/.bfont.ttf %%DATADIR%%/.Blanguages %%NLS%%%%DATADIR%%/locale/ar/LC_MESSAGES/blender.mo |