--- tendra-4.1.2.orig/INSTALL +++ tendra-4.1.2/INSTALL @@ -66,12 +66,13 @@ # plenty of free space). # -BASE_DIR=/usr/local/src/TenDRA-4.1.2 -PUBLIC_BIN=/usr/local/bin -INSTALL_DIR=/usr/local/lib/TenDRA +BASE_DIR=`pwd` +DEB_DIR=${BASE_DIR}/debian/tendra +PUBLIC_BIN=${DEB_DIR}/usr/bin +INSTALL_DIR=${DEB_DIR}/usr/lib/TenDRA COMMON_DIR=${INSTALL_DIR}/lib MACH_DIR=${INSTALL_DIR}/machines -MAN_DIR=/usr/local/man +MAN_DIR=${DEB_DIR}/usr/man WORK_DIR=${BASE_DIR}/work TEMP_DIR=/var/tmp @@ -139,7 +140,7 @@ # have a particular suffix, for example it may be set to ".exe". # -CC=cc +CC="cc -O2 -D_POSIX_SOURCE" CCOPTS= LIBOPTS= TCCOPTS="TCCOPTS=" @@ -799,5 +800,6 @@ ${COMMENT} installation completed successfully else ${COMMENT} installation completed with errors + exit 1 fi exit 0 --- tendra-4.1.2.orig/debian/copyright +++ tendra-4.1.2/debian/copyright @@ -0,0 +1,85 @@ +This package was debianized by Mark Brown on +Sun, 22 Nov 1998 15:41:38 +0000. + +It was build using the file TenDRA-4.1.2.tar.gz downloaded from the +now defunct ftp://alph.dera.gov.uk/pub/TenDRA/ with minor changes to +the installation script and library locations. + +Upstream Authors: UK Defence Evaluation & Research Agency +Contact: R.Andrews@eris.dera.gov.uk + +Copyright: + + Crown Copyright (c) 1997, 1998 + + This TenDRA(r) Computer Program is subject to Copyright + owned by the United Kingdom Secretary of State for Defence + acting through the Defence Evaluation and Research Agency + (DERA). It is made available to Recipients with a + royalty-free licence for its use, reproduction, transfer + to other parties and amendment for any purpose not excluding + product development provided that any such use et cetera + shall be deemed to be acceptance of the following conditions: + + (1) Its Recipients shall ensure that this Notice is + reproduced upon any copies or amended versions of it; + + (2) Any amended version of it shall be clearly marked to + show both the nature of and the organisation responsible + for the relevant amendment or amendments; + + (3) Its onward transfer from a recipient to another + party shall be deemed to be that party's acceptance of + these conditions; + + (4) DERA gives no warranty or assurance as to its + quality or suitability for any purpose and DERA accepts + no liability whatsoever in relation to any use to which + it may be put. + +The Motif 1.2 API description is subject to the following copyright: + + COPYRIGHT NOTICE + + This program is the proprietary property of IXI Ltd, a subsidiary + of the Santa Cruz Operation (SCO). Use, reproduction, production + of amended versions and/or transfer of this program is permitted + PROVIDED THAT: + + (a) This legend be preserved on any such reproduction and amended + version. + + (b) Any recipient of such reproduction or amended version accept + the conditions set out in this legend. + + IXI accepts no liability whatsoever in relation to any use to + which this program may be put and gives no warranty as to the + program's suitability for any purpose. + + All rights reserved. + + Copyright (c) 1995, 1996 + +The power installer (not used in Debian but in the source files) is +subject to the following copyright: + + Copyright (c) 1996 Open Software Foundation, Inc. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, provided + that the above copyright notice appears in all copies and that both the + copyright notice and this permission notice appear in supporting + documentation. + + OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. + + IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, + NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + --- tendra-4.1.2.orig/debian/rules +++ tendra-4.1.2/debian/rules @@ -0,0 +1,65 @@ +#!/usr/bin/make -f +# Made with the aid of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Also some stuff taken from debmake scripts, by Cristopt Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Note that build does much of what would normally be done by install +build: build-stamp +build-stamp: + dh_testdir + dh_clean -k + dh_installdirs + + ./INSTALL + + touch build-stamp + +install: install-stamp +install-stamp: + rm -rf ./debian/tendra/usr/man + /bin/sh ./debian/fixup.sh + + touch install-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp debian/substvars + + rm -rf ./debian/tendra ./work + find . -name '*~' -exec rm '{}' ';' + + dh_clean + +binary-indep: build + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir -a + dh_testroot -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_installman -a + mv debian/tendra/usr/bin/tcc debian/tendra/usr/bin/tendracc + mv debian/tendra/usr/share/man/man1/tcc.1 debian/tendra/usr/share/man/man1/tendracc.1 + rm debian/tendra/usr/bin/trans debian/tendra/usr/share/man/man1/trans.1 + dh_installchangelogs -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary --- tendra-4.1.2.orig/debian/README.debian +++ tendra-4.1.2/debian/README.debian @@ -0,0 +1,32 @@ + TenDRA for Debian + ----------------- + +This file contains a few notes specific to the Debian package of TenDRA. +For full user documentation of TenDRA, please either visit the TenDRA +website or install the package tendra-doc which contains a copy of the +website. + +C++ +--- + +The C++ standard library used by TenDRA is extremely incomplete. It is +pretty much unusable for building useful applications. + +System C compiler +----------------- + +While the default is to use gcc as the standard C compiler, TenDRA can +made the default. Just replace the symlinks cc and cc.1.gz in +/etc/alternatives with symlinks pointing to /usr/bin/tcc and +/usr/man/man1/tcc.1.gz respectively. If you do this, be sure that you +know how to deal with software that assumes it will be built with gcc. + +Non-i386 support +----------------- + +TenDRA only supports i386 processors under Linux. Sparc and Alpha +processors are supported, but only under DEC Unix and Solaris, so if +someone has the enthusiasm to do a port, much of the work will already +have been done. + + -- Mark Brown , Sun, 22 Nov 1998 16:06:10 +0000 --- tendra-4.1.2.orig/debian/changelog +++ tendra-4.1.2/debian/changelog @@ -0,0 +1,150 @@ +tendra (4.1.2-19) unstable; urgency=low + + * Use dh_installman, fixing FTBFS caused file(1) having hopelessly + poor FORTRAN detection (closes: #608179) + * Detect amd64 and 80x86 to support building with an amd64 kernel. + + -- Mark Brown Sun, 09 Jan 2011 19:53:55 +0000 + +tendra (4.1.2-18) unstable; urgency=low + + * The kernel team have decided to stop shipping page.h (closes: #479978). + * Standards version 3.7.3 (no changes). + + -- Mark Brown Wed, 07 May 2008 23:01:34 +0100 + +tendra (4.1.2-17) unstable; urgency=low + + * Work around an illegally defined union in the glibc 2.5 POSIX threads type + header by overriding the header with one that exposes no internals. + * Policy 3.7.2 (no changes). + + -- Mark Brown Tue, 17 Apr 2007 20:57:55 +0100 + +tendra (4.1.2-16) unstable; urgency=medium + + * Don't ship trans and drop confict with transcriber (closes: #403215). + + -- Mark Brown Sat, 30 Dec 2006 22:37:52 +0000 + +tendra (4.1.2-15) unstable; urgency=low + + * Update to debhelper 4. + * Policy 3.6.2 (no changes). + * Remove obsolete watch file. + * Add libc6-dev as an alternative to libc-dev. + * Remove trailing . from synopsis. + + -- Mark Brown Mon, 2 Jan 2006 13:47:28 +0000 + +tendra (4.1.2-14) unstable; urgency=low + + * Fix removal of alternatives (closes: #328492). + * Fix build failure due to non-ANSI __builtin_warning() macro in + linux/compiler.h. + * Output the numbers we make up for labels in trans as unsigned rather than + signed values so that as doesn't get upset with the '-'s that would + otherwise occur in the resulting labels. + + -- Mark Brown Sat, 17 Sep 2005 18:57:54 +0100 + +tendra (4.1.2-13) unstable; urgency=high + + * Rename compiler binary to tendracc (closes: #150934). + + -- Mark Brown Tue, 12 Nov 2002 09:26:41 +0000 + +tendra (4.1.2-12) unstable; urgency=low + + * Don't copy over runtime files. + + -- Mark Brown Sun, 10 Nov 2002 13:53:09 +0000 + +tendra (4.1.2-11) unstable; urgency=low + + * Fix update-alternatives to refer to /usr/share/man. + + -- Mark Brown Sat, 2 Nov 2002 13:42:49 +0000 + +tendra (4.1.2-10) unstable; urgency=low + + * Define __GLIBC_HAVE_LONG_LONG in system description since glibc doesn't + detect TenDRA in features.h (closes: #166269). + * Bump Standards-Version to 3.5.7. + + -- Mark Brown Sat, 26 Oct 2002 09:57:11 +0100 + +tendra (4.1.2-9) unstable; urgency=low + + * Fix missing underscore in declaration of _POSIX_PATH_MAX in + src/lib/machines/linux/80x86/include/bits/posix1_lim.h. Thanks to + Carsten Kuckuk for spotting this. + * Remove src/lib/env/linux/elf/80x86.old/ - again thanks to Carsten + Kuckuk . + + -- Mark Brown Thu, 23 Aug 2001 00:14:22 +0100 + +tendra (4.1.2-8) unstable; urgency=low + + * Conflict with transcriber due to trans binary (closes: #107057). + + -- Mark Brown Mon, 30 Jul 2001 08:52:02 +0100 + +tendra (4.1.2-7) unstable; urgency=low + + * The "Woohoo! It compiles!" release. + * Fixes many compile time errors. This mostly consists of alterations + to the per-platform API exceptions. Some of these changes could do + with more scrutiny (closes: #103816). + * Move to /usr/share/doc (closes: #91676). + * Move to /usr/share/man (closes: #91046). + * Updated standards version to 3.3.6. + * Added build dependancies. + * Added debhelper stanzas in maintainer scripts. + * Don't remove alternative during upgrade. + * Note that upstream website is now defunct in copyright file. + + -- Mark Brown Thu, 26 Jul 2001 01:24:41 +0100 + +tendra (4.1.2-6) unstable; urgency=low + + * Downgrade priority to extra. + * Updated standards version (no changes). + + -- Mark Brown Wed, 17 Mar 1999 20:09:17 +0000 + +tendra (4.1.2-5) unstable; urgency=low + + * Call fixup.sh using /bin/sh - thanks to liw & dbuild. + * Fixed web site address - thanks to Hilton Fernandes. + + -- Mark Brown Sun, 31 Jan 1999 22:02:24 +0000 + +tendra (4.1.2-4) unstable; urgency=low + + * Provide binaries for utilities in /usr/bin. Closes #30933. + + -- Mark Brown Mon, 21 Dec 1998 13:08:52 +0000 + +tendra (4.1.2-3) unstable; urgency=low + + * Rebuild to remove versioned lib6 dependancy. + + -- Mark Brown Thu, 17 Dec 1998 11:19:48 +0000 + +tendra (4.1.2-2) unstable; urgency=low + + * Added recommends for libc-dev + * Added dependancy on binutils. This means binutils is needed even + for the static analysis functions, but probably won't hurt anyone. + * Rewrote blurb in control file. + + -- Mark Brown Wed, 25 Nov 1998 00:48:06 +0000 + +tendra (4.1.2-1) unstable; urgency=low + + * Initial Release. + + -- Mark Brown Sun, 22 Nov 1998 16:06:10 +0000 + + --- tendra-4.1.2.orig/debian/control +++ tendra-4.1.2/debian/control @@ -0,0 +1,19 @@ +Source: tendra +Section: devel +Priority: extra +Maintainer: Mark Brown +Standards-Version: 3.7.3 +Build-Depends: debhelper + +Package: tendra +Architecture: i386 +Depends: ${shlibs:Depends}, binutils +Recommends: libc6-dev | libc-dev +Suggests: tendra-doc +Description: A C and C++ compiler and checker using TDF/ANDF + TenDRA is a free C/C++ compiler built around the TDF/ANDF format + which provides strict conformance checks for a range of APIs. + Among those currently supported are ANSI and ISO C, POSIX 1 & 2, + System V, Unix95, XPG3 and XPG4. + . + C++ support is extremely limited in this release. --- tendra-4.1.2.orig/debian/tendra.prerm +++ tendra-4.1.2/debian/tendra.prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ $1 != "upgrade" ]; then + update-alternatives --remove cc /usr/bin/tendracc +fi + +#DEBHELPER# --- tendra-4.1.2.orig/debian/compat +++ tendra-4.1.2/debian/compat @@ -0,0 +1 @@ +4 --- tendra-4.1.2.orig/debian/tendra.manpages +++ tendra-4.1.2/debian/tendra.manpages @@ -0,0 +1,14 @@ +src/producers/c/tdfc2.1 +src/producers/cpp/tcpplus.1 +src/tools/disp/disp.1 +src/tools/pl/pl.1 +src/tools/tcc/tcc.1 +src/tools/tcc/tccenv.5 +src/tools/tcc/tchk.1 +src/tools/tld/tld.1 +src/tools/tnc/tnc.1 +src/tools/tspec/tspec.1 +src/utilities/calculus/calculus.1 +src/utilities/lexi/lexi.1 +src/utilities/sid/sid.1 +src/installers/80x86/linux/trans.1 --- tendra-4.1.2.orig/debian/fixup.sh +++ tendra-4.1.2/debian/fixup.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# Delete all references to the working directory from the installed +# tree. This is an utterly gross way to go about things, but it is +# *much* quicker and simpler than trying to fix it properly. Note +# that the script wants to be run from the root of the build tree - +# not from within the debian subdir. +# +# Mark Brown + +# History: +# +# 19981122 - initial version +# 20050102 - debian/tmp -> debian/tendra for debhelper 4. + +# We're only interested in the build tree +cd debian/tendra || exit 1 + +# Escape the name of the current directory for sed +PWD=$(pwd | sed 's/\//\\\//g') + +# Which files need modifying? Could manage without this, but I feel +# happier touching as few files as possible. +FILES=$(grep -l $(pwd) $(find .) 2>/dev/null) + +echo Fixing paths... + +# Do the fixup. I'm probably missing some horrible problem here. +for x in ${FILES} ; do + sed 's/'${PWD}'//g' ${x} > ${x}.new + cp ${x}.new ${x} + rm ${x}.new +done + +# Symlink manpage-bearing files +(cd usr/bin +for x in calculus lexi disp pl sid tcpplus tdfc2 tld tnc trans ; do + ln -s ../lib/TenDRA/machines/linux/$(uname -r)/*/bin/${x} . +done) --- tendra-4.1.2.orig/debian/tendra.docs +++ tendra-4.1.2/debian/tendra.docs @@ -0,0 +1 @@ +README --- tendra-4.1.2.orig/debian/tendra.postinst +++ tendra-4.1.2/debian/tendra.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +update-alternatives \ + --install /usr/bin/cc cc /usr/bin/tendracc 10 \ + --slave /usr/share/man/man1/cc.1.gz cc.1.gz /usr/share/man/man1/tendracc.1.gz + +#DEBHELPER# --- tendra-4.1.2.orig/debian/tendra.dirs +++ tendra-4.1.2/debian/tendra.dirs @@ -0,0 +1,4 @@ +usr/bin +usr/lib/TenDRA +usr/share/man/man1 +usr/share/man/man5 --- tendra-4.1.2.orig/src/utilities/tuname/tuname.c +++ tendra-4.1.2/src/utilities/tuname/tuname.c @@ -131,6 +131,7 @@ PROTO_T ( CONST char *m ) { if ( m [0] == 'i' && strstr ( m, "86" ) ) return ( "80x86" ) ; + if ( m [0] == 'x' && strstr ( m, "64" ) ) return ( "80x86" ) ; return ( "unknown" ) ; } --- tendra-4.1.2.orig/src/installers/80x86/common/out.c +++ tendra-4.1.2/src/installers/80x86/common/out.c @@ -154,6 +154,18 @@ } +void outnu + PROTO_N ( (n) ) + PROTO_T ( unsigned long n ) +{ + int st = fprintf (fpout, "%lu", n); + if (st == EOF) { + failer (BAD_OUTPUT); + exit(EXIT_FAILURE); + }; + +} + void outhex PROTO_N ( (n) ) PROTO_T ( int n ) --- tendra-4.1.2.orig/src/installers/80x86/common/instr.c +++ tendra-4.1.2/src/installers/80x86/common/instr.c @@ -628,7 +628,7 @@ outs("$"); outs(local_prefix); outs("V"); - outn((long)l.i); + outnu((unsigned long)l.i); return; } @@ -642,7 +642,7 @@ outs(local_prefix); outs("V"); - outn((long)l.i); + outnu((unsigned long)l.i); outs(":"); outnl(); return; @@ -657,7 +657,7 @@ outs(".set "); outs(local_prefix); outs("O"); - outn((long)l.i); /* produce an identifying number */ + outnu((unsigned long)l.i); /* produce an identifying number */ outs(","); if (s<4) { @@ -685,7 +685,7 @@ }; outs(local_prefix); outs("O"); - outn((long)l.i); /* produce an identifying number */ + outnu((unsigned long)l.i); /* produce an identifying number */ return; } --- tendra-4.1.2.orig/src/installers/80x86/common/out.h +++ tendra-4.1.2/src/installers/80x86/common/out.h @@ -62,6 +62,7 @@ extern void outs PROTO_S ((char *str)); extern void outc PROTO_S ((char c)); extern void outn PROTO_S ((long n)); +extern void outnu PROTO_S ((unsigned long n)); extern void outhex PROTO_S ((int n)); extern void outnl PROTO_S ((void)); extern int outinit PROTO_S ((char *intermed)); --- tendra-4.1.2.orig/src/lib/env/linux/elf/80x86/tcc_prof +++ tendra-4.1.2/src/lib/env/linux/elf/80x86/tcc_prof @@ -1,6 +1,6 @@ /* TCC ENVIRONMENT : PROFILING FOR Linux I386 */ -+CRT0 "-dynamic-linker /lib/ld-linux.so.1 /usr/lib/gcrt1.o" ++CRT0 "-dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcrt1.o" #include_next #endif --- tendra-4.1.2.orig/src/lib/machines/linux/80x86/include/bits/pthreadtypes.h +++ tendra-4.1.2/src/lib/machines/linux/80x86/include/bits/pthreadtypes.h @@ -0,0 +1,86 @@ +#ifndef __HACKED_BITS_PTHREADTYPES_H +#define __HACKED_BITS_PTHREADTYPES_H + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +typedef unsigned long int pthread_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +} pthread_attr_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + long int __align; +} pthread_mutexattr_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_COND_T]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + long int __align; +} pthread_condattr_t; + + +typedef unsigned int pthread_key_t; + +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +typedef volatile int pthread_spinlock_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + +#endif --- tendra-4.1.2.orig/src/lib/machines/linux/80x86/include/bits/posix1_lim.h +++ tendra-4.1.2/src/lib/machines/linux/80x86/include/bits/posix1_lim.h @@ -0,0 +1,10 @@ +#ifndef __HACKED_POSIX_LIM +#define __HACKED_POSIX_LIM + +#include_next + +/* glibc has increased this to 256 to reflect Austin group changes. */ +#undef _POSIX_PATH_MAX +#define _POSIX_PATH_MAX 255 + +#endif --- tendra-4.1.2.orig/src/lib/machines/linux/80x86/include/bits/types.h +++ tendra-4.1.2/src/lib/machines/linux/80x86/include/bits/types.h @@ -0,0 +1,8 @@ +#ifndef __HACKED_GNU_TYPES +#define __HACKED_GNU_TYPES + +#define __GNUC__ +#include_next +#undef __GNUC__ + +#endif --- tendra-4.1.2.orig/src/lib/machines/linux/80x86/include/linux/compiler.h +++ tendra-4.1.2/src/lib/machines/linux/80x86/include/linux/compiler.h @@ -0,0 +1,8 @@ +#ifndef __HACKED_LINUX_COMPILER_H +#define __HACKED_LINUX_COMPILER_H + +#define __STRICT_ANSI__ + +#include_next + +#endif --- tendra-4.1.2.orig/src/lib/apis/xpg3/sys/shm.h +++ tendra-4.1.2/src/lib/apis/xpg3/sys/shm.h @@ -56,7 +56,7 @@ +TYPE struct shmid_ds ; +FIELD struct shmid_ds { struct ipc_perm shm_perm ; - int shm_segsz ; + size_t shm_segsz ; ~shm_pid_t shm_lpid ; ~shm_pid_t shm_cpid ; ~shm_nattch_t shm_nattch ;