diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-05-27 22:12:09 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-05-27 22:12:09 +0000 |
commit | 18dd6954f3060c12b7882f4cb2a1f68dbfc0f102 (patch) | |
tree | 51edb00936e1a3da263df313cad16c1fa2858d19 /net-mgmt | |
parent | eb37a12fc9841da5f3a397814fbb99436d82a988 (diff) | |
download | ports-18dd6954f3060c12b7882f4cb2a1f68dbfc0f102.tar.gz ports-18dd6954f3060c12b7882f4cb2a1f68dbfc0f102.zip |
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/macroscope/Makefile | 15 | ||||
-rw-r--r-- | net-mgmt/macroscope/files/CheckTypeSize.c.in | 34 |
2 files changed, 38 insertions, 11 deletions
diff --git a/net-mgmt/macroscope/Makefile b/net-mgmt/macroscope/Makefile index 24db587a496d..67f06536684b 100644 --- a/net-mgmt/macroscope/Makefile +++ b/net-mgmt/macroscope/Makefile @@ -14,7 +14,6 @@ MASTER_SITES= ftp://ftp.berlios.de/pub/macroscope/ \ MAINTAINER= white_raven@users.berlios.de COMMENT= User and IP traffic management with Web interface -BUILD_DEPENDS= cmake:${PORTSDIR}/devel/cmake LIB_DEPENDS= lzo2:${PORTSDIR}/archivers/lzo2 \ odbc:${PORTSDIR}/databases/unixODBC \ pcap:${PORTSDIR}/net/libpcap @@ -22,13 +21,7 @@ LIB_DEPENDS= lzo2:${PORTSDIR}/archivers/lzo2 \ USE_RC_SUBR= macroscope USE_BZIP2= yes USE_DOS2UNIX= yes - -CMAKE_ARGS= -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_COMPILER:STRING="${CC}" \ - -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ - -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ - -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ - -DCMAKE_INSTALL_PREFIX=${PREFIX} +USE_CMAKE= yes OPTIONS= MYSQL "With MySQL support" on \ FIREBIRD "With Firebird support" off @@ -55,8 +48,8 @@ USE_FIREBIRD= yes BROKEN= Does not compile .endif -do-configure: - @(cd ${WRKSRC}; \ - ${LOCALBASE}/bin/cmake ${CMAKE_ARGS} .) +post-patch: + @${REINPLACE_CMD} -e 's|".*\.c\.in"|"${FILESDIR}/CheckTypeSize.c.in"|' \ + ${WRKSRC}/builds/cmake/CheckTypeSize.cmake .include <bsd.port.post.mk> diff --git a/net-mgmt/macroscope/files/CheckTypeSize.c.in b/net-mgmt/macroscope/files/CheckTypeSize.c.in new file mode 100644 index 000000000000..8c9a0163e524 --- /dev/null +++ b/net-mgmt/macroscope/files/CheckTypeSize.c.in @@ -0,0 +1,34 @@ +#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@ +#ifdef CHECK_TYPE_SIZE_TYPE + +@CHECK_TYPE_SIZE_PREINCLUDE@ +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif /* HAVE_STDINT_H */ + +#ifdef HAVE_STDDEF_H +# include <stddef.h> +#endif /* HAVE_STDDEF_H */ + +@CHECK_TYPE_SIZE_PREMAIN@ + +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + if(ac > 1000){return *av[0];} + return sizeof(CHECK_TYPE_SIZE_TYPE); +} + +#else /* CHECK_TYPE_SIZE_TYPE */ + +# error "CHECK_TYPE_SIZE_TYPE has to specify the type" + +#endif /* CHECK_TYPE_SIZE_TYPE */ |