libiio: fix pkgconfig paths
[feed/packages.git] / libs / hyperscan / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=hyperscan
9 PKG_VERSION:=5.4.2
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=https://codeload.github.com/intel/hyperscan/tar.gz/v$(PKG_VERSION)?
14 PKG_HASH:=32b0f24b3113bbc46b6bfaa05cf7cf45840b6b59333d078cc1f624e4c40b2b99
15
16 PKG_MAINTAINER:=John Audia <therealgraysky@proton.me>
17 PKG_LICENSE:=BSD-3-Clause BSD-2-Clause BSL-1.0
18 PKG_LICENSE_FILES:=LICENSE
19 PKG_BUILD_DEPENDS:=ragel/host python3/host boost/host
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 # A minimum of SSSE3 support is required to use hyperscan
25 # We need to define the C(XX)FLAGS to avoid -march=native being
26 # used as this is hardcoded by upstream, see:
27 # https://github.com/intel/hyperscan/blob/master/doc/dev-reference/getting_started.rst
28 CMAKE_OPTIONS += \
29 -DCMAKE_INSTALL_PREFIX=/usr \
30 -DCMAKE_INSTALL_LIBDIR=lib \
31 -DBUILD_SHARED_LIBS=ON \
32 -DCMAKE_C_FLAGS="-march=x86-64-v2" \
33 -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
34 -Wno-dev
35
36 define Package/hyperscan-headers
37 CATEGORY:=Libraries
38 SECTION:=libs
39 TITLE:=Hyperscan Headers
40 URL:=https://github.com/intel/hyperscan
41 DEPENDS:=@TARGET_x86_64
42 endef
43
44 define Package/hyperscan-runtime
45 CATEGORY:=Libraries
46 SECTION:=libs
47 TITLE:=Hyperscan Runtime
48 URL:=https://github.com/intel/hyperscan
49 DEPENDS:=@TARGET_x86_64 +libstdcpp
50 endef
51
52 define Package/hyperscan-headers/description
53 This package contains the headers for Hyperscan.
54 endef
55
56 define Package/hyperscan-runtime/description
57 This package contains the shared objects for Hyperscan.
58 endef
59
60 # This installs files into ./staging_dir/. so that you can cross compile from the host
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/include/hs
63 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/hs/* $(1)/usr/include/hs/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libhs* $(1)/usr/lib/
66 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67 $(INSTALL_DATA) $(PKG_BUILD_DIR)/libhs.pc $(1)/usr/lib/pkgconfig/libhs.pc
68 endef
69
70 # These install files on the target. Compare with Build/InstallDev
71 define Package/hyperscan-headers/install
72 $(INSTALL_DIR) $(1)/usr/include/hs
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/hs/*.h $(1)/usr/include/hs/
74 endef
75
76 define Package/hyperscan-runtime/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libhs* $(1)/usr/lib/
79 endef
80
81 $(eval $(call BuildPackage,hyperscan-headers))
82 $(eval $(call BuildPackage,hyperscan-runtime))