Try to guess the target system automatically
authoretrunko <eblima@gmail.com>
Mon, 7 Jul 2008 18:26:02 +0000 (18:26 +0000)
committeretrunko <eblima@gmail.com>
Mon, 7 Jul 2008 18:26:02 +0000 (18:26 +0000)
trunk/etk/debian/changelog
trunk/etk/debian/control
trunk/etk/debian/rules

index 037e2cc..c8fb8f0 100644 (file)
@@ -1,3 +1,10 @@
+etk (0.1.0.042-maemo4) 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) <eduardo.lima@indt.org.br>  Thu, 03 Jul 2008 16:05:28 -0300
+
 etk (0.1.0.042-maemo3) unstable; urgency=low
 
   * New release.
index 562bca0..cc4bf8c 100644 (file)
@@ -2,13 +2,13 @@ Source: etk
 Section: libs
 Priority: optional
 Maintainer: Maemo-EFL Team <maemo-efl-devel@garage.maemo.org>
-Build-Depends: cdbs, quilt, debhelper (>= 4.0.0), autotools-dev, libevas0-dev (>= 0.9.9.042-maemo3), libecore0-dev (>= 0.9.9.042-maemo3), libedje0-dev (>= 0.5.0.042-maemo4)
+Build-Depends: cdbs, quilt, debhelper (>= 4.0.0), autotools-dev, libevas0-dev (>= 0.9.9.042-maemo4), libecore0-dev (>= 0.9.9.042-maemo4), libedje0-dev (>= 0.5.0.042-maemo5), edje0-bin (>= 0.5.0.042-maemo5)
 Standards-Version: 3.7.2
 
 Package: libetk0
 Architecture: any
 Section: libs
-Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo3), libecore0 (>= 0.9.9.042-maemo3), libecore0-imf-evas (>= 0.9.9.042-maemo3), libedje0 (>= 0.5.0.042-maemo4), libetk0-engine-evas-software-x11 (= ${Source-Version}), libetk0-engine-evas-software-x11-16 (= ${Source-Version})
+Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo4), libecore0 (>= 0.9.9.042-maemo4), libecore0-imf-evas (>= 0.9.9.042-maemo4), libedje0 (>= 0.5.0.042-maemo5), libetk0-engine-evas-software-x11 (= ${Source-Version}), libetk0-engine-evas-software-x11-16 (= ${Source-Version})
 Provides: libetk
 Description: A widget toolkit based on the EFL
  ETK is a widget toolkit based on the enlightenment foundation libraries.
@@ -16,7 +16,7 @@ Description: A widget toolkit based on the EFL
 #Package: libetk0-engine-fb
 #Architecture: any
 #Section: libs
-#Depends: ${shlibs:Depends}, libetk0 (= ${Source-Version}), libevas0 (>= 0.9.9.042-maemo3), libecore0 (>= 0.9.9.042-maemo3), libedje0 (>= 0.5.0.042-maemo4)
+#Depends: ${shlibs:Depends}, libetk0 (= ${Source-Version}), libevas0 (>= 0.9.9.042-maemo4), libecore0 (>= 0.9.9.042-maemo4), libedje0 (>= 0.5.0.042-maemo5)
 #Provides: libetk-engine-fb
 #Description: Framebuffer engine for Etk
 # ETK is a widget toolkit based on the enlightenment foundation libraries.
@@ -26,7 +26,7 @@ Description: A widget toolkit based on the EFL
 Package: libetk0-engine-evas
 Architecture: any
 Section: libs
-Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo3), libecore0 (>= 0.9.9.042-maemo3), libedje0 (>= 0.5.0.042-maemo4), libetk0 (= ${Source-Version})
+Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo4), libecore0 (>= 0.9.9.042-maemo4), libedje0 (>= 0.5.0.042-maemo5), libetk0 (= ${Source-Version})
 Provides: libetk-engine-evas
 Description: Evas engine for Etk
  ETK is a widget toolkit based on the enlightenment foundation libraries.
@@ -36,7 +36,7 @@ Description: Evas engine for Etk
 Package: libetk0-engine-evas-x11
 Architecture: any
 Section: libs
-Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo3), libecore0 (>= 0.9.9.042-maemo3), libedje0 (>= 0.5.0.042-maemo4), libetk0 (= ${Source-Version}), libetk0-engine-evas (= ${Source-Version})
+Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo4), libecore0 (>= 0.9.9.042-maemo4), libedje0 (>= 0.5.0.042-maemo5), libetk0 (= ${Source-Version}), libetk0-engine-evas (= ${Source-Version})
 Provides: libetk-engine-evas-x11
 Description: X11 engine for Etk
  ETK is a widget toolkit based on the enlightenment foundation libraries.
@@ -46,7 +46,7 @@ Description: X11 engine for Etk
 Package: libetk0-engine-evas-software-x11
 Architecture: any
 Section: libs
-Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo3), libecore0 (>= 0.9.9.042-maemo3), libedje0 (>= 0.5.0.042-maemo4), libetk0 (= ${Source-Version}), libetk0-engine-evas-x11 (= ${Source-Version})
+Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo4), libecore0 (>= 0.9.9.042-maemo4), libedje0 (>= 0.5.0.042-maemo5), libetk0 (= ${Source-Version}), libetk0-engine-evas-x11 (= ${Source-Version})
 Provides: libetk-engine-evas-software-x11
 Description: X11 software engine for Etk
  ETK is a widget toolkit based on the enlightenment foundation libraries.
@@ -56,7 +56,7 @@ Description: X11 software engine for Etk
 Package: libetk0-engine-evas-software-x11-16
 Architecture: any
 Section: libs
-Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo3), libecore0 (>= 0.9.9.042-maemo3), libedje0 (>= 0.5.0.042-maemo4), libetk0 (= ${Source-Version}), libetk0-engine-evas-x11 (= ${Source-Version}), libetk0-engine-evas-software-x11 (= ${Source-Version})
+Depends: ${shlibs:Depends}, libevas0 (>= 0.9.9.042-maemo4), libecore0 (>= 0.9.9.042-maemo4), libedje0 (>= 0.5.0.042-maemo5), libetk0 (= ${Source-Version}), libetk0-engine-evas-x11 (= ${Source-Version}), libetk0-engine-evas-software-x11 (= ${Source-Version})
 Provides: libetk-engine-evas-software-x11-16
 Description: X11 software engine for Etk optimized for 16 bits
  ETK is a widget toolkit based on the enlightenment foundation libraries.
@@ -76,7 +76,7 @@ Description: Virtual package provfing all engines for Etk
 Package: libetk0-dev
 Architecture: any
 Section: libdevel
-Depends: libevas0-dev (>= 0.9.9.042-maemo3), libecore0-dev (>= 0.9.9.042-maemo3), libedje0-dev (>= 0.5.0.042-maemo4), libetk0 (= ${Source-Version})
+Depends: libevas0-dev (>= 0.9.9.042-maemo4), libecore0-dev (>= 0.9.9.042-maemo4), libedje0-dev (>= 0.5.0.042-maemo5), libetk0 (= ${Source-Version})
 Provides: libetk-dev
 Description: Etk headers, static libraries and documentation
  Headers, static libraries and documentation for the ETK widget library.
index 4e987df..304f0e5 100755 (executable)
@@ -6,15 +6,43 @@ include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
 DEB_CONFIGURE_EXTRA_FLAGS := --disable-ecore-fb-x11-support
 
-DEB_BUILD_ARCH  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
-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
+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)
+