mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: spicy-1.8.1
This commit is contained in:
parent
4c5cc13029
commit
f1863a0492
2 changed files with 63 additions and 0 deletions
39
srcpkgs/spicy/patches/fix-cross.patch
Normal file
39
srcpkgs/spicy/patches/fix-cross.patch
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
--- a/scripts/precompile-headers.sh
|
||||||
|
+++ b/scripts/precompile-headers.sh
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
config=$1
|
||||||
|
header=$2;
|
||||||
|
|
||||||
|
- for flag in $(${config} --cxxflags); do
|
||||||
|
+ for flag in $(${CROSSCOMPILE_EMULATOR} ${config} --cxxflags); do
|
||||||
|
if ! echo "${flag}" | grep -q '^-I'; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
@@ -49,7 +49,7 @@
|
||||||
|
LIBSPICY=$(search_header "${SPICY_CONFIG}" spicy/rt/libspicy.h)
|
||||||
|
|
||||||
|
# Extract version from `hilti-config`. It should be identical to the one from `spicy-config`.
|
||||||
|
-VERSION=$(${HILTI_CONFIG} --version | cut -d ' ' -f1)
|
||||||
|
+VERSION=$(${CROSSCOMPILE_EMULATOR} ${HILTI_CONFIG} --version | cut -d ' ' -f1)
|
||||||
|
|
||||||
|
# The cache is read from the environment variable `SPICY_CACHE`
|
||||||
|
# if set; else a patch under the user's home directory is used.
|
||||||
|
@@ -61,14 +61,14 @@
|
||||||
|
# NOTE: The compiler invocations here should be kept in sync
|
||||||
|
# with what we do in `CMakeLists.txt`.
|
||||||
|
cp "${LIBHILTI}" "${CACHE}/precompiled_libhilti_debug.h"
|
||||||
|
-$("${HILTI_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti_debug.h.gch"
|
||||||
|
+$(${CROSSCOMPILE_EMULATOR} "${HILTI_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti_debug.h.gch"
|
||||||
|
|
||||||
|
cp "${LIBHILTI}" "${CACHE}/precompiled_libhilti.h"
|
||||||
|
|
||||||
|
-$("${HILTI_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti.h.gch"
|
||||||
|
+$(${CROSSCOMPILE_EMULATOR} "${HILTI_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti.h.gch"
|
||||||
|
|
||||||
|
cp "${LIBSPICY}" "${CACHE}/precompiled_libspicy_debug.h"
|
||||||
|
-$("${SPICY_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy_debug.h.gch"
|
||||||
|
+$(${CROSSCOMPILE_EMULATOR} "${SPICY_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy_debug.h.gch"
|
||||||
|
|
||||||
|
cp "${LIBSPICY}" "${CACHE}/precompiled_libspicy.h"
|
||||||
|
-$("${SPICY_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy.h.gch"
|
||||||
|
+$(${CROSSCOMPILE_EMULATOR} "${SPICY_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy.h.gch"
|
24
srcpkgs/spicy/template
Normal file
24
srcpkgs/spicy/template
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Template file for 'spicy'
|
||||||
|
pkgname=spicy
|
||||||
|
version=1.8.1
|
||||||
|
revision=1
|
||||||
|
build_style=cmake
|
||||||
|
build_helper=qemu
|
||||||
|
hostmakedepends="flex python3"
|
||||||
|
makedepends="libfl-devel zlib-devel"
|
||||||
|
short_desc="Generate Robust Parsers for Protocols & File Formats"
|
||||||
|
maintainer="Andrew Benson <abenson+void@gmail.com>"
|
||||||
|
license="BSD-3-Clause"
|
||||||
|
homepage="https://docs.zeek.org/projects/spicy/en/latest/"
|
||||||
|
distfiles="https://github.com/zeek/spicy/releases/download/v${version}/spicy.tar.gz"
|
||||||
|
checksum=016d2ba6dc7a35e007bc8519afd7dec4ede15a129ce7b268ebd90865d8da9fa8
|
||||||
|
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
export CROSSCOMPILE_EMULATOR="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
|
||||||
|
else
|
||||||
|
export CROSSCOMPILE_EMULATOR=
|
||||||
|
fi
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vlicense LICENSE
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue