Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Set up DarwinPorts to coexist with fink UNIX
I'm sure many people on this list, including myself, are huge fans of Fink. Unfortunately, there is much UNIX software missing from its listings. I've found that often DarwinPorts fills the gaps of Fink (for example, it has 3 POP/IMAP servers to fink's 0, and qpopper was very easy to get working). Unfortunately, it is much harder to set up than fink.

Here are the steps I had to go through, noting that I assume permissions are set up correctly:
  1. Disable Fink: Comment out "source /sw/bin/init.csh" from .cshrc (or .bashrc). DarwinPorts uses PATH to decide which program it uses, but unfortunately fink's tclsh caused me problems. It might be easier to just change PATH.

  2. Check out the source from cvs (The following is from their Get DarwinPorts guide):
    cd ${PROGRAM_FOLDER}
    cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
    cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -P darwinports
    
  3. Build DarwinPorts:
    cd ${PROGRAM_FOLER}/darwinports/base
    ./configure
    make
    sudo make install
    
  4. (Optional) Put the package listing in a global location so all users can use DarwinPorts:
    cd ${PROGRAM_FOLER}/darwinports
    cp -R dports /opt/local/dports
    
  5. (Optional) Edit /etc/ports/sources.conf. It should contain the line:
    file:///opt/local/dports
    
  6. Double check that we are using the right tclsh: In one case it used /sw/bin/tclsh, even though I commented out fink. You should double check the files port, portall, portindex in /opt/local/bin to make sure that they start with the line "#!/usr/bin/tclsh".

  7. Add /opt/local/bin to your path.

  8. It should work. Try typing sudo port install PortsManager. This will install a GUI for DarwinPorts in /Utilities.

  9. Reenable Fink. Fink and DarwinPorts should coexist fine, now that all the port code points to #!/usr/bin/tclsh.

  10. To check for new/updated packages:
    cd /opt/local/dports
    cvs update -d
    
Yes, this is much more difficult process than fink, but if you need the extra packages and don't want to manage them by hand, I would say its worth the effort.
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[15,500 views]  

Set up DarwinPorts to coexist with fink | 13 comments | Create New Account
Click here to return to the 'Set up DarwinPorts to coexist with fink' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
funny...
Authored by: mikerose on Jan 13, '04 02:00:14PM

I had no such difficulty on my machine; in fact, Fink was a lot harder to get working. For darwinports, I just used the CVS instructions (two lines) to download and configure darwinports... happily installed stuff a few minutes later.



[ Reply to This | # ]
funny...
Authored by: ar on Jan 13, '04 04:06:08PM

Agree. I ran into several problems while trying to install from fink. darwinports, on the other hand, seemed to just work as advertised. Maybe it's because I'm used to the FreeBSD ports system?



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: Trusted Content on Jan 14, '04 01:20:04AM
Ermmm, there's a much simpler way of going about this. When DarwinPorts's configure script is looking for tclsh, it will pick the first one in its path. Since you will, at some point, have to add /opt/local/bin (or whever you choose to install dports binaries) to your path, do that first, and throw it at the beginning of your path. Then, symlink the proper tclsh into /opt/local/bin, i. e.
sudo ln -sf /usr/bin/tclsh /opt/local/bin/
Then DarwinPorts's configure will automatically pick the right tclsh as it falls first in the path. Of course, to get the path right, I always use my trusted /etc/profile (works if you are using bash, which you probably will be if you are using Panther):

# System-wide .profile for sh(1)

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
TERM="xterm-color"

export PATH TERM

[ -r /etc/bashrc ] && source /etc/bashrc && source /sw/bin/init.sh

PATH="/opt/local/bin:$PATH"

export PATH
Problem solved :)

[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: clith on Jan 14, '04 09:43:42AM
Just to be pedantic, you should check for the existance of /sw/bin/init.sh before sourcing it (in case you uninstall fink at some point). Also, you only need to export variables once, and I find it easier to put it on the same line as the var assignment...
# System-wide .profile for sh(1)

export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
export TERM="xterm-color"

[ -r /etc/bashrc ] && source /etc/bashrc
[ -r /sw/bin/init.sh] && source /sw/bin/init.sh

[ -d /opt/local/bin ] && PATH="/opt/local/bin:$PATH"


[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: xcode on Jul 01, '04 11:52:12PM

Hi
I followed the two above hints and for a while they worked fine then the man pages for all dawinports installs disappeared, has anyone else experienced this problem? Also what little knowledge I have of the bash shell tells me that a better sytax for PATH="/opt/local/bin:$PATH" is PATH=$PATH":/opt/local/bin"



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: hagbard on Jan 15, '04 04:24:32AM

Thanks for your hint, I thought darwinports was dead ;-)

I installed exactly as you hinted, but somehow, I'm getting cvs errors when installing packages. here's the error:
Error: Target com.apple.fetch returned: CVS check out failed
I cheched with the -d debug option, and it is looking for a cvs password in a file (which was installed but is empty). What's strange is that anon cvs requires only a 'return' as a password...
anybody else has the same problem ?
here's the exact error log:
DEBUG: Assembled command: 'cd "/opt/local/dports/sysutils/PortsManager/work" && CVS_PASSFILE=/opt/local/dports/sysutils/PortsManager/work/.cvspass cvs -f -d cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -r HEAD PortsManager'
cvs checkout: cannot find password



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: fragerybou on Jan 17, '04 11:58:18PM

I've definitely been getting the same cvs password error. I've also been unable to figure out how to get around it. I'll keep trying, but if anyone has any suggestions, please let us know!



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: fragerybou on Jan 18, '04 01:30:49PM

I posted a topic on the forums about this, and got a response from blb. Essentially, he said that the cvs server is outdated, and the project for PortsManager has stalled, so it probably wouldn't work anyway. He suggested that we stick to the port cli command in the mean time.



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: AntonyBlakey on Jan 29, '04 08:42:31PM
You can fix this by doing

CVS_PASSFILE=/opt/local/dports/sysutils/PortsManager/work/.cvspass sudo cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
which sets the cvs password in the special .cvspass file that this port expects.

[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: Code Masseur on Nov 16, '05 11:47:24AM

I wouldn't say it's dead. I just installed darwinports a few weeks ago because it provides software which fink does not.

Please note that I'm writing this response almost 2 years after the original comment! :-)

I consider both fink and darwinports to be complementary.



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: ssevenup on Mar 08, '04 11:23:09PM

FYI, as of recently DarwinPorts Manager.app has been removed from the list so it's a bad choice to test if it's working.

--MM



---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: lewinb on Nov 15, '04 12:42:57AM

I have followed the instructions explicitly, both those listed here, and those listed on darwinports.opendarwin.org ... I keep getting errors, at every step... HELP!

I am using 10.2.8, tcl8.3, darwin 6.8.0 ... apple's x11 preview for jaguar, which seems to work fine. I do NOT have Fink installed. I have a (somewhat) working dports, so it has worked in the past, but now I can't even do a clean install.

At first, I wanted to simply update dp, but got some seemingly inescapable error after downloading the update files, and was unable to complete the make install. So, I thought I might as well just make a clean install. So I get the files from cvs, and follow the instructions. Then the insanity starts.

Configure errors out, telling me to specify tcl with the command "--with-tclpackagedir" (they forgot to include the "=" sign... it should be --with-tclpackagedir=")

I end up having to read the actual configure file to find out what they mean by this. I finally get the thing to configure without error with the following:

./configure --with-tcl=/usr/local/lib/tcl8.3 --with-tclinclude=/usr/local/include/tcl8.3 --with-tclpackage=/private/var/db/pkg/tcl-8.3.4_4

I had to specify all of these, because as soon as I specified one, it asked for the next.

So, next, make.

This following warning was reported about 50 times throughout make. Here is a sample:

===> making all in doc===> making all in src
===> making all in src/darwinports1.0
gcc -c -DUSE_TCL_STUBS -W -Wall -pedantic -g -O -DHAVE_CONFIG_H -I.. -I. -I"/usr/local/include/tcl8.3" -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 darwinports.c -o darwinports.o
/var/tmp/cc72gNcY.i:1:3: warning: style of line directive is a GCC extension
darwinports.c:2:3: warning: style of line directive is a GCC extension
darwinports.c:33:3: warning: style of line directive is a GCC extension
darwinports.c:36:3: warning: style of line directive is a GCC extension
In file included from /usr/include/machine/types.h:30,
from /usr/include/sys/types.h:72,
from /usr/include/stdio.h:64,
from /usr/local/include/tcl8.3/tcl.h:183,
from darwinports.c:36:
/usr/include/ppc/types.h:2:3: warning: style of line directive is a GCC extension

____________________

make errors out with this at the end:

/usr/local/include/tcl8.3/tclDecls.h:2:3: warning: style of line directive is a GCC extension
/usr/local/include/tcl8.3/tclDecls.h:1768:3: warning: style of line directive is a GCC extension
darwinports.o portconf.o session.o util.o -o Darwinports -L/usr/local/lib -ltclstub8.3 -lmd
darwinports.o:No such file or directory
*** Error code 1

Stop in /Volumes/water/darwinports/base/src/darwinports1.0.
*** Error code 1

Stop in /Volumes/water/darwinports/base/src.
*** Error code 1

Stop in /Volumes/water/darwinports/base.


______________
Can ANYone shed some light on this?

I have found a ton of back-and-forth on opendarwin's mail list archives about tcl being somehow critical to dp, but as far as I can tell, I should be ok, and can't figure out why I am having to specify all of these tcl directories.



[ Reply to This | # ]
Set up DarwinPorts to coexist with fink
Authored by: tonyo on Feb 01, '05 02:54:01PM

Funny, similar problem; sorta off topic for me though, I'm not using Fink at all, I just came on this thread while looking for my own install problem with darwinports. This morning I updated my ports and when I switched to base to update the infrastructure, whammo, make stopped and gave a simlar error.

Tried several times, reboot, repaired permissions, chicken blood on monitor, no go. I'd installed the latest 10.3.7 security patch earlier this week - thining that it had messed somehow with the install, I trashed the old darwinports directory and reinstalled (exactly to the tee using instructions on the website) using latest CVS snapshot.

Bang, make failed again with this error;


sha1cmd.c: In function `SHA1Cmd':
sha1cmd.c:119: error: `SHA_DIGEST_LENGTH' undeclared (first use in this function)
sha1cmd.c:119: error: (Each undeclared identifier is reported only once
sha1cmd.c:119: error: for each function it appears in.)
sha1cmd.c:140: warning: implicit declaration of function `SHA1_File'
sha1cmd.c:119: warning: unused variable `buf'
*** Error code 1

Stop in /Users/tonyo/darwinports/base/src/pextlib1.0.
*** Error code 1

Stop in /Users/tonyo/darwinports/base/src.
*** Error code 1

Stop in /Users/tonyo/darwinports/base.

I'm subscribing now to the darwinports list to ask around about this - anyone else seen it or a fix?

tia

Tony



[ Reply to This | # ]