debian/0000755000000000000000000000000012261756036007176 5ustar debian/copyright0000644000000000000000000000550112166120076011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: units Source: http://www.gnu.org/software/units/ Files: * Copyright: 1984-2012 Free Software Foundation, Inc. License: GPL-3+ Files: getopt.h Copyright: 1989-1994 Free Software Foundation, Inc. License: GPL-2+ Files: units.info units.pdf units.texinfo units.txt Copyright: 1996-1012 Free Software Foundation, Inc. License: GFDL-1.3+ Files: debian/* Copyright: 1997-1998 James Troup 1999-2012 John G. Hasler 2013 Stephen Kitt License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. . On Debian GNU/Linux systems, the complete text of the GNU General Public License, version 2, can be found in `/usr/share/common-licenses/GPL-2'. License: GPL-3+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. . On Debian GNU/Linux systems, the complete text of the GNU General Public License, version 3, can be found in `/usr/share/common-licenses/GPL-3'. License: GFDL-1.3+ Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". . On Debian GNU/Linux systems, the complete text of the GNU Free Documentation License, version 1.3, can be found in `/usr/share/common-licenses/GFDL-1.3'. debian/watch0000644000000000000000000000035712166120073010222 0ustar version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \ ftp://ftp.gnu.org/gnu/units (?:.*/)?units[_\-\.]?(\d\S*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) debian/clean0000644000000000000000000000004112171602476010174 0ustar parse.tab.c units.info units.man debian/gbp.conf0000644000000000000000000000012512166315575010616 0ustar # Configuration file for git-buildpackage and friends [DEFAULT] pristine-tar = True debian/menu0000644000000000000000000000014612166117633010064 0ustar ?package(units):needs="text" section="Applications/Science/Mathematics" title="Units" command="units" debian/patches/0000755000000000000000000000000012261755604010625 5ustar debian/patches/bisonfix.patch0000644000000000000000000000320112261755575013472 0ustar Author: Adrian Mariano Description: Update the parser to drop deprecated constructs --- a/parse.y +++ b/parse.y @@ -23,35 +23,29 @@ %{ -#define YYPARSE_PARAM comm -#define YYLEX_PARAM comm - -#define COMM ((struct commtype *)comm) - #include "units.h" -int yylex(); -void yyerror(char *); +struct commtype { + int location; + char *data; + struct unittype *result; + int errorcode; + char *paramname; + struct unittype *paramvalue; +}; static int err; /* value used by parser to store return values */ -#define CHECK if (err) { COMM->errorcode=err; YYABORT; } +#define CHECK if (err) { comm->errorcode=err; YYABORT; } +int yylex(); +void yyerror(struct commtype *comm, char *); #define MEMSIZE 100 struct unittype *memtable[MEMSIZE]; int nextunit=0; int maxunit=0; -struct commtype { - int location; - char *data; - struct unittype *result; - int errorcode; - char *paramname; - struct unittype *paramvalue; -}; - struct function { char *name; double (*func)(double); @@ -136,6 +130,9 @@ %} +%parse-param {struct commtype *comm} +%lex-param {struct commtype *comm} + %pure_parser %name-prefix="units" @@ -184,8 +181,8 @@ %% - input: EOL { COMM->result = makenumunit(1,&err); CHECK; YYACCEPT; } - | unitexpr EOL { COMM->result = $1; YYACCEPT; } + input: EOL { comm->result = makenumunit(1,&err); CHECK; YYACCEPT; } + | unitexpr EOL { comm->result = $1; YYACCEPT; } | error { YYABORT; } ; @@ -444,7 +441,7 @@ } -void yyerror(char *s){} +void yyerror(struct commtype *comm, char *s){} void freelist(int startunit) debian/patches/preserve-cppflags.patch0000644000000000000000000000054312171602406015267 0ustar Description: Use CPPFLAGS when processing C source Author: Stephen Kitt --- a/Makefile.in +++ b/Makefile.in @@ -55,7 +55,7 @@ .SUFFIXES: .c .@OBJEXT@ .c.@OBJEXT@: - $(CC) $(DEFS) $(CFLAGS) -I$(srcdir) -c $< + $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -I$(srcdir) -c $< # %.@OBJEXT@: %.c # $(CC) $(DEFS) $(CFLAGS) -I$(srcdir) -c %.c debian/patches/texinfo.patch0000644000000000000000000000107112171601653013313 0ustar Description: Use TeX processing commands in @tex sections Author: Stephen Kitt --- a/units.texinfo +++ b/units.texinfo @@ -884,7 +884,7 @@ For example, one form of the Darcy--Weisbach fluid-flow equation is @tex $$ - @Delta P = {8 @over @pi^2} @rho fL { Q^2 @over d^5} + \Delta P = {8 \over \pi^2} \rho fL { Q^2 \over d^5} $$ @end tex @ifnottex @@ -902,7 +902,7 @@ It might be desired to have the equation in the form @tex $$ - @Delta P = A_1 @rho fL {Q^2 @over d^5} + \Delta P = A_1 \rho fL {Q^2 \over d^5} $$ @end tex @ifnottex debian/patches/pager.patch0000644000000000000000000000126512166120076012741 0ustar Description: Use /usr/bin/pager instead of more Author: Stephen Kitt --- a/units.c +++ b/units.c @@ -78,7 +78,7 @@ #define HELPCOMMAND "help" /* Command to request help at prompt */ #define SEARCHCOMMAND "search" /* Command to request text search of units */ #define UNITMATCH "?" /* Command to request conformable units */ -#define DEFAULTPAGER "more" /* Default pager program */ +#define DEFAULTPAGER "/usr/bin/pager" /* Default pager program */ #define DEFAULTLOCALE "en_US" /* Default locale */ #define MAXINCLUDE 5 /* Max depth of include files */ #define MAXFILES 25 /* Max number of units files on command line */ debian/patches/series0000644000000000000000000000012612261610230012022 0ustar pager.patch texinfo.patch preserve-cppflags.patch generic-python.patch bisonfix.patch debian/patches/generic-python.patch0000644000000000000000000000033312171615455014577 0ustar Description: Use /usr/bin/python rather than /usr/bin/python2 Author: Stephen Kitt --- a/units_cur +++ b/units_cur @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python # Version 2 # 9 July 2013 debian/changelog0000644000000000000000000002526112261756011011047 0ustar units (2.02-2) unstable; urgency=medium * Add bisonfix.patch from upstream to allow building with bison 3 (closes: #733374). * Standards-Version 3.9.5, no change required. -- Stephen Kitt Sat, 04 Jan 2014 11:01:41 +0100 units (2.02-1) unstable; urgency=low * New upstream version. * Add texinfo.patch to fix @tex sections with texinfo 5. * Add preserve-cppflags.patch to keep CPPFLAGS. * Use debian/clean to delete files instead of overriding dh_clean; delete parse.tab.c and units.info since they're re-generated at build time, and build-depend on bison. * Install units_cur now that it works, and build-depend on python. -- Stephen Kitt Thu, 18 Jul 2013 00:34:37 +0200 units (2.01-1) unstable; urgency=low * Adopt package (closes: #705770). * New upstream version (closes: #702543, LP: #1019786): - includes updated CODATA values (closes: #591526); - defines imperial pint as 20 imperial fluid ounces (closes: #637092); - updates manpage fixing all reported issues (closes: #606403, LP: #1009549); - adds Taiwanese units (closes: #604615); - explains how to view available units (closes: #661903, #704506); - adds the twip unit (closes: #520428). * Use simplified dh 9 rules (LP: #496810). * Specify source format "3.0 (quilt)" and remove units.man on clean (it is modified during the build). * Add watch file provided by Bart Martens (thanks!). * Drop obsolete build-dependency on texi2html. * Use dh_autoreconf to update the configure script automatically. * wrap-and-sort the control files. * Drop obsolete libreadline{5,6}-dev alternative build-dependencies. * Add collab-maint VCS information. * Standards-Version 3.9.4, no further change required. * Drop obsolete build-dependency on dpkg or install-info. * Add pager.patch to use /usr/bin/pager instead of more when PAGER is not defined (closes: #695909). * Update debian/copyright and switch to machine-readable format. -- Stephen Kitt Sun, 07 Jul 2013 00:38:26 +0200 units (1.88-2) unstable; urgency=low * Orphaned -- John G. Hasler Fri, 19 Apr 2013 14:06:55 -0500 units (1.88-1) unstable; urgency=low * New upstream release Closes: #629926: Temperature units are not correctly converted Closes: #642973: currency exchange rates should be updated -- John G. Hasler Tue, 19 Jun 2012 20:16:52 -0500 units (1.87-2) unstable; urgency=low * Deleted debian/prerm, fixed debian/postinst and postrm. Added debian/compat (level 7), Edited debian/control Brought standards-version up to 3.8.3, updated libreadline build dependency, added dpkg (>= 1.15.4) | install-info to depends: * Replaced "more" with "/usr/bin/pager" at line 55 in units.c Closes: #548597: Please use /usr/bin/pager as default pager -- John G. Hasler Wed, 07 Oct 2009 21:34:00 -0500 units (1.87-1) unstable; urgency=low * New upstream release Upstream made "*" and "/" the same precedence. Closes: #359658: units: precedence of '/' is bad Units reads ~/.units.dat if it exists before reading the standard units database. Closes: #456544: units: $UNITSFILE doesn't override default anymore -- John Hasler Sun, 20 Jul 2008 21:54:50 -0500 units (1.86a-1) unstable; urgency=low * New upstream release Upstream has changed this section: we now have usbillion and brbillion. Elsewhere billion is defined as usbillion. Perhaps in the future this could be made to depend on locale. Closes: #165946: units: Confusing information in units.dat Upstream added a "help" command that searches the database. Closes: #375255: units: wishlist (finding the "unit") Closes: #370224: crochet is spelled crotchet * 'install -s' now only used if 'nostrip' is not in DEB_BUILD_OPTIONS. Closes: #438233: units: not handling nostrip build option (policy 10.1) * Fixed menu entry. * Fixed parallel build problem by consolidating all "install -d" commands in debian/rules into one line. -- John Hasler Sun, 2 Dec 2007 21:46:50 -0600 units (1.85-3) unstable; urgency=low * Fixed typo in control file * Added missing build-depends on texinfo Closes: #340850: FTBFS: makeinfo: Command not found -- John Hasler Wed, 21 Dec 2005 21:10:54 -0600 units (1.85-2) unstable; urgency=low * Fixed calling of configure script in rules. Closes: #340850: FTBFS: makeinfo: Command not found * Upstream changed handling of imperial units (didn't notice earlier). Closes: #259411: Mile incorrectly related to other imperial units -- John Hasler Tue, 13 Dec 2005 20:56:45 -0600 units (1.85-1) unstable; urgency=low * New upstream release Closes: #339108 units: new upstream release available Closes: #223890 Missing 0 in the help text. Closes: #266752 -V: doubled slash Closes: #233472 suggest cdromspeed and dvdspeed units Closes: #204473 "nmi" should be "nauticalmile", not "nanomile" [patch] * Fixed build dependencies. Closes: #326284 please rebuild with libreadline5-dev as build dependency Closes: #322941 switch to libreadline5 * Fixed typos. Closes: #302822 'man units' typos: "Fahrehneit" and "accomodates" * Corrected FSF address. * Put missing quotes in menu, moved menu to /usr/share. -- John Hasler Tue, 22 Nov 2005 21:33:27 -0600 units (1.81-4) unstable; urgency=low * Added md5sums. -- John Hasler Tue, 2 Dec 2003 14:30:00 -0500 units (1.81-3) unstable; urgency=low * Closes: #195260 FTBFS with gcc-3.3: Uses multiline strings Removed example script from end of units.c. gcc 3.3 was choking on it despite it being inside a '#if 0 ... #endif'. -- John Hasler Thur, 29 May 2003 20:30:00 -0500 units (1.81-2) unstable; urgency=low * Closes: #168132 FTBFS: missing build-depends Added texi2html -- John Hasler Thur, 7 Nov 2002 8:00:00 -0600 units (1.81-1) unstable; urgency=low * New upstream version * Simplified scripts, added Build-Depends * Closes: #150343 New upstream version * Closes: #160955 Something Weird About Kelvin-value User error * Closes: #165955 surveyfoot/intfoot inconsistency Fixed in new upstream -- John Hasler Mon, 4 Nov 2002 16:30:00 -0600 units (1.77-1) unstable; urgency=low * New upstream version. * Closes: #88634 * Closes: #97022 * Closes: #88631 -- John Hasler Thu, 10 May 2001 20:45:00 -0500 units (1.55-4) unstable; urgency=low * Rebuild to use libreadline4. -- John Hasler Mon, 24 Jul 2000 20:45:00 -0500 units (1.55-3) unstable; urgency=low * Add readline support. * closes: #59589 * closes: #60900 -- John Hasler Wed, 22 Mar 2000 20:45:00 -0500 units (1.55-2) unstable; urgency=low * Policy compliance. -- John Hasler Sun, 8 Jan 2000 20:45:00 -0500 units (1.55-1) unstable; urgency=low * New upstream release. * closes: #43354, #25160 -- John Hasler Tue, 3 Aug 1999 20:45:00 -0500 units (1.54-6) unstable; urgency=low * Upped libreadlineg2 dependency from -12 to -13 because of segfaults with -12. -- John Hasler Sat, 15 May 1999 16:54:37 -0500 units (1.54-5) unstable; urgency=low * debian/control (Maintainer): new maintainer. * Rebuilt with libc6 2.1.1-1. -- John Hasler Tue, 27 Apr 1999 20:54:37 -0500 units (1.54-4) frozen unstable; urgency=low * debian/control (Standards-Version): updated to 2.4.1.0. * debian/control (Maintainer): new address. * debian/copy: ditto. * Rebuilt with ncurses4. * units.c: #include iff READLINE is defined to get add_history() prototype. * units.c: Added prototypes for handlesum(), completereduce() and compareunits(). * units.c (readunits,lookupunit,addunit,completeunits): parentheses around assignment used as a truth value. * units.c (showanswer): initialize sep, right and left to quiet -Wall. * debian/rules (binary-arch): install the `NEWS' and `README' files into /usr/doc/units/. -- James Troup Fri, 23 Oct 1998 16:29:34 +0100 units (1.54-3) frozen unstable; urgency=low * debian/rules (build): pass datadir=/usr/share/misc/ to configure to ensure that units.dat goes to /usr/share/misc/ and doesn't clutter up /usr/share/, reported by Scott Ellis . [#20481] * debian/urles (binary-arch): ditto (datadir=/debian/tmp/usr/share/misc to make install). -- James Troup Thu, 2 Apr 1998 02:34:53 +0100 units (1.54-2) unstable; urgency=low * debian/control (Standards-Version): updated to 2.4.0.0. * debian/copyright: correct reference to now uncompressed GPL in /usr/doc/copyright. * debian/copyright: correct the FSF's address. * debian/rules: drop $(package) and use a literal string instead. * debian/rules: use go=rX as the argument to chmod, rather than g-ws. * debian/rules: don't pass -c to install. * debian/rules: other minor cleanups. -- James Troup Fri, 13 Feb 1998 21:04:47 +0000 units (1.54-1) unstable; urgency=low * New upstream version. * Uses pristine upstream source. * Compile with -g, strip on install. * Minor update to postinst. prerm removed and replaced by a more intelligent postrm. * Minor fixes to copyright file. * Added a menu entry. * Minor alterations to the rules file (now {}-free *sigh*). -- James Troup Tue, 18 Nov 1997 03:11:17 +0000 units (1.53-3) unstable; urgency=low * Rebuilt with libc6. -- James Troup Wed, 25 Jun 1997 18:54:32 +0100 units (1.53-2) frozen unstable; urgency=low * Patched units.c so that units doesn't go mad when passed null arguments. Patch from Mark Baker . * Extended units.dat, patch from Mark Baker :- eushot, thou, ecu, unitedkingdompound, unitedstatesdollar, British currency (shilling, oldpence, quid, fiver, tenner), English spellings of aluminum and sulfur, ISO currency codes (+ UKP). * Correct Section: in debian/control (misc -> utils). * Replaced cp's with install's in debian/rules. * Removed substvars in debian/rules clean target. * Added HTML documentation (converted from texinfo) as per standard. -- James Troup Thu, 3 Apr 1997 00:58:11 +0100 units (1.53-1) unstable; urgency=low * Initial release. -- James Troup Sun, 19 Jan 1997 20:44:33 +0000 debian/source/0000755000000000000000000000000012166120073010464 5ustar debian/source/format0000644000000000000000000000001412166120073011672 0ustar 3.0 (quilt) debian/control0000644000000000000000000000205312261755755010610 0ustar Source: units Section: utils Priority: optional Maintainer: Stephen Kitt Standards-Version: 3.9.5 Build-Depends: bison, debhelper (>= 9), dh-autoreconf, libreadline-dev, python, texinfo Homepage: http://ftp.gnu.org/gnu/units/ Vcs-Git: git://anonscm.debian.org/collab-maint/units.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/units.git;a=summary Package: units Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: ${python:Depends} Description: converts between different systems of units GNU 'units' program converts quantities expressed in various scales to their equivalents in other scales. The 'units' program can only handle multiplicative scale changes directly. It uses a functional notation for "nonlinear" conversions such a Fahrenheit temperature to Celsius temperature. . This package includes the units_cur script to update currency conversion information; this script requires a Python interpreter. debian/postrm0000644000000000000000000000056612166117633010452 0ustar #! /bin/sh # # This is the postrm script for the Debian GNU/Linux units package # # Written by John G. Hasler set -e #DEBHELPER# case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) if [ -x /usr/bin/update-menus ] then update-menus fi ;; *) echo "postrm called with unknown argument \`$1'" >&2 ;; esac debian/compat0000644000000000000000000000000212166120072010361 0ustar 9 debian/rules0000755000000000000000000000014412171615532010250 0ustar #!/usr/bin/make -f # debian/rules file - for GNU Units (2.01). %: dh $@ --with autoreconf,python2 debian/postinst0000644000000000000000000000061512166117633011004 0ustar #!/bin/sh # # This is the postinst script for the Debian GNU/Linux units package # # Written by John G. Hasler set -e #DEBHELPER# case "$1" in configure) if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi ;; abort-remove|abort-deconfigure|abort-upgrade) # Nothing to undo ;; *) echo "postinst called with unknown argument \`$1'" >&2 ;; esac debian/units.docs0000644000000000000000000000001412166120075011175 0ustar NEWS README