diff -u gtk+2.0-2.16.0/debian/control.in gtk+2.0-2.16.0/debian/control.in --- gtk+2.0-2.16.0/debian/control.in +++ gtk+2.0-2.16.0/debian/control.in @@ -1,7 +1,8 @@ Source: gtk+@APIVER@ Section: libs Priority: optional -Maintainer: Sebastien Bacher +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Sebastien Bacher Uploaders: @GNOME_TEAM@ Build-Depends: debhelper (>= 5.0.22), gettext, @@ -29,7 +30,7 @@ libpng12-dev, gnome-pkg-tools (>= 0.11), chrpath, - dpkg-dev (>= 1.13.19), + dpkg-dev (>= 1.14.17), x11proto-xext-dev, libdirectfb-dev (>= 1.0.0), libcups2-dev (>= 1.2), diff -u gtk+2.0-2.16.0/debian/control gtk+2.0-2.16.0/debian/control --- gtk+2.0-2.16.0/debian/control +++ gtk+2.0-2.16.0/debian/control @@ -1,7 +1,8 @@ Source: gtk+2.0 Section: libs Priority: optional -Maintainer: Sebastien Bacher +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Sebastien Bacher Uploaders: Debian GNOME Maintainers , Emilio Pozuelo Monfort , Gustavo Noronha Silva , Josselin Mouette , Sebastian Dröge Build-Depends: debhelper (>= 5.0.22), gettext, @@ -29,7 +30,7 @@ libpng12-dev, gnome-pkg-tools (>= 0.11), chrpath, - dpkg-dev (>= 1.13.19), + dpkg-dev (>= 1.14.17), x11proto-xext-dev, libdirectfb-dev (>= 1.0.0), libcups2-dev (>= 1.2), diff -u gtk+2.0-2.16.0/debian/changelog gtk+2.0-2.16.0/debian/changelog --- gtk+2.0-2.16.0/debian/changelog +++ gtk+2.0-2.16.0/debian/changelog @@ -1,3 +1,33 @@ +gtk+2.0 (2.16.0-1ubuntu3) intrepid; urgency=low + + * Port optmised flavor work by Loic Minier from pango1.0 : + - Rework flavor-specific vars. + + Introduce $(flavor) which is set to $* to clarify implicit rules + + Rename common_configure_flags to configure_flags + + Introduce the flavor_get macro to use a flavor specific override or + fallback to the common defaults for make vars. + + Use $(call flavor_get, ) to retrieve configure_flags, CFLAGS, and + LDFLAGS allowing to override these per flavor. + - Add support for an optimised pass, implemented as a flavor + + Define a deveult OPTLIBDIR and replace it in the sed foo for %.in files; + this is like LIBDIR, but with some hwcaps extension, e.g. usr/lib/vfp. + + Add vars to build an optimised vfp flavour for armel with + additional CFLAGS + + Add the "opt" special flavor to flavors to run the testuites on, + CHECK_FLAVORS + + Also sed and append %.opt after %.in when generating $ files from %.in; + the %.opt file is optional and only included if the opt flavor is + included. + + Add a debian/libgtk2.0-0.install.opt which lists files from the + optimised flavor to install in libgtk2.0-0. + + Add a debian/libgail18.install.opt which lists files from the + optimised flavor to install in libgail18 + - Build-dep on dpkg-dev >= 1.14.17 and drop -g -O$(if $(findstring + noopt$(DEB_BUILD_OPTIONS)),0<2) from CFLAGS, only keeping -Wall as honor + the default CFLAGS. + + -- Emmet Hikory Mon, 30 Mar 2009 16:14:15 +0900 + gtk+2.0 (2.16.0-1ubuntu2) jaunty; urgency=low * No-change rebuild to fix lpia shared library dependencies. diff -u gtk+2.0-2.16.0/debian/rules gtk+2.0-2.16.0/debian/rules --- gtk+2.0-2.16.0/debian/rules +++ gtk+2.0-2.16.0/debian/rules @@ -27,6 +27,7 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) # ppc64 support; see #386815 # XXX Should probably be fixed in binutils @@ -36,8 +37,10 @@ CFLAGS += -mminimal-toc endif -CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2) +# default CFLAGS; these can be expanded with $(call flavor_get, ) +CFLAGS += -Wall +# default LDFLAGS; these can be expanded with $(call flavor_get, ) # used to fail in directfb code -- but this might be fixed -- currently fails # in the cups gtkprint backend #LDFLAGS += -Wl,-z,defs @@ -77,22 +80,42 @@ # Note: the shared flavor is required FLAVORS := directfb shared static +# optional optimised flavor for some arches +OPTLIBDIR = +# sample code +ifneq ($(filter $(DEB_HOST_ARCH), armel),) +FLAVORS += opt +OPTLIBDIR := $(LIBDIR)/vfp +opt_CFLAGS += $(CFLAGS) -mfpr=vfp -mfloat-abi=softfp +endif + # list of flavors to run the test suite on # don't run the directfb testsuite on kfreebsd as it hangs; see #431477 ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) -CHECK_FLAVORS := $(filter shared static, $(FLAVORS)) +CHECK_FLAVORS := $(filter opt shared static, $(FLAVORS)) else -CHECK_FLAVORS := $(filter directfb shared static, $(FLAVORS)) +CHECK_FLAVORS := $(filter opt directfb shared static, $(FLAVORS)) endif +# current flavor we're building; this is only expanded in flavor specific +# targets +current_flavor = $* + +# macro to get a value for the current flavor we're building; for example +# when building the shared flavor, $(call flavor_get,GFLAGS) will expand to +# shared_CFLAGS if it's set or to CFLAGS otherwise; pay attention to not adding +# superflous spaces when for the arguments of $(call ); only some vars can +# be expanded in this way though +flavor_get = $(or $($(current_flavor)_$(1)),$($(1))) + # build dir for the current flavor; this is only expanded in flavor specific # targets -builddir = $(buildbasedir)/$* +builddir = $(buildbasedir)/$(current_flavor) buildbasedir = $(CURDIR)/debian/build # install dir for the current flavor; this is only expanded in flavor specific # targets -installdir = $(installbasedir)/$* +installdir = $(installbasedir)/$(current_flavor) installbasedir = $(CURDIR)/debian/install # relative libdir @@ -112,29 +135,29 @@ LOADER_FILES_D := $(MODULES_BASE_PATH)/loader-files.d # configure flags -common_configure_flags := \ +configure_flags := \ --prefix=/usr \ --libdir=/$(LIBDIR) \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --sysconfdir=/etc \ --enable-test-print-backend -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - common_configure_flags += --build=$(DEB_BUILD_GNU_TYPE) -else - common_configure_flags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) + --build=$(DEB_BUILD_GNU_TYPE) +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + configure_flags += --host=$(DEB_HOST_GNU_TYPE) endif -shared_configure_flags := $(common_configure_flags) \ + +shared_configure_flags := $(configure_flags) \ --with-xinput=yes \ --enable-shared \ --disable-static -static_configure_flags := $(common_configure_flags) \ +static_configure_flags := $(configure_flags) \ --with-xinput=yes \ --with-included-loaders=yes \ --disable-modules \ --disable-shared \ --enable-static -directfb_configure_flags := $(common_configure_flags) \ +directfb_configure_flags := $(configure_flags) \ --with-xinput=no \ --enable-shared \ --disable-static \ @@ -175,8 +198,9 @@ dh_testdir mkdir -p $(builddir) cd $(builddir) && \ - CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - $(CURDIR)/configure $($*_configure_flags) + CFLAGS="$(call flavor_get,CFLAGS)" \ + LDFLAGS="$(call flavor_get,LDFLAGS)" \ + $(CURDIR)/configure $(call flavor_get,configure_flags) touch $@ configure: $(addprefix $(STAMP_DIR)/configure-stamp-, $(FLAVORS)) @@ -239,7 +263,9 @@ -e "s#@GTK_BINARY_VERSION@#$(GTK_BINARY_VERSION)#g" \ -e "s#@LIBDIR@#$(LIBDIR)#g" \ -e "s#@MODULES_BASE_PATH@#$(MODULES_BASE_PATH)#g" \ - $@.in > $@ + $@.in \ + $(wildcard $(if $(filter opt,$(FLAVORS)),$@.opt)) \ + > $@ clean:: debian/control dh_testdir only in patch2: unchanged: --- gtk+2.0-2.16.0.orig/debian/libgtk2.0-0.install.opt +++ gtk+2.0-2.16.0/debian/libgtk2.0-0.install.opt @@ -0,0 +1,3 @@ +# from the optimised flavor +debian/install/opt/@LIBDIR@/libgtk*.so.* @OPTLIBDIR@ +debian/install/opt/@LIBDIR@/libgdk*.so.* @OPTLIBDIR@ only in patch2: unchanged: --- gtk+2.0-2.16.0.orig/debian/libgail18.opt +++ gtk+2.0-2.16.0/debian/libgail18.opt @@ -0,0 +1,2 @@ +# from the optimised flavor +debian/install/opt/@LIBDIR@/libgail*.so.* @OPTLIBDIR@