m681x-gdb stable port information

Package: m681x-gdb
Version: 6.4
Revision: 2
Maintainer: Carl van Denzen
Recommends: m681x-binutils,m681x-gcc,m681x-newlib
HomePage: http://m68hc11.serveftp.org/
Source: mirror:gnu:/gdb/gdb-%v.tar.gz
Source-MD5: 7dc98022ee96bba5331f195dc8a5491a
Source2: http://m68hc11.serveftp.org/m68hc1x-builder-3.1.tar.gz
Source2-MD5: 6c3ee04975e34414acf69dab2d2b1556
DescPort: <<
Avoided using /sw/m6811. Its lib & include folders have been moved to /sw/share/m6811 and the binaries are put into /sw/bin.
All files that are not recognizable as m6811 files renamed to m6811-xxx to avoid clashes with other potential toolchains.
--with-as=%p/bin/m6811-elf-as added, I do not know why it is needed when not building into /usr/local, but it solves a problem.
Somehow nls does not work: configure sees the /sw/include/libintl.h, but during link phase, the /sw/lib/libintl.a is not found. My simple solution was to disable nls.
Only 6811 is supported, 6812 is not supported
TODO: Native Language Support.
<<
PatchScript: <<
patch -p1 < ../m68hc1x-builder-3.1/gdb-6.4-m68hc1x-20060122.diffs
sed patch.tmp -e 's/\(SIM.*\) -lm/\1/'
mv -f patch.tmp gdb/config/m68hc11/m68hc11.mt
<<
CompileScript: <<
#!/bin/bash -ev
# Extract TARGET and PROGRAM_PREFIX from the fink package name
# m6811-xxxx -> m6811-elf cq m6811-elf- cq m6811 (machine)
SOURCEDIR=$(pwd)
for x in 1 ; do
#
# 681$x
#
MACHINE=%n;MACHINE=${MACHINE%%x-*}$x
TARGET=${MACHINE}-elf;PROGRAM_PREFIX=$TARGET-
echo $TARGET $MACHINE $PROGRAM_PREFIX
#
cd $SOURCEDIR
BUILDDIR=build.${MACHINE}
mkdir ${BUILDDIR}
cd ${BUILDDIR}
${SOURCEDIR}/configure --target=$TARGET --prefix=%i/share/$MACHINE --bindir=%i/bin --mandir=%i/share/man --infodir=%i/share/info --enable-languages=c --program-prefix=$PROGRAM_PREFIX --with-local-prefix=%i/include/local --with-as=%p/bin/m6811-elf-as --with-ld=%p/bin/m6811-elf-ld --disable-nls
make
done
<<
InstallScript: <<
#!/bin/bash -ev
# Extract TARGET and PROGRAM_PREFIX from the fink package name
# m6811-xxxx -> m6811-elf cq m6811-elf- cq m6811 (machine)
SOURCEDIR=$(pwd)
for x in 1 ; do
#
# 681$x
#
MACHINE=%{n};MACHINE=${MACHINE%%x-*}$x
TARGET=${MACHINE}-elf;PROGRAM_PREFIX=$TARGET-
cd $SOURCEDIR
BUILDDIR=build.${MACHINE}
cd ${BUILDDIR}
make install
/usr/bin/find -E %i -regex ".*/libiberty.a" -exec rm -f {} \;
#
# Remove duplicate info entries (between binutils and this one)
#
for i in $(/usr/bin/find -E %d -regex ".*/(bfd|configure|standards).*\.info(-[0-9]+)?" -print);do echo rm $i ;rm $i ;done
#
# Rename the files xxx.info into m6811-elf-xxx.info cq m6812-elf-xx.info to avoid name clashes with other binutils packages and these two packages (m6811 and m6812)
# The files of the m6811 should not be renamed, hence the inverted grep.
#
for i in $(/usr/bin/find -E %d -regex ".*/.*\.info(-[0-9]+)?" -print|grep --invert-match /${MACHINE%%%%?});do echo $i ${i%%/*} ${i##*/} ;mv $i ${i%%/*}/$PROGRAM_PREFIX${i##*/};done
done
<<
DocFiles:
InfoDocs: m6811-elf-annotate.info m6811-elf-gdb.info m6811-elf-gdbint.info m6811-elf-stabs.info m6811-elf-standards.info
Description: For Motorola 68hc11/12 micro controllers
License: GPL
#Homepage: http://gcc.gnu.org/
BuildDepends: m681x-binutils (>=2.16-1)