diff options
-rw-r--r-- | debian/changelog | 172 | ||||
-rw-r--r-- | debian/control | 77 | ||||
-rw-r--r-- | debian/copyright | 48 | ||||
-rw-r--r-- | debian/icon.1 | 246 | ||||
-rw-r--r-- | debian/icont-wrapper | 3 | ||||
-rw-r--r-- | debian/patches/config-illumos.patch | 194 | ||||
-rw-r--r-- | debian/patches/debian-9.4.3-2.patch | 205 | ||||
-rw-r--r-- | debian/patches/dyson-mklib.sh-gcc.patch | 14 | ||||
-rw-r--r-- | debian/patches/fix-warnings.patch | 740 | ||||
-rw-r--r-- | debian/patches/series | 6 | ||||
-rw-r--r-- | debian/patches/undefine-SHARED-if-defined.patch | 16 | ||||
-rw-r--r-- | debian/patches/use-__fpending.patch | 36 | ||||
-rwxr-xr-x | debian/rules | 250 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/source/local-options | 1 |
15 files changed, 2009 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..55e7b8e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,172 @@ +icon (9.4.3-2) unstable; urgency=medium + + * Apply patch from Jurij Smakov to correctly change -O2 to -O0 when building. + Should build and pass tests on all archs now, including Sparc32 + (Closes: #475952, #420979) + + -- Christian Hudon <chrish@debian.org> Sun, 17 Aug 2008 19:45:27 -0400 + +icon (9.4.3-1) unstable; urgency=low + + * New upstream version. (Closes: #339781) + * Merge NMU changes, except CLK_TCK -> CLOCKS_PER_SEC one, because + upstream now has a fallback using a sysconfig() call. (Closes: + #249208, #292864, #293472, #277660, #360180) Will wait to see if this + builds on all archs before closing bug number 420979. + * Maintainer back in action. (Closes: #454591) + + -- Christian Hudon <chrish@debian.org> Sun, 9 Dec 2007 12:37:42 -0500 + +icon (9.4.2-2.8) unstable; urgency=medium + + * Non-maintainer upload during BSP. + * Substitute CLK_TCK with CLOCKS_PER_SEC in src/common/time.c (Closes: + #420979). + + -- Mario Iseli <admin@marioiseli.com> Thu, 17 May 2007 18:10:20 +0200 + +icon (9.4.2-2.7) unstable; urgency=low + + * NMU + * Fixes FTBFS on arm* and ppc64. Closes: #344503, #360180 + + -- Riku Voipio <riku.voipio@iki.fi> Thu, 12 Oct 2006 14:12:30 +0300 + +icon (9.4.2-2.6) unstable; urgency=low + + * NMU + * Fix FTBFS on i386 by building with -O0 there. Same as bug #249208 + but for i386 now. Closes: #346188 + + -- Joey Hess <joeyh@debian.org> Sun, 5 Mar 2006 21:08:52 -0500 + +icon (9.4.2-2.5) unstable; urgency=low + + * Non-maintainer upload + * Fix debian/rules so that debian/rules succeeds (Closes: #342322) + * Let iconc not depend on xlibs-dev anymore (Closes: #346188, #347153) + + -- Marc 'HE' Brockschmidt <he@debian.org> Sat, 21 Jan 2006 16:06:34 +0100 + +icon (9.4.2-2.4) unstable; urgency=medium + + * NMU + * Apply patch from Jurij Smakov to work around possible + gcc bug. closes: #322972. + * Bump Standards-Version to 3.6.2. + * Remove prerm scripts. + + -- Clint Adams <schizo@debian.org> Mon, 19 Dec 2005 22:48:01 -0500 + +icon (9.4.2-2.3) unstable; urgency=low + + * Non-maintainer upload during BSP + * Update debian/rules arch/os selections to current dpkg + conventions which fixes FTBFS on linux (Closes: #316664) + + -- Frank Lichtenheld <djpig@debian.org> Sun, 7 Aug 2005 02:46:33 +0200 + +icon (9.4.2-2.2) unstable; urgency=low + + * Non-maintainer upload during BSP + * Update config/gnu/Makeconf according to config/linux/Makeconf to + prevent an infinite loop/system hang. (closes: #292864) + * Force system to linux for k*BSD when configuring. (closes: #293472) + * Change Build-Depends from `xlibs-dev' to `libx11-dev, libxt-dev'. + (closes: #277660) + * Compile with -O0 on amd64. (closes: #249208) + + -- Michael Banck <mbanck@debian.org> Sun, 6 Feb 2005 12:00:47 +0100 + +icon (9.4.2-2.1) unstable; urgency=low + + * Non-maintainer upload during BSP + * Compile with -O0 on some architectures + (alpha,hppa,ia64,mips,mipsel,powerpc,s390,sparc) + I don't know if this fixes all of them but at least + alpha, ia64, powerpc I have tested to build (see #229394) + * Add -Wall -g to CFLAGS while we're at it. Obviously nobody + has ever done this from the output this produces :/ + * Remove debian/postinst as it only sets the usr/doc link + + -- Frank Lichtenheld <djpig@debian.org> Fri, 19 Mar 2004 13:44:06 +0100 + +icon (9.4.2-2) unstable; urgency=low + + * Apply patch from Frank Lichtenheld to make icon build on other + architectures. (Closes: #217655) + + -- Christian Hudon <chrish@pianocktail.org> Mon, 29 Dec 2003 21:20:36 -0500 + +icon (9.4.2-1) unstable; urgency=low + + * New upstream release + * Apply patch to change dependency on xlib6-dev to xlibs-dev. (Closes: #170198) + * Install .icn files in icon-ipl and patch iconc so its LPATH defaults + to /usr/lib/icon-ipl. This makes the IPL usable from iconc. (Closes: #171418) + * Run tests before building icont package. + + -- Christian Hudon <chrish@debian.org> Sat, 25 Oct 2003 22:32:28 -0400 + +icon (9.4.0-2) unstable; urgency=medium + + * Remove bashims from debian/rules. Allows building on powerpc. + (Closes: #116847, 108570) + * Applied various patches to allow building on Hurd, alpha. + (Closes: #108163, #109487) + * Make sure all .icn and .u[12] files are built and installed + in icon-ipl, so graphics facility is usable. (Closes: #115336) + + -- Christian Hudon <chrish@debian.org> Thu, 1 Nov 2001 17:51:59 -0500 + +icon (9.4.0-1) unstable; urgency=low + + * New upstream release. (Closes: #106640) + * Replaced architecture-specific linux configurations by generic one. + * Removed icont wrapper, patched the source to obtain the same effect. + * The Icon programming library is now again part of the source package. + + -- Christian Hudon <chrish@debian.org> Tue, 7 Aug 2001 13:20:10 -0400 + +icon (9.3.2-2) frozen unstable; urgency=low + + * Applied patch from Jim Studt to get basic ARM support. (Closes: #57768) + + -- Christian Hudon <chrish@debian.org> Tue, 7 Mar 2000 22:57:59 -0500 + +icon (9.3.2-1) frozen unstable; urgency=low + + * Upgraded to latest upstream release. + * Updated to Standards-Version 3.1.1 + * Lintian-clean + * Split out icont-ipl into its own package, since the icon makefiles + don't have support for building it anymore. + * The alpha and sun architectures are now supported. + * Corrected typo in description. (Closes: #18914) + * Added wrapper around icont that sets defaults for IPATH and LPATH. + (Closes: #25944) + + -- Christian Hudon <chrish@debian.org> Fri, 14 Jan 2000 22:19:14 -0500 + +icon (9.3-1) unstable; urgency=low + + * Upgraded to newest upstream release (mainly bugfixes) + * Recompiled with libc6. + + -- Christian Hudon <chrish@debian.org> Wed, 25 Feb 1998 20:25:57 -0500 + +icon (9.1-1) unstable; urgency=low + + * Initial release. + * Removed leading underscores in symbols of config/unix/i486_linux/rswitch.s + They prevented iconx from linking. + * Added -L/usr/X11R6/lib before the -lX11 directive to the XLIB define + in config/unix/i486_linux/xiconx.mak. Otherwise gcc couldn't find the X11 + library when linking iconx. + * Modified docs/icon.1 so that it does not use the ".ds" directive + * Added a missing closing double-quote to the top Makefile in the 'help' + rule. + + -- Christian Hudon <chrish@debian.org> Sat, 28 Dec 1996 19:56:59 -0500 + + diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4b093f1 --- /dev/null +++ b/debian/control @@ -0,0 +1,77 @@ +Source: icon +Maintainer: Christian Hudon <chrish@debian.org> +Standards-Version: 3.6.2 +Section: devel +Priority: optional +Build-Depends: libx11-dev, libxt-dev + +Package: icont +Architecture: any +Depends: ${shlibs-icont:Depends} +Recommends: iconx +Suggests: icon-ipl +Description: Interpreter for Icon, a high-level programming language + Ideal for both complex nonnumerical applications and for situations where + users need quick solutions with a minimum of programming effort, Icon is a + high-level, general purpose programming language with a syntax similar to + Pascal and C. Its applications include: rapid prototyping, analyzing + natural languages, generating computer programs, and artificial + intelligence. (From the back cover of the book "The Icon Programming + Language," by Griswold and Griswold.) + . + This package contains the Icon translator, which converts Icon source code + into `ucode` that can then be executed with the help of the iconx program. + +Package: iconx +Architecture: any +Depends: ${shlibs-iconx:Depends} +Description: Executor for Icon, a high-level programming language + Ideal for both complex nonnumerical applications and for situations where + users need quick solutions with a minimum of programming effort, Icon is a + high-level, general purpose programming language with a syntax similar to + Pascal and C. Its applications include: rapid prototyping, analyzing + natural languages, generating computer programs, and artificial + intelligence. (From the back cover of the book "The Icon Programming + Language," by Griswold and Griswold.) + . + This package contains the Icon executor, iconx, which is needed to execute + interpreted Icon programs. If you are starting from Icon source code (as + opposed to precompiled `ucode' files), you will also need the icont + package, which converts your Icon source into a program that iconx can + execute. + +Package: iconc +Architecture: any +Depends: ${shlibs-iconc:Depends}, gcc, libx11-dev, libxt-dev +Suggests: icont, icon-ipl +Description: Compiler for Icon, a high-level programming language + Ideal for both complex nonnumerical applications and for situations where + users need quick solutions with a minimum of programming effort, Icon is a + high-level, general purpose programming language with a syntax similar to + Pascal and C. Its applications include: rapid prototyping, analyzing + natural languages, generating computer programs, and artificial + intelligence. (From the back cover of the book "The Icon Programming + Language," by Griswold and Griswold.) + . + This package contains the Icon compiler. It generates programs that + generally run faster than those of the icont/iconx Icon interpreter. On the + other hand, the Icon compiler takes much longer to compile programs and is + more memory-hungry than the iconx/icont pair. As such, the compiler is + probably only useful to speed up the execution of large Icon programs once + they are fully developed and debugged. + +Package: icon-ipl +Architecture: all +Recommends: icont +Description: Libraries for Icon, a high-level programming language + Ideal for both complex nonnumerical applications and for situations where + users need quick solutions with a minimum of programming effort, Icon is a + high-level, general purpose programming language with a syntax similar to + Pascal and C. Its applications include: rapid prototyping, analyzing + natural languages, generating computer programs, and artificial + intelligence. (From the back cover of the book "The Icon Programming + Language," by Griswold and Griswold.) + . + This package contains the Icon program library, a library of Icon + procedures and programs contributed by Icon users. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..563678e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,48 @@ +This is the Debian GNU/Linux prepackaged version of the Icon programming +language environment. + +This package was built by Christian Hudon <chrish@debian.org> +from sources obtained from: + ftp://ftp.cs.arizona.edu/icon/packages/unix/unix.tar.gz + +Please see the file /usr/share/doc/icon-dir/changelog.Debian.gz for a list +of changes made to the original Icon package for integration into Debian. + +The Icon programming language environment is in the public domain. The +original notice follows: + +---------------------------- + +This material is in the public domain. You may use and copy this material +freely. This privilege extends to modifications, although any modified +version of this system given to a third party should clearly identify your +modifications as well as the original source. + +The responsibility for the use of this material resides entirely with you. +We make no warranty of any kind concerning this material, nor do we make +any claim as to the suitability of Icon for any application. + +Installation instructions and other documentation are available from the +Icon web site listed below. + +Please note: This distribution includes both a compiler and an interpreter, +but only the interpreter is supported. It gets into execution quickly and +is fast enough for almost all applications. Although the compiler produces +programs that run faster, it requires a large amount of memory and disk +space and is slow to get into execution, and we no longer maintain it. + +For more information or assistance, contact: + + Icon Project + Department of Computer Science + The University of Arizona + P.O. Box 210077 + Tucson, AZ 85721-0077 + U.S.A. + + voice: (520) 621-6613 + fax: (520) 621-4246 + + icon-project@cs.arizona.edu + + http://www.cs.arizona.edu/icon/ diff --git a/debian/icon.1 b/debian/icon.1 new file mode 100644 index 0000000..e807436 --- /dev/null +++ b/debian/icon.1 @@ -0,0 +1,246 @@ +.co \" IPD244b: Manual page for Version 9 icon(1) +.ds I \fHicont\fR and \fHiconc\fR +.TH ICON 1 "1 November 1995 IPD244b" +.SH NAME +icon \- interpret or compile Icon programs +.SH SYNOPSIS +\fHicont\fR [ option ... ] file ... [ \fH\-x\fR arg ... ] +.br +\fHiconc\fR [ option ... ] file ... [ \fH\-x\fR arg ... ] +.SH DESCRIPTION +\fHicont\fR and \fHiconc\fR each convert an Icon source program into executable form. +\fHicont\fR translates quickly and provides interpretive execution. +\fHiconc\fR takes longer to compile but produces programs that +execute faster. +\fHicont\fR and \fHiconc\fR for the most part can be used interchangeably. +.PP +This manual page describes both \fHicont\fR and \fHiconc\fR. Where there +there are differences in usage between \fHicont\fR and \fHiconc\fR, these are noted. +.PP +\fBFile Names:\fR Files whose names end in \fH.icn\fR are assumed +to be Icon source files. The \fH.icn\fR suffix may be omitted; +if it is not present, it is supplied. The character \fH\-\fR can +be used to indicate an Icon source file given in standard input. +Several source files can be given on the same command line; if so, they +are combined to produce a single program. +.PP +The name of the executable file is the base name of the +first input file, +formed by deleting the suffix, if present. \fHstdin\fR is used for +source programs given in standard input. +.PP +\fBProcessing:\fR As noted in the synopsis above, \fHicont\fR and \fHiconc\fR accept options followed +by file names, optionally followed by \fH\-x\fR and arguments. If \fH\-x\fR +is given, the program is executed automatically and any following +arguments are passed to it. +.PP +\fHicont\fR: The processing performed by \fHicont\fR consists of two phases: +\fItranslation\fR and \fIlinking\fR. During translation, +each Icon source file is translated into an intermediate language called +\fIucode\fR. Two ucode files are produced for each +source file, with base names from the +source file and suffixes \fH.u1\fR and \fH.u2\fR. +During linking, the one or more pairs of ucode files are combined to +produce a single +\fIicode\fR file. +The ucode files are deleted after the icode file is created. +.PP +Processing by \fHicont\fR can be terminated after translation by the +\fH\-c\fR option. In this case, the ucode files are not deleted. +The names of \fH.u1\fR files from previous translations can be given on the +\fHicont\fR command line. +These files and the corresponding \fH.u2\fR +files are included in the linking phase after the translation of any source +files. +The suffix \fH.u\fR can be used in place of \fH.u1\fR; in this case +the \fH1\fR is supplied automatically. +Ucode files that are explicitly named are not deleted. +.PP +\fHiconc\fR: The processing performed by \fHiconc\fR consists of two +phases: \fIcode generation\fR and \fIcompilation and linking\fR. The +code generation phase produces C code, consisting of a \fH.c\fR and a \fH.h\fR +file, with the base name of the first source file. These files are +then compiled and linked to produce an executable binary file. +The C files normally are deleted after compilation and linking. +.PP +Processing by \fHiconc\fR can be terminated after code generation by +the \fH\-c\fR option. In this case, the C files are not deleted. +.SH OPTIONS +The following options are recognized by \fHicont\fR and \fHiconc\fR: +.TP 4 +\fH\-c\fR +Stop after producing intermediate files and do not delete them. +.TP 4 +\fH\-e\fR \fIfile\fR +Redirect standard error output to \fIfile\fR. +.TP +\fH\-f s\fR +Enable full string invocation. +.TP +\fH\-o \fIname\fR +Name the output file \fIname\fR. +.TP +\fH\-s\fR +Suppress informative messages. +Normally, both informative messages and error messages are sent +to standard error output. +.TP +\fH\-t\fR +Arrange for \fH&trace\fR to have an initial value of \-1 +when the program is executed and for \fHiconc\fR enable debugging features. +.TP +\fH\-u\fR +Issue warning messages for undeclared identifiers in the program. +.TP +\fH\-v \fIi\fR +Set verbosity level of informative messages to \fIi\fH +.TP +\fH\-E\fR +Direct the results of preprocessing to standard output and inhibit +further processing. +.PP +The following additional options are recognized by \fHiconc\fR: +.TP 4 +\fH\-f \fIstring\fR +Enable features as indicated by the letters in \fIstring\fR: +.TP 8 + \fHa\fR +all, equivalent to \fHdelns\fR +.TP 8 + \fHd\fR +enable debugging features: \fHdisplay()\fR, +\fHname()\fR, \fHvariable()\fR, error +trace back, and the effect of \fH\-f n\fR (see below) +.TP 8 + \fHe\fR +enable error conversion +.TP 8 + \fHl\fR +enable large-integer arithmetic +.TP 8 + \fHn\fR +produce code that keeps track of line numbers and file names in the source code +.TP 8 + \fHs\fR +enable full string invocation +.TP 4 +\fH\-n \fIstring\fR +Disable specific optimizations. These are indicated by the +letters in \fIstring\fR: +.TP 8 + \fHa\fR +all, equivalent to \fHcest\fR +.TP 8 + \fHc\fR +control flow optimizations other than switch statement optimizations +.TP 8 + \fHe\fR +expand operations in-line when reasonable +(keywords are always put in-line) +.TP 8 + \fHs\fR +optimize switch statements associated with operation invocations +.TP 8 + \fHt\fR +type inference +.TP 4 +\fH\-p \fIarg\fR +Pass \fIarg\fR on to the C compiler used by \fHiconc\fR +.TP 4 +\fH\-r \fIpath\fR +Use the run-time system at \fIpath\fR, which must end with a slash. +.TP 4 +.TP 4 +\fH\-C \fIprg\fR +Have \fHiconc\fR use the C compiler given by \fIprg\fH +.SH "ENVIRONMENT VARIABLES" +When an Icon program is executed, several environment variables +are examined to determine certain execution parameters. +Values in parentheses are the default values. +.TP 4 +\fHBLKSIZE\fR (500000) +The initial size of the allocated block region, in bytes. +.TP +\fHCOEXPSIZE\fR (2000) +The size, in words, of each co-expression block. +.TP +\fHDBLIST\fR +The location of data bases +for \fHiconc\fR to search before the standard one. +The value of \fHDBLIST\fR should be a blank-separated +string of the form \fIp1\0p2 ...\0 pn\fR where the \fIpi\fR name directories. +.TP +\fHICONCORE\fR +If set, a core dump is produced for error termination. +.TP 4 +\fHICONX\fR +The location of \fHiconx\fR, the executor for icode files, is +built into an icode file when it +is produced. This location can be overridden by setting the +environment variable \fHICONX\fR. +If \fHICONX\fR is set, its value is used in place of the location +built into the icode file. +.TP 4 +\fHIPATH\fR +The location of ucode files +specified in link declarations for \fHicont\fR. +\fHIPATH\fR is a blank-separated list of directories. +The current directory is always searched first, regardless of the value of +\fHIPATH\fR. +.TP 4 +\fHLPATH\fR +The location of source files +specified in preprocessor \fH$include\fR directives and in link +declarations for \fHiconc\fR. +\fHLPATH\fR is otherwise similar to \fHIPATH\fR. +.TP +\fHMSTKSIZE\fR (10000) +The size, in words, of the main interpreter stack for \fHicont\fR. +.TP +\fHNOERRBUF\fR +By default, \fH&errout\fR is buffered. If this variable is set, \fH&errout\fR +is not buffered. +.TP +\fHQLSIZE\fR (5000) +The size, in bytes, of the region used for pointers +to strings during garbage collection. +.TP +\fHSTRSIZE\fR (500000) +The initial size of the string space, in bytes. +.TP +\fHTRACE\fR +The initial value of \fH&trace\fR. +If this variable has a value, it overrides the translation-time +\fH\-t\fR +option. +.SH FILES +.ta \w'\fHicont\fR 'u +\fHicont\fR Icon translator +.br +\fHiconc\fR Icon compiler +.br +\fHiconx\fR Icon executor +.br +.SH SEE ALSO +\fIThe Icon Programming Language\fR, +Ralph E. Griswold and Madge T. Griswold, +Prentice-Hall Inc., +Englewood Cliffs, New Jersey, Second Edition, +1990. +.LP +\fIVersion 9.1 of Icon\fR, Ralph E. Griswold, Clinton L. Jeffery, +and Gregg M. Townsend, IPD267, +Department of Computer Science, The University of Arizona, 1995. +.LP +\fIVersion 9 of the Icon Compiler\fR, +Ralph E. Griswold, IPD237, Department of Computer Science, +The University of Arizona, 1995. +.LP +icon_vt(1) +.SH "LIMITATIONS AND BUGS" +.LP +The icode files for the +interpreter do not stand alone; the Icon run-time system (\fHiconx\fR) must be +present. +.LP +Stack overflow is checked using a heuristic that is not always effective. diff --git a/debian/icont-wrapper b/debian/icont-wrapper new file mode 100644 index 0000000..21e494b --- /dev/null +++ b/debian/icont-wrapper @@ -0,0 +1,3 @@ +#!/bin/bash + +LPATH=${LPATH:-/usr/lib/icon-ipl} IPATH=${IPATH:-/usr/lib/icon-ipl} exec icont.real "$@" diff --git a/debian/patches/config-illumos.patch b/debian/patches/config-illumos.patch new file mode 100644 index 0000000..61ee4d2 --- /dev/null +++ b/debian/patches/config-illumos.patch @@ -0,0 +1,194 @@ +Index: icon/config/illumos/Makedefs +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ icon/config/illumos/Makedefs 2013-01-28 05:28:17.202012546 +0000 +@@ -0,0 +1,19 @@ ++# CC C compiler ++# CFLAGS flags for building C files ++# CFDYN additional flags for dynamic functions ++# RLINK flags for linking run-time system ++# RLIBS libraries to link with run-time system ++# TLIBS libraries to link for POSIX threads ++# XLIBS libraries to link for graphics ++# XPMDEFS definitions for building XPM library ++# GDIR directory of graphics helper library ++ ++CC = gcc ++CFDYN = -fPIC ++CFLAGS = -D_XOPEN_SOURCE=500 ++RLINK = ++RLIBS = -lm ++TLIBS = ++XLIBS = -lX11 ++XPMDEFS = -DZPIPE -DSYSV ++GDIR = xpm +Index: icon/config/illumos/define.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ icon/config/illumos/define.h 2013-01-28 05:28:17.203439124 +0000 +@@ -0,0 +1,10 @@ ++/* ++ * Icon configuration file for Sun Solaris using Gnu C compiler ++ */ ++ ++#define UNIX 1 ++#define LoadFunc ++ ++/* use gcc to compile generated code */ ++#define CComp "gcc" ++#define COpts "-I/usr/openwin/include -ldl" +Index: icon/config/illumos/i386.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ icon/config/illumos/i386.c 2013-01-28 05:33:19.286991222 +0000 +@@ -0,0 +1,72 @@ ++/* ++ * Coswitch for Windows using Visual C++. ++ * ++ * Written by Frank J. Lhota, based on an assembly version ++ * authored by Robert Goldberg and modified for OS/2 2.0 by Mark ++ * Emmer. ++ */ ++ ++#include <stdlib.h> ++#include <sys/asm_linkage.h> ++#include <sys/trap.h> ++ ++/* ++ * The Windows co-expression context consists of 5 words. The ++ * following constants define the byte offsets for each of the ++ * registers stored in the context. ++ */ ++ ++#define SP_OFF "0" ++#define BP_OFF "4" ++#define SI_OFF "8" ++#define DI_OFF "12" ++#define BX_OFF "16" ++ ++int coswitch(old, new, first) ++int *old; ++int *new; ++int first; ++{ ++ ++ /* Save current context to *old */ ++ __asm__ __volatile__ ( ++ "movl %%esp," SP_OFF "(%0)\n\t" ++ "movl %%ebp," BP_OFF "(%0)\n\t" ++ "movl %%esi," SI_OFF "(%0)\n\t" ++ "movl %%edi," DI_OFF "(%0)\n\t" ++ "movl %%ebx," BX_OFF "(%0)" ++ : : "a"( old ) ++ ); ++ ++ if ( first ) ++ { ++ /* first != 0 => restore context in *new. */ ++ __asm__ __volatile__ ( ++ "movl " SP_OFF "(%0),%%esp\n\t" ++ "movl " BP_OFF "(%0),%%ebp\n\t" ++ "movl " SI_OFF "(%0),%%esi\n\t" ++ "movl " DI_OFF "(%0),%%edi\n\t" ++ "movl " BX_OFF "(%0),%%ebx" ++ : : "a"( new ) ++ ); ++ } ++ else ++ { ++ /* ++ * first == 0 => Set things up for first activation of this ++ * coexpression. Load stack pointer from first ++ * word of *new and call new_context, which ++ * should never return. ++ */ ++ __asm__ __volatile__ ( ++ "movl " SP_OFF "(%0),%%esp\n\t" ++ "movl %%esp,%%ebp" ++ : : "a"( new ) ++ ); ++ new_context( 0, NULL ); ++ syserr( "interp() returned in coswitch" ); ++ } ++ ++ return 0; ++} ++ +Index: icon/config/illumos/sparc.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ icon/config/illumos/sparc.c 2013-01-28 05:28:17.206221785 +0000 +@@ -0,0 +1,39 @@ ++/* ++ * coswitch for Sun-4 Sparc. ++ * ++ * Compile this with 'gcc -c rswitch.c'. Do not use gcc -O. ++ */ ++ ++#include <sys/asm_linkage.h> ++#include <sys/trap.h> ++ ++int coswitch(old_cs, new_cs, first) ++int *old_cs, *new_cs; ++int first; ++{ ++ asm("ta 0x03"); /* ST_FLUSH_WINDOWS in trap.h */ ++ asm("ld [%fp+0x44], %o0"); /* load old_cs into %o0 */ ++ asm("st %sp,[%o0]"); /* Save user stack pointer */ ++ asm("st %fp,[%o0+0x4]"); /* Save frame pointer */ ++ asm("st %i7,[%o0+0x8]"); /* Save return address */ ++ ++ if (first == 0) { /* this is the first activation */ ++ asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */ ++ asm("ld [%o0], %o1"); /* load %o1 from cstate[0] */ ++ ++ /* Decrement new stack pointer value before loading it into sp. */ ++ /* The top 64 bytes of the stack are reserved for the kernel, to */ ++ /* save the 8 local and 8 in registers into, on context switches, */ ++ /* interrupts, traps, etc. */ ++ ++ asm("save %o1,-96, %sp"); /* load %sp from %o1 */ ++ new_context(0,0); ++ syserr("new_context() returned in coswitch"); ++ ++ } else { ++ asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */ ++ asm("ld [%o0+0x4],%fp"); /* Load frame pointer */ ++ asm("ld [%o0+0x8],%i7"); /* Load return address */ ++ asm("ld [%o0],%sp"); /* Load user stack pointer */ ++ } ++} +Index: icon/config/illumos/status +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ icon/config/illumos/status 2013-01-28 05:28:17.207353708 +0000 +@@ -0,0 +1,29 @@ ++System configuration: ++ ++ Intel architecture running the Dyson system ++ (GNU userland with illumos kernel and libc) ++ Debian derivative. ++ ++Latest Icon version: ++ ++ Version 9.4.3 ++ ++Installer: ++ ++ Igor Pashev <pashev.igor@gmail.com> ++ ++Missing features: ++ ++ None ++ ++Known bugs: ++ ++ None ++ ++Comments: ++ ++ Tested under Dyson ++ ++Date: ++ ++ January 28, 2013 diff --git a/debian/patches/debian-9.4.3-2.patch b/debian/patches/debian-9.4.3-2.patch new file mode 100644 index 0000000..67dae58 --- /dev/null +++ b/debian/patches/debian-9.4.3-2.patch @@ -0,0 +1,205 @@ +diff --git a/Makefile b/Makefile +index 0fc9ce7..0104cac 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,6 +2,9 @@ + # + # See doc/install.htm for instructions. + ++LC_ALL=C ++export LC_ALL ++ + + # configuration parameters + VERSION=v943 +@@ -153,14 +156,14 @@ Benchmark-icont: + + Clean: + touch Makedefs +- rm -rf icon.* ++ rm -rf icon.v* + cd src; $(MAKE) Clean + cd ipl; $(MAKE) Clean + cd tests; $(MAKE) Clean + + Pure: + touch Makedefs +- rm -rf icon.* ++ rm -rf icon.v* + rm -rf bin/[abcdefghijklmnopqrstuvwxyz]* + rm -rf lib/[abcdefghijklmnopqrstuvwxyz]* + cd ipl; $(MAKE) Pure +diff --git a/config/gnu/Makedefs b/config/gnu/Makedefs +index e69de29..01f86b3 100644 +--- a/config/gnu/Makedefs ++++ b/config/gnu/Makedefs +@@ -0,0 +1,19 @@ ++# CC C compiler ++# CFLAGS flags for building C files ++# CFDYN additional flags for dynamic functions ++# RLINK flags for linking run-time system ++# RLIBS libraries to link with run-time system ++# TLIBS libraries to link for POSIX threads ++# XLIBS libraries to link for graphics ++# XPMDEFS definitions for building XPM library ++# GDIR directory of graphics helper library ++ ++CC = gcc ++CFLAGS = -O2 ++CFDYN = -fPIC ++RLINK = -Wl,-E ++RLIBS = -lm -ldl ++TLIBS = -lpthread ++XLIBS = -L/usr/X11R6/lib -lX11 ++XPMDEFS = -DZPIPE ++GDIR = xpm +diff --git a/config/gnu/define.h b/config/gnu/define.h +index e69de29..6ce5df8 100644 +--- a/config/gnu/define.h ++++ b/config/gnu/define.h +@@ -0,0 +1,11 @@ ++/* ++ * Icon configuration file for the GNU system. ++ */ ++ ++#define UNIX 1 ++#define LoadFunc ++/* no SysOpt: GLibC's getopt() is POSIX-compatible only if an envmt var ++ is set. */ ++ ++#define CComp "gcc" ++#define COpts "-O2 -fomit-frame-pointer" +diff --git a/config/gnu/rswitch.c b/config/gnu/rswitch.c +index e69de29..4a9def0 100644 +--- a/config/gnu/rswitch.c ++++ b/config/gnu/rswitch.c +@@ -0,0 +1,27 @@ ++/* ++ * This is the co-expression context switch for the GNU system. ++ */ ++ ++/* ++ * coswitch ++ */ ++ ++coswitch(old_cs, new_cs, first) ++int *old_cs, *new_cs; ++int first; ++ { ++ asm(" movl 8(%ebp),%eax"); ++ asm(" movl %esp,0(%eax)"); ++ asm(" movl %ebp,4(%eax)"); ++ asm(" movl 12(%ebp),%eax"); ++ if (first == 0) { /* this is the first activation */ ++ asm(" movl 0(%eax),%esp"); ++ asm(" movl $0,%ebp"); ++ new_context(0, 0); ++ syserr("interp() returned in coswitch"); ++ } ++ else { ++ asm(" movl 0(%eax),%esp"); ++ asm(" movl 4(%eax),%ebp"); ++ } ++ } +diff --git a/config/gnu/status b/config/gnu/status +index e69de29..9ad2dec 100644 +--- a/config/gnu/status ++++ b/config/gnu/status +@@ -0,0 +1,28 @@ ++System configuration: ++ ++ Intel architecture running the GNU system ++ ++Latest Icon version: ++ ++ Version 9.4.0 ++ ++Installer: ++ ++ Marcus Brinkmann ++ The Debian project ++ ++Missing features: ++ ++ None ++ ++Known bugs: ++ ++ None ++ ++Comments: ++ ++ Tested under Debian GNU/Hurd. ++ ++Date: ++ ++ August 9, 2001 +diff --git a/ipl/Makefile b/ipl/Makefile +index a438946..9112435 100644 +--- a/ipl/Makefile ++++ b/ipl/Makefile +@@ -9,8 +9,8 @@ All: Ilib Ibin + Ilib: cfuncs/libcfunc.so + cfuncs/libcfunc.so: ../bin/icont + cp incl/*.icn gincl/*.icn cfuncs/icall.h ../lib +- cd procs; LPATH= ../../bin/icont -usc *.icn; mv *.u? ../../lib +- cd gprocs; LPATH= ../../bin/icont -usc *.icn; mv *.u? ../../lib ++ cd procs; LPATH=../../lib ../../bin/icont -usc *.icn; mv *.u? ../../lib ++ cd gprocs; LPATH=../../lib ../../bin/icont -usc *.icn; mv *.u? ../../lib + if grep '^ *# *define LoadFunc' ../src/h/define.h >/dev/null; \ + then $(MAKE) Cfunctions; fi + +diff --git a/src/iconc/ctrans.c b/src/iconc/ctrans.c +index 7d33ac5..f04f8af 100644 +--- a/src/iconc/ctrans.c ++++ b/src/iconc/ctrans.c +@@ -37,6 +37,8 @@ int trans() + struct srcfile *sf; + + lpath = getenv("LPATH"); /* remains null if unspecified */ ++ if (!lpath) ++ lpath = "/usr/lib/icon-ipl"; + + for (sf = srclst; sf != NULL; sf = sf->next) + trans1(sf->name); /* translate each file in turn */ +diff --git a/src/icont/tunix.c b/src/icont/tunix.c +index 9478403..bff6988 100644 +--- a/src/icont/tunix.c ++++ b/src/icont/tunix.c +@@ -301,7 +301,7 @@ static char *libpath(char *prog, char *envname) { + else + strcpy(buf, "."); + strcat(buf, ":"); +- strcat(buf, relfile(prog, "/../../lib")); ++ strcat(buf, "/usr/lib/icon-ipl"); + return salloc(buf); + } + +diff --git a/src/runtime/fmisc.r b/src/runtime/fmisc.r +index 6691241..cba0a1a 100644 +--- a/src/runtime/fmisc.r ++++ b/src/runtime/fmisc.r +@@ -195,7 +195,9 @@ function{1} copy(x) + runerr(0); + dst->table.size = src->table.size; + dst->table.mask = src->table.mask; +- dst->table.defvalue = src->table.defvalue; ++ memcpy((char *) &dst->table.defvalue, ++ (char *) &src->table.defvalue, ++ sizeof(dst->table.defvalue)); + for (i = 0; i < HSegs && src->table.hdir[i] != NULL; i++) + memcpy((char *)dst->table.hdir[i], (char *)src->table.hdir[i], + src->table.hdir[i]->blksize); +diff --git a/tests/general/Test-icon b/tests/general/Test-icon +index 07ccb87..7f53036 100755 +--- a/tests/general/Test-icon ++++ b/tests/general/Test-icon +@@ -45,7 +45,7 @@ for F in $*; do + F=`basename $F .icn` + rm -f $F.out + echo "Testing $F" +- if $IC -s $F.icn; then ++ if IPATH=../../lib $IC -s $F.icn; then + if test -x $F.exe; then + EXE=$F.exe + else diff --git a/debian/patches/dyson-mklib.sh-gcc.patch b/debian/patches/dyson-mklib.sh-gcc.patch new file mode 100644 index 0000000..9787d31 --- /dev/null +++ b/debian/patches/dyson-mklib.sh-gcc.patch @@ -0,0 +1,14 @@ +Description: We use GNU toolchain, but not Glibc (yet) +Index: icon/ipl/cfuncs/mklib.sh +=================================================================== +--- icon.orig/ipl/cfuncs/mklib.sh 2005-07-07 17:36:06.000000000 +0000 ++++ icon/ipl/cfuncs/mklib.sh 2013-01-28 06:19:51.637580774 +0000 +@@ -15,7 +15,7 @@ + Darwin*) + cc -bundle -undefined suppress -flat_namespace -o $LIBNAME "$@";; + SunOS*) +- $CC $CFLAGS -G -o $LIBNAME "$@" -lc -lsocket;; ++ gcc -shared -o $LIBNAME -fPIC "$@" -lsocket;; + HP-UX*) + ld -b -o $LIBNAME "$@";; + IRIX*) diff --git a/debian/patches/fix-warnings.patch b/debian/patches/fix-warnings.patch new file mode 100644 index 0000000..5e979fe --- /dev/null +++ b/debian/patches/fix-warnings.patch @@ -0,0 +1,740 @@ +Index: icon/src/common/infer.c +=================================================================== +--- icon.orig/src/common/infer.c 2002-04-11 23:41:08.000000000 +0000 ++++ icon/src/common/infer.c 2013-01-28 06:28:57.698559662 +0000 +@@ -23,8 +23,8 @@ + assert (sizeof(int) >= 4); /* need 32-bit ints or better */ + assert (sizeof(long) <= 8); /* but can't handle over 64 */ + printf("/* generated by infer.c */\n"); +- printf("#define IntBits %d\n", 8 * sizeof(int)); +- printf("#define WordBits %d\n", 8 * sizeof(void *)); ++ printf("#define IntBits %d\n", 8 * (int)sizeof(int)); ++ printf("#define WordBits %d\n", 8 * (int)sizeof(void *)); + if (offsetof(tstruct, d) > sizeof(void *)) + printf("#define Double\n"); + if (atdepth(2) > atdepth(1)) +Index: icon/src/xpm/data.c +=================================================================== +--- icon.orig/src/xpm/data.c 2005-10-05 15:29:21.000000000 +0000 ++++ icon/src/xpm/data.c 2013-01-28 07:15:18.841563094 +0000 +@@ -8,11 +8,6 @@ + * Developed by Arnaud Le Hors * + \*****************************************************************************/ + +-/* Official version number */ +-static char *RCS_Version = "$XpmVersion: 3.2c $"; +- +-/* Internal version number */ +-static char *RCS_Id = "$Id: xpm.shar,v 3.13 1992/12/29 16:05:26 lehors Exp $"; + + #include "xpmP.h" + #ifdef VMS +@@ -23,7 +18,6 @@ + #include <ctype.h> + #endif + +-FUNC(atoui, unsigned int, (char *p, unsigned int l, unsigned int *ui_return)); + LFUNC(ParseComment, int, (xpmData *mdata)); + + unsigned int +@@ -105,12 +99,13 @@ + ungetc(*s, file); + } + } ++ return 0; + } + + /* + * skip to the end of the current string and the beginning of the next one + */ +-xpmNextString(mdata) ++int xpmNextString(mdata) + xpmData *mdata; + { + if (!mdata->type) +@@ -136,6 +131,7 @@ + ungetc(c, file); + } + } ++ return 0; + } + + +@@ -208,7 +204,7 @@ + while (isspace(c = *mdata->cptr) && c != mdata->Eos) + mdata->cptr++; + start = mdata->cptr; +- while (c = *mdata->cptr) ++ while ((c = *mdata->cptr)) + mdata->cptr++; + n = mdata->cptr - start + 1; + p = (char *) malloc(n); +@@ -277,7 +273,7 @@ + /* + * get the current comment line + */ +-xpmGetCmt(mdata, cmt) ++int xpmGetCmt(mdata, cmt) + xpmData *mdata; + char **cmt; + { +@@ -291,6 +287,7 @@ + mdata->CommentLength = 0; + } else + *cmt = NULL; ++ return 0; + } + + /* +@@ -403,7 +400,7 @@ + /* + * close the file related to the xpmData if any + */ +-XpmDataClose(mdata) ++int XpmDataClose(mdata) + xpmData *mdata; + { + switch (mdata->type) { +@@ -419,4 +416,5 @@ + break; + #endif + } ++ return 0; + } +Index: icon/src/xpm/create.c +=================================================================== +--- icon.orig/src/xpm/create.c 2005-10-05 15:29:21.000000000 +0000 ++++ icon/src/xpm/create.c 2013-01-28 06:45:50.887531187 +0000 +@@ -260,7 +260,7 @@ + for (l = 0, cs = colorsymbols; l < numsymbols; l++, cs++) + if ((!cs->name && cs->value && cts[cts_index] && + !strcasecmp(cs->value,cts[cts_index])) || +- cs->name && !strcmp(cs->name, s)) ++ (cs->name && !strcmp(cs->name, s))) + break; + if (l != numsymbols) { + if (cs->name && cs->value) +@@ -344,7 +344,7 @@ + + #endif + +-xpmCreateImage(display, attrib, image_return, shapeimage_return, attributes) ++int xpmCreateImage(display, attrib, image_return, shapeimage_return, attributes) + Display *display; + xpmInternAttrib *attrib; + XImage **image_return; +@@ -414,8 +414,8 @@ + ErrorStatus = CreateColors(display, attributes, attrib->colorTable, + attrib->ncolors, image_pixels, mask_pixels, + &mask_pixel, &pixels, &npixels); +- if (ErrorStatus != XpmSuccess && (ErrorStatus < 0 || attributes && +- (attributes->valuemask & XpmExactColors) && attributes->exactColors)) ++ if ((ErrorStatus != XpmSuccess) && (ErrorStatus < 0 || (attributes && ++ (attributes->valuemask & XpmExactColors) && attributes->exactColors))) + RETURN(ErrorStatus); + + /* +Index: icon/src/xpm/misc.c +=================================================================== +--- icon.orig/src/xpm/misc.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/misc.c 2013-01-28 06:47:53.666632432 +0000 +@@ -14,7 +14,7 @@ + * Free the computed color table + */ + +-xpmFreeColorTable(colorTable, ncolors) ++int xpmFreeColorTable(colorTable, ncolors) + char ***colorTable; + int ncolors; + { +@@ -31,6 +31,7 @@ + } + free(colorTable); + } ++ return 0; + } + + +@@ -39,7 +40,7 @@ + * which ones must be freed later on. + */ + +-xpmInitInternAttrib(attrib) ++int xpmInitInternAttrib(attrib) + xpmInternAttrib *attrib; + { + attrib->ncolors = 0; +@@ -48,6 +49,7 @@ + attrib->xcolors = NULL; + attrib->colorStrings = NULL; + attrib->mask_pixel = UNDEF_PIXEL; ++ return 0; + } + + +@@ -55,7 +57,7 @@ + * Free the xpmInternAttrib pointers which have been allocated + */ + +-xpmFreeInternAttrib(attrib) ++int xpmFreeInternAttrib(attrib) + xpmInternAttrib *attrib; + { + unsigned int a, ncolors; +@@ -74,13 +76,14 @@ + free(*sptr); + free(attrib->colorStrings); + } ++ return 0; + } + + + /* + * Free array of extensions + */ +-XpmFreeExtensions(extensions, nextensions) ++int XpmFreeExtensions(extensions, nextensions) + XpmExtension *extensions; + int nextensions; + { +@@ -101,6 +104,7 @@ + } + free(extensions); + } ++ return 0; + } + + +@@ -108,7 +112,7 @@ + * Return the XpmAttributes structure size + */ + +-XpmAttributesSize() ++int XpmAttributesSize() + { + return sizeof(XpmAttributes); + } +@@ -119,7 +123,7 @@ + * but the structure itself + */ + +-XpmFreeAttributes(attributes) ++int XpmFreeAttributes(attributes) + XpmAttributes *attributes; + { + if (attributes) { +@@ -159,6 +163,7 @@ + } + attributes->valuemask = 0; + } ++ return 0; + } + + +@@ -167,7 +172,7 @@ + * the xpmInternAttrib structure. + */ + +-xpmSetAttributes(attrib, attributes) ++int xpmSetAttributes(attrib, attributes) + xpmInternAttrib *attrib; + XpmAttributes *attributes; + { +@@ -184,6 +189,7 @@ + attributes->height = attrib->height; + attributes->valuemask |= XpmSize; + } ++ return 0; + } + + #ifdef NEED_STRDUP +Index: icon/src/xpm/parse.c +=================================================================== +--- icon.orig/src/xpm/parse.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/parse.c 2013-01-28 07:11:16.472740553 +0000 +@@ -136,7 +136,7 @@ + /* + * parse extensions + */ +- if (attributes && (attributes->valuemask & XpmReturnExtensions)) ++ if (attributes && (attributes->valuemask & XpmReturnExtensions)) { + if (extensions) { + ErrorStatus = ParseExtensions(data, &attributes->extensions, + &attributes->nextensions); +@@ -146,6 +146,7 @@ + attributes->extensions = NULL; + attributes->nextensions = 0; + } ++ } + + /* + * store found informations in the xpmInternAttrib structure +@@ -265,7 +266,7 @@ + */ + curkey = 0; + lastwaskey = 0; +- while (l = xpmNextWord(data, buf)) { ++ while ((l = xpmNextWord(data, buf))) { + if (!lastwaskey) { + for (key = 0, sptr = xpmColorKeys; key < NKEYS; key++, sptr++) + if ((strlen(*sptr) == l) && (!strncmp(*sptr, buf, l))) +@@ -338,7 +339,7 @@ + + bzero(colidx, 256 * sizeof(short)); + for (a = 0; a < ncolors; a++) +- colidx[ colorTable[a][0][0] ] = a + 1; ++ colidx[(size_t) colorTable[a][0][0] ] = a + 1; + + for (y = 0; y < height; y++) + { +@@ -363,7 +364,7 @@ + + bzero(cidx, 256*256 * sizeof(short)); + for (a = 0; a < ncolors; a++) +- cidx [ colorTable[a][0][0] ][ colorTable[a][0][1] ] = a + 1; ++ cidx [(size_t) colorTable[a][0][0] ][(size_t) colorTable[a][0][1] ] = a + 1; + + for (y = 0; y < height; y++) + { +Index: icon/src/xpm/xpmP.h +=================================================================== +--- icon.orig/src/xpm/xpmP.h 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/xpmP.h 2013-01-28 07:15:17.804114555 +0000 +@@ -173,6 +173,7 @@ + + /* I/O utility */ + ++FUNC(xpmGetString, int, (xpmData * mdata, char **sptr, unsigned int *l)); + FUNC(xpmNextString, int, (xpmData * mdata)); + FUNC(xpmNextUI, int, (xpmData * mdata, unsigned int *ui_return)); + +@@ -276,4 +277,6 @@ + FUNC(strdup, char *, (char *s1)); + #endif + ++FUNC(atoui, unsigned int, (char *p, unsigned int l, unsigned int *ui_return)); ++ + #endif +Index: icon/src/xpm/XpmWrFFrI.c +=================================================================== +--- icon.orig/src/xpm/XpmWrFFrI.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/XpmWrFFrI.c 2013-01-28 07:42:05.840038776 +0000 +@@ -63,7 +63,7 @@ + else + name++; + #endif +- if (dot = index(name, '.')) { ++ if ((dot = index(name, '.'))) { + new_name = (char*)strdup(name); + if (!new_name) { + new_name = NULL; +@@ -71,7 +71,7 @@ + } else { + /* change '.' to '_' to get a valid C syntax name */ + name = s = new_name; +- while (dot = index(s, '.')) { ++ while ((dot = index(s, '.'))) { + *dot = '_'; + s = dot; + } +@@ -206,7 +206,7 @@ + + if (colorTable && mask_pixel != UNDEF_PIXEL) { + for (key = 1; key <= NKEYS; key++) { +- if (s = colorTable[mask_pixel][key]) ++ if ((s = colorTable[mask_pixel][key])) + fprintf(file, "\t%s %s", xpmColorKeys[key - 1], s); + } + } else +@@ -258,7 +258,7 @@ + if (b != ncolors2) { + c = 0; + for (key = 1; key <= NKEYS; key++) { +- if (s = colorTable[b][key]) ++ if ((s = colorTable[b][key])) + fprintf(file, "\t%s %s", xpmColorKeys[key - 1], s); + } + } +Index: icon/src/rtt/rttdb.c +=================================================================== +--- icon.orig/src/rtt/rttdb.c 2002-04-11 20:50:17.000000000 +0000 ++++ icon/src/rtt/rttdb.c 2013-01-28 07:29:50.509893975 +0000 +@@ -542,7 +542,7 @@ + fprintf(db, "%d ", num_cases); + indx = 1; + for (i = 0; i < num_cases; ++i) { +- fprintf(db, "\n%d ", il->u[indx++].n); /* selection number */ ++ fprintf(db, "\n%d ", (int)il->u[indx++].n); /* selection number */ + put_inlin(db, il->u[indx++].fld); /* action */ + } + fprintf(db, "\n"); +@@ -567,14 +567,14 @@ + * runerr with no value argument. + */ + fprintf(db, "runerr1 "); +- fprintf(db, "%d ", il->u[0].n); /* error number */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* error number */ + break; + case IL_Err2: + /* + * runerr with a value argument. + */ + fprintf(db, "runerr2 "); +- fprintf(db, "%d ", il->u[0].n); /* error number */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* error number */ + put_inlin(db, il->u[1].fld); /* variable */ + break; + case IL_Lst: +@@ -649,15 +649,15 @@ + /* + * A variable. + */ +- fprintf(db, "%d ", il->u[0].n); /* symbol table index */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* symbol table index */ + break; + case IL_Subscr: + /* + * A subscripted variable. + */ + fprintf(db, "[ "); +- fprintf(db, "%d ", il->u[0].n); /* symbol table index */ +- fprintf(db, "%d ", il->u[1].n); /* subscripting index */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* symbol table index */ ++ fprintf(db, "%d ", (int)il->u[1].n); /* subscripting index */ + break; + case IL_Block: + /* +@@ -671,7 +671,7 @@ + /* + * Output a symbol table of tended variables. + */ +- fprintf(db, "%d ", il->u[1].n); /* number of local tended */ ++ fprintf(db, "%d ", (int)il->u[1].n); /* number of local tended */ + for (i = 2; i - 2 < il->u[1].n; ++i) + switch (il->u[i].n) { + case TndDesc: +@@ -733,8 +733,8 @@ + else + fprintf(db, "f "); + +- fprintf(db, "%d ", il->u[5].n); /* num string bufs */ +- fprintf(db, "%d ", il->u[6].n); /* num cset bufs */ ++ fprintf(db, "%d ", (int)il->u[5].n); /* num string bufs */ ++ fprintf(db, "%d ", (int)il->u[6].n); /* num cset bufs */ + i = il->u[7].n; + fprintf(db, "%d ", i); /* num args */ + indx = 8; +@@ -961,15 +961,15 @@ + fprintf(db, "$efail "); /* errorfail statement */ + break; + case ILC_Goto: +- fprintf(db, "$goto %d ", ilc->n); /* goto label */ ++ fprintf(db, "$goto %d ", (int)ilc->n); /* goto label */ + break; + case ILC_CGto: + fprintf(db, "$cgoto "); /* conditional goto */ + put_ilc(db, ilc->code[0]); /* condition (with $c $e) */ +- fprintf(db, "%d ", ilc->n); /* label */ ++ fprintf(db, "%d ", (int)ilc->n); /* label */ + break; + case ILC_Lbl: +- fprintf(db, "$lbl %d ", ilc->n); /* label */ ++ fprintf(db, "$lbl %d ", (int)ilc->n); /* label */ + break; + case ILC_LBrc: + fprintf(db, "${ "); /* start of C block with dcls */ +@@ -1000,7 +1000,7 @@ + if (ilc->n == RsltIndx) + fprintf(db, "r "); /* this is "result" */ + else +- fprintf(db, "%d ", ilc->n); /* offset into a symbol table */ ++ fprintf(db, "%d ", (int)ilc->n); /* offset into a symbol table */ + } + + /* +@@ -1028,11 +1028,12 @@ + fprintf(db, "e"); /* can do error conversion */ + else + fprintf(db, "_"); /* cannot do error conversion */ +- if (may_fthru) /* body functions only: */ ++ if (may_fthru) { /* body functions only: */ + if (flag & DoesFThru) + fprintf(db, "t"); /* can fall through */ + else + fprintf(db, "_"); /* cannot fall through */ ++ } + fprintf(db, " "); + } + +Index: icon/src/preproc/bldtok.c +=================================================================== +--- icon.orig/src/preproc/bldtok.c 2001-12-12 18:28:12.000000000 +0000 ++++ icon/src/preproc/bldtok.c 2013-01-28 07:35:48.898131331 +0000 +@@ -212,7 +212,7 @@ + /* + * Look ahead to see if a ## operator is next. + */ +- if (*next_char == '#' && next_char[1] == '#') ++ if (*next_char == '#' && next_char[1] == '#') { + if (tok_id == PpDirEnd) + errt1(t, "## expressions must not cross directive boundaries"); + else { +@@ -222,6 +222,7 @@ + free_t(t); + return NULL; + } ++ } + return t; + } + +@@ -365,7 +366,7 @@ + * for white space to discard. + */ + cs->dir_state = Within; +- if ((t1 = chck_wh_sp(cs)) != NULL) ++ if ((t1 = chck_wh_sp(cs)) != NULL) { + if (t1->tok_id == PpDirEnd) { + /* + * We found a new-line, this is a null preprocessor directive. +@@ -376,6 +377,7 @@ + } + else + free_t(t1); /* discard white space */ ++ } + c = *next_char; + if (islower(c) || isupper(c) || c == '_') { + /* +@@ -399,11 +401,12 @@ + * A header name has to be tokenized specially. Find + * it, then save the token. + */ +- if ((t2 = chck_wh_sp(cs)) != NULL) ++ if ((t2 = chck_wh_sp(cs)) != NULL) { + if (t2->tok_id == PpDirEnd) + errt1(t2, "file name missing from #include"); + else + free_t(t2); ++ } + c = *next_char; + if (c == '"') + cs->tok_sav = hdr_tok('"', StrLit, cs); +@@ -752,12 +755,13 @@ + /* + * The operand must be in the same preprocessing directive. + */ +- if ((t2 = chck_wh_sp(cs)) != NULL) ++ if ((t2 = chck_wh_sp(cs)) != NULL) { + if (t2->tok_id == PpDirEnd) + errt2(t2, t1->image, + " preprocessing expression must not cross directive boundary"); + else + free_t(t2); ++ } + return t1; + + default: +Index: icon/src/preproc/macro.c +=================================================================== +--- icon.orig/src/preproc/macro.c 2001-12-12 18:28:13.000000000 +0000 ++++ icon/src/preproc/macro.c 2013-01-28 07:36:19.080691786 +0000 +@@ -270,7 +270,7 @@ + static char buf[20]; + + m = *m_find(id->image); +- if (m != NULL && m->category == SpecMac) ++ if (m != NULL && m->category == SpecMac) { + if (m->mname == line_mac) { /* __LINE___ */ + sprintf(buf, "%d", id->line); + m->body = new_t_lst(new_token(PpNumber, buf, id->fname, +@@ -279,6 +279,7 @@ + else if (m->mname == file_mac) /* __FILE__ */ + m->body = new_t_lst(new_token(StrLit, id->fname, id->fname, + id->line)); ++ } + return m; + } + +Index: icon/src/runtime/interp.r +=================================================================== +--- icon.orig/src/runtime/interp.r 2002-07-10 23:42:38.000000000 +0000 ++++ icon/src/runtime/interp.r 2013-01-28 08:04:40.576851911 +0000 +@@ -1601,7 +1601,7 @@ + char buf[50]; + + sprintf(buf, "unimplemented opcode: %ld (0x%08x)\n", +- (long)lastop, lastop); ++ (long)lastop, (unsigned int)lastop); + syserr(buf); + } + } +Index: icon/src/runtime/rmisc.r +=================================================================== +--- icon.orig/src/runtime/rmisc.r 2004-11-18 17:13:16.000000000 +0000 ++++ icon/src/runtime/rmisc.r 2013-01-28 08:11:35.845335783 +0000 +@@ -683,7 +683,7 @@ + putc(')', f); + } + else if (Type(*dp) == T_External) +- fprintf(f, "external(%d)",((struct b_external *)BlkLoc(*dp))->blksize); ++ fprintf(f, "external(%d)",(int)((struct b_external *)BlkLoc(*dp))->blksize); + else if (Type(*dp) <= MaxType) + fprintf(f, "%s", blkname[Type(*dp)]); + else +Index: icon/src/runtime/rxrsc.ri +=================================================================== +--- icon.orig/src/runtime/rxrsc.ri 2003-04-24 20:41:19.000000000 +0000 ++++ icon/src/runtime/rxrsc.ri 2013-01-28 08:14:34.695479550 +0000 +@@ -685,7 +685,7 @@ + */ + p = xlfd_field(fontlist[champ], XLFD_Size); + if (p[0] == '0' && p[1] == '-') +- sprintf(fontspec, "%.*s%d%s", p - fontlist[champ], ++ sprintf(fontspec, "%.*s%d%s", (int)(p - fontlist[champ]), + fontlist[champ], bestsize, p + 1); + else + strcpy(fontspec, fontlist[champ]); +Index: icon/ipl/cfuncs/icall.h +=================================================================== +--- icon.orig/ipl/cfuncs/icall.h 2004-11-17 22:50:50.000000000 +0000 ++++ icon/ipl/cfuncs/icall.h 2013-01-28 08:39:11.130875411 +0000 +@@ -94,6 +94,7 @@ + + #include <stdio.h> + #include <limits.h> ++#include <string.h> + + #if INT_MAX == 32767 + #define WordSize 16 +Index: icon/src/iconc/ccode.c +=================================================================== +--- icon.orig/src/iconc/ccode.c 2002-07-10 16:49:38.000000000 +0000 ++++ icon/src/iconc/ccode.c 2013-01-28 08:35:30.801468796 +0000 +@@ -3719,7 +3719,7 @@ + int n; + { + struct code *cd; +- static cnt=1; ++ static int cnt=1; + + cd = NewCode(2 * n + 1); + cd->cd_id = C_CdAry; +Index: icon/src/iconc/chkinv.c +=================================================================== +--- icon.orig/src/iconc/chkinv.c 2000-07-30 02:42:31.000000000 +0000 ++++ icon/src/iconc/chkinv.c 2013-01-28 08:36:46.476591093 +0000 +@@ -22,7 +22,7 @@ + static int seq_exec (int exec_flg1, int exec_flg2); + static int spcl_inv (struct node *n, struct node *asgn); + +-static ret_flag; ++static int ret_flag; + + /* + * chkinv - check for invocation and assignment optimizations. +Index: icon/src/iconc/codegen.c +=================================================================== +--- icon.orig/src/iconc/codegen.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/iconc/codegen.c 2013-01-28 08:36:25.540948861 +0000 +@@ -156,7 +156,7 @@ + for (i = 0; i < GHSize; i++) + for (gptr = ghash[i]; gptr != NULL; gptr = gptr->blink) + if (!(gptr->flag & F_SmplInv)) +- fprintf(codefile, " {%d, \"%s\"},\n", strlen(gptr->name), ++ fprintf(codefile, " {%d, \"%s\"},\n", (int)strlen(gptr->name), + gptr->name); + fprintf(codefile, " };\n"); + } +@@ -352,7 +352,7 @@ + fprintf(inclfile, "dptr r_rslt, continuation r_s_cont);\n"); + initpblk(inclfile, 'P', p->prefix, name, nquals, p->nargs, p->ndynam, + p->nstatic, n_stat + 1); +- fprintf(inclfile, "\n {%d, \"%s\"},\n", strlen(name), name); ++ fprintf(inclfile, "\n {%d, \"%s\"},\n", (int)strlen(name), name); + } + arg_nms(p->args, init_glbl); + p->tnd_loc = dyn_nms(p->dynams, init_glbl); +@@ -376,7 +376,7 @@ + n = arg_nms(lptr->next, prt); + lptr->val.index = n; + if (prt) +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(lptr->name), lptr->name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(lptr->name), lptr->name); + return n + 1; + } + +@@ -395,7 +395,7 @@ + n = dyn_nms(lptr->next, prt); + lptr->val.index = n; + if (prt) +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(lptr->name), lptr->name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(lptr->name), lptr->name); + return n + 1; + } + +@@ -412,7 +412,7 @@ + stat_nms(lptr->next, prt); + lptr->val.index = ++n_stat; + if (prt) +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(lptr->name), lptr->name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(lptr->name), lptr->name); + } + + /* +@@ -477,7 +477,7 @@ + fprintf(inclfile, "\n"); + implproto(ip); + initpblk(inclfile, 'F', prefix, name, 1, nargs, -1, 0, 0); +- fprintf(inclfile, "{%d, \"%s\"}}};\n", strlen(name), name); ++ fprintf(inclfile, "{%d, \"%s\"}}};\n", (int)strlen(name), name); + } + + /* +@@ -520,7 +520,7 @@ + */ + initpblk(inclfile, 'R', r->prefix, name, nfields + 1, nfields, -2, + r->rec_num, 1); +- fprintf(inclfile, "\n {%d, \"%s\"},\n", strlen(name), name); ++ fprintf(inclfile, "\n {%d, \"%s\"},\n", (int)strlen(name), name); + fldnames(r->fields); + fprintf(inclfile, " }};\n"); + } +@@ -538,7 +538,7 @@ + return; + fldnames(fields->next); + name = fields->name; +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(name), name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(name), name); + } + + /* +@@ -1048,7 +1048,7 @@ + fprintf(codefile, ".vword.sptr = \"%s\";\n", lit->image); + fprintf(codefile, " "); + val_loc(cd->Rslt, outer); +- fprintf(codefile, ".dword = %d;\n", strlen(lit->image)); ++ fprintf(codefile, ".dword = %d;\n", (int)strlen(lit->image)); + fprintf(codefile, " cnv_int(&"); + val_loc(cd->Rslt, outer); + fprintf(codefile, ", &"); +@@ -1193,7 +1193,7 @@ + */ + if (cd->FileName != NULL) { + fprintf(codefile, " file_name = \""); +- prt_i_str(codefile, cd->FileName, strlen(cd->FileName)); ++ prt_i_str(codefile, cd->FileName, (int)strlen(cd->FileName)); + fprintf(codefile, "\";\n"); + } + if (cd->LineNum != 0) +Index: icon/src/iconc/csym.c +=================================================================== +--- icon.orig/src/iconc/csym.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/iconc/csym.c 2013-01-28 08:34:56.175244144 +0000 +@@ -821,7 +821,7 @@ + * invocation. + */ + fprintf(codefile, " {T_Proc, 11, O%c%c_%s, %d, -1, 0, 0, {{%d, \"", c1, c2, +- name, nargs, strlen(op)); ++ name, nargs, (int)strlen(op)); + for (s = op; *s != '\0'; ++s) { + if (*s == '\\') + fprintf(codefile, "\\"); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..150d59a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,6 @@ +debian-9.4.3-2.patch +config-illumos.patch +undefine-SHARED-if-defined.patch +use-__fpending.patch +dyson-mklib.sh-gcc.patch +fix-warnings.patch diff --git a/debian/patches/undefine-SHARED-if-defined.patch b/debian/patches/undefine-SHARED-if-defined.patch new file mode 100644 index 0000000..ffe84ae --- /dev/null +++ b/debian/patches/undefine-SHARED-if-defined.patch @@ -0,0 +1,16 @@ +Description: SHARED may be defined in sys/mman.h + Better solution might be proper CFLAGS +Index: icon/src/h/xwin.h +=================================================================== +--- icon.orig/src/h/xwin.h 2002-09-13 21:04:32.000000000 +0000 ++++ icon/src/h/xwin.h 2013-01-28 05:41:14.988907554 +0000 +@@ -74,6 +74,9 @@ + #define WMAXCOLORS 256 + #define MAXCOLORNAME 40 + #define MAXDISPLAYNAME 64 ++#ifdef SHARED ++#undef SHARED ++#endif + #define SHARED 0 + #define MUTABLE 1 + #define NUMCURSORSYMS 78 diff --git a/debian/patches/use-__fpending.patch b/debian/patches/use-__fpending.patch new file mode 100644 index 0000000..b23fb04 --- /dev/null +++ b/debian/patches/use-__fpending.patch @@ -0,0 +1,36 @@ +Description: Supported in GLIBC and in Solaris libc +Index: icon/ipl/cfuncs/fpoll.c +=================================================================== +--- icon.orig/ipl/cfuncs/fpoll.c 2003-01-10 17:48:57.000000000 +0000 ++++ icon/ipl/cfuncs/fpoll.c 2013-01-28 06:15:30.654169575 +0000 +@@ -29,6 +29,7 @@ + */ + + #include <stdio.h> ++#include <stdio_ext.h> + #include <sys/types.h> + #include <sys/time.h> + +@@ -57,21 +58,8 @@ + msec = IntegerVal(argv[2]); + } + +- /* check for data already in buffer */ +- /* there's no legal way to do this in C; we cheat */ +-#if defined(__GLIBC__) && defined(_STDIO_USES_IOSTREAM) /* new GCC library */ +- if (f->_IO_read_ptr < f->_IO_read_end) ++ if (__fpending(f)) + RetArg(1); +-#elif defined(__GLIBC__) /* old GCC library */ +- if (f->__bufp < f->__get_limit) +- RetArg(1); +-#elif defined(_FSTDIO) /* new BSD library */ +- if (f->_r > 0) +- RetArg(1); +-#else /* old AT&T library */ +- if (f->_cnt > 0) +- RetArg(1); +-#endif + + /* set up select(2) structure */ + FD_ZERO(&fds); /* clear file bits */ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ba6dc79 --- /dev/null +++ b/debian/rules @@ -0,0 +1,250 @@ +#!/usr/bin/make -f +# +# Do we make rt.a into an ELF library? +# Do we make iconx link with xpm.so? + +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) +DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) + +# Take account of old dpkg-architecture output. + +ifeq ($(DEB_HOST_ARCH_CPU),) + DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) + ifeq ($(DEB_HOST_ARCH_CPU),x86_64) + DEB_HOST_ARCH_CPU := amd64 + endif +endif +ifeq ($(DEB_HOST_ARCH_OS),) + DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)) + ifeq ($(DEB_HOST_ARCH_OS),gnu) + DEB_HOST_ARCH_OS := hurd + endif +endif + +CFLAGS_OPT = -O2 + +ifneq (, $(filter $(DEB_HOST_ARCH_CPU), alpha hppa ia64 mips mipsel \ + powerpc s390 sparc amd64 i386 \ + arm armel armeb ppc64 )) + CFLAGS_OPT = -O0 +endif + +ifneq (, $(filter $(DEB_HOST_ARCH_OS), linux kfreebsd knetbsd)) + system = linux +else + ifeq ($(DEB_HOST_ARCH_OS),hurd) + system = gnu + else + system = $(DEB_HOST_ARCH_OS) + endif +endif + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS_OPT = -O0 +endif + +CFLAGS = -Wall -g $(CFLAGS_OPT) + +configure: + $(checkdir) + $(MAKE) X-Configure name=$(system) + sed "s/CFLAGS = .*/CFLAGS = $(CFLAGS)/" Makedefs > Makedefs.tmp + mv Makedefs.tmp Makedefs + touch configure + +build-icont: configure + $(checkdir) + $(MAKE) Icont + touch build-icont + +build-iconc: configure + $(checkdir) + $(MAKE) Iconc + (cd src/common && make patchstr && cp patchstr ../../bin) + touch build-iconc + +build-ipl: configure + $(checkdir) + $(MAKE) Ilib + +clean: + $(checkdir) + -rm -f configure build-icont build-iconc build-ipl + -rm -rf debian/tmp-iconx debian/tmp-icont debian/tmp-iconc debian/tmp-ipl debian/files debian/*~ + -rm -f bin/* debian/substvars + $(MAKE) Pure + +binary-icont: checkroot build-icont test-icont + $(checkdir) + -rm -rf debian/tmp-icont +# Create the directory hierarchy. + install -d debian/tmp-icont/usr/bin + install -d debian/tmp-icont/DEBIAN + install -d debian/tmp-icont/usr/share/man/man1 + install -d debian/tmp-icont/usr/share/doc/icont +# Copy the executables and documentation... + install -s -m 755 bin/icont debian/tmp-icont/usr/bin + install -m 644 debian/icon.1 debian/tmp-icont/usr/share/man/man1/icont.1 + sed -e 's/icon-dir/icont/g' debian/copyright \ + >debian/tmp-icont/usr/share/doc/icont/copyright + install -m 644 debian/changelog \ + debian/tmp-icont/usr/share/doc/icont/changelog.Debian +# Patch icont... +# bin/patchstr debian/tmp-icont/usr/bin/icont /usr/bin/iconx +# Wrap icont to provide default for IPATH and LPATH +# mv debian/tmp-icont/usr/bin/icont debian/tmp-icont/usr/bin/icont.real +# install -o root -g root -m 755 debian/icont-wrapper debian/tmp-icont/usr/bin/icont +# Compress documentation... + test -f debian/tmp-icont/usr/share/doc/icont/changelog.Debian.gz || \ + gzip -9 debian/tmp-icont/usr/share/doc/icont/changelog.Debian + -gzip -9rq debian/tmp-icont/usr/share/man +# (cd debian/tmp-icont/usr/share/man/man1 && ln -sf icont.1.gz icont.real.1.gz) +# Fix permissions... + chmod -R u=rwX,go=rX debian/tmp-icont + chown -R root.root debian/tmp-icont +# Make the debian control area. + dpkg-shlibdeps -pshlibs-icont debian/tmp-icont/usr/bin/* + dpkg-gencontrol -isp -picont -Pdebian/tmp-icont +# And finally, build the Debian package! + dpkg --build debian/tmp-icont .. + +binary-iconx: checkroot build-icont + $(checkdir) + -rm -rf debian/tmp-iconx +# Create the directory hierarchy. + install -d debian/tmp-iconx/usr/bin + install -d debian/tmp-iconx/DEBIAN + install -d debian/tmp-iconx/usr/share/man/man1 + install -d debian/tmp-iconx/usr/share/doc/iconx +# Copy the executables and documentation... + install -s -m 755 bin/iconx debian/tmp-iconx/usr/bin + install -m 644 debian/icon.1 debian/tmp-iconx/usr/share/man/man1/iconx.1 + sed -e 's/icon-dir/iconx/g' debian/copyright \ + >debian/tmp-iconx/usr/share/doc/iconx/copyright + install -m 644 debian/changelog \ + debian/tmp-iconx/usr/share/doc/iconx/changelog.Debian +# Compress documentation... + test -f debian/tmp-iconx/usr/share/doc/iconx/changelog.Debian.gz || \ + gzip -9 debian/tmp-iconx/usr/share/doc/iconx/changelog.Debian + -gzip -9rq debian/tmp-iconx/usr/share/man +# Fix permissions... + chmod -R u=rwX,go=rX debian/tmp-iconx + chown -R root.root debian/tmp-iconx +# Make the debian control area. + dpkg-shlibdeps -pshlibs-iconx debian/tmp-iconx/usr/bin/* + dpkg-gencontrol -isp -piconx -Pdebian/tmp-iconx +# And finally, build the Debian package! + dpkg --build debian/tmp-iconx .. + +binary-iconc: checkroot build-iconc + $(checkdir) + -rm -rf debian/tmp-iconc +# Create the directory hierarchy. + install -d debian/tmp-iconc/usr/bin + install -d debian/tmp-iconc/DEBIAN + install -d debian/tmp-iconc/usr/share/man/man1 + install -d debian/tmp-iconc/usr/share/doc/iconc + install -d debian/tmp-iconc/usr/lib/iconc +# Copy the executables and library files... + install -s -m 755 bin/iconc debian/tmp-iconc/usr/bin + install -m 644 bin/dlrgint.o bin/rt.* bin/libIgpx.a debian/tmp-iconc/usr/lib/iconc +# Patch iconc... + bin/patchstr debian/tmp-iconc/usr/bin/iconc /usr/lib/iconc/ +# Copy documentation... + install -m 644 debian/icon.1 debian/tmp-iconc/usr/share/man/man1/iconc.1 + sed -e 's/icon-dir/iconc/g' debian/copyright \ + >debian/tmp-iconc/usr/share/doc/iconc/copyright + install -m 644 debian/changelog \ + debian/tmp-iconc/usr/share/doc/iconc/changelog.Debian +# Compress documentation... + test -f debian/tmp-iconc/usr/share/doc/iconc/changelog.Debian.gz || \ + gzip -9 debian/tmp-iconc/usr/share/doc/iconc/changelog.Debian + -gzip -9rq debian/tmp-iconc/usr/share/man +# Fix permissions... + chmod -R u=rwX,go=rX debian/tmp-iconc + chown -R root.root debian/tmp-iconc +# Make the debian control area. + dpkg-shlibdeps -pshlibs-iconc debian/tmp-iconc/usr/bin/* + dpkg-gencontrol -isp -piconc -Pdebian/tmp-iconc +# And finally, build the Debian package! + dpkg --build debian/tmp-iconc .. + +binary-ipl: checkroot build-ipl + $(checkdir) + -rm -rf debian/tmp-ipl +# Create the directory hierarchy. + install -d debian/tmp-ipl/DEBIAN + install -d debian/tmp-ipl/usr/share/doc/icon-ipl + install -d debian/tmp-ipl/usr/lib/icon-ipl +# Copy Icon program library... + cp -r lib/* ipl/procs/*.icn ipl/gprocs/*.icn debian/tmp-ipl/usr/lib/icon-ipl +# Copy copyright information. + sed -e 's/icon-dir/icon-ipl/g' debian/copyright \ + >debian/tmp-ipl/usr/share/doc/icon-ipl/copyright + install -m 644 debian/changelog \ + debian/tmp-ipl/usr/share/doc/icon-ipl/changelog.Debian +# Compress documentation... + find debian/tmp-ipl/usr/share/doc/icon-ipl -type f -size +6k -print | \ + xargs --no-run-if-empty gzip -9 + test -f debian/tmp-ipl/usr/share/doc/icon-ipl/changelog.Debian.gz || \ + gzip -9 debian/tmp-ipl/usr/share/doc/icon-ipl/changelog.Debian +# Fix permissions... + chmod -R u=rwX,go=rX debian/tmp-ipl + chown -R root.root debian/tmp-ipl +# Make the debian control area. + dpkg-gencontrol -isp -picon-ipl -Pdebian/tmp-ipl +# And finally, build the Debian package! + dpkg --build debian/tmp-ipl .. + +test-icont: build-icont + $(checkdir) + @echo Tests for the Icon interpreter. + @echo First some simple tests to be sure Icon works. + $(MAKE) Samples-icont + @echo More exhaustive tests of various features of Icon and larger programs. + @echo 1. Basic tests. Should show only insignificant differences. + $(MAKE) Test-icont + +test-iconc: build-iconc + $(checkdir) + @echo Tests for the Icon compiler. + @echo First some simple tests to be sure Icon works. + $(MAKE) Samples-iconc + @echo More exhaustive tests of various features of Icon and larger programs. + @echo 1. Basic tests. Should show only insignificant differences. + $(MAKE) Test-iconc Test-opt Test-noopt + +benchmark-icont: build-icont + $(checkdir) + $(MAKE) Benchmark-icont + +benchmark-iconc: build-iconc + $(checkdir) + $(MAKE) Benchmark-icont + +build-iconx: build-icont +build: build-icont build-iconc build-ipl + +binary-arch: binary-icont binary-iconx binary-iconc + +binary-indep: binary-ipl + $(checkroot) + +binary: binary-indep binary-arch + +test: test-icont test-iconc + +benchmark: benchmark-icont behchmark-iconc + +define checkdir + test -f src/icont/tmem.c -a -f debian/rules +endef + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test "`whoami`" = root + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/local-options b/debian/source/local-options new file mode 100644 index 0000000..4aceb10 --- /dev/null +++ b/debian/source/local-options @@ -0,0 +1 @@ +unapply-patches |