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

(-)x11-clocks/glclock/Makefile (-11 / +24 lines)
Lines 16-26 Link Here
16
MAINTAINER=	ports@FreeBSD.org
16
MAINTAINER=	ports@FreeBSD.org
17
COMMENT=	OpenGL Spinning pocketwatch demo and benchmark utility
17
COMMENT=	OpenGL Spinning pocketwatch demo and benchmark utility
18
18
19
LIB_DEPENDS=	glut.3:${PORTSDIR}/graphics/libglut
20
19
USE_X_PREFIX=	yes
21
USE_X_PREFIX=	yes
20
USE_MESA=	yes
22
USE_GL=		yes
21
MAKEFILE=	makefile
23
MAKEFILE=	makefile
22
ALL_TARGET=	glclock
24
MAKE_ARGS=	CC="${CXX}" LN="${CXX}" OPT="${OPT}" \
23
MAKE_ENV=	PTHREAD_LIBS="${PTHREAD_LIBS}"
25
		INCLUDE_PATH="-I${X11BASE}/include" \
26
		LIB_PATH="-L${X11BASE}/lib" LIBS="${LIBS}"
27
ALL_TARGET=	${PORTNAME}
28
29
OPT=		${CXXFLAGS} ${PTHREAD_CFLAGS} \
30
		-DGLCLOCK_DIR="\\\"${PREFIX}/lib/X11/glclock/\\\""
31
LIBS=		-lglut -lGLU -lGL -lXext -lXmu -lX11 -lm -lXi ${PTHREAD_LIBS}
24
32
25
SCRIPTS = benchclock crystalclock f_crystalclock f_glclock		\
33
SCRIPTS = benchclock crystalclock f_crystalclock f_glclock		\
26
	  f_marbleclock f_metalclock f_mwclock f_woodclock marbleclock	\
34
	  f_marbleclock f_metalclock f_mwclock f_woodclock marbleclock	\
Lines 28-41 Link Here
28
36
29
TEXTURES = marble.ppm sky.ppm wood.ppm
37
TEXTURES = marble.ppm sky.ppm wood.ppm
30
38
39
.if defined(WITH_OPTIMIZED_CFLAGS)
40
CXXFLAGS+=	-O3 -fexpensive-optimizations -ffast-math \
41
		-fomit-frame-pointer -fforce-mem -fforce-addr
42
.endif
43
31
do-install:
44
do-install:
32
	@${INSTALL_PROGRAM} ${WRKSRC}/glclock ${PREFIX}/bin
45
	${INSTALL_PROGRAM} ${WRKSRC}/glclock ${PREFIX}/bin
33
	@for f in ${SCRIPTS}; do \
46
.for f in ${SCRIPTS}
34
	   ${INSTALL_SCRIPT} ${WRKSRC}/$$f ${PREFIX}/bin; \
47
	${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/bin
35
	 done
48
.endfor
36
	@mkdir -p ${PREFIX}/lib/X11/glclock
49
	@${MKDIR} ${PREFIX}/lib/X11/glclock
37
	@for f in ${TEXTURES}; do \
50
.for f in ${TEXTURES}
38
	   ${INSTALL_DATA} ${WRKSRC}/$$f ${PREFIX}/lib/X11/glclock; \
51
	${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/lib/X11/glclock
39
	 done
52
.endfor
40
53
41
.include <bsd.port.mk>
54
.include <bsd.port.mk>
(-)x11-clocks/glclock/files/patch-aa (-38 lines)
Lines 1-38 Link Here
1
--- makefile.orig	Sat Jun 12 08:37:05 1999
2
+++ makefile	Tue Dec 14 15:34:07 1999
3
@@ -3,22 +3,27 @@
4
 #         June 1998 by Masaki Kawase (g93088@isc.chubu.ac.jp)
5
 #
6
 
7
-             CC = g++
8
-             LN = g++
9
-            OPT = -O2
10
+             CC = ${CXX}
11
+             LN = ${CC} 
12
+            OPT = ${CFLAGS} -fexpensive-optimizations -ffast-math \
13
+                  -fomit-frame-pointer -fforce-mem -fforce-addr
14
 
15
-   INCLUDE_PATH = -I/usr/local/X11R6/include
16
-       LIB_PATH = -L/usr/local/X11R6/lib
17
+    GLCLOCK_DIR = ${PREFIX}/lib/X11/glclock/
18
 
19
-           LIBS = -lglut -lGLU -lGL -lXext -lXmu -lX11 -lm
20
+   INCLUDE_PATH = -I${X11BASE}/include
21
+       LIB_PATH = -L${X11BASE}/lib -Wl,-rpath,/usr/X11R6/lib
22
+
23
+# Link with -lGL on FreeBSD so we use hardware-accelerated GL, when installed.
24
+# (see http://people.FreeBSD.org/~3d)
25
+           LIBS = -lglut -lGLU -lGL -lXext -lXmu -lX11 -lm -lXi ${PTHREAD_LIBS}
26
 
27
 #                 for Mesa
28
 #          LIBS = -lglut -lMesatk -lMesaGLU -lMesaGL -lXi -lXext -lXmu -lX11 -lm
29
 
30
-         CFLAGS = -c
31
+         CFLAGS += -w -DGLCLOCK_DIR=\"${GLCLOCK_DIR}\" ${PTHREAD_CFLAGS}
32
          LFLAGS =
33
 
34
-COMPILE = $(CC) $(CFLAGS) $(OPT) $(INCLUDE_PATH)
35
+COMPILE = $(CC) $(CFLAGS) $(OPT) -c $(INCLUDE_PATH)
36
 LINK = $(LN) $(LFLAGS) $(OPT) $(LIB_PATH)
37
 
38
 MAIN = glclock

Return to bug 62644