- Update to version 20120318
- Convert to optionsng PR: ports/171979 Submitted by: KATO Tsuguru <tkato432 _at_ yahoo.com> Approved by: beat (mentor) Feature safe: yes
This commit is contained in:
parent
8a12622713
commit
150086bb40
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308046
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= bcpp
|
||||
PORTVERSION= 20050725
|
||||
PORTVERSION= 20120318
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ftp://invisible-island.net/bcpp/
|
||||
EXTRACT_SUFX= .tgz
|
||||
@ -10,27 +10,30 @@ EXTRACT_SUFX= .tgz
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= A utility similar to indent for C++ code
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
MAKEFILE= makefile
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
MAKEFILE= makefile
|
||||
|
||||
CFLAGS+= -DBCPP_CONFIG_DIR=\\\"${PREFIX}/etc/${PORTNAME}\\\"
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
|
||||
${WRKSRC}/code/bcpp.cpp
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/code/bcpp.cpp
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/code/${PORTNAME} ${PREFIX}/bin
|
||||
${INSTALL_DATA} ${WRKSRC}/code/${PORTNAME}.cfg \
|
||||
${PREFIX}/etc/${PORTNAME}.cfg.sample
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.if !exists(${PREFIX}/etc/${PORTNAME}.cfg)
|
||||
cd ${PREFIX}/etc && ${CP} -p ${PORTNAME}.cfg.sample ${PORTNAME}.cfg
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/txtdocs/hirachy.txt ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/txtdocs/manual.txt ${DOCSDIR}
|
||||
.endif
|
||||
@${ECHO_CMD}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
@${ECHO_CMD}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (bcpp-20050725.tgz) = 1a4b5e8e741d6be400eb68b7c4a3eebc6dabe29948a72a7a0bccb1db075eaa2a
|
||||
SIZE (bcpp-20050725.tgz) = 132649
|
||||
SHA256 (bcpp-20120318.tgz) = 75a7035da6387ff94111e643ff9efd26f742b52732f0bb8e434c216b8a642507
|
||||
SIZE (bcpp-20120318.tgz) = 147987
|
||||
|
@ -1,24 +0,0 @@
|
||||
--- code/bcpp.cpp.orig Sat May 18 13:53:27 2002
|
||||
+++ code/bcpp.cpp Fri Jun 7 14:39:33 2002
|
||||
@@ -2755,6 +2757,7 @@
|
||||
char* pSPath = getenv ("PATH");
|
||||
char* pEPath = NULL;
|
||||
char* pNameMem = NULL;
|
||||
+ char* tmpCfgName = new char[strlen("%%PREFIX%%/etc") + strlen(pCfgName)+1];
|
||||
char sepChar = NULLC;
|
||||
const char* pathSepChar;
|
||||
char backUp;
|
||||
@@ -2763,6 +2766,13 @@
|
||||
// test to see if file is in current directory first !
|
||||
if ((pCfgFile = fopen(pCfgName, "r")) != NULL)
|
||||
return;
|
||||
+
|
||||
+ // look to see if it's in %%PREFIX%%/etc
|
||||
+ tmpCfgName = strcat( tmpCfgName, "%%PREFIX%%/etc/" );
|
||||
+ tmpCfgName = strcat( tmpCfgName, pCfgName );
|
||||
+ if ((pCfgFile = fopen(tmpCfgName, "r")) != NULL)
|
||||
+ return;
|
||||
+
|
||||
|
||||
// environment variable not found, lord knows what it is !
|
||||
if (pSPath == NULL)
|
@ -1,2 +0,0 @@
|
||||
You should modify /usr/local/etc/bcpp.cfg.sample to your liking and
|
||||
copy it to /usr/local/etc/bcpp.cfg
|
@ -1,5 +1,7 @@
|
||||
bin/bcpp
|
||||
@unexec if cmp -s %D/etc/bcpp.cfg %D/etc/bcpp.cfg.sample; then rm -f %D/etc/bcpp.cfg; fi
|
||||
etc/bcpp.cfg.sample
|
||||
@exec if [ ! -f %D/etc/bcpp.cfg ] ; then cp -p %D/etc/bcpp.cfg.sample %D/etc/bcpp.cfg; fi
|
||||
%%PORTDOCS%%%%DOCSDIR%%/hirachy.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/manual.txt
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user