OBS User unknown 2007-01-15 23:33:10 +00:00 committed by Git OBS Bridge
commit fbfb9f633a
7 changed files with 430 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

253
potrace-1.7-io.patch Normal file
View File

@ -0,0 +1,253 @@
diff -Naur potrace-1.7/ChangeLog potrace-1.7x/ChangeLog
--- potrace-1.7/ChangeLog 2005-03-06 02:32:06.000000000 -0400
+++ potrace-1.7x/ChangeLog 2005-11-11 21:15:58.000000000 -0400
@@ -1,5 +1,15 @@
ChangeLog
+ (2005/11/11) PS1 - portability: use binary file i/o in Cygwin.
+ (2005/06/24) PS1 - potracelib: fixed allocation bug. Thanks to
+ Jung Shin for reporting this bug.
+ (2005/06/23) PS1 - potracelib_demo.c: free resources properly.
+ (2005/06/23) PS1 - initialize unused private state to 0.
+ (2005/06/23) PS1 - decompose.c: improved memory allocation scheme.
+ (2005/05/06) PS1 - added "alphacurve" field to private curve
+ structure, so that backends that don't use the public interface
+ (such as the EPS backend) can be warned of non-conforming curves.
+
v1.7 2005/03/06
(2005/03/05) PS1 - fixed progress bar subrange bug.
diff -Naur potrace-1.7/check/pgmdiff.c potrace-1.7x/check/pgmdiff.c
--- potrace-1.7/check/pgmdiff.c 2005-02-22 17:31:23.000000000 -0400
+++ potrace-1.7x/check/pgmdiff.c 2005-11-11 22:30:31.000000000 -0400
@@ -24,6 +24,8 @@
double diff;
int x, y, d;
+ platform_init();
+
if (ac != 3) {
fprintf(stderr, "pgmdiff: wrong number of arguments\n");
fprintf(stderr, "Usage: pgmdiff file1 file2\n");
@@ -38,7 +40,7 @@
if (strcmp(file1, "-")==0) {
r = gm_read(stdin, &g1);
} else {
- f = fopen(file1, "r");
+ f = fopen(file1, "rb");
if (!f) {
fprintf(stderr, "pgmdiff: %s: %s\n", file1, strerror(errno));
return 2;
@@ -57,7 +59,7 @@
if (strcmp(file2, "-")==0) {
r = gm_read(stdin, &g2);
} else {
- f = fopen(file2, "r");
+ f = fopen(file2, "rb");
if (!f) {
fprintf(stderr, "pgmdiff: %s: %s\n", file2, strerror(errno));
return 2;
diff -Naur potrace-1.7/src/backend_eps.c potrace-1.7x/src/backend_eps.c
--- potrace-1.7/src/backend_eps.c 2005-02-22 17:31:23.000000000 -0400
+++ potrace-1.7x/src/backend_eps.c 2005-11-11 20:44:07.000000000 -0400
@@ -305,10 +305,10 @@
}
static int eps_path(privcurve_t *curve) {
- if (info.longcoding) {
- return eps_path_long(curve);
- } else {
+ if (info.longcoding==0 && curve->alphacurve) {
return eps_path_short(curve);
+ } else {
+ return eps_path_long(curve);
}
}
diff -Naur potrace-1.7/src/curve.h potrace-1.7x/src/curve.h
--- potrace-1.7/src/curve.h 2005-02-20 18:55:31.000000000 -0400
+++ potrace-1.7x/src/curve.h 2005-11-11 20:44:08.000000000 -0400
@@ -20,6 +20,10 @@
int *tag; /* tag[n]: POTRACE_CORNER or POTRACE_CURVETO */
dpoint_t (*c)[3]; /* c[n][i]: control points.
c[n][0] is unused for tag[n]=POTRACE_CORNER */
+ /* the remainder of this structure is special to privcurve, and is
+ used in EPS debug output and special EPS "short coding". These
+ fields are valid only if "alphacurve" is set. */
+ int alphacurve; /* have the following fields been initialized? */
dpoint_t *vertex; /* for POTRACE_CORNER, this equals c[1] */
double *alpha; /* only for POTRACE_CURVETO */
double *alpha0; /* "uncropped" alpha parameter - for debug output only */
diff -Naur potrace-1.7/src/decompose.c potrace-1.7x/src/decompose.c
--- potrace-1.7/src/decompose.c 2005-03-06 02:35:51.000000000 -0400
+++ potrace-1.7x/src/decompose.c 2005-11-11 20:35:42.000000000 -0400
@@ -194,6 +194,7 @@
/* add point to path */
if (len>=size) {
size+=100;
+ size*=1.3;
pt1 = (point_t *)realloc(pt, size * sizeof(point_t));
if (!pt1) {
goto error;
diff -Naur potrace-1.7/src/main.c potrace-1.7x/src/main.c
--- potrace-1.7/src/main.c 2005-02-22 17:31:23.000000000 -0400
+++ potrace-1.7x/src/main.c 2005-11-11 22:30:31.000000000 -0400
@@ -1024,7 +1024,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdin;
}
- return fopen(filename, "r");
+ return fopen(filename, "rb");
}
/* open a file for writing. Return stdout if filename is NULL or "-" */
@@ -1032,7 +1032,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdout;
}
- return fopen(filename, "w");
+ return fopen(filename, "wb");
}
/* close a file, but do nothing is filename is NULL or "-" */
@@ -1172,6 +1172,10 @@
int i;
char *outfile;
+ /* platform-specific initializations, e.g., set file i/o to binary */
+ platform_init();
+
+ /* process options */
dopts(ac, av);
b = info.backend;
diff -Naur potrace-1.7/src/mkbitmap.c potrace-1.7x/src/mkbitmap.c
--- potrace-1.7/src/mkbitmap.c 2005-02-20 18:55:33.000000000 -0400
+++ potrace-1.7x/src/mkbitmap.c 2005-11-11 21:12:48.000000000 -0400
@@ -583,7 +583,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdin;
}
- return fopen(filename, "r");
+ return fopen(filename, "rb");
}
/* open a file for writing. Return stdout if filename is NULL or "-" */
@@ -591,7 +591,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdout;
}
- return fopen(filename, "w");
+ return fopen(filename, "wb");
}
/* close a file, but do nothing is filename is NULL or "-" */
@@ -639,6 +639,9 @@
int i;
char *outfile;
+ /* platform-specific initializations, e.g., set file i/o to binary */
+ platform_init();
+
/* process options */
dopts(ac, av);
diff -Naur potrace-1.7/src/platform.h potrace-1.7x/src/platform.h
--- potrace-1.7/src/platform.h 2005-02-20 18:55:33.000000000 -0400
+++ potrace-1.7x/src/platform.h 2005-11-11 22:07:13.000000000 -0400
@@ -13,4 +13,17 @@
unsigned int _CRT_fmode = _O_BINARY;
#endif
+#ifdef __CYGWIN__
+#include <fcntl.h>
+#include <io.h>
+static inline void platform_init(void) {
+ setmode(0,O_BINARY);
+ setmode(1,O_BINARY);
+}
+#else
+static inline void platform_init(void) {
+ /* NOP */
+}
+#endif
+
#endif /* PLATFORM_H */
diff -Naur potrace-1.7/src/potracelib.c potrace-1.7x/src/potracelib.c
--- potrace-1.7/src/potracelib.c 2005-02-26 21:47:04.000000000 -0400
+++ potrace-1.7x/src/potracelib.c 2005-11-11 20:35:42.000000000 -0400
@@ -64,7 +64,7 @@
prog.d_prev = param->progress.min;
/* allocate state object */
- st = (potrace_state_t *)malloc(sizeof(potrace_state_t *));
+ st = (potrace_state_t *)malloc(sizeof(potrace_state_t));
if (!st) {
return NULL;
}
@@ -80,6 +80,7 @@
st->status = POTRACE_STATUS_OK;
st->plist = plist;
+ st->priv = NULL; /* private state currently unused */
progress_subrange_end(&prog, &subprog);
diff -Naur potrace-1.7/src/potracelib_demo.c potrace-1.7x/src/potracelib_demo.c
--- potrace-1.7/src/potracelib_demo.c 2005-02-21 13:28:12.000000000 -0400
+++ potrace-1.7x/src/potracelib_demo.c 2005-11-11 20:35:42.000000000 -0400
@@ -51,6 +51,14 @@
return bm;
}
+/* free a bitmap */
+static void bm_free(potrace_bitmap_t *bm) {
+ if (bm != NULL) {
+ free(bm->map);
+ }
+ free(bm);
+}
+
/* ---------------------------------------------------------------------- */
/* demo */
@@ -91,6 +99,7 @@
fprintf(stderr, "Error tracing bitmap: %s\n", strerror(errno));
return 1;
}
+ bm_free(bm);
/* output vector data, e.g. as a rudimentary EPS file */
printf("%%!PS-Adobe-3.0 EPSF-3.0\n");
@@ -128,9 +137,8 @@
printf("grestore\n");
printf("%%EOF\n");
+ potrace_state_free(st);
+ potrace_param_free(param);
+
return 0;
}
-
-
-
-
diff -Naurw potrace-1.7/src/trace.c potrace-1.7x/src/trace.c
--- potrace-1.7/src/trace.c 2005-02-26 21:54:08.000000000 -0400
+++ potrace-1.7x/src/trace.c 2005-05-06 20:54:42.000000000 -0300
@@ -891,6 +891,7 @@
curve->alpha[j] = alpha; /* store the "cropped" value of alpha */
curve->beta[j] = 0.5;
}
+ curve->alphacurve = 1;
return 0;
}
@@ -1165,6 +1166,7 @@
i1 = mod(i+1,om);
pp->ocurve.beta[i] = s[i] / (s[i] + t[i1]);
}
+ pp->ocurve.alphacurve = 1;
free(pt);
free(pen);

