From amdmi3@amdmi3.ru  Thu Mar 20 02:24:39 2008
Return-Path: <amdmi3@amdmi3.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2336F106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 Mar 2008 02:24:39 +0000 (UTC)
	(envelope-from amdmi3@amdmi3.ru)
Received: from cp65.agava.net (cp65.agava.net [89.108.66.215])
	by mx1.freebsd.org (Postfix) with ESMTP id A11B28FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 Mar 2008 02:24:38 +0000 (UTC)
	(envelope-from amdmi3@amdmi3.ru)
Received: from [213.148.20.85] (helo=hive.panopticon)
	by cp65.agava.net with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.63 (FreeBSD))
	(envelope-from <amdmi3@amdmi3.ru>)
	id 1JcAWR-000OS7-3g
	for FreeBSD-gnats-submit@freebsd.org; Thu, 20 Mar 2008 05:28:51 +0300
Received: from hades.panopticon (hades.panopticon [192.168.0.32])
	by hive.panopticon (Postfix) with ESMTP id BC3799CD4
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 Mar 2008 05:24:11 +0300 (MSK)
Received: by hades.panopticon (Postfix, from userid 1000)
	id F126B1702D; Thu, 20 Mar 2008 05:24:51 +0300 (MSK)
Message-Id: <20080320022451.F126B1702D@hades.panopticon>
Date: Thu, 20 Mar 2008 05:24:51 +0300 (MSK)
From: Dmitry Marakasov <amdmi3@amdmi3.ru>
Reply-To: Dmitry Marakasov <amdmi3@amdmi3.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] graphics/glfw: cleanup USE_X_PREFIX, respect PTHREAD_LIBS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         121891
>Category:       ports
>Synopsis:       [PATCH] graphics/glfw: cleanup USE_X_PREFIX, respect PTHREAD_LIBS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 20 02:30:01 UTC 2008
>Closed-Date:    Thu Mar 20 20:08:44 UTC 2008
>Last-Modified:  Thu Mar 20 20:10:09 UTC 2008
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 7.0-RELEASE FreeBSD 7.0-RELEASE #5: Fri Mar 14 14:26:43 MSK 2008 root@hades.panopticon:/usr/obj/usr/src/sys/HADES i386


>Description:
* Change USE_X_PREFIX to USE_XORG
* While here, fix patch so pthread libs don't get erroneously detected as -lpthread, but as ${PTHREAD_LIBS}
* While here, use SF macro
>How-To-Repeat:
>Fix:

--- glfw.patch begins here ---
diff -ruN glfw.orig/Makefile glfw/Makefile
--- glfw.orig/Makefile	2008-03-20 05:12:06.000000000 +0300
+++ glfw/Makefile	2008-03-20 05:21:44.000000000 +0300
@@ -7,16 +7,15 @@
 
 PORTNAME=	glfw
 PORTVERSION=	2.5.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR=	${PORTNAME}
+MASTER_SITES=	SF
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	A portable framework for OpenGL development
 
 USE_BZIP2=	yes
-USE_X_PREFIX=	yes
+USE_XORG=	x11 xxf86vm xext
 USE_GL=		yes
 ALL_TARGET=	x11
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
diff -ruN glfw.orig/files/patch-compile.sh glfw/files/patch-compile.sh
--- glfw.orig/files/patch-compile.sh	2008-03-20 05:12:06.000000000 +0300
+++ glfw/files/patch-compile.sh	2008-03-20 05:20:42.000000000 +0300
@@ -1,5 +1,5 @@
---- compile.sh.orig	Sun Feb 15 01:19:38 2004
-+++ compile.sh	Thu Apr  1 11:12:31 2004
+--- compile.sh.orig	2004-07-25 00:36:46.000000000 +0400
++++ compile.sh	2008-03-20 05:20:39.000000000 +0300
 @@ -72,10 +72,10 @@
  ##########################################################################
  if [ "x$force_gcc" = xyes ]; then
@@ -29,7 +29,7 @@
  # X11R5 in /usr/X11R5/lib ?
  elif [ -r "/usr/X11R5/lib" ]; then
   LFLAGS="$LFLAGS -L/usr/X11R5/lib"
-@@ -140,9 +140,9 @@
+@@ -145,9 +145,9 @@
  rm -f conftest*
  
  echo " Using GNU C: ""$use_gcc" 1>&6
@@ -42,7 +42,7 @@
  echo " " 1>&6
  
  
-@@ -164,6 +164,8 @@
+@@ -169,6 +169,8 @@
  int main() {; return 0;}
  EOF
  
@@ -51,7 +51,18 @@
  if { (eval echo $config_script: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then
    rm -rf conftest*
    has_xf86vm=yes
-@@ -206,7 +208,7 @@
+@@ -200,18 +202,10 @@
+ 
+ # Try -lpthread (most systems)
+ LIBS_OLD="$LIBS"
+-LIBS="$LIBS -lpthread"
+-if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then
+-  rm -rf conftest*
+-  has_pthread=yes
+-else
+-  echo "$config_script: failed program was:" >&5
+-  cat conftest.c >&5
+-fi
  
  # Try -pthread (e.g. FreeBSD)
  if [ "x$has_pthread" = xno ]; then
@@ -60,7 +71,7 @@
    if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then
      rm -rf conftest*
      has_pthread=yes
-@@ -364,24 +366,24 @@
+@@ -369,24 +363,24 @@
  echo "$config_script: Checking for sysconf support" >&5
  has_sysconf=no
  
@@ -96,7 +107,7 @@
  
  echo " sysconf support: ""$has_sysconf" 1>&6
  if [ "x$has_sysconf" = xyes ]; then
-@@ -424,9 +426,9 @@
+@@ -429,9 +423,9 @@
  # Post fixups
  ##########################################################################
  if [ "x$use_gcc" = xyes ]; then
--- glfw.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Mar 20 02:30:10 UTC 2008 
Responsible-Changed-Why:  
miwi@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121891 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Mar 20 20:08:43 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121891 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/121891: commit references a PR
Date: Thu, 20 Mar 2008 20:08:43 +0000 (UTC)

 miwi        2008-03-20 20:08:37 UTC
 
   FreeBSD ports repository
 
   Modified files:
     graphics/glfw        Makefile 
     graphics/glfw/files  patch-compile.sh 
   Log:
   - Use SF macro
   - Get rid of USE_X_PREFIX.
   
   PR:             121891
   Submitted by:   Dmitry Marakasov <amdmi3@amdmi3.ru>
   
   Revision  Changes    Path
   1.9       +3 -4      ports/graphics/glfw/Makefile
   1.4       +18 -7     ports/graphics/glfw/files/patch-compile.sh
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
