1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Add staging support

- Convert to USES=tar:bzip2
- Use @sample for configuration files
- Remove Enable word from options descriptions
This commit is contained in:
Pawel Pekala 2014-05-18 16:21:50 +00:00
parent a0e9a04d87
commit a80d61a390
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354436
4 changed files with 43 additions and 73 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= lynx
DISTVERSION= ${VERSION}.${MINOR_VERSION:S/.//}
PORTREVISION= 1
CATEGORIES= japanese www ipv6
MASTER_SITES= http://lynx.isc.org/current/ \
http://ftp2.uk.freebsd.org/sites/lynx.isc.org/current/
@ -18,7 +19,7 @@ MINOR_VERSION= rel.1
CONFLICTS= lynx-2.* ja-lynx-2.8.8.*
USE_BZIP2= yes
USES= tar:bzip2
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-screen=ncurses --with-zlib --libdir="${L_LIB}" \
--enable-nsl-fork --enable-ipv6 \
@ -26,21 +27,20 @@ CONFIGURE_ARGS= --with-screen=ncurses --with-zlib --libdir="${L_LIB}" \
--with-bzlib
MAKE_ARGS= helpdir=${L_HELP} docdir=${DOCSDIR}
MAKEFILE= makefile
INSTALL_TARGET= install-full
WRKSRC= ${WRKDIR}/${PORTNAME}${VERSION:S/./-/g}
L_LIB= ${PREFIX}/etc
L_HELP= ${PREFIX}/share/lynx_help
MAN1= lynx.1
MAKE_JOBS_UNSAFE=yes
OPTIONS_DEFINE= JAPANESE_UTF8 COLOR_STYLE DEFAULT_COLORS DOCS
OPTIONS_SUB= yes
JAPANESE_UTF8_DESC= Enable experimental Japanese UTF-8 logic
COLOR_STYLE_DESC= Enable color style (ncurses/curses)
DEFAULT_COLORS_DESC= Enable default colors (ncurses/slang)
JAPANESE_UTF8_DESC= Experimental Japanese UTF-8 logic
COLOR_STYLE_DESC= Color style (ncurses/curses)
DEFAULT_COLORS_DESC= Default colors (ncurses/slang)
JAPANESE_UTF8_USES= iconv
JAPANESE_UTF8_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG}
@ -48,25 +48,10 @@ JAPANESE_UTF8_CONFIGURE_ENABLE= japanese-utf8
COLOR_STYLE_CONFIGURE_ENABLE= color-style
DEFAULT_COLORS_CONFIGURE_ENABLE=default-colors
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
INSTALL_TARGET= install-full
.else
INSTALL_TARGET= install install-help
.endif
# Change "cd foo && $(MAKE_RECUR)" into "$(MAKE_RECUR) -C foo" to unbreak
# parallel builds
post-patch:
@${REINPLACE_CMD} -E 's|cd (.+) && (\$$\(MAKE_RECUR\))|\2 -C \1|' \
${WRKSRC}/${MAKEFILE}.in
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
.endif
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${L_HELP}
.include <bsd.port.mk>

View File

