1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 07:07:13 +02:00

Major plugin refactor and cleanup.

Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
This commit is contained in:
Sandu Liviu Catalin
2021-01-30 08:51:39 +02:00
parent e0e34b4030
commit 4a6bfc086c
6219 changed files with 1209835 additions and 454916 deletions

202
vendor/POCO/release/script/cpproj vendored Normal file
View File

@ -0,0 +1,202 @@
#! /bin/sh
#
# cpproj
#
# Copy project files
#
# usage: copyproj <src> <dest>
#
src=$1
dst=$2
extradirs="doc templates res bundle sql"
if [ "$src" = "" ] ; then
echo "usage: $0 <source> <destination>"
exit 1
fi
if [ "$dst" = "" ] ; then
echo "usage: $0 <source> <destination>"
exit 1
fi
mkdir -p ${dst}
mkdir -p ${dst}/src
if [ -d ${src}/include ] ; then
mkdir -p ${dst}/include
cp -R ${src}/include/* ${dst}/include
fi
cp ${src}/src/* ${dst}/src >/dev/null 2>&1
cp ${src}/*.sln ${dst} >/dev/null 2>&1
cp ${src}/*.vcxproj ${dst} >/dev/null 2>&1
cp ${src}/*.vcxproj.filters ${dst} >/dev/null 2>&1
cp ${src}/Makefile* ${dst} >/dev/null 2>&1
cp ${src}/*.make ${dst} >/dev/null 2>&1
cp ${src}/*.progen ${dst} >/dev/null 2>&1
cp ${src}/CMakeLists.txt ${dst} >/dev/null 2>&1
if [ "`find ${src} -name '*.bndlspec'`" != "" ] ; then
cp ${src}/*.bndlspec ${dst} >/dev/null 2>&1
fi
if [ -f ${src}/.project ] ; then
cp ${src}/.project ${dst} >/dev/null 2>&1
cp ${src}/.cdtproject ${dst} >/dev/null 2>&1
fi
if [ -d ${src}/cmake ] ; then
mkdir -p ${dst}/cmake
cp -R ${src}/cmake/* ${dst}/cmake >/dev/null 2>&1
fi
if [ -d ${src}/testsuite ] ; then
mkdir -p ${dst}/testsuite
mkdir -p ${dst}/testsuite/src
if [ -d ${src}/testsuite/data ] ; then
mkdir -p ${dst}/testsuite/data
cp -R ${src}/testsuite/data/* ${dst}/testsuite/data >/dev/null 2>&1
fi
if [ -d ${src}/testsuite/bundles ] ; then
mkdir -p ${dst}/testsuite/bundles
cp -R ${src}/testsuite/bundles/* ${dst}/testsuite/bundles >/dev/null 2>&1
fi
cp ${src}/testsuite/src/* ${dst}/testsuite/src >/dev/null 2>&1
cp ${src}/testsuite/*.vcxproj ${dst}/testsuite >/dev/null 2>&1
cp ${src}/testsuite/*.vcxproj.filters ${dst}/testsuite >/dev/null 2>&1
cp ${src}/testsuite/Makefile* ${dst}/testsuite >/dev/null 2>&1
cp ${src}/testsuite/*.make ${dst}/testsuite >/dev/null 2>&1
cp ${src}/testsuite/*.progen ${dst}/testsuite >/dev/null 2>&1
cp ${src}/testsuite/CMakeLists.txt ${dst}/testsuite >/dev/null 2>&1
if [ -d ${src}/testsuite/cmake ] ; then
mkdir -p ${dst}/testsuite/cmake
cp -R ${src}/testsuite/cmake/* ${dst}/testsuite/cmake >/dev/null 2>&1
fi
if [ "`find ${src}/testsuite -name '*.properties'`" != "" ] ; then
cp ${src}/testsuite/*.properties ${dst}/testsuite >/dev/null 2>&1
fi
if [ "`find ${src}/testsuite -name '*.xml'`" != "" ] ; then
cp ${src}/testsuite/*.xml ${dst}/testsuite >/dev/null 2>&1
fi
if [ "`find ${src}/testsuite -name '*.pem'`" != "" ] ; then
cp ${src}/testsuite/*.pem ${dst}/testsuite >/dev/null 2>&1
fi
fi
if [ -f ${src}/extradirs ] ; then
extradirs="$extradirs `cat ${src}/extradirs`"
fi
for extradir in $extradirs ;
do
if [ -d ${src}/${extradir} ] ; then
mkdir -p ${dst}/${extradir}
cp -R ${src}/${extradir}/* ${dst}/${extradir} >/dev/null 2>&1
fi
done
if [ -d ${src}/samples ] ; then
mkdir -p ${dst}/samples
cp ${src}/samples/*.sln ${dst}/samples >/dev/null 2>&1
cp ${src}/samples/Makefile* ${dst}/samples >/dev/null 2>&1
cp ${src}/samples/*.progen ${dst}/samples >/dev/null 2>&1
cp ${src}/samples/CMakeLists.txt ${dst}/samples >/dev/null 2>&1
samples=`find ${src}/samples/* -type d -print -prune | sed "s:^.*/::"`
for sample in $samples ;
do
if [ -d "${src}/samples/${sample}/src" ] ; then
mkdir -p ${dst}/samples/${sample}
if [ -d ${src}/samples/${sample}/src ] ; then
mkdir -p ${dst}/samples/${sample}/src
cp ${src}/samples/${sample}/src/* ${dst}/samples/${sample}/src >/dev/null 2>&1
fi
if [ -d ${src}/samples/${sample}/bundle ] ; then
mkdir -p ${dst}/samples/${sample}/bundle
cp -R ${src}/samples/${sample}/bundle/* ${dst}/samples/${sample}/bundle >/dev/null 2>&1
fi
if [ -d ${src}/samples/${sample}/res ] ; then
mkdir -p ${dst}/samples/${sample}/res
cp -R ${src}/samples/${sample}/res/* ${dst}/samples/${sample}/res >/dev/null 2>&1
fi
if [ -d ${src}/samples/${sample}/xml ] ; then
mkdir -p ${dst}/samples/${sample}/xml
cp -R ${src}/samples/${sample}/xml/* ${dst}/samples/${sample}/xml >/dev/null 2>&1
fi
if [ -d ${src}/samples/${sample}/media ] ; then
mkdir -p ${dst}/samples/${sample}/media
cp -R ${src}/samples/${sample}/media/* ${dst}/samples/${sample}/media >/dev/null 2>&1
fi
cp ${src}/samples/${sample}/*.vcxproj ${dst}/samples/${sample} >/dev/null 2>&1
cp ${src}/samples/${sample}/*.vcxproj.filters ${dst}/samples/${sample} >/dev/null 2>&1
cp ${src}/samples/${sample}/Makefile* ${dst}/samples/${sample} >/dev/null 2>&1
cp ${src}/samples/${sample}/*.make ${dst}/samples/${sample} >/dev/null 2>&1
cp ${src}/samples/${sample}/*.progen ${dst}/samples/${sample} >/dev/null 2>&1
cp ${src}/samples/${sample}/CMakeLists.txt ${dst}/samples/${sample} >/dev/null 2>&1
if [ -d ${src}/samples/${sample}/cmake ] ; then
mkdir -p ${dst}/samples/${sample}/cmake
cp -R ${src}/samples/${sample}/cmake/* ${dst}/samples/${sample}/cmake >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/ -name '*.properties'`" != "" ] ; then
cp ${src}/samples/${sample}/*.properties ${dst}/samples/${sample} >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/ -name '*.ini'`" != "" ] ; then
cp ${src}/samples/${sample}/*.ini ${dst}/samples/${sample} >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/ -name '*.xml'`" != "" ] ; then
cp ${src}/samples/${sample}/*.xml ${dst}/samples/${sample} >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/ -name '*.wsdl'`" != "" ] ; then
cp ${src}/samples/${sample}/*.wsdl ${dst}/samples/${sample} >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/ -name '*.pem'`" != "" ] ; then
cp ${src}/samples/${sample}/*.pem ${dst}/samples/${sample} >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/ -name '*.bndlspec'`" != "" ] ; then
cp ${src}/samples/${sample}/*.bndlspec ${dst}/samples/${sample} >/dev/null 2>&1
fi
if [ -d ${src}/samples/${sample}/include ] ; then
mkdir -p ${dst}/samples/${sample}/include
cp -R ${src}/samples/${sample}/include/* ${dst}/samples/${sample}/include >/dev/null 2>&1
fi
if [ -d ${src}/samples/${sample}/bin ] ; then
mkdir -p ${dst}/samples/${sample}/bin
if [ "`find ${src}/samples/${sample}/bin/ -name '*.properties'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.properties ${dst}/samples/${sample}/bin >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.ini'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.ini ${dst}/samples/${sample}/bin >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.xml'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.xml ${dst}/samples/${sample}/bin >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.wsdl'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.wsdl ${dst}/samples/${sample}/bin >/dev/null 2>&1
fi
if [ "`find ${src}/samples/${sample}/bin/ -name '*.pem'`" != "" ] ; then
cp ${src}/samples/${sample}/bin/*.pem ${dst}/samples/${sample}/bin >/dev/null 2>&1
fi
fi
else
mkdir -p ${dst}/samples/${sample}
cp -R ${src}/samples/${sample}/* ${dst}/samples/${sample} >/dev/null 2>&1
fi
done
fi

108
vendor/POCO/release/script/mkdoc vendored Normal file
View File

@ -0,0 +1,108 @@
#! /bin/sh
#
# mkdoc
#
# Create reference documentation for a POCO release.
# This is a wrapper for mkdocumentation that syncs to the
# Perforce head revision, reads the current
# version from $POCO_BASE/VERSION and requires a release
# specification (loaded from $POCO_BASE/release/spec/*.release)
# as argument.
#
# usage: mkdoc [-l <perforce-label>] [<specfile>]
#
if [ "$POCO_BASE" = "" ] ; then
echo "Error: POCO_BASE not set."
exit 1
fi
osname=`uname -s | tr ' ' '_'`
osarch=`uname -m | tr ' ' '_'`
case `uname` in
CYGWIN*) osname="CYGWIN"
;;
esac
spec=""
docConfig=$POCO_BASE/PocoDoc/cfg/mkdoc-poco.xml
while [ "$1" != "" ] ;
do
if [ "$1" = "-C" ] ; then
shift
docConfig=$1
shift
elif [ "$1" = "-v" ] ; then
shift
version=$1
shift
else
spec=$1
shift
fi
done
if [ "$spec" != "" ] ; then
relspec="-f release/spec/${spec}.release"
tag="-$spec"
reltag="-t $spec"
else
relspec=""
reltag=""
tag=""
fi
cd $POCO_BASE
if [ ! -f VERSION ] ; then
echo "Error: No VERSION file found."
exit 2
fi
if [ "$version" = "" ] ; then
read version <$POCO_BASE/VERSION
fi
release=$version$tag
if [ ! -f libversion ] ; then
echo "Error: No libversion file found."
exit 2
fi
if [ "$libversion" = "" ] ; then
read libversion <$POCO_BASE/libversion
fi
#
# Build release
#
echo "Building tools"
tools=$POCO_BASE/stage/tools
rm -rf $tools
mkdir -p $tools
mkrelease -o $tools $version CppParser PocoDoc
cd $tools
./configure --no-tests --no-samples --no-prefix
make -s -j8
if [ $osname = "CYGWIN" ] ; then
find $tools -type f -name "cyg*$libversion.dll" > $TMP/dlls
rebase -O -T $TMP/dlls
rm $TMP/dlls
fi
cd $POCO_BASE
if [ $osname = "CYGWIN" ] ; then
# Poco dlls must be on PATH for Cygwin
export PATH=$tools/lib/$osname/$osarch:$PATH
fi
export PATH=$tools/PocoDoc/bin/$osname/$osarch:$PATH
echo PATH=$PATH
echo "Building documentation $release (using $docConfig)"
mkdocumentation $reltag $relspec -C $docConfig -v $version

View File

@ -0,0 +1,147 @@
#! /bin/sh
#
# mkdocumentation
#
# Create reference documentation for a POCO release.
#
# Usage:
# mkdocumentation [-u] [-t <reltag>] [-f <compfile>] {<component>}
#
# -u: Upload file to release repository.
# -t: Specify release tag.
# -f <compfile>: Component list file
# -c <config>: Build using the given configuration
# <components>: Additional components to include
#
# Environment:
# $POCO_BASE: POCO base directory (e.g., "/cygdrive/p/poco-1.2")
#
# Prerequisites:
# PocoDoc must be in PATH
#
if [ "$POCO_BASE" = "" ] ; then
echo "Error: POCO_BASE not set."
exit 1
fi
make=make
include=`dirname $0`
build=$POCO_BASE/stage/docbuild
dist=$POCO_BASE/releases
docConfig=$POCO_BASE/PocoDoc/cfg/mkdocumentation.xml
read version <$POCO_BASE/VERSION
osname=`uname -s | tr ' ' '_'`
osarch=`uname -m | tr ' ' '_'`
comps=""
specfile=""
tag=""
config=""
while [ "$1" != "" ] ;
do
if [ "$1" = "-f" ] ; then
shift
specfile=$1
shift
elif [ "$1" = "-t" ] ; then
shift
tag=$1
shift
elif [ "$1" = "-c" ] ; then
shift
config=$1
shift
elif [ "$1" = "-C" ] ; then
shift
docConfig=$1
shift
elif [ "$1" = "-v" ] ; then
shift
version=$1
shift
else
comps="$comps $1"
shift
fi
done
if [ "$specfile" != "" ] ; then
while read c
do
comps="$comps $c"
done <$specfile
fi
allcomps="Foundation XML JSON Util Net $comps"
#
# Clean build directory
#
echo "Cleaning build directory: $build"
rm -rf $build
mkdir -p $build
mkdir -p $dist
#
# Copy POCO sources into build directory
#
echo "Copying sources"
mkrelease -o $build $version $comps
#
# Make all files writeable
#
chmod -R +w $build
#
# Generate documentation
#
echo "Generating documentation"
# Create a PocoDoc configuration file
docVersion=$version
if [ $tag ] ; then
docVersion="$docVersion-$tag"
fi
docPath=$dist/poco-${docVersion}-doc
includes=""
for inc in `find $build -name include -print` ; do
includes="$includes,-I$inc"
done
: ${CC:=gcc}
: ${CXX:=g++}
: ${CXXFLAGS:=-std=c++11}
echo "CC=$CC" >>$build/PocoDoc.ini
echo "CXX=$CXX" >>$build/PocoDoc.ini
echo "CXXFLAGS=$CXXFLAGS" >>$build/PocoDoc.ini
echo "PocoBuild=$build" >>$build/PocoDoc.ini
echo "PocoBase=$POCO_BASE" >>$build/PocoDoc.ini
echo "PocoDoc.output=$docPath" >>$build/PocoDoc.ini
echo "PocoDoc.version=$docVersion" >> $build/PocoDoc.ini
echo "Includes=$includes" >> $build/PocoDoc.ini
echo "PocoDoc --config=$docConfig --config=$build/PocoDoc.ini"
PocoDoc --config=$docConfig --config=$build/PocoDoc.ini
cd $dist
chmod -R ugo+rw poco-${docVersion}-doc
chmod -R go+r poco-${docVersion}-doc
tar cf poco-${docVersion}-doc.tar poco-${docVersion}-doc
gzip -f poco-${docVersion}-doc.tar
if [ -x /usr/bin/zip ] ; then
/usr/bin/zip -r -q poco-${docVersion}-doc.zip poco-${docVersion}-doc
fi
echo "Done."

88
vendor/POCO/release/script/mkrel vendored Normal file
View File

@ -0,0 +1,88 @@
#! /bin/sh
#
# mkrel
#
# Create a release for distribution.
# This is a wrapper for mkrelease that syncs to the
# Perforce head revision, reads the current
# version from $POCO_BASE/VERSION and requires a release
# specification (loaded from $POCO_BASE/release/spec/*.release)
# as argument.
#
# usage: mkrel [<specfile>]
#
if [ "$POCO_BASE" = "" ] ; then
echo "Error: POCO_BASE not set."
exit 1
fi
cd $POCO_BASE
if [ ! -f VERSION ] ; then
echo "Error: No VERSION file found."
exit 2
fi
case `uname` in
CYGWIN*) cygwin=1
;;
*) cygwin=""
;;
esac
label=""
spec=""
lineEndConv=""
while [ "$1" != "" ] ;
do
if [ "$1" = "-l" ] ; then
shift
label=@$1
shift
elif [ "$1" = "-c" ] ; then
shift
lineEndConv=$1
shift
else
spec=$1
shift
fi
done
if [ "$spec" != "" ] ; then
relspec="-f release/spec/${spec}.release"
reltag="-$spec"
else
relspec=""
reltag=""
fi
if [ "$lineEndConv" != "" ] ; then
lnendcvt="-c ${lineEndConv}"
fi
if [ $cygwin ] ; then
export PWD=`cygpath -w $POCO_BASE`
fi
#
# Sync files
#
if [ "$label" != "" ] ; then
echo "Syncing files to ${label}..."
p4 sync ./...$label
fi
read version <$POCO_BASE/VERSION
release=$version$reltag
#
# Build release
#
echo "Building release $release"
rm -rf releases/poco-$release.*
$POCO_BASE/release/script/mkrelease $release $relspec $lnendcvt

456
vendor/POCO/release/script/mkrelease vendored Normal file
View File

@ -0,0 +1,456 @@
#! /bin/bash
#
# mkrelease
#
# Create a release for distribution.
#
# usage: mkrelease [-i] [-f specfile] <version> [<component>...]
#
if [ "$1" = "" ] ; then
echo "usage: $0 [-i] <version> [<component>...]"
echo " -i - include internal tools"
echo " -f specfile - read component list from specfile"
echo " -o dir - specify output directory"
echo " -c location - specify line-ending conversion utility (enables conversion)"
echo " -l - include licensing"
exit 1
fi
comps="Foundation Encodings XML JSON Util Net"
internal=0
specfile=""
version=""
output=""
lineEndConv=""
licensingDep=""
while [ "$1" != "" ] ;
do
if [ "$1" = "-i" ] ; then
shift
internal=1
elif [ "$1" = "-f" ] ; then
shift
specfile=$1
shift
elif [ "$1" = "-o" ] ; then
shift
output=$1
shift
elif [ "$1" = "-c" ] ; then
shift
lineEndConv=$1
shift
elif [ "$1" = "-l" ] ; then
shift
licensingDep="Licensing-libexec"
comps="$comps Licensing"
elif [ "$version" = "" ] ; then
version=$1
shift
else
comps="$comps $1"
shift
fi
done
if [ "$specfile" != "" ] ; then
while read c
do
comps="$comps $c"
done <$specfile
fi
if [ "$version" = "" ] ; then
echo "Error: no version specified."
exit 1
fi
if [ "$output" != "" ] ; then
target=$output
else
target=$POCO_BASE/releases/poco-${version}
fi
mkdir -p ${target}
mkdir -p ${target}/doc
mkdir -p ${target}/contrib
mkdir -p ${target}/patches
mkdir -p ${target}/cmake
#
# readme files, etc.
#
echo ${version} "(`date +%Y-%m-%d`)" >${target}/VERSION
cp ${POCO_BASE}/LICENSE ${target}
cp ${POCO_BASE}/NEWS ${target}
cp ${POCO_BASE}/README ${target}
cp ${POCO_BASE}/CHANGELOG ${target}
cp ${POCO_BASE}/CONTRIBUTORS ${target}
cp ${POCO_BASE}/DLLVersion.rc ${target}
cp ${POCO_BASE}/doc/Acknowledgements.html ${target}/doc
cp ${POCO_BASE}/doc/*.page ${target}/doc
cp -R ${POCO_BASE}/contrib/* ${target}/contrib
cp -R ${POCO_BASE}/patches/* ${target}/patches
cp -R ${POCO_BASE}/cmake/* ${target}/cmake
cp ${POCO_BASE}/CMakeLists.txt ${target}
#
# build system
#
mkdir -p ${target}/build/config
mkdir -p ${target}/build/rules
mkdir -p ${target}/build/script
cp ${POCO_BASE}/build/config/* ${target}/build/config
cp ${POCO_BASE}/build/rules/* ${target}/build/rules
cp ${POCO_BASE}/build/script/* ${target}/build/script
cp ${POCO_BASE}/buildwin.cmd ${target}
cp ${POCO_BASE}/configure ${target}
cp ${POCO_BASE}/libversion ${target}
if [ $internal = 1 ] ; then
cp ${POCO_BASE}/build/script/testall ${target}/build/script
cp ${POCO_BASE}/build/script/waitfortest ${target}/build/script
fi
#
# CppUnit
#
mkdir -p ${target}/CppUnit
mkdir -p ${target}/CppUnit/doc
mkdir -p ${target}/CppUnit/include/CppUnit
mkdir -p ${target}/CppUnit/src
cp ${POCO_BASE}/CppUnit/doc/* ${target}/CppUnit/doc >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/include/CppUnit/* ${target}/CppUnit/include/CppUnit >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/src/* ${target}/CppUnit/src >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/*.sln ${target}/CppUnit >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/*.vcxproj ${target}/CppUnit >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/*.vcxproj.filters ${target}/CppUnit >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/Makefile ${target}/CppUnit >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/*.progen ${target}/CppUnit >/dev/null 2>&1
cp ${POCO_BASE}/CppUnit/CMakeLists.txt ${target}/CppUnit >/dev/null 2>&1
#
# Copy components
#
for comp in $comps ;
do
cpproj ${POCO_BASE}/$comp ${target}/$comp
done
#
# Create components file
#
echo "CppUnit" >${target}/components
for comp in $comps ;
do
echo $comp >>${target}/components
done
#
# Make all files writeable
#
chmod -R +w ${target}
#
# Generate Makefile
#
cat >${target}/Makefile <<'ENDOFSCRIPT'
#
# Makefile
#
# The global Makefile for POCO [generated by mkrelease]
#
sinclude config.make
sinclude config.build
ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd)
endif
ifdef POCO_VERBOSE
$(info POCO_BASE = $(POCO_BASE))
endif
ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE)
endif
ifdef POCO_VERBOSE
$(info POCO_BUILD = $(POCO_BUILD))
endif
#
# Determine OS
#
POCO_HOST_OSNAME = $(shell uname)
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
POCO_HOST_OSNAME = CYGWIN
endif
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
POCO_HOST_OSNAME = MinGW
endif
ifdef POCO_VERBOSE
$(info POCO_HOST_OSNAME = $(POCO_HOST_OSNAME))
endif
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
ifdef POCO_VERBOSE
$(info POCO_HOST_OSARCH = $(POCO_HOST_OSARCH))
endif
#
# If POCO_CONFIG is not set, use the OS name as configuration name
#
ifndef POCO_CONFIG
POCO_CONFIG = $(POCO_HOST_OSNAME)
endif
ifdef POCO_VERBOSE
$(info POCO_CONFIG = $(POCO_CONFIG))
endif
#
# Include System Specific Settings
#
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
#
# Determine operating system
#
ifndef POCO_TARGET_OSNAME
OSNAME := $(POCO_HOST_OSNAME)
else
OSNAME := $(POCO_TARGET_OSNAME)
endif
ifdef POCO_VERBOSE
$(info OSNAME = $(OSNAME))
endif
ifndef POCO_TARGET_OSARCH
OSARCH := $(POCO_HOST_OSARCH)
else
OSARCH := $(POCO_TARGET_OSARCH)
endif
ifdef POCO_VERBOSE
$(info OSARCH = $(OSARCH))
endif
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
# TESTS and SAMPLES are set in config.make
poco: libexecs $(if $(TESTS),tests) $(if $(SAMPLES),samples)
all: libexecs tests samples
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
ENDOFSCRIPT
echo "COMPONENTS = $comps" >>${target}/Makefile
cat >>${target}/Makefile <<'ENDOFSCRIPT'
cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit
CppUnit-clean:
$(MAKE) -C $(POCO_BASE)/CppUnit clean
install: libexecs
mkdir -p $(INSTALLDIR)/include/Poco
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/bin
for comp in $(filter-out $(foreach f,$(OMIT),$f%),$(COMPONENTS)) ; do \
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
fi ; \
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
fi ; \
done
ifeq ($(OSNAME), CYGWIN)
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type f -exec cp -f {} $(INSTALLDIR)/bin \;
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/bin \;
endif
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
ENDOFSCRIPT
libexecs=""
tests=""
samples=""
cleans=""
for comp in $comps ;
do
libexecs="$libexecs ${comp}-libexec"
cleans="$cleans ${comp}-clean"
if [ -d "${POCO_BASE}/${comp}/testsuite" ] ; then
tests="$tests ${comp}-tests"
fi
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
samples="$samples ${comp}-samples"
fi
done
echo "libexecs = $libexecs" >>${target}/Makefile
echo "tests = $tests" >> ${target}/Makefile
echo "samples = $samples" >> ${target}/Makefile
echo "cleans = $cleans" >> ${target}/Makefile
echo "" >>${target}/Makefile
echo '.PHONY: $(libexecs)' >>${target}/Makefile
echo '.PHONY: $(tests)' >>${target}/Makefile
echo '.PHONY: $(samples)' >>${target}/Makefile
echo '.PHONY: $(cleans)' >>${target}/Makefile
echo "" >>${target}/Makefile
echo 'libexecs: $(filter-out $(foreach f,$(OMIT),$f%),$(libexecs))' >>${target}/Makefile
echo 'tests: $(filter-out $(foreach f,$(OMIT),$f%),$(tests))' >>${target}/Makefile
echo 'samples: $(filter-out $(foreach f,$(OMIT),$f%),$(samples))' >>${target}/Makefile
echo 'cleans: $(filter-out $(foreach f,$(OMIT),$f%),$(cleans))' >>${target}/Makefile
for comp in $comps ;
do
if [ "`grep -c POCO_LICENSING "${POCO_BASE}/${comp}/Makefile"`" != 0 ] ; then
dependencies=$licensingDep
else
dependencies=""
fi
if [ -f "${POCO_BASE}/${comp}/dependencies" ] ; then
for dep in `cat "${POCO_BASE}/${comp}/dependencies"` ;
do
# get rid of surrounding whitespace (trailing \r on Cygwin)
read dep <<< "$dep"
dependencies="$dependencies ${dep}-libexec"
done
fi
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-libexec: $dependencies
\$(MAKE) -C \$(POCO_BASE)/${comp}
ENDOFSCRIPT
if [ -d "${POCO_BASE}/${comp}/testsuite" ] ; then
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-tests: ${comp}-libexec cppunit
\$(MAKE) -C \$(POCO_BASE)/${comp}/testsuite
ENDOFSCRIPT
fi
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
sdependencies=""
if [ -f "${POCO_BASE}/${comp}/samples/dependencies" ] ; then
for dep in `cat "${POCO_BASE}/${comp}/samples/dependencies"` ;
do
# get rid of surrounding whitespace (trailing \r on Cygwin)
read dep <<< ${dep}
sdependencies="$sdependencies ${dep}-libexec"
done
fi
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-samples: ${comp}-libexec $sdependencies
\$(MAKE) -C \$(POCO_BASE)/${comp}/samples
ENDOFSCRIPT
fi
cat >>${target}/Makefile <<ENDOFSCRIPT
${comp}-clean:
\$(MAKE) -C \$(POCO_BASE)/${comp} clean
ENDOFSCRIPT
if [ -f "${POCO_BASE}/${comp}/testsuite/Makefile" ] ; then
cat >>${target}/Makefile <<ENDOFSCRIPT
\$(MAKE) -C \$(POCO_BASE)/${comp}/testsuite clean
ENDOFSCRIPT
fi
if [ -f "${POCO_BASE}/${comp}/samples/Makefile" ] ; then
cat >>${target}/Makefile <<ENDOFSCRIPT
\$(MAKE) -C \$(POCO_BASE)/${comp}/samples clean
ENDOFSCRIPT
fi
done
cat >>${target}/Makefile <<ENDOFSCRIPT
clean: cleans CppUnit-clean
distclean:
rm -rf \$(POCO_BUILD)/lib
find \$(POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf
find \$(POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf
find \$(POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf
ENDOFSCRIPT
#
# Create Visual Studio 14 build script
#
cat >${target}/build_vs140.cmd <<'ENDOFSCRIPT'
@echo off
buildwin 140 build shared both Win32 samples
ENDOFSCRIPT
#
# Create Visual Studio 15 build script
#
cat >${target}/build_vs150.cmd <<'ENDOFSCRIPT'
@echo off
buildwin 150 build shared both Win32 samples
ENDOFSCRIPT
#
# Create Visual Studio 16 build script
#
cat >${target}/build_vs160.cmd <<'ENDOFSCRIPT'
@echo off
buildwin 160 build shared both Win32 samples
ENDOFSCRIPT
#
# Fix line endings
#
if [ "$lineEndConv" != "" ] ; then
$lineEndConv ${target}/build_vs140.cmd
$lineEndConv ${target}/build_vs150.cmd
$lineEndConv ${target}/build_vs160.cmd
$lineEndConv ${target}/Makefile
$lineEndConv ${target}/components
fi
#
# Create .tar and .zip archives
#
if [ "$output" = "" ] ; then
cd releases
find ${target}/ -print | sed "s:^${target}/*::" >${target}/MANIFEST
tar cf poco-${version}.tar poco-${version}
gzip poco-${version}.tar
tar cf poco-${version}.tar poco-${version}
bzip2 poco-${version}.tar
if [ -x /usr/bin/zip ] ; then
/usr/bin/zip -r -q poco-${version}.zip poco-${version}
fi
fi
exit 0

13
vendor/POCO/release/spec/all.release vendored Normal file
View File

@ -0,0 +1,13 @@
Crypto
NetSSL_OpenSSL
JWT
Data
Data/SQLite
Data/ODBC
Data/MySQL
Data/PostgreSQL
Zip
PageCompiler
PageCompiler/File2Page
MongoDB
Redis

13
vendor/POCO/release/spec/world.release vendored Normal file
View File

@ -0,0 +1,13 @@
Crypto
NetSSL_OpenSSL
Data
Data/SQLite
Data/ODBC
Data/MySQL
Zip
PageCompiler
PageCompiler/File2Page
MongoDB
Redis
CppParser
PDF