[24709] trunk/dports/graphics/pgplot

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 30 15:32:20 PDT 2007


Revision: 24709
          http://trac.macosforge.org/projects/macports/changeset/24709
Author:   jann at macports.org
Date:     2007-04-30 15:32:19 -0700 (Mon, 30 Apr 2007)

Log Message:
-----------
Commit of ticket #11479

Modified Paths:
--------------
    trunk/dports/graphics/pgplot/Portfile
    trunk/dports/graphics/pgplot/files/patch-aqdriv.m_aqt
    trunk/dports/graphics/pgplot/files/patch-drivers.list_aqt
    trunk/dports/graphics/pgplot/files/patch-sys_darwin_g77_gcc.conf_aqt

Added Paths:
-----------
    trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf
    trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf_aqt

Modified: trunk/dports/graphics/pgplot/Portfile
===================================================================
--- trunk/dports/graphics/pgplot/Portfile	2007-04-30 22:11:20 UTC (rev 24708)
+++ trunk/dports/graphics/pgplot/Portfile	2007-04-30 22:32:19 UTC (rev 24709)
@@ -18,21 +18,15 @@
 platforms			darwin
 
 homepage			http://www.astro.caltech.edu/~tjp/pgplot/
-master_sites            ftp://ftp.astro.caltech.edu/pub/pgplot/:pgplot \
-                        sourceforge:aquaterm:aqt
+master_sites            ftp://ftp.astro.caltech.edu/pub/pgplot/:pgplot
 
-set aqtversion		1.0.0
-
 distfiles			${name}5.2.tar.gz:pgplot
 
-distname			${name}5.2:pgplot \
-				aquaterm_src.${aqtversion}:aqt
+distname			${name}5.2:pgplot
 
 worksrcdir			${name}/build:pgplot
-				
 
-checksums			${name}5.2.tar.gz md5 e8a6e8d0d5ef9d1709dfb567724525ae \
-				aquaterm_src.${aqtversion}.tar.gz md5 937461dfefb62178bee960bfe88e0991
+checksums			${name}5.2.tar.gz md5 e8a6e8d0d5ef9d1709dfb567724525ae
 
 depends_lib			lib:libpng:libpng lib:libz:zlib bin:g77-dp-3.4:gcc34
 
@@ -53,7 +47,7 @@
 
 configure {
 	cd ${worksrcpath}
-	system "../makemake .. ${ppMakeMakeTarget}"
+	system "../makemake .. ${ppMakeMakeTarget} ${ppCompilerSpec}"
 }
 
 build.target		all
@@ -75,40 +69,67 @@
 	xinstall -m 644 -W ${worksrcpath} cpgplot.h ${destroot}/${prefix}/include
 	xinstall -m 644 -W ${worksrcpath} pgplot.doc ../copyright.notice \
 		${destroot}/${prefix}/share/doc/${name}
-	if {[variant_isset x11]} {
-		xinstall -m 755 -W ${worksrcpath} pgdisp pgxwin_server \
-			${destroot}/${prefix}/bin
-	}
 }
 
