Source: dzen2 Version: 0.9.5~svn271-4 Tags: upstream patch User: helm...@debian.org Usertags: rebootstrap
dzen2 fails to cross build from source, because it uses build architecture build tools such as pkg-config or strip. For making it cross buildable, these tools need to be substitutable and substituted. The attached patch (applicable upstream) makes the tools subtitutable. dh_auto_build passes PKG_CONFIG to make. For STRIP, I recommend passing STRIP=true to make, because that will make -dbgsym packages work. Please consider applying the attached patch and passing STRIP=true to dh_auto_build. Helmut
--- dzen2-0.9.5~svn271.orig/config.mk +++ dzen2-0.9.5~svn271/config.mk @@ -6,6 +6,8 @@ # paths PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man +PKG_CONFIG ?= pkg-config +STRIP ?= strip X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib @@ -39,18 +41,18 @@ ## Option 5: With XFT -LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `pkg-config --libs xft` -CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XFT `pkg-config --cflags xft` +LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `$(PKG_CONFIG) --libs xft` +CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XFT `$(PKG_CONFIG) --cflags xft` ## Option 6: With XPM and XFT -#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXpm `pkg-config --libs xft` -#CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XPM -DDZEN_XFT `pkg-config --cflags xft` +#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXpm `$(PKG_CONFIG) --libs xft` +#CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XPM -DDZEN_XFT `$(PKG_CONFIG) --cflags xft` ## Option 7: With Xinerama and XPM and XFT -#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama -lXpm `pkg-config --libs xft` -#CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT `pkg-config --cflags xft` +#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama -lXpm `$(PKG_CONFIG) --libs xft` +#CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT `$(PKG_CONFIG) --cflags xft` @@ -65,7 +67,7 @@ #CFLAGS += -xtarget=ultra # Debugging -#CFLAGS = ${INCS} -DVERSION=\"${VERSION}\" -std=gnu89 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -O2 -pipe -DDZEN_XFT `pkg-config --cflags xft` +#CFLAGS = ${INCS} -DVERSION=\"${VERSION}\" -std=gnu89 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -O2 -pipe -DDZEN_XFT `$(PKG_CONFIG) --cflags xft` #LDFLAGS = ${LIBS} # compiler and linker --- dzen2-0.9.5~svn271.orig/Makefile +++ dzen2-0.9.5~svn271/Makefile @@ -24,7 +24,7 @@ dzen2: ${OBJ} @echo LD $@ @${LD} -o $@ ${OBJ} ${LDFLAGS} - @strip $@ + @${STRIP} $@ @echo "Run ./help for documentation" clean: --- dzen2-0.9.5~svn271.orig/gadgets/Makefile +++ dzen2-0.9.5~svn271/gadgets/Makefile @@ -24,24 +24,24 @@ dbar: ${OBJ} @echo LD $@ @${LD} -o $@ dbar-main.o dbar.o ${LDFLAGS} - @strip $@ + @${STRIP} $@ gdbar: ${OBJ} @echo LD $@ # @${LD} -o $@ gdbar.o dbar.o ${LDFLAGS} -L${X11LIB} -lX11 @${LD} -o $@ gdbar.o dbar.o ${LDFLAGS} - @strip $@ + @${STRIP} $@ gcpubar: ${OBJ} @echo LD $@ # @${LD} -o $@ gcpubar.o dbar.o ${LDFLAGS} -L${X11LIB} @${LD} -o $@ gcpubar.o dbar.o ${LDFLAGS} - @strip $@ + @${STRIP} $@ textwidth: ${OBJ} @echo LD $@ @${LD} -o $@ textwidth.o ${LDFLAGS} -L${X11LIB} -lX11 - @strip $@ + @${STRIP} $@ clean: @echo cleaning