Revision 449205c48661f5890534733cb74818612c4613e4 authored by Sébastien Loriot on 13 January 2017, 12:18:55 UTC, committed by Sébastien Loriot on 13 January 2017, 12:18:55 UTC
this fix a warning with old version of boost < 1.51 Use another workaround to avoid the compilation error of the area(face_range,tm) overload
1 parent e3f9ffa
check_library_uses_no_gpl_files
#!/bin/bash
# This scripts checks that the libraries in src do not use any GPL'd files
# and mix LGPL'd and GPL'd files in one library. The script unpacks a tarball,
# removes all files under GPL license (*), attempts to build the libraries
# in src/, and prints any error messages about "No such file or directory".
#
# (*) The script uses license_check to identify the GPL'd files and removes
# them, with the exception of files/directories contained in an optional file.
# There should be a file with default exceptions in the same directory.
set -e
# see also check_licenses
EXTENSIONS="C cpp h xpm gif pcx bmp jpeg png txt html vcproj sln dsp dsw cin cout cmd nef cgal dll lib tex makefile readme"
CHECK_PATTERN="\.(`echo $EXTENSIONS | sed -e 's/ /\\|/g'`)"
if [ $# -lt 1 -o $# -gt 2 ]; then
echo "Usage: ${0##*/} <tarball> [exceptions]"
exit 1
fi
DIR=`pwd`
if [ "x${1:0:1}" != x/ ]; then
FILE="`pwd`/$1"
else
FILE="$1"
fi
if [ $# = 2 ]; then
if [ "x${2:0:1}" != x/ ]; then
EXCEPTIONS="`pwd`/$2"
else
EXCEPTIONS="$2"
fi
fi
echo -n Extracting tarball $FILE ...
TMP_DIR=`mktemp -dq /tmp/${0##*/}.XXXXXX`
cd $TMP_DIR
tar xzf $FILE
DIR=${FILE##*/}
DIR=${DIR%.tar.gz}
cd $DIR
echo " done"
echo
echo Removing GPLed files ...
if [ "x$EXCEPTIONS" != x ]; then
licensecheck -r * -c $CHECK_PATTERN | grep "[^L]GPL (v3 or later)" | sed 's/:.*//' | grep -v -f "$EXCEPTIONS" | sort
rm `licensecheck -r * -c $CHECK_PATTERN | grep "[^L]GPL (v3 or later)" | sed 's/:.*//' | grep -v -f "$EXCEPTIONS"`
else
licensecheck -r * -c $CHECK_PATTERN | grep "[^L]GPL (v3 or later)" | sed 's/:.*//' | sort
rm `licensecheck -r * -c $CHECK_PATTERN | grep "[^L]GPL (v3 or later)" | sed 's/:.*//'`
fi
echo Removing GPLed files done
echo
echo List of exceptions:
if [ "x$EXCEPTIONS" != x ]; then
cat "$EXCEPTIONS"
else
echo "(none)"
fi
echo
echo -n Building $1 ...
rm -fr demo/[A-Z]*
rm -fr examples/[A-Z]*
# Somehow -DWITH_CGAL_Core=OFF is not taken into account, hence the CORE files
# are listed in the exceptions file.
cmake . -DBUILD_SHARED_LIBS=TRUE -DWITH_CGAL_Qt5=OFF -DWITH_CGAL_Core=OFF
make | grep -C 10 "No such file" || true
echo " done"
echo
echo -n Cleaning up ...
cd ..
rm -fr $DIR
cd ..
rmdir $TMP_DIR
echo " done"
echo
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...