1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Correct snprintf(3) usage in the patch

- Make use of new @sample keyword in pkg-plist
- Hand over to games@ team, cleanup a bit
This commit is contained in:
Alexey Dokuchaev 2014-04-17 08:06:06 +00:00
parent 8e2258fb58
commit 1ab22b753f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=351458
3 changed files with 8 additions and 9 deletions

View File

@ -3,23 +3,24 @@
PORTNAME= qstat
PORTVERSION= 2.11
PORTREVISION= 1
CATEGORIES= games net
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= danfe@FreeBSD.org
MAINTAINER= games@FreeBSD.org
COMMENT= Command-line program to query game servers on the net
GNU_CONFIGURE= yes
CONFLICTS_INSTALL= torque-[0-9]*
GNU_CONFIGURE= yes
OPTIONS_DEFINE= DOCS
post-extract:
@${MV} ${WRKSRC}/qstat.cfg ${WRKSRC}/qstat.cfg.default
@${MV} ${WRKSRC}/qstat.cfg ${WRKSRC}/qstat.cfg.sample
post-patch:
@${REINPLACE_CMD} -e 's|qstat\.cfg|&.default|' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|qstat\.cfg|&.sample|' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|' ${WRKSRC}/qstat.c
post-install:

View File

@ -5,7 +5,7 @@
if ( filename != NULL && filename[0] != '\0') {
char path[1024];
- sprintf( path, "%s/%s", filename, HOME_CONFIG_FILE);
+ snprintf( path, (sizeof(path) -1),"%s/%s", var, HOME_CONFIG_FILE);
+ snprintf( path, sizeof(path), "%s/%s", var, HOME_CONFIG_FILE);
}
/* 1. $QSTAT_CONFIG
2. UNIX: $HOME/.qstatrc WIN: $HOME/qstat.cfg

View File

@ -1,7 +1,5 @@
bin/qstat
@unexec if cmp -s %D/etc/qstat.cfg %D/etc/qstat.cfg.default; then rm -f %D/etc/qstat.cfg; fi
etc/qstat.cfg.default
@exec [ -f %B/qstat.cfg ] || cp %B/%f %B/qstat.cfg
@sample etc/qstat.cfg.sample
%%PORTDOCS%%%%DOCSDIR%%/qstatdoc.html
%%PORTDOCS%%%%DOCSDIR%%/info/UT2003.txt
%%PORTDOCS%%%%DOCSDIR%%/info/GhostRecon.txt