Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 2009 21:41:49 +0100
From:      Marcus von Appen <mva@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Subject:   Testers for graphics/blender with OPTION knobs
Message-ID:  <20090313204149.GA90262@medusa.sysfault.org>

next in thread | raw e-mail | index | archive | help

--24zk1gE8NUlDmwG9
Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF"
Content-Disposition: inline


--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

it took some time, but finally graphics/blender got a lot of options to
configure. Those enable users to tweak it to their personal needs and
hopefully will allow graphics/blender to run on more platforms.

Especially users of non-i386 platforms are invited to test the different
options as some of the earlier dependencies, which had and have certain
requirements, can be disabled now.

A patch is attached and feedback highly welcome.

Regards
Marcus

--h31gzZEtNLTqOjlF
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="graphics_blender.diff"
Content-Transfer-Encoding: quoted-printable

Index: graphics/blender/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/pcvs/ports/graphics/blender/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- graphics/blender/Makefile	23 Feb 2009 21:43:16 -0000	1.30
+++ graphics/blender/Makefile	13 Mar 2009 20:02:27 -0000
@@ -16,14 +16,10 @@
=20
 BUILD_DEPENDS=3D	${LOCALBASE}/lib/libode.a:${PORTSDIR}/devel/ode
 LIB_DEPENDS=3D	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
=20
 USE_XORG=3D	x11 xext xmu xi
 USE_PYTHON=3D	2.5+
@@ -43,33 +39,96 @@
 LANG=3D		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
=20
-OPTIONS=3D	OCFLAGS "Enable optimized CFLAGS" off \
-		NLS	"Native language support" on
+OPTIONS=3D	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" on \
+		NLS		"Native language support" on \
+		OCFLAGS		"Optimized Cflags" off \
+		OPENAL		"3D sound support using OpenAL" on \
+		OPENEXR		"High dynamic-range (HDR) support using OpenEXR" on \
+		OPENMP		"Parallel processing support" off \
+		VERSE		"Shared networking support using Verse" on
=20
 .include <bsd.port.pre.mk>
=20
-MAKE_ENV+=3D	NAN_CPPFLAGS=3D"-I${LOCALBASE}/include/freetype2 \
-		-I${LOCALBASE}/include \
-		-I${LOCALBASE}/include/OpenEXR \
-		-I${PYTHON_INCLUDEDIR}/"
-MAKE_ENV+=3D	NAN_FREETYPE=3D"${LOCALBASE}/"
-MAKE_ENV+=3D	NAN_OPENEXR=3D"${LOCALBASE}/"
-MAKE_ENV+=3D	NAN_OPENAL=3D"${LOCALBASE}/"
+MAKE_ENV+=3D	NAN_FMOD=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_PYTHON=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_PYTHON_VERSION=3D${PYTHON_VER}
-MAKE_ENV+=3D	NAN_FMOD=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_JPEG=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_PNG=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_ZLIB=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_ODE=3D"${LOCALBASE}/"
 MAKE_ENV+=3D	NAN_GLEW=3D"${LOCALBASE}/"
+MAKE_ENV+=3D	NAN_JUST_BLENDERDYNAMIC=3D"true"
+MAKE_ENV+=3D	WITH_BF_DYNAMICOPENGL=3D"true"
+
 CFLAGS+=3D	"-I${LOCALBASE}/include"
