diff options
-rw-r--r-- | devel/bcpp/Makefile | 27 | ||||
-rw-r--r-- | devel/bcpp/distinfo | 4 | ||||
-rw-r--r-- | devel/bcpp/files/patch-code__bcpp.cpp | 24 | ||||
-rw-r--r-- | devel/bcpp/pkg-message | 2 | ||||
-rw-r--r-- | devel/bcpp/pkg-plist | 2 |
5 files changed, 19 insertions, 40 deletions
diff --git a/devel/bcpp/Makefile b/devel/bcpp/Makefile index 4ff216f3eab8..ad716fd0f5ec 100644 --- a/devel/bcpp/Makefile +++ b/devel/bcpp/Makefile @@ -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> diff --git a/devel/bcpp/distinfo b/devel/bcpp/distinfo index f8dca36ac433..35c9ba990088 100644 --- a/devel/bcpp/distinfo +++ b/devel/bcpp/distinfo @@ -1,2 +1,2 @@ -SHA256 (bcpp-20050725.tgz) = 1a4b5e8e741d6be400eb68b7c4a3eebc6dabe29948a72a7a0bccb1db075eaa2a -SIZE (bcpp-20050725.tgz) = 132649 +SHA256 (bcpp-20120318.tgz) = 75a7035da6387ff94111e643ff9efd26f742b52732f0bb8e434c216b8a642507 +SIZE (bcpp-20120318.tgz) = 147987 diff --git a/devel/bcpp/files/patch-code__bcpp.cpp b/devel/bcpp/files/patch-code__bcpp.cpp deleted file mode 100644 index e6d787eb57af..000000000000 --- a/devel/bcpp/files/patch-code__bcpp.cpp +++ /dev/null @@ -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) diff --git a/devel/bcpp/pkg-message b/devel/bcpp/pkg-message deleted file mode 100644 index 87ab868406bd..000000000000 --- a/devel/bcpp/pkg-message +++ /dev/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 diff --git a/devel/bcpp/pkg-plist b/devel/bcpp/pkg-plist index 4a2f216c371f..b856950ce290 100644 --- a/devel/bcpp/pkg-plist +++ b/devel/bcpp/pkg-plist @@ -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%% |