ports/137565: [PATCH]www/lynx: fix handling of lynx.cfg[.sample] during installation

bf bf1783 at gmail.com
Sat Aug 8 10:00:14 UTC 2009


>Number:         137565
>Category:       ports
>Synopsis:       [PATCH]www/lynx: fix handling of lynx.cfg[.sample] during installation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 08 10:00:13 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     bf
>Release:        8-CURRENT amd64
>Organization:
-
>Environment:
>Description:
--Fix kludged-up install-help target that can tamper with a user's locally-modified lynx.cfg or the shipped lynx.cfg.sample.  (The install-cfg target should install lynx.cfg.sample, and the install-help target should slightly modify lynx.cfg.sample to account for the help file locations.  Neither should touch lynx.cfg if it is present.)

--Slightly simplify some commands in the pkg-plist.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN lynx.orig/files/patch-aa lynx/files/patch-aa
--- lynx.orig/files/patch-aa	2009-08-08 05:17:52.000000000 -0400
+++ lynx/files/patch-aa	2009-08-08 04:58:28.000000000 -0400
@@ -1,17 +1,22 @@
---- makefile.in.orig	Mon Sep  4 01:25:39 2006
-+++ makefile.in	Tue Jul 31 10:37:26 2007
-@@ -366,7 +366,9 @@
+--- makefile.in.orig	2006-09-03 19:25:39.000000000 -0400
++++ makefile.in	2009-08-08 04:44:18.000000000 -0400
+@@ -361,12 +361,12 @@
+ 			(cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \
+ 		fi'
+ 	@echo Updating $(sysconfdir)/lynx.cfg
+-	@ECHO_CC@$(SHELL) -c 'if test -f $(SYSCONFDIR)/lynx.cfg ; then \
+-		mv $(SYSCONFDIR)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ; \
++	@ECHO_CC@$(SHELL) -c 'if test -f $(SYSCONFDIR)/lynx.cfg.sample ; then \
++		mv $(SYSCONFDIR)/lynx.cfg.sample $(SYSCONFDIR)/lynx.tmp ; \
  	else \
  		cp $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ; \
  	fi'
 -	@echo Updating $(sysconfdir)/lynx.cfg to point to installed help-files
-+	@echo Updating $(srcdir)/lynx.cfg.sample
-+	@cp $(srcdir)/lynx.cfg $(srcdir)/lynx.tmp
-+	@echo Updating $(srcdir)/lynx.cfg.sample to point to installed help-files
++	@echo Updating $(SYSCONFDIR)/lynx.cfg.sample to point to installed help-files
  	@ECHO_CC at sed	-e '/^HELPFILE:http/s!^!#!' \
  		-e '/^#HELPFILE:file/s!#!!' \
  		$(SYSCONFDIR)/lynx.tmp | \
-@@ -374,9 +376,11 @@
+@@ -374,9 +374,11 @@
  	$(SHELL) $(scripts_dir)/cfg_path.sh lynx_doc  $(helpdir) | \
  	sed	-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
  		-e '/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
@@ -25,7 +30,7 @@
  
  LYHelp.h : help_files.sed LYHelp.hin
  	@echo Creating $@
-@@ -398,18 +402,17 @@
+@@ -398,18 +400,17 @@
  	$(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(scripts_dir)/cfg_defs.sh $(srcdir)'
  
  install-cfg : $(SYSCONFDIR)
diff -ruN lynx.orig/pkg-plist lynx/pkg-plist
--- lynx.orig/pkg-plist	2009-08-08 05:17:52.000000000 -0400
+++ lynx/pkg-plist	2009-08-08 04:59:04.000000000 -0400
@@ -1,10 +1,10 @@
 bin/lynx
- at unexec if [ -f %D/etc/lynx.cfg ] && cmp -s %D/etc/lynx.cfg %D/etc/lynx.cfg.sample; then rm -f %D/etc/lynx.cfg; fi
+ at unexec if cmp -s %D/etc/lynx.cfg %D/etc/lynx.cfg.sample; then rm -f %D/etc/lynx.cfg; fi
 etc/lynx.cfg.sample
- at exec if [ ! -f %D/etc/lynx.cfg ] ; then cp -p %D/%F %B/lynx.cfg; fi
- at unexec if [ -f %D/etc/lynx.lss ] && cmp -s %D/etc/lynx.lss %D/etc/lynx.lss.sample; then rm -f %D/etc/lynx.lss; fi
+ at exec if [ ! -f %B/lynx.cfg ]; then cp -p %D/%F %B/lynx.cfg; fi
+ at unexec if cmp -s %D/etc/lynx.lss %D/etc/lynx.lss.sample; then rm -f %D/etc/lynx.lss; fi
 etc/lynx.lss.sample
- at exec if [ ! -f %D/etc/lynx.lss ] ; then cp -p %D/%F %B/lynx.lss; fi
+ at exec if [ ! -f %B/lynx.lss ]; then cp -p %D/%F %B/lynx.lss; fi
 @exec mkdir -p %D/share/lynx_help
 %%DOCSDIR%%/CHANGES
 %%DOCSDIR%%/COPYHEADER


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list