+NANCPPFLAGS=3D
+
+.if !defined(WITHOUT_DDS)
+MAKE_ENV+=3D	WITH_DDS=3D"true"
+.else
+MAKE_ENV+=3D	WITH_DDS=3D"false"
+.endif
+
+.if defined(WITHOUT_FFMPEG)
+MAKE_ENV+=3D	WITH_FFMPEG=3D"false"
+.else
+MAKE_ENV+=3D	WITH_FFMPEG=3D"true"
+MAKE_ENV+=3D	NAN_USE_FFMPEG_CONFIG=3D"true"
+MAKE_ENV+=3D	NAN_FFMPEG=3D"${LOCALBASE}/"
+LIB_DEPENDS+=3D	avutil.1:${PORTSDIR}/multimedia/ffmpeg
+.endif
+
+.if defined(WITHOUT_FREETYPE)
+MAKE_ENV+=3D	WITH_FREETYPE2=3D"false"
+.else
+MAKE_ENV+=3D	WITH_FREETYPE2=3D"true"
+MAKE_ENV+=3D	NAN_FREETYPE=3D"${LOCALBASE}/"
+MAKE_ENV+=3D	NAN_FTGL=3D"${LOCALBASE}/"
+NANCPPFLAGS+=3D	"-I${LOCALBASE}/include/freetype2"
+LIB_DEPENDS+=3D	freetype.9:${PORTSDIR}/print/freetype2
+LIB_DEPENDS+=3D	ftgl.2:${PORTSDIR}/graphics/ftgl
+.endif
+
+.if defined(WITHOUT_KETSJI)
+MAKE_ENV+=3D	NAN_NO_KETSJI=3D"true"
+MAKE_ENV+=3D	WITH_BF_BLENDERGAMEENGINE=3D"false"
+MAKE_ENV+=3D	WITH_BF_BLENDERPLAYER=3D"false"
+PLIST_SUB+=3D	KETSJI=3D"@comment "
+.else
+MAKE_ENV+=3D	NAN_NO_KETSJI=3D"false"
+MAKE_ENV+=3D	NAN_USE_BULLET=3D"true"
+MAKE_ENV+=3D	WITH_BF_BLENDERGAMEENGINE=3D"true"
+MAKE_ENV+=3D	WITH_BF_BLENDERPLAYER=3D"true"
+PLIST_SUB+=3D	KETSJI=3D""
+.endif
=20
 .if !defined(WITHOUT_NLS)
 USE_GETTEXT=3D	yes
 MAKE_ENV+=3D	INTERNATIONAL=3D"true"
+
+# Iconv support?
+.if defined(WITH_ICONV)
+USE_ICONV=3D	yes
+MAKE_ENV+=3D	WITH_ICONV=3D"true"
+.else
+MAKE_ENV+=3D	WITH_ICONV=3D"false"
+.endif
+
+.if defined(WITHOUT_FREETYPE)
+# Implies Freetype2 - ignore the without knob.
+MAKE_ENV+=3D	WITH_FREETYPE2=3D"true"
+MAKE_ENV+=3D	NAN_FREETYPE=3D"${LOCALBASE}/"
+LIB_DEPENDS+=3D	freetype.9:${PORTSDIR}/print/freetype2
+LIB_DEPENDS+=3D	ftgl.2:${PORTSDIR}/graphics/ftgl
+.endif
+
 PLIST_SUB+=3D	NLS=3D""
 .else
+MAKE_ENV+=3D	WITH_ICONV=3D"false"
 PLIST_SUB+=3D	NLS=3D"@comment "
 .endif
=20
@@ -77,16 +136,45 @@
 CFLAGS+=3D	-O3 -ffast-math
 .endif
=20
-.if ${ARCH} =3D=3D "amd64"
-MAKE_ENV+=3D	NAN_NO_KETSJI=3D"true"
-MAKE_ENV+=3D	WITH_BF_BLENDERGAMEENGINE=3D"false"
-MAKE_ENV+=3D	WITH_BF_BLENDERPLAYER=3D"false"
+.if defined(WITHOUT_OPENAL)
+MAKE_ENV+=3D	NAN_NO_OPENAL=3D"true"
 .else
