Commit fe720c1b authored by Ondrej Sury's avatar Ondrej Sury

Imported Upstream version 1.2.0~alpha3

parent 499038ab

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This source diff could not be displayed because it is too large. You can view the blob instead.
.PHONY: coverage testclean ChangeLog RELEASE package package.xml docs
DATE=`date +%Y-%m-%d--%H-%M-%S`
MONGODB_VERSION=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_VERSION;')
MONGODB_MINOR=$(shell echo $(MONGODB_VERSION) | cut -d. -f1,2)
MONGODB_STABILITY=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_STABILITY;')
LIB_PATH=vendor/mongodb/mongodb
COMPOSER_ARGS=update --no-interaction --prefer-source
PHPUNIT_ARGS=--process-isolation
help:
@echo -e "\t$$ make vm"
@echo -e "\t - Launches VMs for running multiple MongoDB variations"
@echo -e "\t$$ make list-servers"
@echo -e "\t - Lists running servers, and their URIs"
@echo -e "\t$$ make test-bootstrap"
@echo -e "\t - Starts up MongoDB through mongo-orchestration"
@echo ""
@echo -e "\t$$ make coveralls"
@echo -e "\t - Creates code coverage report using coveralls"
@echo -e "\t$$ make coverage"
@echo -e "\t - Creates code coverage report using gcov"
@echo ""
@echo -e "\t$$ make composer"
@echo -e "\t - Installs test dependencies using composer"
@echo ""
@echo -e "\t$$ make distcheck"
@echo -e "\t - Builds the archive, runs the virtual tests"
@echo ""
@echo -e "\t$$ make release"
@echo -e "\t - Packages the archive, runs the tests locally and virtual"
@echo ""
@echo -e "\t$$ make package"
@echo -e "\t - Creates the pecl archive to use for provisioning"
@echo -e "\t$$ make test-virtual"
@echo -e "\t - Provisions some VMs, installs the pecl archive and executes the tests"
mv-coverage:
@if test -e $(top_srcdir)/coverage; then \
echo "Moving previous coverage run to coverage-$(DATE)"; \
mv coverage coverage-$(DATE); \
fi
lcov-coveralls:
lcov --gcov-tool $(top_srcdir)/.llvm-cov.sh --capture --directory . --output-file .coverage.lcov --no-external
lcov-local:
lcov --gcov-tool $(top_srcdir)/.llvm-cov.sh --capture --derive-func-data --directory . --output-file .coverage.lcov --no-external
coverage: mv-coverage lcov-local
genhtml .coverage.lcov --legend --title "mongodb code coverage" --output-directory coverage
coveralls: mv-coverage lcov-coveralls
coveralls --exclude src/libbson --exclude src/libmongoc --exclude src/contrib --exclude lib --exclude tests
composer:
@command -v composer >/dev/null 2>&1; \
if test $$? -eq 0; then \
composer $(COMPOSER_ARGS) ;\
if test -d $(LIB_PATH); then \
composer $(COMPOSER_ARGS) --working-dir $(LIB_PATH) ;\
fi \
elif test -r composer.phar; then \
php composer.phar $(COMPOSER_ARGS); \
if test -d $(LIB_PATH); then \
php $(top_srcdir)/composer.phar $(COMPOSER_ARGS) --working-dir $(LIB_PATH) ;\
fi \
else \
echo "Cannot find composer :("; \
echo "Aborting."; \
exit 1; \
fi
vm:
@command -v vagrant >/dev/null 2>&1 || { echo >&2 "Vagrant needs to be installed to run vms"; exit 1; }
@vagrant up ldap mo
list-servers:
php scripts/list-servers.php
test-bootstrap:
php scripts/start-servers.php
distcheck: package test-virtual
test-virtual: package
sh ./scripts/run-tests-on.sh freebsd
sh ./scripts/run-tests-on.sh precise32
sh ./scripts/run-tests-on.sh precise64
testunit: composer
@command -v phpunit >/dev/null 2>&1; \
if test $$? -eq 0; then \
pushd $(LIB_PATH) ;\
phpunit $(PHPUNIT_ARGS) ;\
popd ;\
elif test -r phpunit.phar; then \
pushd $(LIB_PATH) ;\
php $(top_srcdir)/phpunit.phar $(PHPUNIT_ARGS) ;\
popd ;\
else \
echo "Cannot find phpunit :("; \
echo "Aborting."; \
exit 1; \
fi
testall: composer test testunit
testclean:
@for group in generic standalone; do \
find $(top_srcdir)/tests/$$group -type f -name "*.diff" -o -name "*.exp" -o -name "*.log" -o -name "*.mem" -o -name "*.out" -o -name "*.php" -o -name "*.sh" | xargs rm -f; \
done;
mongodbdep:
release: test distcheck
@echo "Please run:"
@echo " " git add RELEASE-$(MONGODB_VERSION)
@echo " " git commit -m \"Add $(MONGODB_VERSION) release notes\"
@echo " " git tag -a -m \"Release $(MONGODB_VERSION)\" $(MONGODB_VERSION)
@echo " " git push --tags
@echo " " make release-docs
@echo "And don't forget to bump version in php_phongo.h"
package: ChangeLog package.xml
@git checkout RELEASE-$(MONGODB_MINOR)
pecl package package.xml
@cat RELEASE-$(MONGODB_MINOR) >> RELEASE-$(MONGODB_VERSION)
@mv RELEASE-$(MONGODB_VERSION) RELEASE-$(MONGODB_MINOR)
docs:
mkdocs build --clean
release-docs: docs
mkdocs gh-deploy --clean
package.xml: RELEASE
php bin/prep-release.php $(MONGODB_VERSION) $(MONGODB_STABILITY)
RELEASE:
@echo "RELEASE $(MONGODB_VERSION)" >> RELEASE-$(MONGODB_VERSION)
@echo "-------------" >> RELEASE-$(MONGODB_VERSION)
@git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --no-merges --date short --since="$$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" >> RELEASE-$(MONGODB_VERSION)
@echo -e "\n" >> RELEASE-$(MONGODB_VERSION)
ChangeLog:
@git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short > ChangeLog
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
RELEASE 1.1.9
-------------
2016-10-20 Jeremy Mikola <jmikola@gmail.com>
* PHPC-820: Upgrade libbson and libmongoc to 1.3.6
RELEASE 1.1.9
-------------
2016-10-20 Jeremy Mikola <jmikola@gmail.com>
* PHPC-820: Upgrade libbson and libmongoc to 1.3.6
This diff is collapsed.
// vim:ft=javascript
ARG_ENABLE("mongodb", "MongoDB support", "no");
ARG_WITH("mongodb-sasl", "MongoDB: Build against Cyrus-SASL", "yes");
if (PHP_MONGODB != "no") {
ADD_EXTENSION_DEP("mongodb", "openssl", false);
ADD_FLAG("CFLAGS_MONGODB", " /I" + configure_module_dirname + " /I" + configure_module_dirname + "/src/libmongoc/src/mongoc" + " /I" + configure_module_dirname + "/src/libbson/src/bson/ /I" + configure_module_dirname + "/src/libbson/src /I" + configure_module_dirname + "/src/contrib /D HAVE_MONGODB_SASL=1 /D BSON_COMPILATION=1 /D MONGOC_COMPILATION=1 /D MONGOC_TRACE=1 /D MONGOC_NO_AUTOMATIC_GLOBALS=1 /D BSON_EXTRA_ALIGN=0");
EXTENSION("mongodb", "php_phongo.c");
ADD_SOURCES(configure_module_dirname + "/", "phongo_compat.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src", "bson.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/BSON", "Type.c Unserializable.c Serializable.c Persistable.c Binary.c Javascript.c MaxKey.c MinKey.c ObjectID.c Regex.c Timestamp.c UTCDateTime.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "Command.c Cursor.c CursorId.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c BulkWrite.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/MongoDB/Exception", "Exception.c LogicException.c RuntimeException.c UnexpectedValueException.c InvalidArgumentException.c ConnectionException.c AuthenticationException.c SSLConnectionException.c ExecutionTimeoutException.c ConnectionTimeoutException.c WriteException.c BulkWriteException.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/contrib/", "php-ssl.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/libbson/src/yajl", "yajl_version.c yajl.c yajl_encode.c yajl_lex.c yajl_parser.c yajl_buf.c yajl_tree.c yajl_alloc.c yajl_gen.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/libbson/src/bson", "bcon.c bson.c bson-atomic.c bson-clock.c bson-context.c bson-error.c bson-iter.c bson-iso8601.c bson-json.c bson-keys.c bson-md5.c bson-memory.c bson-oid.c bson-reader.c bson-string.c bson-timegm.c bson-utf8.c bson-value.c bson-version-functions.c bson-writer.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/libmongoc/src/mongoc", "mongoc-array.c mongoc-async.c mongoc-async-cmd.c mongoc-buffer.c mongoc-bulk-operation.c mongoc-b64.c mongoc-client.c mongoc-client-pool.c mongoc-cluster.c mongoc-collection.c mongoc-counters.c mongoc-cursor.c mongoc-cursor-array.c mongoc-cursor-transform.c mongoc-cursor-cursorid.c mongoc-database.c mongoc-find-and-modify.c mongoc-init.c mongoc-gridfs.c mongoc-gridfs-file.c mongoc-gridfs-file-page.c mongoc-gridfs-file-list.c mongoc-host-list.c mongoc-index.c mongoc-list.c mongoc-log.c mongoc-matcher-op.c mongoc-matcher.c mongoc-memcmp.c mongoc-opcode.c mongoc-queue.c mongoc-read-prefs.c mongoc-read-concern.c mongoc-rpc.c mongoc-set.c mongoc-server-description.c mongoc-server-stream.c mongoc-socket.c mongoc-stream.c mongoc-stream-buffered.c mongoc-stream-file.c mongoc-stream-gridfs.c mongoc-stream-socket.c mongoc-topology.c mongoc-topology-scanner.c mongoc-topology-description.c mongoc-uri.c mongoc-util.c mongoc-version-functions.c mongoc-write-command.c mongoc-write-concern.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/libmongoc/src/mongoc", "mongoc-rand.c mongoc-scram.c mongoc-stream-tls.c mongoc-ssl.c", "mongodb");
ADD_SOURCES(configure_module_dirname + "/src/libmongoc/src/mongoc", "mongoc-sasl.c", "mongodb");
AC_DEFINE("HAVE_MONGOC", 1);
AC_DEFINE("MONGOC_HAVE_WEAK_SYMBOLS", 1);
if (!CHECK_LIB("libsasl.lib", "mongodb", PHP_MONGODB)) {
WARNING("mongodb libsasl support not enabled, libs not found");
}
if (CHECK_LIB("ssleay32.lib", "mongodb", PHP_MONGODB) && CHECK_LIB("libeay32.lib", "mongodb", PHP_MONGODB) && CHECK_HEADER_ADD_INCLUDE("openssl/ssl.h", "CFLAGS_MONGOC")) {
}
FSO.CopyFile(configure_module_dirname + "/win32/bson-config.h", configure_module_dirname + "/src/libbson/src/bson/bson-config.h", true);
FSO.CopyFile(configure_module_dirname + "/win32/bson-version.h", configure_module_dirname + "/src/libbson/src/bson/bson-version.h", true);
FSO.CopyFile(configure_module_dirname + "/win32/mongoc-config.h", configure_module_dirname + "/src/libmongoc/src/mongoc/mongoc-config.h", true);
FSO.CopyFile(configure_module_dirname + "/win32/mongoc-version.h", configure_module_dirname + "/src/libmongoc/src/mongoc/mongoc-version.h", true);
}
/*
+---------------------------------------------------------------------------+