From 3e41608aacc26fc8f4bd753600976afe4c125c58 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 14 Aug 2007 11:25:45 +0200 Subject: [PATCH] Fix Debian rules files to support building non-Linux archs Addresses-Debian-Bug: #437720 Signed-off-by: Samuel Thibault Signed-off-by: "Theodore Ts'o" --- debian/control | 2 +- debian/rules | 7 ++++++- resize/online.c | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 448be70..0bf778a 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: e2fsprogs Section: admin Priority: required Maintainer: Theodore Y. Ts'o -Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, libsepol1-dev, libdevmapper-dev, libselinux1-dev, debhelper (>= 4) +Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdevmapper-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], debhelper (>= 4) Standards-Version: 3.7.3.0 Package: e2fsck-static diff --git a/debian/rules b/debian/rules index 49237b8..3e10091 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,7 @@ export LC_ALL=C # from having to guess our platform (since we know it already) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) +DEB_HOST_OS ?= $(shell dpkg-architecture -qDEB_HOST_OS) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) @@ -82,6 +83,10 @@ else CCOPTS += -D__NO_STRING_INLINES endif +ifeq (${DEB_HOST_ARCH_OS},linux) +DEVMAPPER = --enable-blkid-devmapper +endif + BF_CCOPTS = -Os -fomit-frame-pointer COMMON_CONF_FLAGS = \ @@ -89,7 +94,7 @@ COMMON_CONF_FLAGS = \ --infodir=/usr/share/info --enable-fsck STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression \ - --enable-blkid-devmapper + ${DEVMAPPER} BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \ --disable-nls --disable-swapfs --disable-imager \ diff --git a/resize/online.c b/resize/online.c index 36b3185..fc1f7a2 100644 --- a/resize/online.c +++ b/resize/online.c @@ -21,6 +21,7 @@ extern char *program_name; errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt, blk_t *new_size, int flags EXT2FS_ATTR((unused))) { +#ifdef __linux__ struct ext2_new_group_input input; struct ext2_super_block *sb = fs->super; unsigned long new_desc_blocks; @@ -158,4 +159,9 @@ errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt, close(fd); return 0; +#else + printf(_("Filesystem at %s is mounted on %s, and on-line resizing is" + "not supported on this system.\n"), fs->device_name, mtpt); + exit(1); +#endif } -- 1.8.3.1