-MAKE_ENV+=3D	WITH_BF_BLENDERGAMEENGINE=3D"true"
-MAKE_ENV+=3D	WITH_BF_OPENAL=3D"true"
-MAKE_ENV+=3D	WITH_BF_BLENDERPLAYER=3D"true"
+MAKE_ENV+=3D	NAN_NO_OPENAL=3D"false"
+MAKE_ENV+=3D	NAN_OPENAL=3D"${LOCALBASE}/"
+LIB_DEPENDS+=3D	openal.0:${PORTSDIR}/audio/openal \
+		alut.1:${PORTSDIR}/audio/freealut
 .endif
=20
+.if defined(WITHOUT_OPENEXR)
+MAKE_ENV+=3D	WITH_OPENEXR=3D"false"
+.else
+MAKE_ENV+=3D	WITH_OPENEXR=3D"true"
+MAKE_ENV+=3D	NAN_OPENEXR=3D"${LOCALBASE}/"
+LIB_DEPENDS+=3D	IlmImf.6:${PORTSDIR}/graphics/OpenEXR
+NANCPPFLAGS+=3D	"-I${LOCALBASE}/include/OpenEXR"
+.endif
+
+.if defined(WITH_OPENMP)
+.if ${OSVERSION} < 700000
+BROKEN=3D		OpenMP support is not available for FreeBSD 6.x and below
+.else
+MAKE_ENV+=3D	WITH_BF_OPENMP=3D"true"
+.endif
+.else
+MAKE_ENV+=3D	WITH_BF_OPENMP=3D"false"
+.endif
+
+.if defined(WITHOUT_VERSE)
+MAKE_ENV+=3D	WITH_VERSE=3D"false"
+PLIST_SUB+=3D	VERSE=3D"@comment "
+.else
+MAKE_ENV+=3D	WITH_VERSE=3D"true"
+PLIST_SUB+=3D	VERSE=3D""
+.endif
+
+MAKE_ENV+=3D	NAN_CPPFLAGS=3D"-I${LOCALBASE}/include -I${PYTHON_INCLUDEDIR}=
 \
+			${NANCPPFLAGS}"
+
 .if ${ARCH} =3D=3D "sparc64"
 BROKEN=3D		Fails to link
 .endif
@@ -95,6 +183,16 @@
 	@${REINPLACE_CMD} -e 's|2.5|${PYTHON_VER}|' \
 		${WRKSRC}/source/nan_definitions.mk
=20
+.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 +213,10 @@
 do-install:
 	@${INSTALL_SCRIPT} ${WRKDIR}/blender ${PREFIX}/bin/blender
 	@${INSTALL_PROGRAM} ${WRKSRC}/obj/freebsd-${OSREL}-${ARCH}/bin/blender ${=
PREFIX}/bin/blender-bin
+	@${INSTALL_PROGRAM} ${WRKSRC}/obj/freebsd-${OSREL}-${ARCH}/bin/blenderpla=
yer ${PREFIX}/bin/blenderplayer
+.if !defined(WITHOUT_VERSE)
+	@${INSTALL_PROGRAM} ${WRKSRC}/obj/freebsd-${OSREL}-${ARCH}/bin/verse ${PR=
EFIX}/bin/verse
+.endif
=20
 	@${MKDIR} ${DATADIR}
 	@${CP} -R ${WRKSRC}/release/scripts ${DATADIR}
Index: graphics/blender/pkg-plist
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/pcvs/ports/graphics/blender/pkg-plist,v
retrieving revision 1.7
diff -u -r1.7 pkg-plist
--- graphics/blender/pkg-plist	23 Feb 2009 21:43:16 -0000	1.7
+++ graphics/blender/pkg-plist	13 Mar 2009 20:02:27 -0000
@@ -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
Index: graphics/blender/files/patch-source_Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/pcvs/ports/graphics/blender/files/patch-source_Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-source_Makefile
--- graphics/blender/files/patch-source_Makefile	30 Jan 2009 07:10:17 -0000=
	1.1
