Opened 19 years ago

Closed 18 years ago

Last modified 8 years ago

#5408 closed defect (fixed)

Add Aquaterm Driver to PGPLOT

Reported by: m@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.2
Keywords: Cc: markd@…
Port: pgplot

Description (last modified by ryandesign (Ryan Carsten Schmidt))

AquaTerm already include the driver it just needs to be added to PGPLOT build.

AquaTerm stuff is in share/aquaterm/pgplot after AquaTerm has been installed. Instructions are there as well.

From the readme it looks like you would have to just copy a couple files over and then patch the compiler config to merge the current with the AquaTerm enabled one.

This is from the ReadMe:

0) get pgplot sources: http://www.astro.caltech.edu/~tjp/pgplot/
1) create dir pgplot/sys_macosx if it doesn't exist
2) copy *.conf files to pgplot/sys_macosx
3) copy aqdriv.m to pgplot/drivers
4) edit drivers.list (line 8) to include: 
AQDRIV 0 /AQT AquaTerm.app under Mac OS X     C
5) edit makemake (line 103) to include:
AQDRIV="aqdriv.o"
6) create dir pgplot_obj next to (NOT INSIDE!) pgplot
7) cd to pgplot_obj
8) do ../pgplot/makemake ../pgplot macosx g77_gcc_AQT
   or ../pgplot/makemake ../pgplot macosx xlf_gcc_AQT
   depending on Fortran compiler
9) uncomment any other driver that you want in pgplot_obj/drivers.list (NOTE pgp
lot_obj) 
10) ../pgplot/makemake ../pgplot macosx {g77, xlf}_gcc_AQT
11) make
12) Do try the demos, particularly pgdemo13 and pgdemo17 ;-)
13) make install

Attachments (2)

pgplot fix for aqt.zip (15.7 KB) - added by m@… 18 years ago.
Not patches but patches can probably be made from these.
PGPLOT.zip (4.6 KB) - added by m@… 18 years ago.
Fixes for PGPLOT to add AquaTerm driver

Download all attachments as: .zip

Change History (11)

comment:1 Changed 19 years ago by mww@…

Summary: Add Aquaterm Driver to PGPLOTRFE: Add Aquaterm Driver to PGPLOT

we currently have no mainainer for pgplot - if you could supply a patch, that would be terrific!

comment:2 Changed 18 years ago by m@…

severity: enhancementnormal
Version: 1.01.2

I don't know how to create the patch but I am going to upload a zip of the files that I have patched.

All the "patches" I made are to get pgplot to build with AquaTerm support with one exception. I had to patch the .m file so that it could find the AquaTerm header file properly when built.

When I have time I will try to learn how to make patches but maybe you guys can use what I have done so far.

You will also have to use one of the commands to replace my prefix /opt/dp with the user's prefix. I saw an example of this in the pgplot portfile.

Changed 18 years ago by m@…

Attachment: pgplot fix for aqt.zip added

Not patches but patches can probably be made from these.

comment:3 Changed 18 years ago by m@…

Summary: RFE: Add Aquaterm Driver to PGPLOTAdd Aquaterm Driver to PGPLOT

comment:4 Changed 18 years ago by markd@…

Cc: markd@… added

You can make patches this way:

Make a backup copy of the original files you want to patch within the aquaterm_src.1.0.0/ folder in their original locations (don't move them) and put the suffix .org on them. Then modify the file and diff it against the original:

Example:

cd aquaterm_src.1.0.0/ (all diffs must be done in the root of the download directory):

diff -u adapters/pgplot/aqdriv.m.org adapters/pgplot/aqdriv.m >patch-adapters-pgplot-aqdriv.m

--- adapters/pgplot/aqdriv.m.org        2004-03-04 14:30:31.000000000 -0800
+++ adapters/pgplot/aqdriv.m    2006-04-08 00:53:08.000000000 -0700
@@ -1,5 +1,5 @@
 #import <Foundation/Foundation.h>
-#import "aquaterm/AQTAdapter.h"
+#import <AQTAdapter.h>

 /* Debugging extras */
 static inline void NOOP_(id x, ...) {;}

Please make patches for the rest that way. I'd do it but you've given the file path in terms of their destination rather than their source and that makes it more time consuming to figure it out. If you do that for us and attach the patch files it will help a lot. Thanks.

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 18 years ago by m@…

Should I do the diff before or after applying whatever patches are already included, 'fink patch'?

comment:6 Changed 18 years ago by markd@…

(In reply to comment #5)

Should I do the diff before or after applying whatever patches are already included, 'fink patch'?

Ok, I see the aqdriv.m file comes from aquaterm_src.1.0.0/adapters/pgplot/ so the aquaterm tarball will have to be downloaded and extracted during pgplot install to get the aquaterm driver to work. Would you be interested in being maintainer once the port file gets modifed? No pressure but it would be nice if someone that knows how to use it could test it. But to answer your question about patches:

The diff compares 2 files. the newly modified one and the original. So if the file file4.h needs to be patched, make a copy of the original file and call it say file4.h.org. Now you have two identical files: file4.h.org and file4.h. Now make your changes to file4.h and then diff the two files diff -u <original> <modified> >patch-file4.h like this:

diff -u file4.h.org file4.h >patch-file4.h

But in your case you have patchfiles already from fink. If the patchfiles you have from fink are for the same version of the program and you don't wish to modify them at all then the patches can be used as they are except that the file paths at the top of the file might need to be edited. Or if the changes are as slight as they look to those files by the readme, or if the DP pgplot port is newer than the fink port the original patches won't work. In that case you can open the patchfile and see what changes are made by the patch (look at the file and you'll see what I mean) and make those same changes to the same file in the app version you wish to install and diff it against a copy made before the changes.

I hope this isn't too confusing. I could do it myself when I get a little time and show you how I did it if that's better. I just don't have time right now.

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 18 years ago by m@…

I erased fink tonight and am trying to make patches, etc.

Sorry, my reference to fink is because I forgot that this was on DarwinPorts, I have been using fink because I was tired of waiting for a response. Hopefully, now I'll be able to help out. I wouldn't mind trying to be the maintainer but I can't promise anything since I don't know all of what it involves learning.

My plan is this: I am going to create updated patch files to replace the ones that are include with the port, i.e. in the files folder. I will also create a patch file to update the Portfile. aqdriv.m is included in the AquaTerm port so I will have to figure out how to only add the driver for Mac OS X systems, etc., but will just copy it over from the install once AquaTerm is installed.

Actually, I might download the source as you suggested because people might just use AquaTerm.app from it's website rather than installing it through DP.

Changed 18 years ago by m@…

Attachment: PGPLOT.zip added

Fixes for PGPLOT to add AquaTerm driver

comment:8 Changed 18 years ago by markd@…

Resolution: fixed
Status: newclosed

Changes committed as revision 3 to the Portfile. Thanks! I made some adjustments. You can look at the portfile to how to downlod a copy aquaterm along with pgplot so the aqdrv.m file is available. Also, notice the statement

set aqtversion          1.0.0

in the pgplot Portfile will need to be in sync with the current portfile version of aquaterm. So when aquaterm is updated this variable asould be updated too, although if the file doesn't change it wouldn't really matter.

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: pgplot added
Note: See TracTickets for help on using tickets.