From 923189bea0e00674c2887e575f9a24e92deeaa0a Mon Sep 17 00:00:00 2001
From: Pav Lucistnik <pav@FreeBSD.org>
Date: Thu, 26 Aug 2004 15:56:07 +0000
Subject: - Update to 2.34

PR:		ports/70811
Submitted by:	David Yeske <dyeske@yahoo.com> (maintainer)
---
 graphics/blender-devel/Makefile               |  48 ++--------
 graphics/blender-devel/distinfo               |   4 +-
 graphics/blender-devel/files/patch-SConstruct | 129 ++++++++++++++++++++++++++
 3 files changed, 138 insertions(+), 43 deletions(-)
 create mode 100644 graphics/blender-devel/files/patch-SConstruct

(limited to 'graphics')

diff --git a/graphics/blender-devel/Makefile b/graphics/blender-devel/Makefile
index 83a609cae474..3a01ca2665b1 100644
--- a/graphics/blender-devel/Makefile
+++ b/graphics/blender-devel/Makefile
@@ -5,8 +5,7 @@
 # $FreeBSD$
 
 PORTNAME=	blender
-PORTVERSION=	2.32
-PORTREVISION=	1
+PORTVERSION=	2.34
 CATEGORIES=	graphics games
 MASTER_SITES=	http://download.blender.org/source/
 PKGNAMESUFFIX=	-devel
@@ -14,66 +13,33 @@ PKGNAMESUFFIX=	-devel
 MAINTAINER=	dyeske@yahoo.com
 COMMENT=	3D modeling/rendering/animation/gaming package
 
+BUILD_DEPENDS=	scons:${PORTSDIR}/devel/scons
 LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg \
+		freetype.9:${PORTSDIR}/print/freetype2 \
 		png.5:${PORTSDIR}/graphics/png
 
 PLIST_FILES=	bin/blender
 USE_X_PREFIX=	yes
 USE_BZIP2=	yes
 USE_REINPLACE=	yes
-USE_LIBTOOL_VER=13
-USE_GMAKE=	yes
 USE_PYTHON=	yes
 USE_SDL=	sdl
 USE_GL=		yes
 
-CONFIGURE_ARGS=	--with-sdl=${LOCALBASE} --disable-oggtest --disable-vorbistest --disable-sdltest
-
-CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS} -I${X11BASE}/include -I${LOCALBASE}/include" \
-		LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS} -L${LOCALBASE}/lib -L${X11BASE}/lib"
-
 .if defined(WITH_OPTIMIZED_CFLAGS)
 CFLAGS+=	-O3 -ffast-math
 .endif
 
-.if exists(${LOCALBASE}/lib/libfreetype.so.9) && !defined(WITHOUT_FREETYPE)
-WITH_FREETYPE=	yes
-.endif
-
-.if exists(${LOCALBASE}/lib/libopenal.so) && !defined(WITHOUT_OPENAL)
-WITH_OPENAL=	yes
-.endif
-
-.if defined(WITH_FREETYPE)
-LIB_DEPENDS+=	freetype.9:${PORTSDIR}/print/freetype2
-CONFIGURE_ARGS+=	--with-freetype2=${LOCALBASE}
-.endif
-
-.if defined(WITH_OPENAL)
-LIB_DEPENDS+=	openal.0:${PORTSDIR}/audio/openal
-CONFIGURE_ARGS+=	--enable-openal
-.endif
-
 pre-everything::
 .if !defined(WITH_OPTIMIZED_CFLAGS)
 	@${ECHO_MSG} "You can enable additional compilation optimizations"
 	@${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS"
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} -e \
-		's|<malloc.h>|<stdlib.h>|' \
-		${WRKSRC}/intern/SoundSystem/intern/SND_WaveCache.cpp
-
-	@${REINPLACE_CMD} -E -e \
-		's|^program_transform_name.+$$||; \
-		s| -DFreeBSD||; \
-		s|-lSDL|-lSDL-1.1|' \
-		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+do-build:
+	@cd ${WRKSRC} && scons
 
-	@${REINPLACE_CMD} -e \
-		's|-Wall||' \
-		${WRKSRC}/source/blender/python/api2_2x/Makefile.in \
-		${WRKSRC}/source/blender/python/Makefile.in
+do-install:
+	@${INSTALL_PROGRAM} ${WRKSRC}/blender ${PREFIX}/bin
 
 .include <bsd.port.mk>