+++ graphics/blender/files/patch-source_Makefile	13 Mar 2009 20:02:27 -0000
@@ -1,5 +1,5 @@
---- 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-09 14:46:58.000000000 +0100
 @@ -106,7 +106,7 @@
  COMLIB +=3D $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
  COMLIB +=3D $(NAN_JPEG)/lib/libjpeg.a
@@ -9,3 +9,14 @@
 =20
  ifneq ($(NAN_NO_KETSJI),true)
      COMLIB +=3D $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
+@@ -353,8 +353,8 @@
+         NAN_SND_LIBS +=3D $(DUMMYSOUND)
+         NAN_SND_LIBS +=3D $(OPENALSOUND)
+         NAN_SND_LIBS +=3D $(SDLSOUND)
+-        NAN_SND_LIBS +=3D $(NAN_OPENAL)/lib/libopenal.a
+-	ALUT =3D $(wildcard $(NAN_OPENAL)/lib/libalut.a)
++        NAN_SND_LIBS +=3D $(NAN_OPENAL)/lib/libopenal.so
++	ALUT =3D $(wildcard $(NAN_OPENAL)/lib/libalut.so)
+         NAN_SND_LIBS +=3D $(ALUT)
+         NAN_SND_LIBS +=3D $(SOUNDSYSTEM)
+     else
Index: graphics/blender/files/patch-user-def.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/pcvs/ports/graphics/blender/files/patch-user-def.mk,v
retrieving revision 1.3
diff -u -r1.3 patch-user-def.mk
--- graphics/blender/files/patch-user-def.mk	30 Jan 2009 07:10:17 -0000	1.3
+++ graphics/blender/files/patch-user-def.mk	13 Mar 2009 20:02:27 -0000
@@ -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=3D
 +
 +export TYPE :=3D $(shell echo `uname -s`)
@@ -8,16 +8,14 @@
 +# Allow 64bit compiles.
 +export NAN_YESIAMSTUPID=3Dtrue
 +
-+export WITH_ICONV =3D false
-+export WITH_FFMPEG =3D false
 +export NAN_PYTHON ?=3D /usr/local
 +export NAN_PYTHON_VERSION ?=3D 2.5
 +export NAN_OPENAL ?=3D /usr/local
 +export NAN_FMOD ?=3D /usr/local
++export NAN_FTGL ?=3D /usr/local
 +export NAN_JPEG ?=3D /usr/local
 +export NAN_PNG ?=3D /usr/local
 +export NAN_GLEW ?=3D /usr/local
-+export WITH_OPENEXR =3D true
 +export NAN_OPENEXR ?=3D /usr/local
 +export NAN_OPENEXR_LIBS ?=3D $(NAN_OPENEXR)/lib/libIlmImf.a \
 +	$(NAN_OPENEXR)/lib/libHalf.a \
@@ -26,8 +24,6 @@
 +export NAN_ODE ?=3D /usr/local
 +export NAN_MESA =3D /export/scratch/crap/Mesa-6.2.1
 +export NAN_NSPR =3D /export/scratch/blender/src/nspr-4.2.2/mozilla/nsprpu=
b/dist
-+export WITH_FREETYPE2 =3D true
-+export NAN_NO_STATIC =3D true
-+export NAN_NO_PLUGIN =3D true
 +export NAN_FREETYPE ?=3D /usr/local
-+export WITH_VERSE =3D true
++export NAN_FFMPEGLIBS =3D %%FFMPEGLIBS%%
++export NAN_FFPMEGCFLAGS =3D %%FFMPEGCFLAGS%%

--h31gzZEtNLTqOjlF--

--24zk1gE8NUlDmwG9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkm6xQwACgkQi68/ErJnpkcP1ACgu7ShrKWeFyiZtnFg5uymhzY7
a9QAn2+9GybUrfndy9utWNJlg5ivaD41
=cXXk
-----END PGP SIGNATURE-----

--24zk1gE8NUlDmwG9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090313204149.GA90262>