@ -1,46 +0,0 @@
--- makefile.in.orig 2008-09-22 07:49:47.000000000 +0900
+++ makefile.in 2010-05-01 11:16:06.000000000 +0900
@@ -381,14 +381,9 @@
if test "$(COMPRESS_PROG)" != "" ; then \
(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 ; \
- else \
- cp $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ; \
- fi'
- @echo Updating $(sysconfdir)/lynx.cfg to point to installed help-files
+ @echo Updating $(sysconfdir)/lynx.cfg.default
+ cp $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ;
+ @echo Updating $(sysconfdir)/lynx.cfg.default to point to installed help-files
@ECHO_CC@sed -e '/^HELPFILE:http/s!^!#!' \
-e '/^#HELPFILE:file/s!#!!' \
$(SYSCONFDIR)/lynx.tmp | \
@@ -396,9 +391,9 @@
$(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)!' \
- >$(SYSCONFDIR)/lynx.cfg
- chmod 644 $(SYSCONFDIR)/lynx.cfg
+ >$(SYSCONFDIR)/lynx.cfg.default
-rm -f $(SYSCONFDIR)/lynx.tmp
+ -[ ! -f $(SYSCONFDIR)/lynx.cfg ] && $(INSTALL_DATA) $(SYSCONFDIR)/lynx.cfg.default $(SYSCONFDIR)/lynx.cfg
LYHelp.h : help_files.sed $(srcdir)/LYHelp.hin
@echo Creating $@
@@ -420,10 +415,11 @@
$(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(scripts_dir)/cfg_defs.sh $(srcdir)'
install-cfg : $(SYSCONFDIR)
- @$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg
+ @$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg.default
install-lss : $(SYSCONFDIR)
- @$(SHELL) $(scripts_dir)/install-lss.sh "$(INSTALL_DATA)" $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss
+ @$(SHELL) $(scripts_dir)/install-lss.sh "$(INSTALL_DATA)" $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss.default
+ -[ ! -f $(SYSCONFDIR)/lynx.lss ] && $(INSTALL_DATA) $(SYSCONFDIR)/lynx.lss.default $(SYSCONFDIR)/lynx.lss
uninstall ::
@MSG_DIR_MAKE@ cd $(PO_DIR) && $(MAKE_RECUR) uninstall

View File

@ -0,0 +1,34 @@
--- makefile.in.orig 2008-09-22 00:49:47.000000000 +0200
+++ makefile.in 2014-05-18 13:31:04.012681258 +0200
@@ -319,7 +319,7 @@
fi'
$(SHELL) -c 'for name in COPYING COPYHEADER; do \
cd $(HELPDIR) && rm -f $$name ;\
- cd $(HELPDIR) && ( $(LN_S) $(DOCDIR)/$$name . || cp $(DOCDIR)/$$name . );\
+ cd $(HELPDIR) && ( $(LN_S) $(docdir)/$$name . || cp $(DOCDIR)/$$name . );\
done'
-$(SHELL) -c 'case `id|sed -e "s/(.*//"` in uid=0) chown -R root $(DOCDIR);; esac'
@@ -396,8 +396,8 @@
$(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)!' \
- >$(SYSCONFDIR)/lynx.cfg
- chmod 644 $(SYSCONFDIR)/lynx.cfg
+ >$(SYSCONFDIR)/lynx.cfg.sample
+ chmod 644 $(SYSCONFDIR)/lynx.cfg.sample
-rm -f $(SYSCONFDIR)/lynx.tmp
LYHelp.h : help_files.sed $(srcdir)/LYHelp.hin
@@ -420,10 +420,9 @@
$(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(scripts_dir)/cfg_defs.sh $(srcdir)'
install-cfg : $(SYSCONFDIR)
- @$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg
install-lss : $(SYSCONFDIR)
- @$(SHELL) $(scripts_dir)/install-lss.sh "$(INSTALL_DATA)" $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss
+ @$(SHELL) $(scripts_dir)/install-lss.sh "$(INSTALL_DATA)" $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss.sample
uninstall ::
@MSG_DIR_MAKE@ cd $(PO_DIR) && $(MAKE_RECUR) uninstall

View File

@ -1,10 +1,7 @@
bin/lynx
@unexec if [ -f %D/etc/lynx.cfg ] && cmp -s %D/etc/lynx.cfg %D/etc/lynx.cfg.default; then rm -f %D/etc/lynx.cfg; fi
etc/lynx.cfg.default
@exec if [ ! -f %D/etc/lynx.cfg ] ; then cp -p %D/%F %B/lynx.cfg; fi
%%COLOR_STYLE%%@unexec if [ -f %D/etc/lynx.lss ] && cmp -s %D/etc/lynx.lss %D/etc/lynx.lss.default; then rm -f %D/etc/lynx.lss; fi
%%COLOR_STYLE%%etc/lynx.lss.default
%%COLOR_STYLE%%@exec if [ ! -f %D/etc/lynx.lss ] ; then cp -p %D/%F %B/lynx.lss; fi
@sample etc/lynx.cfg.sample
%%COLOR_STYLE%%@sample etc/lynx.lss.sample
man/man1/lynx.1.gz
@exec mkdir -p %D/share/lynx_help
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/COPYHEADER