From jan@rochel.dyndns.org  Thu Feb  6 07:01:07 2003
Return-Path: <jan@rochel.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 4BF2C37B401; Thu,  6 Feb 2003 07:01:07 -0800 (PST)
Received: from rochel.dyndns.org (pD95303B4.dip.t-dialin.net [217.83.3.180])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 5278D43FA3; Thu,  6 Feb 2003 07:01:06 -0800 (PST)
	(envelope-from jan@rochel.dyndns.org)
Received: from jan by rochel.dyndns.org with local (Exim 4.12)
	id 18gnWS-0000mD-00; Thu, 06 Feb 2003 16:01:04 +0100
Message-Id: <E18gnWS-0000mD-00@rochel.dyndns.org>
Date: Thu, 06 Feb 2003 16:01:04 +0100
From: Jan Rochel <jan.rochel@epost.de>
Sender: Jan Rochel <jan@rochel.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Braun <obraun@FreeBSD.org>
Subject: Update port: graphics/hs-HOpenGL. Fix for some Makefile problems
X-Send-Pr-Version: 3.113

>Number:         48008
>Category:       ports
>Synopsis:       Update port: graphics/hs-HOpenGL. Fix for some Makefile problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 06 07:10:00 PST 2003
>Closed-Date:    Fri Feb 07 00:36:40 PST 2003
>Last-Modified:  Fri Feb 07 00:36:40 PST 2003
>Originator:     Jan Rochel
>Release:        FreeBSD 5.0-RELEASE i386
>Organization:
>Environment:
>Description:
I was told not to use "!=" in the Makefile, so I replaced it.
Thus it's no longer possible to let the system find out the GHC
version and therefore its directory automatically.
The solution consists of a statically defined ghc version (the newest
one) with the possibility to redefine it during configuration by
providing the correct GHC_VERSION variable.
>How-To-Repeat:
>Fix:
--- hs-HOpenGL.diff begins here ---
diff -ruN hs-HOpenGL/Makefile hs-HOpenGL.new/Makefile
--- hs-HOpenGL/Makefile	Thu Feb  6 15:41:08 2003
+++ hs-HOpenGL.new/Makefile	Thu Feb  6 15:37:02 2003
@@ -22,18 +22,22 @@
 USE_GMAKE=	yes
 USE_MESA=	yes
 
-LIB_DIR_ABS!=	(ghc --print-libdir || true) 2>/dev/null
-IMPORT_DIR_ABS=	${LIB_DIR_ABS}/imports/HOpenGL
-LIB_DIR_REL=	${LIB_DIR_ABS:S/^${PREFIX}\///}
+GHC_VERSION=	5.04.2
+LIB_DIR_REL=	lib/ghc-${GHC_VERSION}
+LIB_DIR=	${PREFIX}/${LIB_DIR_REL}
+IMPORT_DIR=	${LIB_DIR}/imports/HOpenGL
 IMPORT_DIR_REL=	${LIB_DIR_REL}/imports/HOpenGL
 
 pre-configure:
-	@if [ "${LIB_DIR_ABS}" != "${PREFIX}/${LIB_DIR_REL}" ]; then \
-		${ECHO_MSG} "ERROR: OpenGL and GHC must be installed in the same PREFIX!"; \
-		exit 1; \
+	@if [ ! -d ${LIB_DIR} ]; then \
+		${ECHO_MSG}; ${ECHO_MSG} "ERROR:"; \
+		${ECHO_MSG} "The GHC directory could not be found (${LIB_DIR})."; \
+		${ECHO_MSG} 'Please provide a $$PREFIX and a $$GHC_VERSION, so that'; \
+		${ECHO_MSG} '$$PREFIX/lib/ghc-$$GHC_VERSION points to the right directory!'; \
+		${ECHO_MSG}; exit 1; \
 	fi
 
-CONFIGURE_ARGS+=--with-library-dir=${LIB_DIR_ABS} --with-import-dir=${IMPORT_DIR_ABS} --enable-Mesa
+CONFIGURE_ARGS+=--with-library-dir=${LIB_DIR} --with-import-dir=${IMPORT_DIR} --enable-Mesa
 PLIST_SUB=	LIB_DIR=${LIB_DIR_REL} IMPORT_DIR=${IMPORT_DIR_REL}
 
 ALL_TARGET=	depend all
@@ -46,7 +50,7 @@
 HSDIR=		${EXAMPLESDIR}/redbook_HS
 HSSRC=		${EXAMPLESSRC}/redbook_HS
 GFXSRC=		${WRKSRC}/GLUT/Graphics
-GFXDIR=		${IMPORT_DIR_ABS}/Graphics
+GFXDIR=		${IMPORT_DIR}/Graphics
 
 CEXAMPLES=	aaindex aapoly aargb accanti accpersp alpha alpha3D anti bezcurve bezmesh bezsurf blendeqn checker clip colormat colormatrix cube depthcue dof double drawf feedback fog fogindex font hello image light lines list material mipmap model movelight multitex nurbs pickdepth picksquare plane planet polyoff polys robot sccolorlight scene scenebamb sceneflat select smooth stencil stroke surface surfpoints teaambient teapots tess tesswind texbind texgen texprox texsub texture3d texturesurf torus trim unproject varray wrap
 HSEXAMPLES=	AAIndex AAPoly AARGB AccAnti AccPersp Alpha Alpha3D Anti BezCurve BezMesh BezSurf BlendEqn Checker Clip ColorMat Cube DList DOF DepthCue Double DrawF Feedback Fog FogIndex Font Hello Image Light Lines Material Mipmap Model MoveLight PickDepth PickSquare Plane Planet PolyOff Polys Quadric Robot ScColorLight Scene SceneBAmb SceneFlat Select Smooth Stencil Stroke TeaAmbient Teapots Tess TexBind TexGen TexProx TexSub TextureSurf Torus Unproject Varray Wrap
--- hs-HOpenGL.diff ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: obraun 
State-Changed-When: Fri Feb 7 00:34:46 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48008 
>Unformatted:
