On 15/03/13 17:53, Alessandro Ghedini wrote: > On Fri, Mar 15, 2013 at 07:30:11AM -0500, Jeff Epler wrote: >> > On Thu, Mar 14, 2013 at 06:30:43PM +0100, Alessandro Ghedini wrote: >>> > > I'll have a look as soon as I have some free time. I was also thinking >>> > > that the >>> > > patch may be applied only in the kfreebsd builds, so it wouldn't >>> > > interfere with >>> > > the linux builds. >> > >> > That sounds great, but I do not yet have the debian expertise to know >> > how to express this in debian/rules (or whereever the appropriate >> > location is) > That would be done by calling "quilt pop" before building on every platform > except from kfreebsd-* (or something like that), with the freebsd patch being > the last one in the series. But I can take care of this one. >
Hi. I have been playing a bit with this idea and I cooked a solution for applying the patches for kfreebsd only when building for kfreebsd. You must create the directory debian/patches/kfreebsd and move all the kfreebsd patches inside this directory. Name the patches in the alphabetic order in you wish them to be applied and use as file extension .patch I attach the patch for debian/rules that implements this by overriding dh_quilt_patch so when building on kfreebsd this patches are automatically imported into the series if they were not already imported (by a previous build). Probably there is a better way of doing this, don't know. Hope you find useful. Feel free to modify it as you want. By the way, thanks for all the work on this :) PS: I think the dependence for the binary package valgrind on "libc6-dbg" should be changed to "libc6-dbg | libc0.1-dbg". Otherwise the package can't be installed (there is no libc6 on kfreebsd, but libc0.1) Regards!
--- a/debian/rules 2013-03-16 20:01:37.626193907 +0100 +++ b/debian/rules 2013-03-16 20:22:02.189434047 +0100 @@ -3,6 +3,7 @@ CROSS := DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CROSS := $(DEB_HOST_GNU_TYPE) endif @@ -35,7 +36,18 @@ endif %: - dh $@ --parallel --with=bash-completion,autoreconf + dh $@ --parallel --with=quilt,bash-completion,autoreconf + +override_dh_quilt_patch: + dh_quilt_patch +ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd) + $(foreach kfreebsdpatch,$(shell cd debian/patches/kfreebsd && ls *.patch), \ + if ! quilt applied|grep -qx "$(kfreebsdpatch)"; then \ + quilt import "debian/patches/kfreebsd/$(kfreebsdpatch)"; \ + dh_quilt_patch; \ + fi; \ + ) +endif override_dh_auto_configure: dh_auto_configure -- --host="$(DEB_HOST_GNU_TYPE)" --enable-tls \
signature.asc
Description: OpenPGP digital signature