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

(-)/home/trasz/glclock/Makefile (-18 / +34 lines)
Lines 2-18 Link Here
2
# Date created:		20 September 1999
2
# Date created:		20 September 1999
3
# Whom:			Randall Hopper <aa8vb@ipass.net>
3
# Whom:			Randall Hopper <aa8vb@ipass.net>
4
#
4
#
5
# $FreeBSD: ports/x11-clocks/glclock/Makefile,v 1.13 2006/01/12 12:54:27 sem Exp $
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	glclock
8
PORTNAME=	glclock
9
PORTVERSION=	5.0
9
PORTVERSION=	6.0b6.0
10
PORTREVISION=	2
11
CATEGORIES=	x11-clocks
10
CATEGORIES=	x11-clocks
12
MASTER_SITES=	http://www.daionet.gr.jp/~masa/archives/
11
MASTER_SITES=	http://www.daionet.gr.jp/~masa/archives/
13
12
14
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	trasz@pin.if.uz.zgora.pl
15
COMMENT=	OpenGL Spinning pocketwatch demo and benchmark utility
14
COMMENT=	OpenGL spinning pocket watch demo and benchmark utility
16
15
17
LIB_DEPENDS=	glut.4:${PORTSDIR}/graphics/libglut
16
LIB_DEPENDS=	glut.4:${PORTSDIR}/graphics/libglut
18
17
Lines 21-51 Link Here
21
MAKEFILE=	makefile
20
MAKEFILE=	makefile
22
MAKE_ARGS=	CC="${CXX}" LN="${CXX}" OPT="${OPT}" \
21
MAKE_ARGS=	CC="${CXX}" LN="${CXX}" OPT="${OPT}" \
23
		INCLUDE_PATH="-I${X11BASE}/include" \
22
		INCLUDE_PATH="-I${X11BASE}/include" \
24
		LIB_PATH="-L${X11BASE}/lib" LIBS="${LIBS}"
23
		LIB_PATH="-L${X11BASE}/lib"
25
ALL_TARGET=	${PORTNAME}
26
24
27
OPT=		${CXXFLAGS} ${PTHREAD_CFLAGS} \
25
OPT=		-DIMAGE_PATH="\\\"${PREFIX}/lib/X11/glclock/\\\"" \
28
		-DGLCLOCK_DIR="\\\"${PREFIX}/lib/X11/glclock/\\\""
26
		${CFLAGS}
29
LIBS=		-lglut -lGLU -lGL -lXext -lXmu -lX11 -lm -lXi ${PTHREAD_LIBS}
30
31
SCRIPTS=	benchclock crystalclock f_crystalclock f_glclock	\
32
	  f_marbleclock f_metalclock f_mwclock f_woodclock marbleclock	\
33
	  metalclock mwclock woodclock
34
27
35
TEXTURES=	marble.ppm sky.ppm wood.ppm
28
PROGRAMS=	glclock glclockmark
29
30
SCRIPTS=	chromeclock chromeclock_L crystalclock crystalclock_L \
31
		glclock_L glclockmark_ALL marbleclock marbleclock_L \
32
		metalclock metalclock_L mwclock mwclock_L woodclock \
33
		woodclock_L
34
35
TEXTURES=	light.ppm marble.ppm sky.ppm wood.ppm detail.pgm \
36
		detail2.pgm detail_b.pgm filter.pgm
37
38
PLIST_FILES=
39
.for f in ${PROGRAMS}
40
PLIST_FILES+=	bin/${f}
41
.endfor
42
.for f in ${SCRIPTS}
43
PLIST_FILES+=	bin/${f}
44
.endfor
45
.for f in ${TEXTURES}
46
PLIST_FILES+=	lib/X11/glclock/${f}
47
.endfor
48
49
PLIST_DIRS=	lib/X11/glclock
36
50
37
.include <bsd.port.pre.mk>
51
.include <bsd.port.pre.mk>
38
52
39
.if defined(WITH_OPTIMIZED_CFLAGS)
53
.if defined(WITH_OPTIMIZED_CFLAGS)
40
CXXFLAGS+=	-O3 -fexpensive-optimizations \
54
CFLAGS+=	-O3 -fexpensive-optimizations \
41
		-fomit-frame-pointer -fforce-mem -fforce-addr
55
		-fomit-frame-pointer -fforce-mem -fforce-addr
42
.if (${ARCH} != "alpha")
56
.if (${ARCH} != "alpha")
43
CXXFLAGS+=	-ffast-math
57
CFLAGS+=	-ffast-math
44
.endif
58
.endif
45
.endif
59
.endif
46
60
47
do-install:
61
do-install:
48
	${INSTALL_PROGRAM} ${WRKSRC}/glclock ${PREFIX}/bin
62
.for f in ${PROGRAMS}
63
	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
