Skip to content

Commit 6859011

Browse files
authored
CXX-2749 Fix debian-package-build-mnmlstc (#1036)
1 parent 1670696 commit 6859011

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.evergreen/debian_package_build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if [ "${IS_PATCH}" = "true" ]; then
4141
fi
4242
if [ "${DEB_BUILD_PROFILES#*pkg.mongo-cxx-driver.mnmlstc}" != "${DEB_BUILD_PROFILES}" ]; then
4343
MNMLSTC_DEPS="git ca-certificates"
44+
MNMLSTC_INCLUDE="-I/usr/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc "
4445
fi
4546

4647

@@ -66,10 +67,10 @@ sudo DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" chroot ./unstable-chroot /bin/ba
6667
LANG=C /bin/bash -x ./debian/build_snapshot.sh && \
6768
debc ../*.changes && \
6869
dpkg -i ../*.deb && \
69-
/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 && \
70-
/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 && \
71-
/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 && \
72-
/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 )"
70+
/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 && \
71+
/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 && \
72+
/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 && \
73+
/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 )"
7374

7475
[ -e ./unstable-chroot/tmp/mongo-cxx-driver/runcommand_examples ] || (echo "Example 'runcommand_examples' was not built!" ; exit 1)
7576
[ -e ./unstable-chroot/tmp/mongo-cxx-driver/aggregation_examples ] || (echo "Example 'aggregation_examples' was not built!" ; exit 1)

debian/rules

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ifneq (,$(filter pkg.mongo-cxx-driver.mnmlstc,$(DEB_BUILD_PROFILES)))
2626
dh_auto_configure -B$(CURDIR)/build -- \
2727
-DBUILD_VERSION=$(DEB_VERSION_UPSTREAM) \
2828
-DBSONCXX_POLY_USE_MNMLSTC=1 \
29+
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
2930
-DENABLE_UNINSTALL=OFF
3031
else
3132
dh_auto_configure -B$(CURDIR)/build -- \
@@ -35,22 +36,12 @@ else
3536
endif
3637

3738
override_dh_auto_build:
38-
ifneq (,$(filter pkg.mongo-cxx-driver.mnmlstc,$(DEB_BUILD_PROFILES)))
39-
dh_auto_build -B$(CURDIR)/build -- all doxygen-current DESTDIR=$(CURDIR)/debian/tmp-mnmlstc
40-
else
4139
dh_auto_build -B$(CURDIR)/build -- all doxygen-current
42-
endif
4340

4441
override_dh_auto_install:
4542
dh_auto_install -B$(CURDIR)/build
4643
find $(CURDIR)/debian/tmp -type d -empty -delete
4744
rm -f $(CURDIR)/debian/tmp/usr/share/mongo-cxx-driver/LICENSE
48-
ifneq (,$(filter pkg.mongo-cxx-driver.mnmlstc,$(DEB_BUILD_PROFILES)))
49-
# Drop MNMLSTC headers in a location where dh_install will pick them up
50-
mv $(CURDIR)/debian/tmp-mnmlstc/usr/include/bsoncxx/v_noabi/bsoncxx/third_party \
51-
$(CURDIR)/debian/tmp/usr/include/bsoncxx/v_noabi/bsoncxx/
52-
rm -rf $(CURDIR)/debian/tmp-mnmlstc
53-
endif
5445

5546
override_dh_auto_test:
5647
# do nothing

0 commit comments

Comments
 (0)