merge from next

This commit is contained in:
Eric Berberich
2012-05-21 09:23:32 +00:00
343 changed files with 7829 additions and 6922 deletions
+84
View File
@@ -0,0 +1,84 @@
#!/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.
QTDIR= cmake . -DBUILD_SHARED_LIBS=TRUE -DWITH_CGAL_Qt4=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
@@ -0,0 +1,4 @@
CMakeLists.txt$
^include/CGAL/CORE/
^include/CGAL/export/CORE.h$
^src/CGALCore/
@@ -1,79 +0,0 @@
#!/bin/bash
# This scripts checks that the libraries in src do not use any QPL'd files
# and mix LGPL'd and QPL'd files in one library. The script unpacks a tarball,
# removesall files under QPL license (*), attempts to build the libraries
# in src/, and print any error messages about "No such file or directory".
#
# (*) The script simply removes all files that contain the string LICENSE.QPL,
# with the exception of files/directories contained in an optional file with
# exceptions. There should be file with default exceptions in the same
# directory.
set -e
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 QPLed files ...
if [ "x$EXCEPTIONS" != x ]; then
grep -rl LICENSE.QPL * | sort
rm `grep -rl LICENSE.QPL * | grep -v -f "$EXCEPTIONS"`
else
grep -rl LICENSE.QPL * | sort
rm `grep -rl LICENSE.QPL *`
fi
echo Removing QPLed 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]*
QTDIR= cmake . -DBUILD_SHARED_LIBS=TRUE
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
@@ -1,5 +0,0 @@
CMakeLists.txt
include/CGAL/CORE
src/CGALCore
include/CGAL/Qt
src/CGALQt4
+1 -1
View File
@@ -63,7 +63,7 @@ if [ ! -f INSTALL ]; then
exit 1
fi
licensecheck -r * -c $CHECK_PATTERN | grep -Ev 'L?GPL \(v3 or later\)' | \
licensecheck -r * -c $CHECK_PATTERN | grep -Ev ': L?GPL \(v3 or later\)' | \
grep -v "^$DIR/\|^include/CGAL/CORE/\|^include/CGAL/OpenNL/\|^src/CGALCore/\|^src/CGALimageIO/\|^config/support/\|test/\|^Packages/\|^developer_scripts\|^doc_tex/\|^winutils/\|^cmake/platforms" | sort >$PREFIX1 || true
echo Note that files in the following directories are ignored:
View File
@@ -9,7 +9,7 @@ setopt extendedglob
for p in ^*build*(/); do
if [ -d $p/include ]; then
licFile=$p/package_info/$p/license.txt
l=`licensecheck -r $p/include $p/src | awk -F': ' '{print $2}' | grep -v BSL | sort -u`
l=`licensecheck -r $p/include $p/src | awk -F': ' '{print $2}' | grep -v BSL | sed -e 's/GENERATED FILE//' | sort -u`
if [ "x`echo $l | wc -l`" = "x1" ]; then
echo $l > "$licFile"
elif [ -z "`echo $l | grep -Eq '^L?GPL \(v3 or later\) *$'`" ]; then
+3 -3
View File
@@ -406,9 +406,9 @@ sub parselicense($) {
$extrainfo = " (with Qt exception)$extrainfo"
}
# if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
# $license = "GENERATED FILE";
# }
if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
$license = "GENERATED FILE";
}
if ($licensetext =~ /(is free software.? )?[Yy]ou can redistribute (it|them) and\/or +modify (it|them) under the terms of the (GNU (Library|Lesser) General Public License|LGPL)/i) {
$license = "LGPL$gplver$extrainfo $license";