update to 0.99 [release 0.99-1mamba;Sun Mar 31 2013]
This commit is contained in:
parent
62dfc1388b
commit
06fd9fd492
@ -1,2 +1,7 @@
|
|||||||
# barcode
|
# barcode
|
||||||
|
|
||||||
|
This is GNU-barcode.
|
||||||
|
The package is meant to solve most needs in barcode creation with a conventional printer.
|
||||||
|
It can create printouts for the conventional product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well as a few other formats.
|
||||||
|
Output is generated as either Postscript or Encapsulated Postscript (other back-ends may be added if needed).
|
||||||
|
|
||||||
|
78
barcode-0.98-debian_fix.patch
Normal file
78
barcode-0.98-debian_fix.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
diff -pur barcode-0.98/main.c barcode-0.98-fix/main.c
|
||||||
|
--- barcode-0.98/main.c 2002-03-01 21:31:07.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/main.c 2005-10-11 07:19:39.000000000 +0000
|
||||||
|
@@ -419,7 +419,6 @@ char *strerror(int error)
|
||||||
|
*/
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
- struct Barcode_Item * bc;
|
||||||
|
FILE *ifile = stdin;
|
||||||
|
FILE *ofile = stdout;
|
||||||
|
char *line;
|
||||||
|
@@ -549,14 +548,6 @@ int main(int argc, char **argv)
|
||||||
|
int ystep = (page_hei - ymargin0 - ymargin1)/lines;
|
||||||
|
int x = columns, y = -1; /* position in the table, start off-page */
|
||||||
|
|
||||||
|
- if (!ximargin) ximargin = BARCODE_DEFAULT_MARGIN;
|
||||||
|
- if (!yimargin) yimargin = BARCODE_DEFAULT_MARGIN;
|
||||||
|
- /* Assign default size unless -g did it (Joachim Reichelt) */
|
||||||
|
- if ( !code_width && !code_height) {
|
||||||
|
- code_width = xstep - 2*ximargin;
|
||||||
|
- code_height = ystep - 2*yimargin;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
page=0;
|
||||||
|
while ( (line = retrieve_input_string(ifile)) ) {
|
||||||
|
x++; /* fit x and y */
|
||||||
|
@@ -564,35 +555,28 @@ int main(int argc, char **argv)
|
||||||
|
x=0; y--;
|
||||||
|
if (y<0) {
|
||||||
|
y = lines-1; page++;
|
||||||
|
- /* flush page */
|
||||||
|
- if (ps && page > 1) fprintf(ofile, "showpage\n");
|
||||||
|
- if (pcl && page > 1) fprintf(ofile, "\f");
|
||||||
|
- /* new page */
|
||||||
|
- if (ps) fprintf(ofile, "%%%%Page: %i %i\n\n",page,page);
|
||||||
|
+ if (page>1) {
|
||||||
|
+ if (ps) {
|
||||||
|
+ fprintf(ofile, "showpage\n");
|
||||||
|
+ fprintf(ofile, "%%%%Page: %i %i\n\n",page,page);
|
||||||
|
+ }
|
||||||
|
+ if (pcl) fprintf(ofile, "\f");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Create a barcode item. This allows to set the margin to 0, as
|
||||||
|
- * we have [xy]imargin to use. But don't use Encode_and_Print(),
|
||||||
|
- * unroll it here instead
|
||||||
|
+ * Print this code, using the internal margins as spacing.
|
||||||
|
+ * In order to remove the extra (default) margin, subtract it
|
||||||
|
+ * in advance (dirty)
|
||||||
|
*/
|
||||||
|
- bc = Barcode_Create(line);
|
||||||
|
- if (!bc) {
|
||||||
|
- fprintf(stderr, "%s: Barcode_Create(): %s\n", argv[0],
|
||||||
|
- strerror(errno));
|
||||||
|
- exit(1);
|
||||||
|
- }
|
||||||
|
- bc->margin = 0;
|
||||||
|
- if ( (Barcode_Position(bc, code_width, code_height,
|
||||||
|
- xmargin0 + ximargin + x * xstep,
|
||||||
|
- ymargin0 + yimargin + y * ystep, 0.0) < 0)
|
||||||
|
- || (Barcode_Encode(bc, flags) < 0)
|
||||||
|
- || (Barcode_Print(bc, ofile, flags) < 0) ) {
|
||||||
|
- fprintf(stderr, "%s: can't encode \"%s\": %s\n", argv[0],
|
||||||
|
- line, strerror(bc->error));
|
||||||
|
+ if (Barcode_Encode_and_Print(line, ofile,
|
||||||
|
+ xstep - 2*ximargin, ystep - 2*yimargin,
|
||||||
|
+ xmargin0 + ximargin + x * xstep - BARCODE_DEFAULT_MARGIN,
|
||||||
|
+ ymargin0 + yimargin + y * ystep - BARCODE_DEFAULT_MARGIN,
|
||||||
|
+ flags)<0) {
|
||||||
|
+ fprintf(stderr, "%s: can't encode \"%s\"\n", argv[0], line);
|
||||||
|
}
|
||||||
|
- Barcode_Delete(bc);
|
||||||
|
}
|
||||||
|
if (ps) fprintf(ofile, "showpage\n\n%%%%Trailer\n\n");
|
||||||
|
if (pcl) fprintf(ofile, "\f");
|
27
barcode-0.98-free.patch
Normal file
27
barcode-0.98-free.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff -pur barcode-0.98/plessey.c barcode-0.98-fix/plessey.c
|
||||||
|
--- barcode-0.98/plessey.c 2005-10-11 08:03:17.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/plessey.c 2005-10-11 07:58:33.000000000 +0000
|
||||||
|
@@ -112,6 +112,7 @@ int Barcode_pls_encode(struct Barcode_It
|
||||||
|
if (!textinfo) {
|
||||||
|
bc->error = errno;
|
||||||
|
free(partial);
|
||||||
|
+ free(checkptr);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -126,6 +127,7 @@ int Barcode_pls_encode(struct Barcode_It
|
||||||
|
bc->error = EINVAL; /* impossible if text is verified */
|
||||||
|
free(partial);
|
||||||
|
free(textinfo);
|
||||||
|
+ free(checkptr);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
code = c - alphabet;
|
||||||
|
@@ -159,6 +161,7 @@ int Barcode_pls_encode(struct Barcode_It
|
||||||
|
strcpy(ptr, fillers[1]);
|
||||||
|
bc->partial = partial;
|
||||||
|
bc->textinfo = textinfo;
|
||||||
|
+ free(checkptr);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
133
barcode-0.98-gcc4.patch
Normal file
133
barcode-0.98-gcc4.patch
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
diff -pur barcode-0.98/codabar.c barcode-0.98-fix/codabar.c
|
||||||
|
--- barcode-0.98/codabar.c 2000-11-08 17:13:27.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/codabar.c 2005-10-11 07:39:55.000000000 +0000
|
||||||
|
@@ -87,9 +87,9 @@ static int add_one(char *ptr, int code)
|
||||||
|
*/
|
||||||
|
int Barcode_cbr_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *c, *ptr, *textptr;
|
||||||
|
int i, code, textpos, usesum, checksum = 0, startpresent;
|
||||||
|
|
||||||
|
diff -pur barcode-0.98/code128.c barcode-0.98-fix/code128.c
|
||||||
|
--- barcode-0.98/code128.c 2002-02-27 13:58:08.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/code128.c 2005-10-11 07:43:16.000000000 +0000
|
||||||
|
@@ -85,9 +85,9 @@ int Barcode_128b_verify(unsigned char *t
|
||||||
|
|
||||||
|
int Barcode_128b_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *textptr;
|
||||||
|
int i, code, textpos, checksum = 0;
|
||||||
|
|
||||||
|
@@ -174,9 +174,9 @@ int Barcode_128c_verify(unsigned char *t
|
||||||
|
|
||||||
|
int Barcode_128c_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *textptr;
|
||||||
|
int i, code, textpos, checksum = 0;
|
||||||
|
|
||||||
|
@@ -413,9 +413,9 @@ static int *Barcode_128_make_array(struc
|
||||||
|
*/
|
||||||
|
int Barcode_128_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *textptr;
|
||||||
|
int *codes; /* dynamic */
|
||||||
|
int i, c, len;
|
||||||
|
@@ -523,9 +523,9 @@ int Barcode_128raw_verify(unsigned char
|
||||||
|
|
||||||
|
int Barcode_128raw_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *textptr;
|
||||||
|
int i, n, count, code, textpos, checksum = 0;
|
||||||
|
|
||||||
|
diff -pur barcode-0.98/code39.c barcode-0.98-fix/code39.c
|
||||||
|
--- barcode-0.98/code39.c 2002-02-27 13:59:06.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/code39.c 2005-10-11 07:44:02.000000000 +0000
|
||||||
|
@@ -101,9 +101,9 @@ static int add_one(char *ptr, int code)
|
||||||
|
*/
|
||||||
|
int Barcode_39_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *c, *ptr, *textptr;
|
||||||
|
int i, code, textpos, checksum = 0;
|
||||||
|
|
||||||
|
diff -pur barcode-0.98/code93.c barcode-0.98-fix/code93.c
|
||||||
|
--- barcode-0.98/code93.c 2001-10-16 16:42:51.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/code93.c 2005-10-11 07:47:20.000000000 +0000
|
||||||
|
@@ -87,8 +87,8 @@ int Barcode_93_verify(unsigned char *tex
|
||||||
|
int Barcode_93_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
static unsigned char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *c, *textptr;
|
||||||
|
int *checksum_str;
|
||||||
|
int i, code, textpos, checksum_len=0;
|
||||||
|
diff -pur barcode-0.98/msi.c barcode-0.98-fix/msi.c
|
||||||
|
--- barcode-0.98/msi.c 2000-11-07 17:45:35.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/msi.c 2005-10-11 07:48:01.000000000 +0000
|
||||||
|
@@ -67,9 +67,9 @@ static int add_one(char *ptr, int code)
|
||||||
|
*/
|
||||||
|
int Barcode_msi_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *ptr, *textptr;
|
||||||
|
int i, code, textpos, usesum, checksum = 0;
|
||||||
|
|
||||||
|
diff -pur barcode-0.98/plessey.c barcode-0.98-fix/plessey.c
|
||||||
|
--- barcode-0.98/plessey.c 2000-11-07 17:43:18.000000000 +0000
|
||||||
|
+++ barcode-0.98-fix/plessey.c 2005-10-11 07:48:52.000000000 +0000
|
||||||
|
@@ -75,9 +75,9 @@ static int add_one(char *ptr, int code)
|
||||||
|
*/
|
||||||
|
int Barcode_pls_encode(struct Barcode_Item *bc)
|
||||||
|
{
|
||||||
|
- static char *text;
|
||||||
|
- static char *partial; /* dynamic */
|
||||||
|
- static char *textinfo; /* dynamic */
|
||||||
|
+ static unsigned char *text;
|
||||||
|
+ static unsigned char *partial; /* dynamic */
|
||||||
|
+ static unsigned char *textinfo; /* dynamic */
|
||||||
|
char *c, *ptr, *textptr;
|
||||||
|
unsigned char *checkptr;
|
||||||
|
int i, code, textpos;
|
138
barcode.spec
Normal file
138
barcode.spec
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
### AUTOUPDATE-OFF: 2
|
||||||
|
Name: barcode
|
||||||
|
Version: 0.99
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: A tool to convert text strings to printed bars
|
||||||
|
Group: Applications/Graphics
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: http://www.gnu.org/software/barcode/barcode.html
|
||||||
|
# snapshots: ftp://ar.linux.it/pub/barcode/CVS-snapshots/
|
||||||
|
Source0: ftp://ftp.gnu.org/gnu/barcode/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: %{name}-0.98-gcc4.patch
|
||||||
|
Patch1: %{name}-0.98-free.patch
|
||||||
|
Patch2: %{name}-0.98-debian_fix.patch
|
||||||
|
License: GPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libpaper-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
Requires(post):%{__install_info}
|
||||||
|
Obsoletes: barcode-devel
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
# FIXME :
|
||||||
|
# Program received signal SIGSEGV, Segmentation fault.
|
||||||
|
# 0xb7eb01f0 in rawmemchr () from /lib/libc.so.6
|
||||||
|
|
||||||
|
%description
|
||||||
|
This is GNU-barcode.
|
||||||
|
The package is meant to solve most needs in barcode creation with a conventional printer.
|
||||||
|
It can create printouts for the conventional product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well as a few other formats.
|
||||||
|
Output is generated as either Postscript or Encapsulated Postscript (other back-ends may be added if needed).
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: GNU barcode files for development
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This is GNU-barcode.
|
||||||
|
The package is meant to solve most needs in barcode creation with a conventional printer.
|
||||||
|
It can create printouts for the conventional product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well as a few other formats.
|
||||||
|
Output is generated as either Postscript or Encapsulated Postscript (other back-ends may be added if needed).
|
||||||
|
|
||||||
|
This package contains the C header, the static library and man page for development.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: GNU barcode documentation
|
||||||
|
Group: Documentation
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
This is GNU-barcode.
|
||||||
|
The package is meant to solve most needs in barcode creation with a conventional printer.
|
||||||
|
It can create printouts for the conventional product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well as a few other formats.
|
||||||
|
Ouput is generated as either Postscript or Encapsulated Postscript (other back-ends may be added if needed).
|
||||||
|
|
||||||
|
This package contains documentation in ps and pdf formats.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
#%patch0 -p1
|
||||||
|
#%patch1 -p1
|
||||||
|
#%patch2 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
%make -j1
|
||||||
|
|
||||||
|
make -C doc pdf
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||||
|
%makeoldinstall \
|
||||||
|
MAN1DIR=%{buildroot}%{_mandir}/man1 \
|
||||||
|
MAN3DIR=%{buildroot}%{_mandir}/man3 \
|
||||||
|
INFODIR=%{buildroot}%{_infodir}
|
||||||
|
|
||||||
|
## barcode manpage conflicts with with file from package xscreensaver (man6)
|
||||||
|
##rm -f %{buildroot}%{_mandir}/man1/barcode.*
|
||||||
|
mv -f %{buildroot}%{_bindir}/sample %{buildroot}%{_bindir}/sample.barcode
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%post
|
||||||
|
%install_info %{name}.info
|
||||||
|
:
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
%uninstall_info %{name}.info
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{_bindir}/barcode
|
||||||
|
%{_bindir}/sample.barcode
|
||||||
|
%{_infodir}/barcode.*
|
||||||
|
#%{_mandir}/man1/barcode.*
|
||||||
|
%doc COPYING
|
||||||
|
|
||||||
|
#%files devel
|
||||||
|
#%defattr(-, root, root)
|
||||||
|
#%{_includedir}/barcode.h
|
||||||
|
#%{_libdir}/libbarcode.a
|
||||||
|
#%{_mandir}/man3/barcode.*
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%doc ChangeLog README TODO
|
||||||
|
%doc doc/*.pdf
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Mar 31 2013 Automatic Build System <autodist@mambasoft.it> 0.99-1mamba
|
||||||
|
- update to 0.99
|
||||||
|
|
||||||
|
* Wed Jul 16 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.98-5mamba
|
||||||
|
- removed incorrect desktop file
|
||||||
|
- restore no longer conflicting man page
|
||||||
|
- fixed descriptions formatting
|
||||||
|
|
||||||
|
* Tue Jul 15 2008 gil <puntogil@libero.it> 0.98-4mamba
|
||||||
|
- rebuild with new libpaper-1.1.21-1mamba
|
||||||
|
|
||||||
|
* Tue Oct 11 2005 Davide Madrisan <davide.madrisan@qilinux.it> 0.98-3qilnx
|
||||||
|
- specfile fixes: use rpm macros, install/uninstall info files
|
||||||
|
- specfile cleanups
|
||||||
|
- new package doc
|
||||||
|
- remove conflicting manpage (barcode)
|
||||||
|
|
||||||
|
* Thu Jun 09 2005 Alessandro Ramazzina <alessandro.ramazzina@qilinux.it> 0.98-2qilnx
|
||||||
|
- rebuild and moved from devel-contrib repository to devel repository
|
||||||
|
|
||||||
|
* Wed Jun 8 2005 Matteo Bernasconi <voyagernm@virgilio.it> 0.98-1qilnx
|
||||||
|
- first build
|
Loading…
Reference in New Issue
Block a user