How to request MacPorts to add a port?

Scott lovecraftian at mac.com
Mon Jun 22 02:24:37 PDT 2009


Hey guys thanks so much for your help, and for actually making 
a MacPorts port for URLtoys.

I went through HELL doing it myself.  And I still can't get
URLtoysw (the GUI version) to work.

I'd like to share my story, which is embedded with THREE questions:

(1)
I ended up doing it manually.  Below were the steps.  I'm sad that I 
had to put these OUTSIDE the /opt/local/ directory:

* get archive of URLtoys stuff at:
  http://search.cpan.org/~jdrago/WWW-URLToys-1.28/URLToys.pm
* make new directory WWW/ in /Library/Perl/Updates/5.8.8
* dig inside the archive, put URLtoys.pm in the above
* same for URLtoys.pod
* put URLtoys.pl in my_commands (the dir for my own stuff, placed in 
  PATH); kill the `.pl' extension; chmod +x

QUESTION 1: Could I have done this more easily?

(2)
You see that I decided to install the MODULAR version, which relies on 
UTLtoys.pm, which module can be used by other perl scripts.

QUESTION 2: I know NOTHING about perl.  Can MacPorts handl perl stuff?
Does it then properly modify the @INC variable?

(3) 
I had a really, really sick time trying to get the GUI version of 
URLtoys to work.  It needs the following things:

* Tk for Perl (only if you want the GUI downloader)
* LWP::TkIO (only if you want the GUI downloader)

First, I did:
$ perl -MCPAN -e 'install "WWW::URLToys"'
see:
http://search.cpan.org/~jdrago/WWW-URLToys-1.28/URLToys.pm

Then I got LWP::TkIO and did the "perl routine" on it:
[perl routine =
 $ perl Makefile.PL
 $ make
 $ make test
 $ make install]
see:
http://search.cpan.org/~rse/lcwa-1.0.0/lib/lwp/lib/LWP/TkIO.pm

Then I moved the urltoysw file (notice the final `w': this is the GUI
script; the regular one is plain `URLtoys') to /opt/local/bin, did
chmod + x, and ran it.

OH NO!  ERROR: "Can't locate Tk.pm in @INC ..."
    
Then:
$ sudo port install tk

This didn’t work.  So I tried:
$ perl -MCPAN -e 'install "Tk"'

Then I did:
$ perl Makefile.PL
$ make
$ make test
$ make install

Then I tried running URLtoysw again.  Same error.

Then I dug in one of the tk archives, found LWP::TkIO, and placed it 
EVERYWHERE it might be of help.

Then I tried running URLtoysw again.  Same error.

Then I downloaded tk-804
see:
http://search.cpan.org/~srezic/Tk-804.028_500/

Then I tried pTk, and any other package that sounded like "tk".

...

I did this for 9 (NINE) hours.

Really.

QUESTION 3:
Can anyone just point me to an explanation?  Can anyone use URLtoys 
on Mac OS X?  If you look around you'll see that lots of Mac folks 
have tk problems:

http://rt.cpan.org/Public/Bug/Display.html?id=39593

http://www.lehigh.edu/~sol0/Macintosh/X/ptk/

http://www.lehigh.edu/~sol0/Macintosh/X/ptk/PerlTK-under-Tiger.txt

http://search.cpan.org/~ni-s/Tk-804.027/pod/UserGuide.pod





More information about the macports-users mailing list