1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/relic: fix for macOS

This commit is contained in:
smlng 2016-11-10 16:21:01 +01:00
parent e4b3331582
commit e10776ff9e
4 changed files with 12 additions and 2 deletions

View File

@ -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)

View File

@ -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) {/' {} +

View File

@ -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' {} +

6
pkg/relic/os_util.sh Normal file
View File

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