64
.endfor
49
.for f in ${SCRIPTS}
65
.for f in ${SCRIPTS}
50
	${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/bin
66
	${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/bin
51
.endfor
67
.endfor
(-)/home/trasz/glclock/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (glclock-5.0.tar.gz) = 191938e1fb9fc1105eaf29e8e7dd954f
1
MD5 (glclock-6.0b6.0.tar.gz) = 3229946a32f35c083c5ca0f0983c580f
2
SHA256 (glclock-5.0.tar.gz) = 2fef933930795b43cb10581af3fae76300c3b4b676b3d7d375ca6b586bc187eb
2
SHA256 (glclock-6.0b6.0.tar.gz) = 7636e53db08c2c955742590abb62d0b61eee791a801e528892b9269fe05a1fc7
3
SIZE (glclock-5.0.tar.gz) = 530737
3
SIZE (glclock-6.0b6.0.tar.gz) = 811803
(-)/home/trasz/glclock/files/patch-GLObject.H (+11 lines)
Line 0 Link Here
1
--- GLObject.H.orig	Sun Oct  1 20:06:31 2006
2
+++ GLObject.H	Sun Oct  1 20:06:40 2006
3
@@ -11,7 +11,7 @@
4
 #pragma warning(disable : 4051)     // ALPHA
5
 #endif
6
 
7
-#include <iostream.h>
8
+#include <iostream>
9
 
10
 #include "GLextensions.H"
11
 #include "PnmIO.H"
(-)/home/trasz/glclock/files/patch-GLextensions.H (+53 lines)
Line 0 Link Here
1
--- GLextensions.H.orig	Thu Jun 22 16:36:07 2000
2
+++ GLextensions.H	Sun Oct  1 20:52:59 2006
3
@@ -12,6 +12,7 @@
4
 #pragma warning(disable : 4051)     // ALPHA
5
 #endif
6
 
7
+#define GL_GLEXT_PROTOTYPES
8
 
9
 #include <GL/gl.h>
10
 #include <GL/glut.h>
11
@@ -202,7 +203,7 @@
12
 
13
 
14
 // multitexture ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥Ð¡¼¥¸¥ç¥ó¡Ê̤Äê¡Ë
15
-#ifdef  GL_VERSION_1_
16
+#if 1
17
 #define GL_VERSION_multitexture
18
 #endif
19
 #define GL_VERSION_multitexture_F		9999.9f
20
@@ -232,13 +233,13 @@
21
 #define GL_VERSION_polygon_offset_F		1.1f
22
 
23
 // texture_cube_map ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥Ð¡¼¥¸¥ç¥ó¡Ê̤Äê¡Ë
24
-#ifdef  GL_VERSION_1_
25
+#if 1
26
 #define GL_VERSION_texture_cube_map
27
 #endif
28
 #define GL_VERSION_texture_cube_map_F	9999.9f
29
 
30
 // texture_compression ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥Ð¡¼¥¸¥ç¥ó¡Ê̤Äê¡Ë
31
-#ifdef  GL_VERSION_1_
32
+#if 1
33
 #define GL_VERSION_texture_compression
34
 #endif
35
 #define GL_VERSION_texture_compression_F	9999.9f
36
@@ -592,6 +593,8 @@
37
 
38
 #endif	// #ifndef GL_ARB_texture_cube_map
39
 
40
+#define GL_EXT_texture_cube_map
41
+
42
 // EXT_texture_cube_map
43
 #ifndef GL_EXT_texture_cube_map
44
 #define GL_EXT_texture_cube_map
45
@@ -687,6 +690,8 @@
46
 #define GL_COMPRESSED_RGBA_S3TC_DXT3		((GLenum)0x83F2)
47
 #define GL_COMPRESSED_RGBA_S3TC_DXT5		((GLenum)0x83F3)
48
 #endif	// #ifndef GL_VERSION_texture_compression_s3tc
49
+
50
+#define GL_EXT_texture_compression_s3tc
51
 
52
 #ifndef GL_EXT_texture_compression_s3tc
53
 #define GL_EXT_texture_compression_s3tc
(-)/home/trasz/glclock/files/patch-MString.H (+30 lines)
Line 0 Link Here
1
--- MString.H.orig	Thu Jun 22 16:58:26 2000
2
+++ MString.H	Sun Oct  1 22:32:31 2006
3
@@ -66,7 +66,7 @@
4
 #ifndef ___STRING_H___
5
 #define ___STRING_H___
6
 
7
-#include <iostream.h>
8
+#include <iostream>
9
 #include <stdio.h>
10
 #include <stdlib.h>
11
 #include <string.h>
12
@@ -75,6 +75,7 @@
13
 
14
 #include "Define.H"
15
 
16
+using namespace std;
17
 
18
 //#define STRING_DEBUG
19
 
20
@@ -407,6 +408,10 @@
21
     friend String& Cut(String      s) ;
22
     friend String& Cut(const char *s) ;
23
 } ;
24
+
25
+String Mid(String, int, int) ;
26
+String Left(const String&, int) ;
27
+String Right(const String&, int) ;
28
 
29
 // À°¿ô¤«¤é String ¤Ø
30
 String IntToString(int i) ;
(-)/home/trasz/glclock/files/patch-ab (-38 lines)
Lines 1-38 Link Here
1
--- ORIG/glclock.cpp	Wed Aug  4 16:28:02 1999
2
+++ glclock.cpp	Mon Sep 20 20:06:09 1999
3
@@ -5716,7 +5716,10 @@
4
 	o_tick = n_tick ;
5
 
6
 	if ((n_tick = glutGet((GLenum)GLUT_ELAPSED_TIME)))
7
-		fps = f_cnt / ((float)(n_tick - o_tick) / 1000) ;
8
+		if ( n_tick == o_tick )
9
+			fps = 0.0f;
10
+		else
11
+			fps = f_cnt / ((float)(n_tick - o_tick) / 1000) ;
12
 	else
13
 		fps = 0.0f ;
14
 
15
@@ -5768,7 +5771,8 @@
16
 	{
17
 		if (fps_count)
18
 		{
19
-			spin_x = -360.0f / fps ;
20
+			if (fps) spin_x = -360.0f / fps ;
21
+			else     spin_x = -30.0f;
22
 			if (spin_x < -30.0f) spin_x = -30.0f ;
23
 		}
24
 
25
@@ -7098,6 +7102,13 @@
26
 	if (!env_file.Search(".ppm"))   env_file   += ".ppm" ;
27
 	if (!solid_file.Search(".ppm")) solid_file += ".ppm" ;
28
 	if (sld2_file != String("") && !sld2_file.Search(".ppm")) sld2_file += ".ppm" ;
29
+
30
+	if ( env_file.Length() && env_file.Character(0) != '/' ) \
31
+		env_file = String( GLCLOCK_DIR ) + env_file;
32
+	if ( solid_file.Length() && solid_file.Character(0) != '/' ) \
33
+		solid_file = String( GLCLOCK_DIR ) + solid_file;
34
+	if ( sld2_file.Length() && sld2_file.Character(0) != '/' ) \
35
+		sld2_file = String( GLCLOCK_DIR ) + sld2_file;
36
 
37
 
38
 	// ´Ä¶­¥Þ¥Ã¥Ô¥ó¥°¤ò»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢¥á¥Ã¥·¥å¤ÎºÂɸÃͤò¿¾¯Êѹ¹
(-)/home/trasz/glclock/files/patch-glclock.H (+11 lines)
Line 0 Link Here
1
--- glclock.H.orig	Sun Oct  1 21:29:41 2006
2
+++ glclock.H	Sun Oct  1 21:29:57 2006
3
@@ -279,7 +279,7 @@
4
 #define DEFAULT_GAME_MODE_STRING	""
5
 
6
 // ¥Ç¥Õ¥©¥ë¥È¥¤¥á¡¼¥¸¥Ñ¥¹
7
-#define IMAGE_PATH			""
8
+//#define IMAGE_PATH			""
9
 
10
 // ¥¹¥Ô¥ó´Ø·¸½é´üÃÍ
11
 #define SPIN_X		-18.0f
(-)/home/trasz/glclock/files/patch-makefile (+15 lines)
Line 0 Link Here
1
--- makefile.orig	Sun Jun 18 16:37:40 2000
2
+++ makefile	Sun Oct  1 20:39:39 2006
3
@@ -11,9 +11,9 @@
4
     TARGET_MARK = glclockmark
5
 
6
 
7
-       COMPILER = g++ -c
8
-         LINKER = g++
9
-            OPT = -O2
10
+       COMPILER = $(CXX) -c
11
+         LINKER = $(CXX)
12
+            OPT = $(CFLAGS)
13
 
14
    INCLUDE_PATH = -I/usr/X11R6/include
15
        LIB_PATH = -L/usr/X11R6/lib
(-)/home/trasz/glclock/pkg-plist (-17 lines)
Lines 1-17 Link Here
1
bin/benchclock
2
bin/crystalclock
3
bin/f_crystalclock
4
bin/f_glclock
5
bin/f_marbleclock
6
bin/f_metalclock
7
bin/f_mwclock
8
bin/f_woodclock
9
bin/glclock
10
bin/marbleclock
11
bin/metalclock
12
bin/mwclock
13
bin/woodclock
14
lib/X11/glclock/marble.ppm
15
lib/X11/glclock/sky.ppm
16
lib/X11/glclock/wood.ppm
17
@dirrm lib/X11/glclock

Return to bug 103880