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

honor prefix & fix warning

PR:		32996
Submitted by:	maintainer
This commit is contained in:
Ying-Chieh Liao 2001-12-19 03:52:40 +00:00
parent ecefb5ebe9
commit ae7cc0cc5c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=51783
3 changed files with 27 additions and 7 deletions

View File

@ -18,10 +18,14 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/code
MAKEFILE= makefile
ALL_TARGET= ${PORTNAME}
post-patch:
@${PERL5} -pi -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/bcpp.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.cfg \
${PREFIX}/etc/${PORTNAME}.cfg.sample
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/txtdocs/hirachy.txt ${DOCSDIR}

View File

@ -1,20 +1,36 @@
--- bcpp.cpp.orig Tue Aug 10 20:54:52 1999
+++ bcpp.cpp Wed Nov 7 10:48:27 2001
@@ -2721,6 +2721,7 @@
+++ bcpp.cpp Tue Dec 18 20:22:18 2001
@@ -1431,6 +1431,7 @@
}
+/*
// purge an Indent-stack
static void freeIndentStack(StackList* pImode)
{
@@ -1451,6 +1452,7 @@
dst -> push(temp);
}
}
+*/
// no extra indent immediately after any brace
void resetSingleIndent(StackList* pIMode)
@@ -2721,6 +2723,7 @@
char* pSPath = getenv ("PATH");
char* pEPath = NULL;
char* pNameMem = NULL;
+ char* tmpCfgName = new char[ 16 + strlen(pCfgName) + 1];
+ char* tmpCfgName = new char[strlen("%%PREFIX%%/etc")+strlen(pCfgName)+1];
char sepChar = NULLC;
const char* pathSepChar;
char backUp;
@@ -2729,6 +2730,13 @@
@@ -2729,6 +2732,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 /usr/local/etc
+ tmpCfgName = strcat( tmpCfgName, "/usr/local/etc/" );
+ // 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;

View File

@ -1,2 +1,2 @@
You should modify /usr/local/etc/bcpp.cfg to your liking and
You should modify /usr/local/etc/bcpp.cfg.sample to your liking and
copy it to /usr/local/etc/bcpp.cfg