Merge pull request #6105 from smlng/pr/pkg/relic/fix_for_macOS

pkg/relic: fix for macOS
pr/spi.typo
Cenk Gündoğan 7 years ago committed by GitHub
commit 603855a050

@ -19,6 +19,8 @@ $(PKG_BUILDDIR)/comp-options.cmake: fix_source
$(PKG_BUILDDIR)/Makefile: $(PKG_BUILDDIR)/comp-options.cmake
cd "$(PKG_BUILDDIR)" && COMP="$(filter-out -Werror=old-style-definition -Werror=strict-prototypes, $(CFLAGS) ) " cmake -DCMAKE_TOOLCHAIN_FILE=comp-options.cmake -DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) .
CFLAGS += -Wno-gnu-zero-variadic-macro-arguments -Wno-unused-function
fix_source: git-download
./fix-util_print_wo_args.sh $(PKG_BUILDDIR)
./fix-old-style-definitions.sh $(PKG_BUILDDIR)

@ -1,2 +1,3 @@
#!/bin/sh
find ${1} -name "*.[ch]" | xargs sed -i 's/() {/(void) {/'
. ${RIOTBASE}/pkg/relic/os_util.sh
find ${1} -type f -name "*.[ch]" -exec ${SEDBIN} 's/() {/(void) {/' {} +

@ -1,2 +1,3 @@
#!/bin/sh
find ${1} -name "*.[ch]" | xargs sed -i 's/util_print("\(.*\)")/util_print("\1", NULL)/g'
. ${RIOTBASE}/pkg/relic/os_util.sh
find ${1} -type f -name "*.[ch]" -exec ${SEDBIN} 's/util_print("\(.*\)")/util_print("\1", NULL)/g' {} +

@ -0,0 +1,6 @@
OSNAME=`uname -s`
SEDBIN="sed -i"
if [ "${OSNAME}" = "Darwin" ] ; then
SEDBIN="sed -i ''"
LANG=C
fi
Loading…
Cancel
Save