3
potrace-1.7.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ef6bcf1500f0084c46d9f91820c38e1e2aa3f1699c0671c7956c78513b8a53b
size 348500

59
potrace.changes Normal file
View File

@ -0,0 +1,59 @@
-------------------------------------------------------------------
Wed Nov 15 15:27:29 CET 2006 - jw@suse.de
- replaced wrong_allocation.patch by official
io.patch -- more bugs fixed.
-------------------------------------------------------------------
Wed Jul 19 11:19:25 CEST 2006 - pnemec@suse.cz
- fixed wrong memory allocation in potracelib.c
(added potrace-wrong_allocation.patch)
-------------------------------------------------------------------
Wed Jan 25 21:40:32 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Mar 9 14:20:18 CET 2005 - nadvornik@suse.cz
- Updated to version 1.7:
* A bug in the progress bar code, which caused arithmetic
exceptions on some 64-bit architectures, has been fixed.
-------------------------------------------------------------------
Mon Feb 28 12:26:42 CET 2005 - sbrabec@suse.cz
- Updated to version 1.6.
-------------------------------------------------------------------
Thu Jan 06 15:58:58 CET 2005 - sbrabec@suse.cz
- Provide bitmap_tracing virtual.
-------------------------------------------------------------------
Fri Aug 27 14:32:28 CEST 2004 - sbrabec@suse.cz
- Updated to version 1.5 (with LZW support).
-------------------------------------------------------------------
Mon Mar 08 11:41:28 CET 2004 - sbrabec@suse.cz
- Updated to version 1.4.
-------------------------------------------------------------------
Thu Feb 05 14:13:02 CET 2004 - sbrabec@suse.cz
- Added speed optimization patch from author.
-------------------------------------------------------------------
Thu Jan 15 12:16:52 CET 2004 - sbrabec@suse.cz
- Updated to version 1.3.
-------------------------------------------------------------------
Wed Aug 13 11:19:30 CEST 2003 - sbrabec@suse.cz
- Initial version 1.0.

91
potrace.spec Normal file
View File

@ -0,0 +1,91 @@
#
# spec file for package potrace (Version 1.7)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: potrace
Summary: Utility for Tracing a Bitmap to Scalable Outline Image
Version: 1.7
Release: 32
License: GNU General Public License (GPL)
Group: Productivity/Graphics/Convertors
Autoreqprov: on
Provides: bitmap_tracing
URL: http://potrace.sourceforge.net/
Source: %{name}-%{version}.tar.bz2
Patch: %{name}-%{version}-io.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Potrace is a utility for tracing a bitmap, which means, transforming a
bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM,
PPM, or BMP), and the default output is one of several vector file
formats. A typical use is to create EPS files from scanned data, such
as company or university logos, handwritten notes, etc. The resulting
image is not "jaggy" like a bitmap, but smooth. It can then be rendered
at any resolution.
Authors:
--------
Peter Selinger <selinger@users.sourceforge.net>
%prep
%setup
%patch -p1
%build
%{?suse_update_config:%{suse_update_config -f}}
CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir}
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -fr $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_prefix}/bin/*
%{_mandir}/man?/*.*
%changelog -n potrace
* Wed Nov 15 2006 - jw@suse.de
- replaced wrong_allocation.patch by official
io.patch -- more bugs fixed.
* Wed Jul 19 2006 - pnemec@suse.cz
- fixed wrong memory allocation in potracelib.c
(added potrace-wrong_allocation.patch)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Mar 09 2005 - nadvornik@suse.cz
- Updated to version 1.7:
* A bug in the progress bar code, which caused arithmetic
exceptions on some 64-bit architectures, has been fixed.
* Mon Feb 28 2005 - sbrabec@suse.cz
- Updated to version 1.6.
* Thu Jan 06 2005 - sbrabec@suse.cz
- Provide bitmap_tracing virtual.
* Fri Aug 27 2004 - sbrabec@suse.cz
- Updated to version 1.5 (with LZW support).
* Mon Mar 08 2004 - sbrabec@suse.cz
- Updated to version 1.4.
* Thu Feb 05 2004 - sbrabec@suse.cz
- Added speed optimization patch from author.
* Thu Jan 15 2004 - sbrabec@suse.cz
- Updated to version 1.3.
* Wed Aug 13 2003 - sbrabec@suse.cz
- Initial version 1.0.

0
ready Normal file
View File