Source: ncurses
Version: 5.9+20140118-1
Severity: wishlist
Tags: patch

As the subject says: the attached patch allows for bootstrapping ncurses, at 
an early stage of the process when multilib compilers and libraries are not 
yet available.
-- 
Daniel Schepler
diff -urN ncurses-5.9+20130608.old/debian/rules ncurses-5.9+20130608/debian/rules
--- ncurses-5.9+20130608.old/debian/rules	2013-06-09 13:29:29.000000000 -0700
+++ ncurses-5.9+20130608/debian/rules	2013-06-10 19:10:15.757766650 -0700
@@ -63,6 +63,16 @@
 		 debian/libtinfo5.install debian/libtinfo-dev.install \
 		 debian/libtermcap.so
 
+ifeq ($(DEB_BUILD_PROFILE),stage1)
+
+bootstrap_dh_flags = -N$(package-lib-32) -N$(package-lib-64) \
+	-N$(package-ti-32) -N$(package-ti-64) \
+	-N$(package-libw-32) \
+	-N$(package-dev-32) -N$(package-dev-64) \
+	-N$(package-devti-32) -N$(package-devw-32)
+
+else
+
 ifeq ($(DEB_HOST_ARCH),i386)
 build_64_target = x86_64-$(DEB_HOST_GNU_SYSTEM)
 build_64 = build-64
@@ -101,6 +111,8 @@
 with_gpm = --with-gpm
 endif
 
+endif  # DEB_BUILD_PROFILE != stage1
+
 CONFARGS =	--prefix=/usr \
 		--build=$(DEB_BUILD_GNU_TYPE) \
 		--with-shared \
@@ -421,7 +433,7 @@
 binary-arch: build install $(autogen-files)
 	dh_testdir
 	dh_testroot
-	dh_install -s --fail-missing
+	dh_install -s --fail-missing $(bootstrap_dh_flags)
 	dh_installman -s
 	dh_installdocs -p$(package-bin) -p$(package-ti) -p$(package-examples) debian/FAQ
 	dh_installdocs -s -N$(package-bin) -N$(package-ti) -N$(package-examples) \
@@ -440,18 +452,18 @@
 	dh_installdocs -p$(package-lib-64) -p$(package-dev-64) \
 		       --link-doc=$(package-ti-64)
 endif
-	dh_installchangelogs -s NEWS
-	dh_installdirs -s
+	dh_installchangelogs -s NEWS $(bootstrap_dh_flags)
+	dh_installdirs -s $(bootstrap_dh_flags)
 
 	# Strip the packages, shipping detached debugging symbols.
-	dh_strip -s -N$(package-libw) -N$(package-ti) --dbg-package=$(package-dbg)
+	dh_strip -s -N$(package-libw) -N$(package-ti) $(bootstrap_dh_flags) --dbg-package=$(package-dbg)
 	dh_strip -p$(package-libw) --dbg-package=$(package-dbgw)
 	dh_strip -p$(package-ti) --dbg-package=$(package-dbgti)
-	dh_lintian -s
+	dh_lintian -s $(bootstrap_dh_flags)
 	dh_compress -p$(package-examples) usr/lib/ncurses/examples/README
-	dh_compress -s -N$(package-examples)
-	dh_fixperms -s
-	dh_link -s
+	dh_compress -s -N$(package-examples) $(bootstrap_dh_flags)
+	dh_fixperms -s $(bootstrap_dh_flags)
+	dh_link -s $(bootstrap_dh_flags)
 	dh_makeshlibs -p$(package-ti) -V "$(package-ti) $(sodepver)" -- -c4
 	dh_makeshlibs -p$(package-lib) -V "$(package-lib) $(sodepver)" -- -c4
 	dh_makeshlibs -p$(package-libw) -V "$(package-libw) $(sodepver)" -- -c4
@@ -464,11 +476,11 @@
 	dh_makeshlibs -p$(package-ti-64) -V "$(package-ti-64) $(sodepver)" -- -c4
 	dh_makeshlibs -p$(package-lib-64) -V "$(package-lib-64) $(sodepver)" -- -c4
 endif
-	dh_shlibdeps -s
-	dh_gencontrol -s
-	dh_installdeb -s
-	dh_md5sums -s
-	dh_builddeb -s
+	dh_shlibdeps -s $(bootstrap_dh_flags)
+	dh_gencontrol -s $(bootstrap_dh_flags)
+	dh_installdeb -s $(bootstrap_dh_flags)
+	dh_md5sums -s $(bootstrap_dh_flags)
+	dh_builddeb -s $(bootstrap_dh_flags)
 
 binary-indep: build install $(autogen-files)
 	dh_testdir

Reply via email to