-variant x11 {
-	depends_lib-append	lib:libX11:XFree86
-
-	patchfiles-append	patch-drivers_x11.list
-}
-
-variant darwin {
-	global ppMakeMakeTarget
+platform darwin {
+	global ppMakeMakeTarget ppCompilerSpec
 	set ppMakeMakeTarget	darwin
+	set ppCompilerSpec		g77_gcc
 	patchfiles-append		patch-sys_darwin_aaaread.me \
 							patch-sys_darwin_g77_gcc.conf
 	post-patch {
 		reinplace "s|@@PREFIX@@|${prefix}|g" \
-			${worksrcpath}/../sys_darwin/g77_gcc.conf
+			${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf
 		reinplace "s|@@X11PREFIX@@|${x11prefix}|g" \
-			${worksrcpath}/../sys_darwin/g77_gcc.conf
+			${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf
 	}
 }
 
+platform darwin 8 i386 {
+	depends_lib-delete	bin:g77-dp-3.4:gcc34
+	depends_lib-append	port:gcc42
+
+	set ppCompilerSpec	gfortran_gcc_42
+
+	patchfiles-delete	patch-sys_darwin_g77_gcc.conf
+	patchfiles-append	patch-sys_darwin_gfortran_gcc_42.conf
+}
+
+default_variants +x11 +aqt
+
+variant x11 {
+	depends_lib-append	lib:libX11:XFree86
+
+	patchfiles-append	patch-drivers_x11.list
+
+	post-destroot {
+		xinstall -m 755 -W ${worksrcpath} pgdisp pgxwin_server \
+			${destroot}/${prefix}/bin
+	}
+}
+
 variant aqt {
 # Variant that adds aquaterm driver support
-	distfiles-append	aquaterm_src.${aqtversion}.tar.gz:aqt
+	depends_lib-append	port:aquaterm
 	patchfiles-append	patch-drivers.list_aqt \
-						patch-sys_darwin_g77_gcc.conf_aqt \
-						patch-makemake_aqt \
-						patch-aqdriv.m_aqt
+						patch-sys_darwin_${ppCompilerSpec}.conf_aqt \
+						patch-makemake_aqt
 	
 	pre-patch {
-		file copy ${workpath}/adapters/pgplot/aqdriv.m ${workpath}/pgplot/drivers/
+		file copy ${prefix}/share/aquaterm/pgplot/aqdriv.m ${workpath}/pgplot/drivers/
 	}
+
+	post-destroot {
+		xinstall -m 755 -W ${worksrcpath} libpgplot.dylib \
+			${destroot}/${prefix}/lib
+	}
 }
+
+# Variant to install demo programs
+variant demos {
+	post-destroot {
+		foreach f [glob {pgdemo[1-9]} {pgdemo1[0-7]}] {
+			xinstall -m 755 -W ${worksrcpath} $f ${destroot}/${prefix}/bin
+		}
+	}
+}

Modified: trunk/dports/graphics/pgplot/files/patch-aqdriv.m_aqt
===================================================================
--- trunk/dports/graphics/pgplot/files/patch-aqdriv.m_aqt	2007-04-30 22:11:20 UTC (rev 24708)
+++ trunk/dports/graphics/pgplot/files/patch-aqdriv.m_aqt	2007-04-30 22:32:19 UTC (rev 24709)
@@ -1,9 +0,0 @@
---- ../drivers/aqdriv.m.org	2006-04-19 13:54:12.000000000 -0500
-+++ ../drivers/aqdriv.m	2006-04-19 13:52:30.000000000 -0500
-@@ -1,5 +1,5 @@
- #import <Foundation/Foundation.h>
--#import "aquaterm/AQTAdapter.h"
-+#import <AQTAdapter.h>
- 
- /* Debugging extras */
- static inline void NOOP_(id x, ...) {;}

Modified: trunk/dports/graphics/pgplot/files/patch-drivers.list_aqt
===================================================================
--- trunk/dports/graphics/pgplot/files/patch-drivers.list_aqt	2007-04-30 22:11:20 UTC (rev 24708)
+++ trunk/dports/graphics/pgplot/files/patch-drivers.list_aqt	2007-04-30 22:32:19 UTC (rev 24709)
@@ -1,10 +1,10 @@
---- ../drivers.list.org	2006-04-19 12:18:30.000000000 -0500
-+++ ../drivers.list	2006-04-19 12:19:47.000000000 -0500
+--- drivers.list.org	2006-04-19 12:18:30.000000000 -0500
++++ drivers.list	2006-04-19 12:19:47.000000000 -0500
 @@ -5,6 +5,7 @@
  ! available on selected operating systems only.
  !------------------------------------------------------------------------------
  ! File       Code       Description                                Restrictions
-+AQDRIV 0 /AQT		AquaTerm.app under Mac OS X						C
++AQDRIV 0 /AQT       AquaTerm.app under Mac OS X			C
  ! BCDRIV 0 /BCANON    Canon Laser printer (bitmap version), landscape
  ! CADRIV 0 /CANON     Canon Laser printer, LBP-8/A2, landscape
  ! CCDRIV 0 /CCP       DEC LJ250 Color Companion printer

Modified: trunk/dports/graphics/pgplot/files/patch-sys_darwin_g77_gcc.conf_aqt
===================================================================
--- trunk/dports/graphics/pgplot/files/patch-sys_darwin_g77_gcc.conf_aqt	2007-04-30 22:11:20 UTC (rev 24708)
+++ trunk/dports/graphics/pgplot/files/patch-sys_darwin_g77_gcc.conf_aqt	2007-04-30 22:32:19 UTC (rev 24709)
@@ -47,7 +47,7 @@
  # $SHARED_LD
   
 -   SHARED_LIB_LIBS=""
-+   SHARED_LIB_LIBS="$LIBS -L@@PREFIX@@/lib/gcc-3.4 -lg2c -lSystem -lpng"
++   SHARED_LIB_LIBS="$LIBS -L@@PREFIX@@/lib/gcc-3.4 -lg2c -lSystem -laquaterm -lpng"
  
  # Optional:
  # Compiler name used on Next systems to compile objective-C files.

Added: trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf
===================================================================
--- trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf	                        (rev 0)
+++ trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf	2007-04-30 22:32:19 UTC (rev 24709)
@@ -0,0 +1,147 @@
+--- ../sys_darwin/gfortran_gcc_42.conf.orig	Wed Dec 31 17:00:00 1969
++++ ../sys_darwin/gfortran_gcc_42.conf	Mon May 17 17:25:36 2004
+@@ -0,0 +1,144 @@
++# The MacPorts build of version 4.2 of the GNU gfortran compiler
++# and GNU gcc C compiler on Darwin.
++#-----------------------------------------------------------------------
++
++# Optional: Needed by XWDRIV (/xwindow and /xserve) and
++#           X2DRIV (/xdisp and /figdisp).
++# The arguments needed by the C compiler to locate X-window include files.
++ 
++   XINCL="-I@@X11PREFIX@@/include"
++
++# Optional: Needed by XMDRIV (/xmotif).
++# The arguments needed by the C compiler to locate Motif, Xt and
++# X-window include files.
++ 
++   MOTIF_INCL=""
++
++# Optional: Needed by XADRIV (/xathena).
++# The arguments needed by the C compiler to locate Xaw, Xt and
++# X-window include files.
++ 
++   ATHENA_INCL=""
++
++# Optional: Needed by TKDRIV (/xtk).
++# The arguments needed by the C compiler to locate Tcl, Tk and
++# X-window include files.
++ 
++   TK_INCL=""
++
++# Optional: Needed by RVDRIV (/xrv).
++# The arguments needed by the C compiler to locate Rivet, Tcl, Tk and
++# X-window include files.
++ 
++   RV_INCL=""
++
++# Mandatory.
++# The FORTRAN compiler to use.
++ 
++   FCOMPL="gfortran-dp-4.2"
++
++# Mandatory.
++# The FORTRAN compiler flags to use when compiling the pgplot library.
++# (NB. makemake prepends -c to $FFLAGC where needed)
++ 
++   FFLAGC="-Wall -O -I@@PREFIX@@/include"
++
++# Mandatory.
++# The FORTRAN compiler flags to use when compiling fortran demo programs.
++# This may need to include a flag to tell the compiler not to treat
++# backslash characters as C-style escape sequences
++ 
++   FFLAGD="-fno-backslash $FFLAGC"
++
++# Mandatory.
++# The C compiler to use.
++ 
++   CCOMPL="gcc-dp-4.2"
++
++# Mandatory.
++# The C compiler flags to use when compiling the pgplot library.
++ 
++   CFLAGC="-Wall -DPG_PPU -O3 -I@@PREFIX@@/include"
++
++# Mandatory.
++# The C compiler flags to use when compiling C demo programs.
++ 
++   CFLAGD="$CFLAGC"
++
++# Optional: Only needed if the cpgplot library is to be compiled.
++# The flags to use when running pgbind to create the C pgplot wrapper
++# library. (See pgplot/cpg/pgbind.usage)
++ 
++   PGBIND_FLAGS="bsd"
++
++# Mandatory.
++# The library-specification flags to use when linking normal pgplot
++# demo programs.
++ 
++   LIBS="-L@@PREFIX@@/lib -L@@X11PREFIX@@/lib -lX11"
++
++# Optional: Needed by XMDRIV (/xmotif).
++# The library-specification flags to use when linking motif
++# demo programs.
++ 
++   MOTIF_LIBS=""
++
++# Optional: Needed by XADRIV (/xathena).
++# The library-specification flags to use when linking athena
++# demo programs.
++ 
++   ATHENA_LIBS=""
++
++# Optional: Needed by TKDRIV (/xtk).
++# The library-specification flags to use when linking Tk demo programs.
++# Note that you may need to append version numbers to -ltk and -ltcl.
++ 
++   TK_LIBS=""
++
++# Mandatory.
++# On systems that have a ranlib utility, put "ranlib" here. On other
++# systems put ":" here (Colon is the Bourne-shell do-nothing command).
++ 
++   RANLIB="ranlib"
++
++# Optional: Needed on systems that support shared libraries.
++# The name to give the shared pgplot library.
++ 
++   SHARED_LIB=""
++
++# Optional: Needed if SHARED_LIB is set.
++# How to create a shared library from a trailing list of object files.
++ 
++   SHARED_LD=""
++
++# Optional:
++# On systems such as Solaris 2.x, that allow specification of the
++# libraries that a shared library needs to be linked with when a
++# program that uses it is run, this variable should contain the
++# library-specification flags used to specify these libraries to
++# $SHARED_LD
++ 
++   SHARED_LIB_LIBS=""
++
++# Optional:
++# Compiler name used on Next systems to compile objective-C files.
++ 
++   MCOMPL=""
++
++# Optional:
++# Compiler flags used with MCOMPL when compiling objective-C files.
++ 
++   MFLAGC=""
++
++# Optional: (Actually mandatory, but already defined by makemake).
++# Where to look for any system-specific versions of the files in
++# pgplot/sys. Before evaluating this script, makemake sets SYSDIR to
++# /wherever/pgplot/sys_$OS, where $OS is the operating-system name
++# given by the second command-line argument of makemake. If the
++# present configuration is one of many for this OS, and it needs
++# different modifications to files in pgplot/sys than the other
++# configurations, then you should create a subdirectory of SYSDIR,
++# place the modified files in it and change the following line to
++# $SYSDIR="$SYSDIR/subdirectory_name".
++ 
++   SYSDIR="$SYSDIR"

Added: trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf_aqt
===================================================================
--- trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf_aqt	                        (rev 0)
+++ trunk/dports/graphics/pgplot/files/patch-sys_darwin_gfortran_gcc_42.conf_aqt	2007-04-30 22:32:19 UTC (rev 24709)
@@ -0,0 +1,65 @@
+--- ../sys_darwin/gfortran_gcc_42.conf.org	2006-04-19 12:15:45.000000000 -0500
++++ ../sys_darwin/gfortran_gcc_42.conf	2006-04-19 12:16:16.000000000 -0500
+@@ -41,7 +41,7 @@
+ # The FORTRAN compiler flags to use when compiling the pgplot library.
+ # (NB. makemake prepends -c to $FFLAGC where needed)
+  
+-   FFLAGC="-Wall -O -I@@PREFIX@@/include"
++   FFLAGC="-Wall -O -I@@PREFIX@@/include -I@@PREFIX@@/include/aquaterm"
+ 
+ # Mandatory.
+ # The FORTRAN compiler flags to use when compiling fortran demo programs.
+@@ -58,7 +58,7 @@
+ # Mandatory.
+ # The C compiler flags to use when compiling the pgplot library.
+  
+-   CFLAGC="-Wall -DPG_PPU -O3 -I@@PREFIX@@/include"
++   CFLAGC="-Wall -DPG_PPU -O3 -I@@PREFIX@@/include -I@@PREFIX@@/include/aquaterm"
+ 
+ # Mandatory.
+ # The C compiler flags to use when compiling C demo programs.
+@@ -75,7 +75,7 @@
+ # The library-specification flags to use when linking normal pgplot
+ # demo programs.
+  
+-   LIBS="-L@@PREFIX@@/lib -L@@X11PREFIX@@/lib -lX11"
++   LIBS="-L@@PREFIX@@/lib -L@@X11PREFIX@@/lib -lX11 -Wl,-framework -Wl,Foundation"
+ 
+ # Optional: Needed by XMDRIV (/xmotif).
+ # The library-specification flags to use when linking motif
+@@ -104,12 +104,12 @@
+ # Optional: Needed on systems that support shared libraries.
+ # The name to give the shared pgplot library.
+  
+-   SHARED_LIB=""
++   SHARED_LIB="libpgplot.dylib"
+ 
+ # Optional: Needed if SHARED_LIB is set.
+ # How to create a shared library from a trailing list of object files.
+  
+-   SHARED_LD=""
++   SHARED_LD="gcc-dp-4.2 -dynamiclib -single_module -o $SHARED_LIB -install_name @@PREFIX@@/lib/$SHARED_LIB"
+ 
+ # Optional:
+ # On systems such as Solaris 2.x, that allow specification of the
+@@ -118,17 +118,17 @@
+ # library-specification flags used to specify these libraries to
+ # $SHARED_LD
+  
+-   SHARED_LIB_LIBS=""
++   SHARED_LIB_LIBS="$LIBS -lgfortran -lSystem -laquaterm -lpng"
+ 
+ # Optional:
+ # Compiler name used on Next systems to compile objective-C files.
+  
+-   MCOMPL=""
++   MCOMPL="gcc-dp-4.2"
+ 
+ # Optional:
+ # Compiler flags used with MCOMPL when compiling objective-C files.
+  
+-   MFLAGC=""
++   MFLAGC="-no-cpp-precomp -DPG_PPU -O2 -I. -I@@PREFIX@@/include/aquaterm"
+ 
+ # Optional: (Actually mandatory, but already defined by makemake).
+ # Where to look for any system-specific versions of the files in

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070430/df6b0f90/attachment.html


More information about the macports-changes mailing list