Tuesday, April 17, 2007

Fixing MacPorts Lynx Version 2.8.6rel.4 colors

MacPorts (formerly Darwin Ports) provides management for open source projects under OS X. Back in the day we had to download, patch, configure, etc. ourselves. MacPorts handles all this. This is a disadvantage if the patching or configuring isn't to our liking. The recent version of Lynx is such a case. The current release displays garish colors on a black background. I wanted the default colors of previous versions. After playing with configuration files in various MacPorts build stages, I found something that works. It might take fewer steps than outlined here, but I don't want to spend anymore time on this project.

Notes: File modifications require root or su. I have MacPorts installed under a custom prefix. Where I have /Users/Shared a standard MacPorts installation would use /opt/local

Before preceding modify the Portfile for Lynx:

Here is the diff from the modification and default file:

< --with-ssl=${prefix}
> --with-ssl=${prefix} \
> --enable-default-colors \
> --disable-color-style

Run MacPorts patch stage for Lynx. This will fetch, extract, and patch the source.
port -d patch lynx

Locate the Lynx.cfg file within the staged work directory.

Here is the diff from the modification and default file:

< #COLOR:0:black:white
> COLOR:0:black:white
< COLOR:6:brightred:black
> #COLOR:6:brightred:black

Install Lynx. The screen should be the familiar white (or light grey) background with black text.
port -d install lynx


No comments: