From 73635654b778f92f07bdd4ca13ded4ac7df8e9c6 Mon Sep 17 00:00:00 2001 From: etrunko Date: Fri, 4 Jul 2008 18:17:12 +0000 Subject: [PATCH] Try to guess the target system automatically --- trunk/imlib2/debian/changelog | 7 +++++++ trunk/imlib2/debian/control | 2 +- trunk/imlib2/debian/rules | 45 ++++++++++++++++++++++++++++++++--------- 3 files changed, 44 insertions(+), 10 deletions(-) diff --git a/trunk/imlib2/debian/changelog b/trunk/imlib2/debian/changelog index 0513039..744ef4e 100644 --- a/trunk/imlib2/debian/changelog +++ b/trunk/imlib2/debian/changelog @@ -1,3 +1,10 @@ +imlib2 (1.4.1.000-maemo3) unstable; urgency=low + + * debian/rules: Try to guess the target device in a bit more clever way. + * debian/control: Fix build dependency info. + + -- Eduardo Lima (Etrunko) Thu, 03 Jul 2008 16:05:28 -0300 + imlib2 (1.4.1.000-maemo2) unstable; urgency=low * New release. diff --git a/trunk/imlib2/debian/control b/trunk/imlib2/debian/control index 0a90cf4..22a7088 100644 --- a/trunk/imlib2/debian/control +++ b/trunk/imlib2/debian/control @@ -2,7 +2,7 @@ Source: imlib2 Section: libs Priority: optional Maintainer: Maemo-EFL Team -Build-Depends: cdbs, libjpeg62-dev, libpng3-dev | libpng2-dev | libpng-dev, libtiff4-dev | libtiff-dev, zlib1g-dev, x11proto-core-dev | xlibs-dev, x11proto-xext-dev | xlibs-dev, libfreetype6-dev | freetype2-dev, libbz2-dev, automake1.7 | automaken, libtool, debhelper (>= 4.0) +Build-Depends: cdbs, libjpeg62-dev, libpng3-dev | libpng2-dev | libpng-dev, libtiff4-dev | libtiff-dev, zlib1g-dev, x11proto-core-dev | xlibs-dev, x11proto-xext-dev | xlibs-dev, libfreetype6-dev | freetype2-dev, libbz2-dev, automake1.7 | automaken, libtool, debhelper (>= 4.0), libx11-dev, libxext-dev Standards-Version: 3.6.2.2 #Package: imlib2-demo diff --git a/trunk/imlib2/debian/rules b/trunk/imlib2/debian/rules index 6230be9..495c7c5 100755 --- a/trunk/imlib2/debian/rules +++ b/trunk/imlib2/debian/rules @@ -9,17 +9,44 @@ DEB_CONFIGURE_EXTRA_FLAGS := --disable-mmx \ --without-gif \ --without-id3 -DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) - CFLAGS += -I/usr/X11R6/include -ifneq (,$(findstring armel,$(DEB_BUILD_ARCH))) - CFLAGS += -DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant - ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS))) - CFLAGS += -mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s - endif - ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS))) - CFLAGS += -mcpu=arm926ej-s +DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH) + +ifeq ($(DEB_BUILD_ARCH),armel) + COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant + N770_CFLAGS=-mcpu=arm926ej-s + N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s + ifneq ($(DEB_BUILD_OPTIONS),) + ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS))) + SPECIFIC_CFLAGS=$(N8x0_CFLAGS) + else + ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS))) + SPECIFIC_CFLAGS=$(N770_CFLAGS) + endif + endif endif + ifeq ($(SPECIFIC_CFLAGS),) + ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?)) + SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2) + ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO)) + SPECIFIC_CFLAGS=$(N8x0_CFLAGS) + endif + endif + ifeq ($(SPECIFIC_CFLAGS),) + # Our last hope is to look at the value returned by `sb-conf current` + SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1) + ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO)) + ifeq ($(SB_CURRENT),GREGALE) + SPECIFIC_CFLAGS=$(N770_CFLAGS) + else + SPECIFIC_CFLAGS=$(N8x0_CFLAGS) + endif + else + COMMON_CFLAGS= + endif + endif + endif endif +CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS) -- 1.7.9.5