[73214] trunk/dports/math/aamath

snc at macports.org snc at macports.org
Sat Nov 6 18:06:00 PDT 2010


Revision: 73214
          http://trac.macports.org/changeset/73214
Author:   snc at macports.org
Date:     2010-11-06 18:05:57 -0700 (Sat, 06 Nov 2010)
Log Message:
-----------
aamath:
 * try to handle missing ncurses dependency
   (it now links against macports--in addition
   to the system ncurses)
 * more comprehensive patch/reinplace

Modified Paths:
--------------
    trunk/dports/math/aamath/Portfile
    trunk/dports/math/aamath/files/patch-Makefile.diff

Modified: trunk/dports/math/aamath/Portfile
===================================================================
--- trunk/dports/math/aamath/Portfile	2010-11-07 01:01:12 UTC (rev 73213)
+++ trunk/dports/math/aamath/Portfile	2010-11-07 01:05:57 UTC (rev 73214)
@@ -5,7 +5,7 @@
 
 name                aamath
 version             0.3
-revision            1
+revision            2
 categories          math textproc
 platforms           darwin
 license             GPLv2
@@ -20,16 +20,26 @@
 master_sites        ${homepage}
 checksums           md5 f0e835bd06069b1bdaddd9e9c3447c12
 
-depends_lib         port:readline
+depends_build       port:byacc port:flex
+depends_lib         port:readline port:ncurses
 
+worksrcdir          aamath
+
+configure.cppflags-append -I/opt/local/include/ncurses
+configure.ldflags-append -lreadline -ltermcap -lncurses
+
 patchfiles          patch-Makefile.diff
+post-patch {
+    reinplace s|@@CXX@@|${configure.cxx}|g ${worksrcpath}/Makefile
+    reinplace s|@@LDFLAGS@@|${configure.ldflags}|g ${worksrcpath}/Makefile
+    reinplace "s|@@CFLAGS@@|${configure.cflags} ${configure.cppflags}|g" ${worksrcpath}/Makefile
+}
 
-worksrcdir          aamath
-
 use_configure       no
 
+build.args  VERBOSE=1
 # Override these values in the Makefile.
-build.args          CXX=${configure.cxx} \
+build.args          VERBOSE=1 CXX=${configure.cxx} \
                     LD=${configure.cxx}
 # The Makefile appends to these values.
 build.env           CFLAGS="${configure.cppflags} ${configure.cxxflags}" \

Modified: trunk/dports/math/aamath/files/patch-Makefile.diff
===================================================================
--- trunk/dports/math/aamath/files/patch-Makefile.diff	2010-11-07 01:01:12 UTC (rev 73213)
+++ trunk/dports/math/aamath/files/patch-Makefile.diff	2010-11-07 01:05:57 UTC (rev 73214)
@@ -1,18 +1,33 @@
---- Makefile.orig	2005-06-22 15:12:18.000000000 -0500
-+++ Makefile	2009-11-15 01:24:01.000000000 -0600
-@@ -3,8 +3,8 @@
+--- Makefile.good	2005-03-01 23:33:50.000000000 -0500
++++ Makefile	2010-11-06 20:58:52.000000000 -0400
+@@ -1,23 +1,25 @@
+-CXX		= g++
+-LD		= g++
++CXX		= @@CXX@@
++LD		= @@CXX@@
  CXXFILES	= parser.cc lexer.cc expr.cc canvas.cc aamath.cc
  OBJS		= $(CXXFILES:.cc=.o) 
  TARGET		= aamath
 -CFLAGS		= -Wall -O2 -g -DUSE_READLINE
 -LFLAGS		= -g
-+CFLAGS		+= -Wall -O2 -g -DUSE_READLINE
-+LFLAGS		+= -g
- LIBS		= -lreadline -ltermcap
+-LIBS		= -lreadline -ltermcap
++CFLAGS		= @@CFLAGS@@
++LIBS		= @@LDFLAGS@@
  
  $(TARGET): $(OBJS)
-@@ -21,3 +21,6 @@
+ 	$(LD) $(LFLAGS) $(OBJS) -o $@ $(LIBS)
  
+ parser.cc parser.h: parser.y
+-	yacc -d parser.y && mv y.tab.c parser.cc && mv y.tab.h parser.h
++	byacc -d parser.y && mv y.tab.c parser.cc && mv y.tab.h parser.h
+ 
+ lexer.cc: lexer.l parser.h
+-	lex lexer.l && mv lex.yy.c lexer.cc
++	flex lexer.l && mv lex.yy.c lexer.cc
+ 
+ .cc.o:
+ 	$(CXX) $(CFLAGS) -c $<
+ 
  clean:
  	rm -f *.o lexer.cc parser.h parser.cc $(TARGET)
 +
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101106/37c9831d/attachment-0001.html>


More information about the macports-changes mailing list