[Fwd: Neuer 11_makefile-sanitize.dpatch]

Kilian Krause kk@verfaction.de
Tue, 17 Aug 2004 15:45:14 +0200


--=-L9iau4pkw7UD0wQmPhFf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This is the new patch for asterisk which was reported to work ok.

I can't get svn-buildpackage to work. It's still:
rm -rf patch-stamp patch-stampT debian/patched
svn: Valid UTF-8 data
(hex:)
followed by invalid UTF-8 sequence
(hex: 89 45 f8 83)
E: found unresolved issues:=20

 ?      svn_io_get_dirents

E: Resolve them manually before continueing


maybe someone can enlighten me..

Apart from that the patch is commmited, so you might be wanting to roll
that out asap.


-----Weitergeleitete Nachricht-----
> From: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
> To: kk@verfaction.de
> Subject: Neuer 11_makefile-sanitize.dpatch
> Date: Tue, 17 Aug 2004 15:25:49 +0200
>=20
> Hallo Kilian,
>=20
> neuer Patch anbei.
>=20
>=20
> Thiemo
>=20
>=20
> #! /bin/sh -e
> ## 11_makefile-sanitize.dpatch by Thiemo Seufer <seufer@csv.ica.uni-stutt=
gart.de>
> ##
> ## All lines beginning with `## DP:' are a description of the patch.
> ## DP: Clean up unusable cruft in the Makefiles
>=20
> if [ $# -lt 1 ]; then
>     echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
>     exit 1
> fi
>=20
> [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
> patch_opts=3D"${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
>=20
> case "$1" in
>     -patch) patch -p1 ${patch_opts} < $0;;
>     -unpatch) patch -R -p1 ${patch_opts} < $0;;
>     *)
>         echo "`basename $0`: script expects -patch|-unpatch as argument" =
>&2
>         exit 1;;
> esac
>=20
> exit 0
>=20
> @DPATCH@
>=20
> --- ./apps/Makefile.old	2004-08-15 13:57:21.000000000 +0200
> +++ ./apps/Makefile	2004-08-15 13:42:10.000000000 +0200
> @@ -42,7 +42,7 @@ APPS+=3D$(shell if [ -f /usr/include/linux
>  APPS+=3D$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_za=
pras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
>  APPS+=3D$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplook=
up.so" ; fi)
> =20
> -CFLAGS+=3D-fPIC
> +CFLAGS+=3D-fPIC -DPIC
> =20
>  ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
>  CFLAGS+=3D-DUSEPOSTGRESVM
> @@ -88,7 +88,7 @@ app_sql_odbc.so: app_sql_odbc.o
>  	$(CC) $(SOLINK) -o $@ $< -lodbc
> =20
>  look:	look.c
> -	gcc -pipe -O6 -g look.c -o look -lncurses
> +	$(CC) $(CFLAGS) look.c -o look -lncurses
> =20
>  ifneq ($(wildcard .depend),)
>  include .depend
> --- ./codecs/ilbc/Makefile.old	2004-08-15 11:16:45.000000000 +0200
> +++ ./codecs/ilbc/Makefile	2004-08-15 12:24:43.000000000 +0200
> @@ -1,10 +1,5 @@
> -ARCH=3D$(PROC)
> -ifeq (${OSARCH},Darwin)
> -CFLAGS+=3D-Wall -Werror -fPIC -O3 -funroll-loops -fomit-frame-pointer
> -else
> -CFLAGS+=3D-Wall -Werror -fPIC -O3 -march=3D$(ARCH) -funroll-loops -fomit=
-frame-pointer
> -endif
> -LIB=3Dlibilbc.a
> +CFLAGS+=3D -Werror -funroll-loops -fomit-frame-pointer
> +LIB=3D libilbc.a
> =20
>  OBJS=3D anaFilter.o iCBSearch.o packing.o \
>          constants.o gainquant.o iLBC_decode.o StateConstructW.o \
> --- ./codecs/lpc10/Makefile.old	2004-08-15 11:16:45.000000000 +0200
> +++ ./codecs/lpc10/Makefile	2004-08-15 12:25:34.000000000 +0200
> @@ -2,49 +2,15 @@
>  # Makefile for LPC-10 speech coder library (unix)
>  #=20
> =20
> -# default C compiler
> -CC?=3D gcc
> +CFLAGS+=3D -I. -Wno-comment -Wno-error
> =20
> -#=20
> -# These definitions for CFLAGS and LIB_TARGET_DIR are used when one
> -# runs make in the lpc10 directory, without environment variables that
> -# override them.  When make is run in this directory from a makefile
> -# for an application that uses the LPC10 coder, there are environment
> -# variables set for CFLAGS and LIB_TARGET_DIR that override these
> -# definitions.
> -#=20
> -
> -LIB_TARGET_DIR =3D .
> -
> -#=20
> -# -I$(LIB_TARGET_DIR) option needed so that #include "machine.h"
> -# directives can find the machine.h file.
> -#=20
> -
> -WARNINGS =3D -Wall -Wno-comment -Wno-error
> -CFLAGS +=3D $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC
> -#CFLAGS+=3D $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi=
)
> -
> -#fix for PPC processors and ALPHA too
> -ifneq ($(OSARCH),Darwin)
> -ifneq ($(findstring BSD,${OSARCH}),BSD)
> -ifneq ($(PROC),ppc)
> -ifneq ($(PROC),x86_64)
> -ifneq ($(PROC),alpha)
> -	CFLAGS+=3D -march=3D$(PROC)
> -endif
> -endif
> -endif
> -endif
> -endif
> -
> -LIB =3D $(LIB_TARGET_DIR)/liblpc10.a
> +LIB=3D ./liblpc10.a
> =20
>  .PHONY: all clean
> =20
> -all:	$(LIB)
> +all: $(LIB)
> =20
> -OBJ=3D	f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \
> +OBJ=3D f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \
>  		deemp.o difmag.o dyptrk.o encode.o energy.o ham84.o \
>  		hp100.o invert.o irc2pc.o ivfilt.o lpcdec.o lpcenc.o \
>  		lpcini.o lpfilt.o median.o mload.o onset.o pitsyn.o \
> --- ./codecs/Makefile.old	2004-08-15 11:16:45.000000000 +0200
> +++ ./codecs/Makefile	2004-08-15 12:50:04.000000000 +0200
> @@ -21,13 +21,14 @@ MODG723=3D$(shell [ -f g723.1/coder.c ] &&
>  MODG723+=3D$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
>  MODSPEEX=3D$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/includ=
e/speex.h ] && echo "codec_speex.so")
>  MODILBC=3D$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
> -CFLAGS+=3D-fPIC
> +CFLAGS+=3D-fPIC -DPIC
>  CFLAGS+=3D$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/loca=
l/include")
> =20
>  LIBG723=3Dg723.1/libg723.a
>  LIBG723B=3Dg723.1b/libg723b.a
> -LIBGSM=3Dgsm/lib/libgsm.a
> -LIBGSMT=3Dgsm/lib/libgsm.a
> +LIBGSM=3D-lgsm
> +# We don't build libgsm but use the system's one.
> +LIBGSMT=3D
>  LIBLPC10=3Dlpc10/liblpc10.a
>  LIBSPEEX=3D$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/loca=
l/lib")
>  LIBSPEEX+=3D-lspeex -lm
> --- ./formats/Makefile.old	2004-08-15 11:16:45.000000000 +0200
> +++ ./formats/Makefile	2004-08-15 13:46:08.000000000 +0200
> @@ -20,9 +20,7 @@ FORMAT_LIBS+=3Dformat_jpeg.so
>  #
>  #FORMAT_LIBS+=3Dformat_g723.so
> =20
> -GSMLIB=3D../codecs/gsm/lib/libgsm.a
> -
> -CFLAGS+=3D-fPIC
> +CFLAGS+=3D-fPIC -DPIC
> =20
>  all: depend $(FORMAT_LIBS)
> =20
> @@ -34,6 +34,12 @@ ifneq ($(wildcard .depend),)
>  include .depend
>  endif
> =20
> +format_gsm.so : format_gsm.o
> +	$(CC) $(SOLINK) -o $@ $< -lgsm
> +
> +format_wav_gsm.so : format_wav_gsm.o
> +	$(CC) $(SOLINK) -o $@ $< -lgsm
> +
>  format_mp3.so : format_mp3.o
>  	$(CC) $(SOLINK) -o $@ $< -lm
> =20
> --- ./channels/h323/Makefile.old	2004-08-15 13:57:21.000000000 +0200
> +++ ./channels/h323/Makefile	2004-08-15 13:13:33.000000000 +0200
> @@ -19,10 +19,6 @@ endif
>  #
>  # This needs to be updated to deal with more than just little endian mac=
hines
>  #
> -OSARCH=3D$(shell uname -s)
> -ifneq (${OSARCH},FreeBSD)
> -CFLAGS +=3D -march=3D$(shell uname -m)
> -endif
>  CFLAGS +=3D -DPBYTE_ORDER=3DPLITTLE_ENDIAN
> =20
>  ifeq (${OSARCH},Linux)
> @@ -85,7 +81,6 @@ chan_h323_d.so:	chan_h323.o ast_h323.o
> =20
>  chan_h323_s.so:	chan_h323.o ast_h323.o
>  	$(CXX)  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(=
PWLIBDIR)/lib  -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s=
 -L/usr/lib $(CHANH323LIB)
> +
>  clean:
>  	rm -f *.o *.so core.* libchanh323.a
> -
> -
> --- ./channels/Makefile.old	2004-08-15 13:57:21.000000000 +0200
> +++ ./channels/Makefile	2004-08-15 13:19:05.000000000 +0200
> @@ -11,8 +11,6 @@
>  # the GNU General Public License
>  #
> =20
> -OSARCH=3D$(shell uname -s)
> -
>  USE_MYSQL_FRIENDS=3D0
>  USE_SIP_MYSQL_FRIENDS=3D0
> =20
> @@ -41,8 +39,8 @@ H323LIB=3D-lh323_OpenBSD_x86_r
>  CHANH323LIB=3D-L/usr/local/lib
>  else
>  MYSQLLIB=3D-L/usr/lib/mysql -lmysqlclient
> -PTLIB=3D-lpt_linux_x86_r
> -H323LIB=3D-lh323_linux_x86_r
> +PTLIB=3D-lpt
> +H323LIB=3D-lopenh323
>  CHANH323LIB=3D-ldl
>  endif
> =20
> @@ -75,7 +73,7 @@ ALSA_SRC=3Dchan_alsa.c
>  ALSA_SRC+=3D$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
> =20
>  CFLAGS+=3D-DCRYPTO
> -CFLAGS+=3D-fPIC
> +CFLAGS+=3D-fPIC -DPIC
> =20
>  ifeq ($(USE_MYSQL_FRIENDS),1)
>  CFLAGS+=3D-DMYSQL_FRIENDS
> --- ./Makefile.old	2004-08-15 13:57:21.000000000 +0200
> +++ ./Makefile	2004-08-15 13:51:43.000000000 +0200
> @@ -13,24 +13,14 @@
> =20
>  .EXPORT_ALL_VARIABLES:
> =20
> -# Create OPTIONS variable
> -OPTIONS=3D
> -
>  OSARCH=3D$(shell uname -s)
> -
> -ifeq (${OSARCH},Linux)
>  PROC=3D$(shell uname -m)
> -ifeq ($(PROC),x86_64)
> -# You must have GCC 3.4 to use k8, otherwise use athlon
> -PROC=3Dk8
> -#PROC=3Dathlon
> -OPTIONS+=3D-m64
> -endif
> -endif
> =20
> -ifeq ($(findstring BSD,${OSARCH}),BSD)
> -PROC=3D$(shell uname -m)
> -endif
> +#
> +# Optimizations for various Architectures/CPU-types. We ignore this if
> +# OPTFLAGS is already set.
> +#
> +ifndef OPTFLAGS
> =20
>  # Pentium Pro Optimize
>  #PROC=3Di686
> @@ -39,22 +29,48 @@ endif
>  #PROC=3Di586
> =20
>  #PROC=3Dk6
> -#PROC=3Dppc
> -
> -PWD=3D$(shell pwd)
> =20
>  ######### More GSM codec optimization
>  ######### Uncomment to enable MMXTM optimizations for x86 architecture C=
PU's
>  ######### which support MMX instructions.  This should be newer pentiums=
,
>  ######### ppro's, etc, as well as the AMD K6 and K7. =20
> -#K6OPT  =3D -DK6OPT
> +#K6OPT=3D -DK6OPT
> +
> +ifeq ($(PROC),i386)
> +OPTIMIZE+=3D -march=3D$(PROC)=20
> +endif
> +
> +ifeq ($(PROC),i486)
> +OPTIMIZE+=3D -march=3D$(PROC)=20
> +endif
> +
> +ifeq ($(PROC),i586)
> +OPTIMIZE+=3D -march=3D$(PROC)=20
> +endif
> +
> +ifeq ($(PROC),i686)
> +OPTIMIZE+=3D -march=3D$(PROC) -DK6OPT
> +endif
> +
> +ifeq ($(PROC),x86_64)
> +# You must have GCC 3.4 to use k8, otherwise use athlon
> +PROC=3D $(shell if $(CC) -march=3Dk8 -S -o /dev/null -xc /dev/null >/dev=
/null 2>&1; then echo "k8"; else echo "athlon"; fi)
> +OPTIMIZE+=3D -m64 -march=3D$(PROC)
> +endif
> =20
>  #Tell gcc to optimize the asterisk's code
> -OPTIMIZE=3D-O6
> +OPTIMIZE+=3D -O6
> +
> +OPTFLAGS=3D $(K6OPT) $(OPTIMIZE)
> +
> +# end of OPTFLAGS
> +endif
> =20
>  #Include debug symbols in the executables (-g) and profiling info (-pg)
>  DEBUG=3D-g #-pg
> =20
> +PWD=3D$(shell pwd)
> +
>  # If you are running a radio application, define RADIO_RELAX so that the=
 DTMF
>  # will be received more reliably
>  #OPTIONS +=3D -DRADIO_RELAX
> @@ -114,9 +130,8 @@ AGI_DIR=3D$(ASTVARLIBDIR)/agi-bin
> =20
>  INCLUDE=3D-Iinclude -I../include
>  CFLAGS=3D-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing=
-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRI=
ND_HAPPY
> -CFLAGS+=3D$(OPTIMIZE)
> -CFLAGS+=3D$(shell if $(CC) -march=3D$(PROC) -S -o /dev/null -xc /dev/nul=
l >/dev/null 2>&1; then echo "-march=3D$(PROC)"; fi)
> -CFLAGS+=3D$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; =
fi)
> +CFLAGS+=3D$(OPTFLAGS)
> +CFLAGS+=3D$(shell if echo $(PROC) | grep -q ppc\|arm\|s390\|s390x; then =
echo "-fsigned-char"; fi)
>  CFLAGS+=3D$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUP=
PORT -I/usr/include/osp" ; fi)
> =20
>  ifeq (${OSARCH},FreeBSD)
> @@ -137,7 +152,7 @@ endif
>  CFLAGS+=3D$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZA=
PTEL_OPTIMIZATIONS"; fi)
>  CFLAGS+=3D$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZA=
PTEL_OPTIMIZATIONS"; fi)
> =20
> -LIBEDIT=3Deditline/libedit.a
> +LIBEDIT=3D-Leditline -ledit
> =20
>  ASTERISKVERSION=3D$(shell if [ -f .version ]; then cat .version; else if=
 [ -d CVS ]; then if [ -f CVS/Tag ] ; then echo "CVS-`sed 's/^T//g' CVS/Tag=
`-`date +"%D-%T"`"; else echo "CVS-HEAD-`date +"%D-%T"`"; fi; fi; fi)
>  HTTPDIR=3D$(shell if [ -d /var/www ]; then echo "/var/www"; else echo "/=
home/httpd"; fi)
> @@ -488,7 +503,7 @@ config:
>  	fi=20
> =20
>  dont-optimize:
> -	$(MAKE) OPTIMIZE=3D K6OPT=3D install
> +	$(MAKE) OPTFLAGS=3D install
> =20
>  valgrind: dont-optimize
> =20

--=20
Best regards,
 Kilian

--=-L9iau4pkw7UD0wQmPhFf
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBBIgvqvdkzt4X+wX8RAtxYAJ46yy8oBHjIEjVgBwLMLMj7xZgpLQCfTYyg
i4zP23p/flA9DJT43Qih6uM=
=ANyc
-----END PGP SIGNATURE-----

--=-L9iau4pkw7UD0wQmPhFf--