aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/macroscope
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2008-05-28 06:12:09 +0800
committermiwi <miwi@FreeBSD.org>2008-05-28 06:12:09 +0800
commitc486a60f04933c8227640b8faca0f931afbe32ef (patch)
tree827b6cdb889eaa1ccc00ca4598ae40dee1a42a50 /net-mgmt/macroscope
parent888eabb1977d6504355090d942963975c8d755ed (diff)
downloadfreebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.tar.gz
freebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.tar.zst
freebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.zip
- Add common code to support for cmake based ports.
- Update devel/cmake to 2.6.0 (also fix ports/123092) - Use the new CMAKE build framework in all ports using cmake Approved by: portmgr (pav)
Diffstat (limited to 'net-mgmt/macroscope')
-rw-r--r--net-mgmt/macroscope/Makefile15
-rw-r--r--net-mgmt/macroscope/files/CheckTypeSize.c.in34
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 */