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:
/Users/Shared/var/db/dports/sources/\
rsync.rsync.darwinports.org_dpupdate_dports/\
www/lynx/Portfile


Here is the diff from the modification and default file:

31c31,33
< --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.
/Users/Shared/var/db/dports/build/\
_Users_Shared_var_db_dports_sources_rsync.rsync.darwinports.\
org_dpupdate_dports_www_lynx/work/lynx2-8-6/lynx.cfg


Here is the diff from the modification and default file:

2938c2938
< #COLOR:0:black:white
---
> COLOR:0:black:white
2945c2945
< 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

Share/Bookmark

No comments: