Hi, On 02/28/2013 01:00 PM, Didier 'OdyX' Raboud wrote: > Would it be possible to refactor that patch to have the dpkg-specific > handling > in debian/rules (as CMAKE argument like -DDISABLE_ALTIVEC for example) > instead > of directly in the CMakeLists.txt ? This would widely help pushing that fix > to > upstream.
I'm attaching two patches (for debian/rules, and for upstream, resp.), that should do exactly this. > By the way, if you could test-compile lightspark from experimental, that > would > be a nice input for upstream too. Yes - just done, builds fine, with exactly the same patches applied. Roland
--- lightspark-0.6.0.1/debian/rules.orig 2013-02-28 12:53:50.744259013 +0000 +++ lightspark-0.6.0.1/debian/rules 2013-02-28 13:04:47.776418169 +0000 @@ -1,12 +1,18 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk + +CONFFLAGS := -DENABLE_RTMP=TRUE -DAUDIO_BACKEND="pulse sdl" + +ifeq ($(DEB_HOST_ARCH),powerpcspe) + CONFFLAGS += -DDISABLE_ALTIVEC=TRUE +endif + %: dh $@ --parallel override_dh_auto_configure: - dh_auto_configure -- \ - -DENABLE_RTMP=TRUE \ - -DAUDIO_BACKEND="pulse sdl" + dh_auto_configure -- $(CONFFLAGS) override_dh_strip: dh_strip --dbg-package=lightspark-dbg
--- lightspark-0.6.0.1.orig/CMakeLists.txt 2012-06-10 11:14:25.000000000 +0200 +++ lightspark-0.6.0.1/CMakeLists.txt 2013-02-28 13:48:09.684176561 +0100 @@ -142,7 +142,10 @@ ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc") SET(ppc 1) SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None ppc") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -D__STDC_CONSTANT_MACROS -fPIC") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS -fPIC") + IF(NOT(DISABLE_ALTIVEC)) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec") + ENDIF() ELSE(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i[3-6]86$|^x86$") # All non-x86 non-ppc architectures. SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None")