On Jan 2, 2012, at 2:38 p.m., Shiyuan wrote:

>    1. I want to write a portfile for install the package auctex for emacs.

There's already a port called "auctex", if you haven't seen it already.

> I have two emacs installed, one is Emacs.app(Cocoa), the other is emacs(for 
> non-graphical command line). Accordingly, I need to specify different 
> configuration for auctex, i.e., set -with-emacs -with-lisp-dir  to different 
> locations.  I want both Emacs.app and emacs can find the package auctex. In 
> this case, should I write two different port files and give the port 
> different names (auctex and auctex-app, for example) or should I make one 
> portfile with two different variants? I try the latter, but it seems that 
> only one variant is activated, that is, the lisp files only exist in one 
> lisp-dir. Are there any other options I can use to make two variants 
> activated at the same time?

Variants are not mutually exclusive unless you define them to be. In this case, 
AUCTeX's configure script might only accept one "--with-lisp-dir" argument and 
one "--with-emacs" argument. Your best bet might be separate ports, or maybe 
subports. I'm not familiar with what AUCTeX installs, so I can't say whether 
separate ports would step on each other's toes by trying to install the same 
files.

>  2. How can I see the the definition of Portfiles for a particular port 
> return by "port search xxport"? 

You can print a portfile to stdout by using "port cat <portname>" or open it in 
your default ${EDITOR} with "port edit <portname>". For instance, to open the 
portfile for emacs-app, use "port edit emacs-app". Throw in an option to pick 
your editor/viewer: "port edit --editor vim emacs-app".

vq

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to