瀏覽代碼

Allow building without libgtest-dev under <nocheck> build profile

I'd like to avoid pulling libgtest-dev into the bootstrap set.

Fortunately, libgtest-dev is only used for testing apt and apt
correctly implements DEB_BUILD_OPTIONS=nocheck now. So this
bug is about getting rid of the Build-Depends.

Simply removing it (by adding a build profile) is not sufficient
however as configure fails hard, so an additional bit is necessary
to cover for that.

Closes: #809726
Helmut Grohne 10 年之前
父節點
當前提交
084faf6a41
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 1 1
      debian/control
  2. 5 0
      debian/rules

+ 1 - 1
debian/control

@@ -9,7 +9,7 @@ Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 8.1.3~), libdb-dev,
  gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.4~),
  zlib1g-dev, libbz2-dev, liblzma-dev,
  xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2),
- autotools-dev, autoconf, automake, libgtest-dev,
+ autotools-dev, autoconf, automake, libgtest-dev <!nocheck>,
  g++ (>= 4:5.2)
 Build-Depends-Indep: doxygen, w3m, graphviz
 Build-Conflicts: autoconf2.13, automake1.4

+ 5 - 0
debian/rules

@@ -60,6 +60,11 @@ ifeq ($(words $(BLD)),0)
 override BLD := ./build
 endif
 
+# When building without <nocheck>, the header is available and thus the test is
+# successful. When building with <nocheck>, the header is missing, but we still
+# pretend it to be available, because configure would fail otherwise.
+export ac_cv_header_gtest_gtest_h=yes
+
 # APT Programs in apt-utils
 APT_UTILS=ftparchive sortpkgs extracttemplates