diff --git a/graphics/blender-devel/distinfo b/graphics/blender-devel/distinfo
index f42be485f383..ec1de640baee 100644
--- a/graphics/blender-devel/distinfo
+++ b/graphics/blender-devel/distinfo
@@ -1,2 +1,2 @@
-MD5 (blender-2.32.tar.bz2) = ebde5f573e19b7b8b64401d293c989e7
-SIZE (blender-2.32.tar.bz2) = 5661028
+MD5 (blender-2.34.tar.bz2) = dad5ac3d415abefad9c52f7b814339d8
+SIZE (blender-2.34.tar.bz2) = 5499297
diff --git a/graphics/blender-devel/files/patch-SConstruct b/graphics/blender-devel/files/patch-SConstruct
new file mode 100644
index 000000000000..b2e75b1d1b6a
--- /dev/null
+++ b/graphics/blender-devel/files/patch-SConstruct
@@ -0,0 +1,129 @@
+--- SConstruct.orig	Fri Aug 20 22:36:47 2004
++++ SConstruct	Fri Aug 20 22:36:52 2004
+@@ -681,6 +681,86 @@
+     openal_lib = ['openal']
+     openal_libpath = ['/usr/lib']
+     openal_include = ['/usr/include']
++    
++elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
++    print "Building for FreeBSD"
++    use_international = 'false'
++    use_gameengine = 'false'
++    use_openal = 'false'
++    use_fmod = 'false'
++    use_quicktime = 'false'
++    use_sumo = 'false'
++    use_ode = 'false'
++    use_buildinfo = 'true'
++    build_blender_dynamic = 'true'
++    build_blender_static = 'false'
++    build_blender_player = 'false'
++    build_blender_plugin = 'false'
++    release_flags = ['-O2']
++    debug_flags = ['-O2', '-g']
++    extra_flags = ['-pipe', '-fPIC', '-funsigned-char']
++    cxxflags = []
++    defines = []
++    warn_flags = ['-Wall','-W']
++    window_system = 'X11'
++    platform_libs = ['m', 'stdc++', 'util']
++    platform_libpath = []
++    platform_linkflags = ['-pthread']
++    extra_includes = []
++    z_lib = ['z']
++    z_libpath = ['/usr/lib']
++    z_include = ['/usr/include']
++    # png library information
++    png_lib = ['png']
++    png_libpath = ['/usr/local/lib']
++    png_include = ['/usr/local/include']
++    # jpeg library information
++    jpeg_lib = ['jpeg']
++    jpeg_libpath = ['/usr/local/lib']
++    jpeg_include = ['/usr/local/include']
++    # OpenGL library information
++    opengl_lib = ['GL', 'GLU']
++    opengl_static = ['/usr/lib/libGL.a', '/usr/lib/libGLU.a']
++    opengl_libpath = ['/usr/lib', '/usr/X11R6/lib']
++    opengl_include = ['/usr/X11R6/include/']
++    # SDL library information
++    sdl_env.ParseConfig ('sdl11-config --cflags')
++    sdl_cflags = sdl_env.Dictionary()['CCFLAGS']
++    sdl_include = sdl_env.Dictionary()['CPPPATH']
++    sdl_env.ParseConfig ('sdl11-config --libs')
++    sdl_libpath =sdl_env.Dictionary()['LIBPATH']
++    sdl_lib = sdl_env.Dictionary()['LIBS']
++    # SOLID library information
++    solid_lib = []                     # TODO
++    solid_libpath = []        # TODO
++    solid_include = ['#extern/solid']
++    qhull_lib = []       # TODO
++    qhull_libpath = []  # TODO
++    qhull_include = ['#extern/qhull/include']
++    # ODE library information
++    ode_lib = ['ode']
++    ode_libpath = ['#../lib/linux-glibc2.2.5-i386/ode/lib']
++    ode_include = ['#../lib/linux-glibc2.2.5-i386/ode/include']
++    # Python library information
++    python_lib = ['python%d.%d' % sys.version_info[0:2]]
++    python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
++    python_include = [sysconfig.get_python_inc ()]
++    python_linkflags = []
++    # International support information
++    ftgl_lib = ['ftgl']
++    ftgl_libpath = ['#../lib/linux-glibc2.2.5-i386/ftgl/lib']
++    ftgl_include = ['#../lib/linux-glibc2.2.5-i386/ftgl/include']
++    freetype_env.ParseConfig('pkg-config --cflags --libs freetype2')
++    freetype_lib = freetype_env.Dictionary()['LIBS']
++    freetype_libpath = freetype_env.Dictionary()['LIBPATH']
++    freetype_include = freetype_env.Dictionary()['CPPPATH']
++    gettext_lib = []
++    gettext_libpath = []
++    gettext_include = []
++    # OpenAL library information
++    openal_lib = ['openal']
++    openal_libpath = ['/usr/lib']
++    openal_include = ['/usr/include']
+ 
+ else:
+     print "Unknown platform %s"%sys.platform
+@@ -1188,7 +1268,7 @@
+ 		shutil.copy("../lib/windows/python/lib/python23.dll", "dist/python23.dll")
+ 		shutil.copy("../lib/windows/sdl/lib/SDL.dll", "dist/SDL.dll")
+ 		shutil.copy("../lib/windows/gettext/lib/gnu_gettext.dll", "dist/gnu_gettext.dll")
+-	elif sys.platform in ['linux2', 'linux-i386']:
++	elif sys.platform in ['linux2', 'linux-i386', 'freebsd4', 'freebsd5']:
+ 		shutil.copy("blender", "dist/blender")
+ 		if user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
+ 			shutil.copy("blenderplayer", "dist/blenderplayer")
+@@ -1376,6 +1456,12 @@
+ 	elif sys.platform == 'linux2' or sys.platform == 'linux-i386':
+ 		zipext += ".tar.gz"
+ 		pf = "linux"
++	elif sys.platform == 'freebsd4':
++		zipext += ".tar.gz"
++		pf = "freebsd4"
++	elif sys.platform == 'freebsd5':
++		zipext += ".tar.gz"
++		pf = "freebsd5"
+ 	
+ 	if user_options_dict['BUILD_BINARY'] == 'release':
+ 		blendname = "blender-" + version + "-" + config_guess
+@@ -1391,7 +1477,7 @@
+ 	print
+ 	if sys.platform == 'win32':
+ 		print "Create the zip!"
+-	elif sys.platform == 'linux2' or sys.platform == 'linux-i386':
++	else:
+ 		print "Create the tarball!"
+ 	print
+ 	
+@@ -1601,7 +1687,7 @@
+ 		if user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
+ 			app_env.Depends(Mappit, playername)
+ 		app_env.Alias("release", Mappit)
+-	elif sys.platform in ['win32', 'linux2', 'linux-i386']:
++	elif sys.platform in ['win32', 'linux2', 'linux-i386', 'freebsd4', 'freebsd5']:
+ 		release_env = Environment()
+ 		releaseit = release_env.Command('blenderrelease', appname, zipit)
+ 		if user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
-- 
cgit v1.2.3