[62768] trunk/dports/graphics/gdchart

jameskyle at macports.org jameskyle at macports.org
Sat Jan 16 12:31:07 PST 2010


Revision: 62768
          http://trac.macports.org/changeset/62768
Author:   jameskyle at macports.org
Date:     2010-01-16 12:31:03 -0800 (Sat, 16 Jan 2010)
Log Message:
-----------
Applied patch for universal support and installation of README.txt. Ticket #23285

Modified Paths:
--------------
    trunk/dports/graphics/gdchart/Portfile

Removed Paths:
-------------
    trunk/dports/graphics/gdchart/files/patch-Makefile.diff

Modified: trunk/dports/graphics/gdchart/Portfile
===================================================================
--- trunk/dports/graphics/gdchart/Portfile	2010-01-16 20:19:08 UTC (rev 62767)
+++ trunk/dports/graphics/gdchart/Portfile	2010-01-16 20:31:03 UTC (rev 62768)
@@ -4,7 +4,7 @@
 
 name                gdchart
 version             0.11.5
-revision            1
+revision            2
 categories          graphics
 maintainers         jameskyle
 description         Easy to use C API, high performance library.
@@ -19,22 +19,50 @@
                     rmd160 be9b11eb446738d9e30d78e8ce73b8a418b1f520
 use_parallel_build  no
 
-depends_lib         port:libpng \
+depends_build       port:libpng \
                     port:zlib \
                     port:gd2 \
                     port:jpeg \
                     port:freetype
 
+set CFLAGS ${configure.cflags}
+
+post-patch {
+    # Use prefix
+    reinplace s:/usr/local:${prefix}: ${worksrcpath}/Makefile
+}
+
 use_configure       no
 
-patchfiles          patch-Makefile.diff
+build.args \
+    CC=${configure.cc} \
+    GD_LIB=libgd.dylib
 
-post-configure {
-    reinplace "s|{__PREFIX__}|${prefix}|g" ${worksrcpath}/Makefile
-    reinplace "s|{__DESTDIR__}|${destroot}|g" ${worksrcpath}/Makefile
+pre-build {
+    build.args-append \
+        CFLAGS="${CFLAGS}"
 }
 
+destroot.args \
+    PREFIX_INC=${destroot}${prefix}/include \
+    PREFIX_LIB=${destroot}${prefix}/lib \
+
+post-destroot {
+    set docdir ${prefix}/share/doc/${name}
+    xinstall -d ${destroot}${docdir}
+    xinstall -m 644 ${worksrcpath}/README.txt ${destroot}${docdir}
+}
+
+variant universal {
+    append CFLAGS " ${configure.universal_cflags}"
+
+    post-patch {
+        # Use libtool instead of ar
+        reinplace "s:ar cr:libtool -o:" \
+            ${worksrcpath}/Makefile
+    }
+}
+
 livecheck.type      regex
 livecheck.url       ${homepage}dev011x.htm
 livecheck.regex     {gdchart([0-9.]+)dev.tar.gz}
-livecheck.md5       a4af7bc927d8b88934da56fce10a7a3c

Deleted: trunk/dports/graphics/gdchart/files/patch-Makefile.diff
===================================================================
--- trunk/dports/graphics/gdchart/files/patch-Makefile.diff	2010-01-16 20:19:08 UTC (rev 62767)
+++ trunk/dports/graphics/gdchart/files/patch-Makefile.diff	2010-01-16 20:31:03 UTC (rev 62768)
@@ -1,49 +0,0 @@
---- Makefile.orig	2008-11-09 14:17:33.000000000 -0800
-+++ Makefile	2008-11-09 14:58:26.000000000 -0800
-@@ -3,14 +3,19 @@
- # CFLAGS=
- # CFLAGS=-g -ansi -pedantic
-
-+# -- Set default prefix and destdir's ------
-+DESTDIR ?= {__DESTDIR__}
-+PREFIX ?= {__PREFIX__}
-+
-+LD_LIBRARY_PATH=$(PREFIX)/lib
- # ----- build path -----
- GDC_INCL=./
- GDC_LD=./
- GDC_LIB=libgdc.a
-
- # ----- install locations -----
--PREFIX_INC = /usr/local/include
--PREFIX_LIB = /usr/local/lib
-+PREFIX_INC = $(PREFIX)/include
-+PREFIX_LIB = $(PREFIX)/lib
-
- # INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
-
-@@ -18,9 +23,9 @@
- # GDChart requires the gd library - www.boutell.com/gd/
- # gd 2.0.28 or better is required (GIF support has returned to libgd)
- # if it's not installed in a standard location edit these lines for your installation
--GD_INCL=/usr/local/include/
--GD_LD=/usr/local/lib/
--GD_LIB=libgd.so
-+GD_INCL=$(PREFIX)/include/
-+GD_LD=$(PREFIX)/lib/
-+GD_LIB=libgd.dylib
- # a static libgd is also available
- # GD_LIB=libgd.a
-
-@@ -135,8 +140,9 @@
-
- # ----- install -----
- install: gdc.h gdchart.h gdcpie.h libgdc.a
--	cp gdc.h  gdchart.h  gdcpie.h $(PREFIX_INC)/
--	cp libgdc.a $(PREFIX_LIB)/
-+	install -d $(DESTDIR)/$(PREFIX_LIB) $(DESTDIR)/$(PREFIX_INC)
-+	install gdc.h  gdchart.h  gdcpie.h $(DESTDIR)/$(PREFIX_INC)/
-+	install libgdc.a $(DESTDIR)/$(PREFIX_LIB)/
-
- # --- clean ---
- clean:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100116/f937e8f8/attachment.html>


More information about the macports-changes mailing list