###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 5.1.1
+VER = 5.4.0
THISAPP = hyperscan-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
-SUP_ARCH = x86_64 i586
+SUP_ARCH = x86_64
+
+# The compiler uses a lot of memory to compile hyperscan, hence we reduce
+# the total number of processes a little bit to be able to build on
+# smaller machines
+MAX_PARALLELISM = $(shell echo $$(( $(SYSTEM_MEMORY) / 1024)))
###############################################################################
# Top-level Rules
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 96f9cd558132dd65ec03648aaaba2a48
+$(DL_FILE)_BLAKE2 = 1a5af88655854b4c1ec58e6663b6c9c4b6fca0aa9d3e4daad3992daf911b8f359f48a95b65e4f05c71aa644e0271471d016fafaca05d547b838a9c52ea016e27
install : $(TARGET)
download :$(patsubst %,$(DIR_DL)/%,$(objects))
-md5 : $(subst %,%_MD5,$(objects))
+b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
-# Downloading, checking, md5sum
+# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+ @$(B2SUM)
###############################################################################
# Installation Details
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch
cd $(DIR_APP) && cmake . \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DBUILD_SHARED_LIBS:BOOL=ON \
- -DBUILD_STATIC_AND_SHARED:BOOL=OFF
+ -DBUILD_STATIC_AND_SHARED:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_EXAMPLES=OFF
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)