View | Details | Raw Unified | Return to bug 95767
Collapse All | Expand All

(-)/usr/ports/games/dangerdeep-new/Makefile (-5 / +8 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	dangerdeep
8
PORTNAME=	dangerdeep
9
PORTVERSION=	0.1.0
9
PORTVERSION=	0.1.1
10
CATEGORIES=	games
10
CATEGORIES=	games
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=	dangerdeep
12
MASTER_SITE_SUBDIR=	dangerdeep
Lines 15-32 Link Here
15
COMMENT=	Open source World War II German submarine simulation
15
COMMENT=	Open source World War II German submarine simulation
16
16
17
BUILD_DEPENDS=	scons:${PORTSDIR}/devel/scons
17
BUILD_DEPENDS=	scons:${PORTSDIR}/devel/scons
18
LIB_DEPENDS=	fftw3.3:${PORTSDIR}/math/fftw3
18
LIB_DEPENDS=	fftw3.3:${PORTSDIR}/math/fftw3 \
19
		execinfo.1:${PORTSDIR}/devel/libexecinfo
19
20
20
USE_X_PREFIX=	yes
21
USE_X_PREFIX=	yes
21
USE_GL=		yes
22
USE_GL=		yes
22
USE_SDL=	sdl mixer image net
23
USE_SDL=	sdl mixer image net
23
USE_REINPLACE=	yes
24
24
25
MAKE_ENV=	CC="${CC}" CXX="${CXX}"
25
MAKE_ENV=	CC="${CC}" CXX="${CXX}"
26
SCONS_ARGS=	installbindir=${PREFIX}/bin installdatadir=${DATADIR}
26
SCONS_ARGS=	installbindir=${PREFIX}/bin installdatadir=${DATADIR}
27
27
28
PLIST=		${WRKDIR}/pkg-plist
28
PLIST=		${WRKDIR}/pkg-plist
29
PLIST_FILES=	bin/dangerdeep
29
PLIST_FILES=	bin/dangerdeep bin/crosssection bin/damagemodel \
30
		bin/oceantest bin/portal bin/viewmodel
30
PLIST_DIRS=	%%DATADIR%%
31
PLIST_DIRS=	%%DATADIR%%
31
32
32
MAN6=		dangerdeep.6
33
MAN6=		dangerdeep.6
Lines 56-62 Link Here
56
	${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
57
	${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
57
58
58
do-install:
59
do-install:
59
	${INSTALL_PROGRAM} ${WRKSRC}/build/freebsd/dangerdeep ${PREFIX}/bin
60
	@cd ${WRKSRC}/build/freebsd && \
61
		${INSTALL_PROGRAM} dangerdeep crosssection damagemodel oceantest \
62
			portal viewmodel ${PREFIX}/bin
60
63
61
	cd ${WRKSRC}/data && \
64
	cd ${WRKSRC}/data && \
62
	${FIND} * -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
65
	${FIND} * -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
(-)/usr/ports/games/dangerdeep-new/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (dangerdeep-0.1.0.tar.gz) = 7e95d871b929a5e322d0a6bde37e7151
1
MD5 (dangerdeep-0.1.1.tar.gz) = 7de20b4594c0fee8d3c1a281f686f943
2
SHA256 (dangerdeep-0.1.0.tar.gz) = 6b987559dc637e2d77a9e0f16d60fb1d58db5513c459b395a74942e7b3b31982
2
SHA256 (dangerdeep-0.1.1.tar.gz) = de6334c88bac6ce1463e48444e550899a61ea85cecf8929a160d07e28f502a20
3
SIZE (dangerdeep-0.1.0.tar.gz) = 12429406
3
SIZE (dangerdeep-0.1.1.tar.gz) = 23831169
(-)/usr/ports/games/dangerdeep-new/files/patch-SConstruct (-69 / +7 lines)
Lines 1-72 Link Here
1
--- SConstruct.orig	Mon Oct 17 20:45:59 2005
1
--- SConstruct	Fri Apr 14 05:13:03 2006
2
+++ SConstruct	Sat Oct 29 14:30:06 2005
2
+++ SConstruct	Fri Apr 14 16:18:12 2006
3
@@ -2,6 +2,11 @@
3
@@ -81,6 +81,7 @@
4
 import os
4
 	libpath = [LOCALBASE + '/lib', X11BASE + '/lib'] 
5
 import sys
6
 
7
+################ FreeBSD port variables
8
+LOCALBASE = os.environ['LOCALBASE']
9
+X11BASE = os.environ['X11BASE']
10
+SDL_CONFIG = os.environ['SDL_CONFIG']
11
+
12
 ################ global config values
13
 version = '0.1.0'
14
 if ARGUMENTS.get('version', 0):
15
@@ -67,10 +72,12 @@
16
 else:
17
 	print "Compiling for Unix/Posix/Linux Environment"
18
 	env = Environment(ENV = os.environ)
19
-	env.Append(CPPPATH = ['/usr/include/SDL', '/usr/include/GL'])
20
-	libpath = ['/usr/X11R6/lib']
21
+	env.Replace(CC = os.environ['CC'])
22
+	env.Replace(CXX = os.environ['CXX'])
23
+	env.Append(CPPPATH = [LOCALBASE + '/include', LOCALBASE + '/include/SDL11', X11BASE + '/include', X11BASE + '/include/GL'])
24
+	libpath = [LOCALBASE + '/lib', X11BASE + '/lib']
25
 	gllibs = ['GL', 'GLU']
5
 	gllibs = ['GL', 'GLU']
26
-	sdllibs = ['SDL', 'SDL_image']
6
 	sdllibs = ['SDL_image']
27
+	sdllibs = ['SDL_image']
7
+	extralibs = ['execinfo']
28
 	ccflags = '-Wall `sdl-config --cflags`'
8
 	cpuinfof = os.popen('sysctl -n hw.instruction_sse')
29
 	if (debug >= 3):
30
 		ccflags += ' -g -pg -O3'	# profiling
31
@@ -92,31 +99,28 @@
32
 	if (cvedit == 1):
33
 		env.Append(CPPDEFINES = ['CVEDIT'])
34
 	# check for mmx/sse support
35
-	cpuinfof = open('/proc/cpuinfo', 'r')
36
+	cpuinfof = os.popen('sysctl -n hw.instruction_sse')
37
 	cpuinfol = cpuinfof.readlines()
9
 	cpuinfol = cpuinfof.readlines()
38
 	mmxsupported = False
10
 	mmxsupported = False
39
 	ssesupported = False
40
 	for i in cpuinfol:
41
-		if i.startswith('flags'):
42
-			m = Split(i)
43
-			for j in m:
44
-				if j == 'mmx':
45
-					mmxsupported = True
46
-				elif j == 'sse':
47
-					ssesupported = True
48
-			break
49
+		if i == '1\n':
50
+			mmxsupported = True
51
+			ssesupported = True
52
 	if (usex86sse == 0) and (mmxsupported and ssesupported):
53
 		usex86sse = 1
54
 	if usex86sse >= 1:
55
 		env.Append(CPPDEFINES = ['USE_SSE'])
56
 		osspecificsrc += ['water_sse.cpp']
57
 		print 'Using x86 SSE/MMX optimizations.'
58
-	env.Append(CCFLAGS = ccflags)
59
+	env.Replace(CCFLAGS = os.environ['CFLAGS'])
60
+	env.Replace(CXXFLAGS = os.environ['CXXFLAGS'] + ' `' + SDL_CONFIG + ' --cflags`')
61
+	env.Append(LINKFLAGS = '`' + SDL_CONFIG + ' --libs`')
62
 	datadir = installdatadir
63
-	build_dir = 'linux'
64
+	build_dir = 'freebsd'
65
 	# check for broken libGL, ignore undefined symbols then
66
-	if (os.system('grep glBindProgram /usr/include/GL/gl*.h > /dev/null') == 0):
67
-		gllibdirs = ['/usr/X11R6/lib/', '/usr/lib/', '/usr/local/lib/']
68
+	if (os.system('grep glBindProgram ' + X11BASE + '/include/GL/gl*.h > /dev/null') == 0):
69
+		gllibdirs = [X11BASE + '/lib/', '/usr/lib/', LOCALBASE + '/lib/']
70
 		gllibdir = ''
71
 		for i in gllibdirs:
72
 			if (os.system('test -f '+i+'libGL.so') == 0):
(-)/usr/ports/games/dangerdeep-new/files/patch-src_coastmap.cpp (-11 lines)
Lines 1-11 Link Here
1
--- src/coastmap.cpp	Mon Jul 18 16:19:30 2005
2
+++ src/coastmap.cpp	Fri Oct 28 15:30:30 2005
3
@@ -1316,7 +1316,7 @@
4
 	maph = surf->h;
5
 	pixelw_real = realwidth/mapw;
6
 	realheight = maph*realwidth/mapw;
7
-	pixels_per_seg = 1 << unsigned(ceil(log2(60000/pixelw_real)));
8
+	pixels_per_seg = 1 << unsigned(ceil(log(60000/pixelw_real)));
9
 	segsx = mapw/pixels_per_seg;
10
 	segsy = maph/pixels_per_seg;
11
 	segw_real = pixelw_real * pixels_per_seg;

Return to bug 95767