[39092] trunk/dports/x11/glui

mcalhoun at macports.org mcalhoun at macports.org
Thu Aug 7 22:35:23 PDT 2008


Revision: 39092
          http://trac.macosforge.org/projects/macports/changeset/39092
Author:   mcalhoun at macports.org
Date:     2008-08-07 22:35:23 -0700 (Thu, 07 Aug 2008)
Log Message:
-----------
glui does not have a configure script. Try to better approximate one.

Modified Paths:
--------------
    trunk/dports/x11/glui/Portfile
    trunk/dports/x11/glui/files/patch-makefile.diff

Modified: trunk/dports/x11/glui/Portfile
===================================================================
--- trunk/dports/x11/glui/Portfile	2008-08-08 05:31:09 UTC (rev 39091)
+++ trunk/dports/x11/glui/Portfile	2008-08-08 05:35:23 UTC (rev 39092)
@@ -1,10 +1,11 @@
 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
-# $Id:$
+# $Id$
 
 PortSystem 1.0
 
 name            glui
 version			2.36
+revision		1
 categories      x11
 maintainers     mcalhoun
 description     A GLUT-based C++ user interface library.
@@ -15,7 +16,6 @@
 master_sites    sourceforge:glui
 distname        ${name}-${version}
 extract.suffix  .tgz
-use_configure   no
 worksrcdir      ${name}-${version}/src
 platforms       darwin
 checksums \
@@ -25,6 +25,17 @@
 
 patchfiles-append patch-makefile.diff patch-glui.diff patch-glui_filebrowser.diff
 
+configure.ldflags -framework GLUT -framework OpenGL
+
+use_configure    no
+
+post-configure {
+    reinplace "s|__CONFIGURE_CXX__|${configure.cxx}|" ${worksrcpath}/makefile
+    reinplace "s|__CONFIGURE_CXXFLAGS__|${configure.cxxflags}|" ${worksrcpath}/makefile
+    reinplace "s|__CONFIGURE_LDFLAGS__|${configure.ldflags}|" ${worksrcpath}/makefile
+    reinplace "s|__CONFIGURE_CPPFLAGS__|${configure.cppflags}|" ${worksrcpath}/makefile
+}
+
 destroot {
     xinstall -m 644 ${worksrcpath}/include/GL/glui.h ${destroot}${prefix}/include
     xinstall -m 644 ${worksrcpath}/lib/libglui.a ${destroot}${prefix}/lib

Modified: trunk/dports/x11/glui/files/patch-makefile.diff
===================================================================
--- trunk/dports/x11/glui/files/patch-makefile.diff	2008-08-08 05:31:09 UTC (rev 39091)
+++ trunk/dports/x11/glui/files/patch-makefile.diff	2008-08-08 05:35:23 UTC (rev 39092)
@@ -1,38 +1,44 @@
---- makefile.orig	2006-07-06 02:42:56.000000000 -0600
-+++ makefile	2007-10-31 12:51:51.000000000 -0600
-@@ -5,9 +5,10 @@
+--- makefile.orig	2007-08-20 21:59:54.000000000 -0600
++++ makefile	2008-08-05 17:54:27.000000000 -0600
+@@ -5,24 +5,18 @@
  #CC=gcc
  
  # Compiler options
 -OPTS=-g
 -OPTS=-O0
 -#OPTS=-O2
-+#OPTS=-g
-+#OPTS=-O0
-+OPTS=-O2
+-
+-UNAME = $(shell uname)
+-
+-ifeq ($(UNAME), Linux)
+-CXX       = g++
+-CPPFLAGS += $(OPTS) -Wall -pedantic
+-endif
++OPTS=__CONFIGURE_CXXFLAGS__
++
++CXX       = __CONFIGURE_CXX__
 +CPPFLAGS += $(OPTS)
  
- UNAME = $(shell uname)
+ #######################################
  
-@@ -21,8 +22,8 @@
  CPPFLAGS += -I./ -I./include
  
  LIBGLUI = -L./lib -lglui
 -LIBGL   = -lGLU -lGL
 -LIBS    = -lXmu -lXext -lX11 -lXi -lm
-+LIBGL   = -framework OpenGL
-+LIBS    = 
++LIBGL   = 
++LIBS    = __CONFIGURE_LDFLAGS__
  
  # One of the following options only...
  
-@@ -35,8 +36,8 @@
+@@ -35,8 +29,8 @@
  # CPPFLAGS += -I/usr/X11R6/include -DGLUI_FREEGLUT
  
  # (3) GLUT
 -LIBGLUT   = -L/usr/X11R6/lib -lglut
 -CPPFLAGS += -I/usr/X11R6/include
-+LIBGLUT   = -framework GLUT
-+CPPFLAGS += 
++LIBGLUT   = 
++CPPFLAGS += __CONFIGURE_CPPFLAGS__
  
  #######################################
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080807/804dfcb4/attachment.html 


More information about the macports-changes mailing list