#!/usr/bin/make -f export DEB_CFLAGS_MAINT_APPEND = -march=armv5tej -marm -Os -fomit-frame-pointer -fno-strict-aliasing -fno-tree-vectorize -fno-aggressive-loop-optimizations -fno-strict-overflow -mfloat-abi=soft -ffast-math export DEB_CXXFLAGS_MAINT_APPEND = $(DEB_CFLAGS_MAINT_APPEND) include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/pkg-info.mk confflags = --disable-rpath --enable-sdl-dlopen \ --disable-assembly --enable-video-opengl --disable-video-x11-xrandr --disable-video-x11-xv --disable-nasm --enable-video-x11 --enable-video-fbcon --disable-video-dga --disable-video-directfb --enable-joystick --disable-cdrom \ --disable-video-ggi --disable-video-svga --disable-video-aalib \ --disable-nas --disable-esd --disable-arts \ --disable-alsa-shared --disable-pulseaudio-shared \ --disable-x11-shared \ --enable-video-caca # Only use NASM routines on x86 CPUs ifeq ($(DEB_HOST_ARCH_CPU),i386) confflags += --enable-nasm endif # Don't use PlayStation 3 Cell driver on powerpc and ppc64 ifneq (,$(findstring $(DEB_HOST_ARCH_CPU),powerpc ppc64)) confflags += --enable-video-ps3=no \ --disable-altivec endif %: dh $@ override_dh_autoreconf: # aclocal needs to include in specific order, and/or it seems that # doesn't try to find .m4 files in /usr/share/aclocal at all. Updates # to both .m4 files and ltmain.sh (aclocal and libtoolize) are necessary # to support new architectures aarch64 (arm64) and powerpc64le, and this # seems the more straight way to achieve it. # # An alternative would be to just build-depend on libesd0-dev, # libasound2-dev and libltdl-dev to provide the files "esd.m4 alsa.m4 # ltdl.m4" in /usr/share/aclocal, and not use the local "acinclude" dir # at all, but this pull even more dependencies, and unneeded ones. # # Another equivalent alternative, but more verbose: # # ACLOCAL="cat acinclude/esd.m4 acinclude/alsa.m4 acinclude/ltdl.m4 \ # /usr/share/aclocal/libtool.m4 \ # /usr/share/aclocal/ltoptions.m4 \ # /usr/share/aclocal/ltversion.m4 \ # /usr/share/aclocal/ltsugar.m4 >> aclocal.m4; aclocal" # LIBTOOLIZE="libtoolize -f -i" dh_autoreconf --as-needed # autoreconf -- -I acinclude -f -i AUTOHEADER=true ACLOCAL="aclocal --force --install -I /usr/share/aclocal/ -I acinclude" LIBTOOLIZE="libtoolize -fi" dh_autoreconf --as-needed # To verify that it worked, grep should find these strings: # #rgrep -i aarch64 . #rgrep -r powerpc64le . override_dh_auto_configure: dh_auto_configure -- $(confflags) override_dh_auto_build: dh_auto_build GZIP="-9n" tar czf debian/examples.tar.gz test --owner=0 --group=0 --mode=go=rX,u+rw,a-s --clamp-mtime --mtime="@$(SOURCE_DATE_EPOCH)" --sort=name override_dh_auto_clean: dh_auto_clean rm -f debian/examples.tar.gz override_dh_install: rm -f debian/tmp/usr/lib/*/libSDL*.la dh_install override_dh_installdocs: dh_installdocs -Xdocs/man3/SDL