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/
This commit is contained in:
parent
79c47e0ccb
commit
52585fa661
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=373720
@ -66,6 +66,7 @@
|
||||
SUBDIR += clamav
|
||||
SUBDIR += clamav-milter
|
||||
SUBDIR += clamav-unofficial-sigs
|
||||
SUBDIR += clambc
|
||||
SUBDIR += clamcour
|
||||
SUBDIR += clamd-stream-client
|
||||
SUBDIR += clamsmtp
|
||||
|
39
security/clambc/Makefile
Normal file
39
security/clambc/Makefile
Normal file
@ -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>
|
2
security/clambc/distinfo
Normal file
2
security/clambc/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (clambc-0.98.5rc1.tar.gz) = bed439949f4259791c80d069ea58c97637bdfaefe352dd0d8f27eb9e2df9b491
|
||||
SIZE (clambc-0.98.5rc1.tar.gz) = 17867376
|
11
security/clambc/files/patch-clang_lib_Driver_ToolChains.cpp
Normal file
11
security/clambc/files/patch-clang_lib_Driver_ToolChains.cpp
Normal file
@ -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/");
|
||||
|
@ -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();
|
11
security/clambc/files/patch-clang_lib_Headers_CMakeLists.txt
Normal file
11
security/clambc/files/patch-clang_lib_Headers_CMakeLists.txt
Normal file
@ -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 ()
|
||||
|
||||
|
20
security/clambc/files/patch-clang_lib_Headers_Makefile
Normal file
20
security/clambc/files/patch-clang_lib_Headers_Makefile
Normal file
@ -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))
|
||||
|
13
security/clambc/files/patch-clang_lib_Runtime_Makefile
Normal file
13
security/clambc/files/patch-clang_lib_Runtime_Makefile
Normal file
@ -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
|
14
security/clambc/files/patch-clang_tools_CIndex_CIndexer.cpp
Normal file
14
security/clambc/files/patch-clang_tools_CIndex_CIndexer.cpp
Normal file
@ -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();
|
20
security/clambc/files/patch-docs_user_building.tex
Normal file
20
security/clambc/files/patch-docs_user_building.tex
Normal file
@ -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
|
11
security/clambc/files/patch-docs_user_html_clambc-user.html
Normal file
11
security/clambc/files/patch-docs_user_html_clambc-user.html
Normal file
@ -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
|
4
security/clambc/pkg-descr
Normal file
4
security/clambc/pkg-descr
Normal file
@ -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/
|
28
security/clambc/pkg-plist
Normal file
28
security/clambc/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user