Date: Mon, 1 Dec 2014 19:35:35 +0000 (UTC) From: Ryan Steinmetz <zi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r373720 - in head/security: . clambc clambc/files Message-ID: <201412011935.sB1JZZuZ014809@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zi Date: Mon Dec 1 19:35:34 2014 New Revision: 373720 URL: https://svnweb.freebsd.org/changeset/ports/373720 QAT: https://qat.redports.org/buildarchive/r373720/ Log: New port: security/clambc: The ClamAV bytecode compiler allows users to build their own bytecode signatures for use with ClamAV. WWW: https://www.clamav.net/ Added: head/security/clambc/ head/security/clambc/Makefile (contents, props changed) head/security/clambc/distinfo (contents, props changed) head/security/clambc/files/ head/security/clambc/files/patch-clang_lib_Driver_ToolChains.cpp (contents, props changed) head/security/clambc/files/patch-clang_lib_Frontend_CompilerInvocation.cpp (contents, props changed) head/security/clambc/files/patch-clang_lib_Headers_CMakeLists.txt (contents, props changed) head/security/clambc/files/patch-clang_lib_Headers_Makefile (contents, props changed) head/security/clambc/files/patch-clang_lib_Runtime_Makefile (contents, props changed) head/security/clambc/files/patch-clang_tools_CIndex_CIndexer.cpp (contents, props changed) head/security/clambc/files/patch-docs_user_building.tex (contents, props changed) head/security/clambc/files/patch-docs_user_html_clambc-user.html (contents, props changed) head/security/clambc/pkg-descr (contents, props changed) head/security/clambc/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Mon Dec 1 19:33:16 2014 (r373719) +++ head/security/Makefile Mon Dec 1 19:35:34 2014 (r373720) @@ -66,6 +66,7 @@ SUBDIR += clamav SUBDIR += clamav-milter SUBDIR += clamav-unofficial-sigs + SUBDIR += clambc SUBDIR += clamcour SUBDIR += clamd-stream-client SUBDIR += clamsmtp Added: head/security/clambc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/Makefile Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,39 @@ +# Created by: Ryan Steinmetz <zi@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= clambc +DISTVERSION= 0.98.5rc1 +CATEGORIES= security +MASTER_SITES= SF +MASTER_SITE_SUBDIR= clamav/${PORTNAME:tl} + +MAINTAINER= zi@FreeBSD.org +COMMENT= Bytecode signature compiler for ClamAV + +LICENSE= GPLv2 + +USES= gmake libtool perl5 +ALL_TARGET= clambc-only +GNU_CONFIGURE= yes +USE_GCC= any +USE_LDCONFIG= yes +USE_PERL5= build +CONFIGURE_SCRIPT=../llvm/configure +CONFIGURE_ARGS= --enable-optimized --enable-targets=host-only \ + --disable-bindings --enable-bindings=none + +WRKSRC= ${WRKDIR}/clamav-bytecode-compiler-${DISTNAME}/obj + +post-extract: + @${MKDIR} ${WRKSRC} + +do-install: + @${MKDIR} ${STAGEDIR}${DATADIR}/include/ + @${RM} ${WRKSRC}/../clang/lib/Headers/CMakeLists.txt \ + ${WRKSRC}/../clang/lib/Headers/Makefile + (cd ${WRKSRC}/../clang/lib/Headers/ && ${COPYTREE_SHARE} . \ + ${STAGEDIR}${DATADIR}/include/) + ${INSTALL_PROGRAM} ${WRKSRC}/Release/bin/clambc-compiler \ + ${STAGEDIR}${PREFIX}/bin/ + +.include <bsd.port.mk> Added: head/security/clambc/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/distinfo Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,2 @@ +SHA256 (clambc-0.98.5rc1.tar.gz) = bed439949f4259791c80d069ea58c97637bdfaefe352dd0d8f27eb9e2df9b491 +SIZE (clambc-0.98.5rc1.tar.gz) = 17867376 Added: head/security/clambc/files/patch-clang_lib_Driver_ToolChains.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-clang_lib_Driver_ToolChains.cpp Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,11 @@ +--- ../clang/lib/Driver/ToolChains.cpp~ 2014-11-10 13:04:47.000000000 -0500 ++++ ../clang/lib/Driver/ToolChains.cpp 2014-11-18 12:24:07.772342155 -0500 +@@ -895,7 +895,7 @@ + + Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple) + : Generic_GCC(Host, Triple) { +- getFilePaths().push_back(getDriver().Dir + "/../lib/clang/1.0/"); ++ getFilePaths().push_back(getDriver().Dir + "/../share/clambc/"); + getFilePaths().push_back("/lib/"); + getFilePaths().push_back("/usr/lib/"); + Added: head/security/clambc/files/patch-clang_lib_Frontend_CompilerInvocation.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-clang_lib_Frontend_CompilerInvocation.cpp Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,14 @@ +--- ../clang/lib/Frontend/CompilerInvocation.cpp.orig ++++ ../clang/lib/Frontend/CompilerInvocation.cpp +@@ -993,9 +993,8 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, + P.eraseComponent(); // Remove /bin from foo/bin + + // Get foo/lib/clang/<version>/include +- P.appendComponent("lib"); +- P.appendComponent("clang"); +- P.appendComponent(CLANG_VERSION_STRING); ++ P.appendComponent("share"); ++ P.appendComponent("clambc"); + } + + return P.str(); Added: head/security/clambc/files/patch-clang_lib_Headers_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-clang_lib_Headers_CMakeLists.txt Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,11 @@ +--- ../clang/lib/Headers/CMakeLists.txt.orig ++++ ../clang/lib/Headers/CMakeLists.txt +@@ -17,7 +17,7 @@ set(files + if (MSVC_IDE OR XCODE) + set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include) + else () +- set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) ++ set(output_dir ${LLVM_BINARY_DIR}/share/clambc) + endif () + + Added: head/security/clambc/files/patch-clang_lib_Headers_Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-clang_lib_Headers_Makefile Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,20 @@ +--- ../clang/lib/Headers/Makefile.orig ++++ ../clang/lib/Headers/Makefile +@@ -12,7 +12,7 @@ include $(LEVEL)/Makefile.common + + CLANG_VERSION := $(shell cat $(PROJ_SRC_DIR)/../../VER) + +-HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include ++HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/share/clambc + + HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h)) + +@@ -26,7 +26,7 @@ $(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir + # Hook into the standard Makefile rules. + all-local:: $(OBJHEADERS) + +-PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include ++PROJ_headers := $(DESTDIR)$(PROJ_prefix)/share/clambc + + INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS)) + Added: head/security/clambc/files/patch-clang_lib_Runtime_Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-clang_lib_Runtime_Makefile Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,13 @@ +--- ../clang/lib/Runtime/Makefile.orig ++++ ../clang/lib/Runtime/Makefile +@@ -17,8 +17,8 @@ LEVEL = ../../../.. + include $(LEVEL)/Makefile.common + + CLANG_VERSION := $(shell cat $(PROJ_SRC_DIR)/../../VER) +-ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION) +-PROJ_resources := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION) ++ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/share/clambc ++PROJ_resources := $(DESTDIR)$(PROJ_prefix)/share/clambc + + ResourceLibDir := $(ResourceDir)/lib + PROJ_resources_lib := $(PROJ_resources)/lib Added: head/security/clambc/files/patch-clang_tools_CIndex_CIndexer.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-clang_tools_CIndex_CIndexer.cpp Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,14 @@ +--- ../clang/tools/CIndex/CIndexer.cpp.orig ++++ ../clang/tools/CIndex/CIndexer.cpp +@@ -87,9 +87,8 @@ std::string CIndexer::getClangResourcesPath() { + P.eraseComponent(); // Remove /bin from foo/bin + + // Get foo/lib/clang/<version>/include +- P.appendComponent("lib"); +- P.appendComponent("clang"); +- P.appendComponent(CLANG_VERSION_STRING); ++ P.appendComponent("local"); ++ P.appendComponent("clambc"); + } + + return P.str(); Added: head/security/clambc/files/patch-docs_user_building.tex ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-docs_user_building.tex Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,20 @@ +--- ../docs/user/building.tex.orig ++++ ../docs/user/building.tex +@@ -96,7 +96,7 @@ $ make install-clambc -j8 + \verb+$PREFIX/bin/clambc-compiler+ + \item ClamAV bytecode header files: + \begin{verbatim} +-$PREFIX/lib/clang/1.1/include: ++$PREFIX/share/clambc: + bcfeatures.h + bytecode_{api_decl.c,api,disasm,execs,features}.h + bytecode.h +@@ -104,7 +104,7 @@ bytecode_{local,pe,types}.h + \end{verbatim} + \item clang compiler (with ClamAV bytecode backend) compiler include files: + \begin{verbatim} +-$PREFIX/lib/clang/1.1/include: ++$PREFIX/share/clambc: + emmintrin.h + float.h + iso646.h Added: head/security/clambc/files/patch-docs_user_html_clambc-user.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/files/patch-docs_user_html_clambc-user.html Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,11 @@ +--- ../docs/user/html/clambc-user.html.orig ++++ ../docs/user/html/clambc-user.html +@@ -233,7 +233,7 @@ class="ec-lmtt-10">$PREFIX/bin/clambc-compiler</span></span></span> + + + <div class="verbatim" id="verbatim-5"> +- $PREFIX/lib/clang/1.1/include: ++ $PREFIX/share/clambc: +  <br />bcfeatures.h +  <br />bytecode_{api_decl.c,api,disasm,execs,features}.h +  <br />bytecode.h Added: head/security/clambc/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/pkg-descr Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,4 @@ +The ClamAV bytecode compiler allows users to build their own bytecode +signatures for use with ClamAV. + +WWW: https://www.clamav.net/ Added: head/security/clambc/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clambc/pkg-plist Mon Dec 1 19:35:34 2014 (r373720) @@ -0,0 +1,28 @@ +bin/clambc-compiler +%%DATADIR%%/include/bcfeatures.h +%%DATADIR%%/include/bytecode.h +%%DATADIR%%/include/bytecode_api.h +%%DATADIR%%/include/bytecode_api_decl.c.h +%%DATADIR%%/include/bytecode_detect.h +%%DATADIR%%/include/bytecode_disasm.h +%%DATADIR%%/include/bytecode_execs.h +%%DATADIR%%/include/bytecode_features.h +%%DATADIR%%/include/bytecode_ilog.h +%%DATADIR%%/include/bytecode_local.h +%%DATADIR%%/include/bytecode_pe.h +%%DATADIR%%/include/bytecode_types.h +%%DATADIR%%/include/emmintrin.h +%%DATADIR%%/include/float.h +%%DATADIR%%/include/iso646.h +%%DATADIR%%/include/limits.h +%%DATADIR%%/include/mm_malloc.h +%%DATADIR%%/include/mmintrin.h +%%DATADIR%%/include/pmmintrin.h +%%DATADIR%%/include/smmintrin.h +%%DATADIR%%/include/stdarg.h +%%DATADIR%%/include/stdbool.h +%%DATADIR%%/include/stddef.h +%%DATADIR%%/include/stdint.h +%%DATADIR%%/include/tgmath.h +%%DATADIR%%/include/tmmintrin.h +%%DATADIR%%/include/xmmintrin.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412011935.sB1JZZuZ014809>