diff --git a/.evergreen/debian_package_build.sh b/.evergreen/debian_package_build.sh index db10a40ae9..dad008485f 100644 --- a/.evergreen/debian_package_build.sh +++ b/.evergreen/debian_package_build.sh @@ -41,6 +41,7 @@ if [ "${IS_PATCH}" = "true" ]; then fi if [ "${DEB_BUILD_PROFILES#*pkg.mongo-cxx-driver.mnmlstc}" != "${DEB_BUILD_PROFILES}" ]; then MNMLSTC_DEPS="git ca-certificates" + MNMLSTC_INCLUDE="-I/usr/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc " fi @@ -66,10 +67,10 @@ sudo DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" chroot ./unstable-chroot /bin/ba LANG=C /bin/bash -x ./debian/build_snapshot.sh && \ debc ../*.changes && \ dpkg -i ../*.deb && \ - /usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o runcommand_examples examples/mongocxx/mongodb.com/runcommand_examples.cpp -lmongocxx -lbsoncxx && \ - /usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o aggregation_examples examples/mongocxx/mongodb.com/aggregation_examples.cpp -lmongocxx -lbsoncxx && \ - /usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o index_examples examples/mongocxx/mongodb.com/index_examples.cpp -lmongocxx -lbsoncxx && \ - /usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o documentation_examples examples/mongocxx/mongodb.com/documentation_examples.cpp -lmongocxx -lbsoncxx )" + /usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o runcommand_examples examples/mongocxx/mongodb.com/runcommand_examples.cpp -lmongocxx -lbsoncxx && \ + /usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o aggregation_examples examples/mongocxx/mongodb.com/aggregation_examples.cpp -lmongocxx -lbsoncxx && \ + /usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o index_examples examples/mongocxx/mongodb.com/index_examples.cpp -lmongocxx -lbsoncxx && \ + /usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -o documentation_examples examples/mongocxx/mongodb.com/documentation_examples.cpp -lmongocxx -lbsoncxx )" [ -e ./unstable-chroot/tmp/mongo-cxx-driver/runcommand_examples ] || (echo "Example 'runcommand_examples' was not built!" ; exit 1) [ -e ./unstable-chroot/tmp/mongo-cxx-driver/aggregation_examples ] || (echo "Example 'aggregation_examples' was not built!" ; exit 1) diff --git a/debian/rules b/debian/rules index cf9e469899..c0a450cf5d 100755 --- a/debian/rules +++ b/debian/rules @@ -26,6 +26,7 @@ ifneq (,$(filter pkg.mongo-cxx-driver.mnmlstc,$(DEB_BUILD_PROFILES))) dh_auto_configure -B$(CURDIR)/build -- \ -DBUILD_VERSION=$(DEB_VERSION_UPSTREAM) \ -DBSONCXX_POLY_USE_MNMLSTC=1 \ + -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ -DENABLE_UNINSTALL=OFF else dh_auto_configure -B$(CURDIR)/build -- \ @@ -35,22 +36,12 @@ else endif override_dh_auto_build: -ifneq (,$(filter pkg.mongo-cxx-driver.mnmlstc,$(DEB_BUILD_PROFILES))) - dh_auto_build -B$(CURDIR)/build -- all doxygen-current DESTDIR=$(CURDIR)/debian/tmp-mnmlstc -else dh_auto_build -B$(CURDIR)/build -- all doxygen-current -endif override_dh_auto_install: dh_auto_install -B$(CURDIR)/build find $(CURDIR)/debian/tmp -type d -empty -delete rm -f $(CURDIR)/debian/tmp/usr/share/mongo-cxx-driver/LICENSE -ifneq (,$(filter pkg.mongo-cxx-driver.mnmlstc,$(DEB_BUILD_PROFILES))) - # Drop MNMLSTC headers in a location where dh_install will pick them up - mv $(CURDIR)/debian/tmp-mnmlstc/usr/include/bsoncxx/v_noabi/bsoncxx/third_party \ - $(CURDIR)/debian/tmp/usr/include/bsoncxx/v_noabi/bsoncxx/ - rm -rf $(CURDIR)/debian/tmp-mnmlstc -endif override_dh_auto_test: # do nothing