[Bf-blender-cvs] [5323355d631] greasepencil-object: Include Potrace lib as new extern

Antonio Vazquez noreply at git.blender.org
Thu Apr 9 18:56:32 CEST 2020


Commit: 5323355d631b9f2575a09843db0de0a42075983d
Author: Antonio Vazquez
Date:   Tue Apr 7 19:06:57 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB5323355d631b9f2575a09843db0de0a42075983d

Include Potrace lib as new extern

Thanks to @lazydodo for his help.

===================================================================

M	extern/CMakeLists.txt
A	extern/potrace/AUTHORS
A	extern/potrace/CMakeLists.txt
A	extern/potrace/COPYING
A	extern/potrace/ChangeLog
A	extern/potrace/INSTALL
A	extern/potrace/Makefile.am
A	extern/potrace/Makefile.in
A	extern/potrace/NEWS
A	extern/potrace/README
A	extern/potrace/README-WIN
A	extern/potrace/aclocal.m4
A	extern/potrace/check/Makefile.am
A	extern/potrace/check/Makefile.in
A	extern/potrace/check/backend-check.sh
A	extern/potrace/check/binary-check.sh
A	extern/potrace/check/checkbin.c
A	extern/potrace/check/data/data1-out.pgm
A	extern/potrace/check/data/data1.bmp1
A	extern/potrace/check/data/data1.bmp24
A	extern/potrace/check/data/data1.bmp24td
A	extern/potrace/check/data/data1.bmp24v5
A	extern/potrace/check/data/data1.bmp32
A	extern/potrace/check/data/data1.bmp32bf
A	extern/potrace/check/data/data1.bmp4
A	extern/potrace/check/data/data1.bmp4r
A	extern/potrace/check/data/data1.bmp8
A	extern/potrace/check/data/data1.bmp8r
A	extern/potrace/check/data/data1.pbm
A	extern/potrace/check/data/data1.pbm.gs
A	extern/potrace/check/data/data1.pbm.plain
A	extern/potrace/check/data/data1.pbm.rot
A	extern/potrace/check/data/data1.pgm
A	extern/potrace/check/data/data1.pgm.inv
A	extern/potrace/check/data/data1.pgm.plain
A	extern/potrace/check/data/data1.pgm.rot
A	extern/potrace/check/data/data1.ppm
A	extern/potrace/check/data/data1.ppm.plain
A	extern/potrace/check/data/data2-out1.pbm
A	extern/potrace/check/data/data2-out2.pbm
A	extern/potrace/check/data/data2.bmp32bf
A	extern/potrace/check/data/data2.ppm
A	extern/potrace/check/data/data3.pgm
A	extern/potrace/check/input-check.sh
A	extern/potrace/check/missing.sh
A	extern/potrace/check/mkbitmap-check.sh
A	extern/potrace/check/mkbitmap-input-check.sh
A	extern/potrace/check/pdf-check.sh
A	extern/potrace/check/pgmdiff.c
A	extern/potrace/check/postscript-check.sh
A	extern/potrace/check/potrace-check.sh
A	extern/potrace/compile
A	extern/potrace/config.guess
A	extern/potrace/config.h.in
A	extern/potrace/config.sub
A	extern/potrace/configure
A	extern/potrace/configure.ac
A	extern/potrace/depcomp
A	extern/potrace/doc/Makefile.am
A	extern/potrace/doc/Makefile.in
A	extern/potrace/doc/dictionary.txt
A	extern/potrace/doc/mkbitmap.1.in
A	extern/potrace/doc/placement.pdf
A	extern/potrace/doc/potrace.1.in
A	extern/potrace/doc/potracelib-fig1a.eps
A	extern/potrace/doc/potracelib-fig1b.eps
A	extern/potrace/doc/potracelib-fig2.eps
A	extern/potrace/doc/potracelib-fig3.eps
A	extern/potrace/doc/potracelib-fig4a.eps
A	extern/potrace/doc/potracelib-fig4b.eps
A	extern/potrace/doc/potracelib-fig5.eps
A	extern/potrace/doc/potracelib-fig6a.eps
A	extern/potrace/doc/potracelib-fig6b.eps
A	extern/potrace/doc/potracelib-fig7-00.eps
A	extern/potrace/doc/potracelib-fig7-06.eps
A	extern/potrace/doc/potracelib-fig7-10.eps
A	extern/potrace/doc/potracelib-fig7-12.eps
A	extern/potrace/doc/potracelib-fig7-13.eps
A	extern/potrace/doc/potracelib-fig8.eps
A	extern/potrace/doc/potracelib.tex
A	extern/potrace/install-sh
A	extern/potrace/ltmain.sh
A	extern/potrace/m4/libtool.m4
A	extern/potrace/m4/ltoptions.m4
A	extern/potrace/m4/ltsugar.m4
A	extern/potrace/m4/ltversion.m4
A	extern/potrace/m4/lt~obsolete.m4
A	extern/potrace/missing
A	extern/potrace/mkinstalldirs
A	extern/potrace/src/Makefile.am
A	extern/potrace/src/Makefile.in
A	extern/potrace/src/auxiliary.h
A	extern/potrace/src/backend_dxf.c
A	extern/potrace/src/backend_dxf.h
A	extern/potrace/src/backend_eps.c
A	extern/potrace/src/backend_eps.h
A	extern/potrace/src/backend_geojson.c
A	extern/potrace/src/backend_geojson.h
A	extern/potrace/src/backend_pdf.c
A	extern/potrace/src/backend_pdf.h
A	extern/potrace/src/backend_pgm.c
A	extern/potrace/src/backend_pgm.h
A	extern/potrace/src/backend_svg.c
A	extern/potrace/src/backend_svg.h
A	extern/potrace/src/backend_xfig.c
A	extern/potrace/src/backend_xfig.h
A	extern/potrace/src/bbox.c
A	extern/potrace/src/bbox.h
A	extern/potrace/src/bitmap.h
A	extern/potrace/src/bitmap_io.c
A	extern/potrace/src/bitmap_io.h
A	extern/potrace/src/bitops.h
A	extern/potrace/src/curve.c
A	extern/potrace/src/curve.h
A	extern/potrace/src/decompose.c
A	extern/potrace/src/decompose.h
A	extern/potrace/src/flate.c
A	extern/potrace/src/flate.h
A	extern/potrace/src/getopt.c
A	extern/potrace/src/getopt1.c
A	extern/potrace/src/greymap.c
A	extern/potrace/src/greymap.h
A	extern/potrace/src/include/getopt/getopt.h
A	extern/potrace/src/libpotrace-export.sym
A	extern/potrace/src/lists.h
A	extern/potrace/src/lzw.c
A	extern/potrace/src/lzw.h
A	extern/potrace/src/main.c
A	extern/potrace/src/main.h
A	extern/potrace/src/mkbitmap.c
A	extern/potrace/src/platform.h
A	extern/potrace/src/potracelib.c
A	extern/potrace/src/potracelib.h
A	extern/potrace/src/potracelib_demo.c
A	extern/potrace/src/progress.h
A	extern/potrace/src/progress_bar.c
A	extern/potrace/src/progress_bar.h
A	extern/potrace/src/render.c
A	extern/potrace/src/render.h
A	extern/potrace/src/trace.c
A	extern/potrace/src/trace.h
A	extern/potrace/src/trans.c
A	extern/potrace/src/trans.h
A	extern/potrace/test-driver
M	source/blender/editors/gpencil/CMakeLists.txt

===================================================================

diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index e79aba0e988..b1aebf1f36d 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -109,3 +109,5 @@ endif()
 if(WITH_MOD_FLUID)
   add_subdirectory(mantaflow)
 endif()
+
+add_subdirectory(potrace)
diff --git a/extern/potrace/AUTHORS b/extern/potrace/AUTHORS
new file mode 100644
index 00000000000..f6b22007218
--- /dev/null
+++ b/extern/potrace/AUTHORS
@@ -0,0 +1,11 @@
+Known contributors are listed here, in alphabetical order by their
+abbreviations (which are used in Changelog).
+
+Main author:
+
+ PS1 Peter Selinger <selinger at users.sourceforge.net>
+
+Contributors:
+
+ CH1 Christoph Hormann <chris_hormann at gmx.de> (GeoJSON backend)
+ TA1 Tor Andersson <tor at ghostscript.com> (PDF backend)
diff --git a/extern/potrace/CMakeLists.txt b/extern/potrace/CMakeLists.txt
new file mode 100644
index 00000000000..79b96678dfd
--- /dev/null
+++ b/extern/potrace/CMakeLists.txt
@@ -0,0 +1,70 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# 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
+# 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.
+#
+# The Original Code is Copyright (C) 2020, Blender Foundation
+# All rights reserved.
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+  src
+  src/include
+)
+
+set(INC_SYS
+
+)
+
+set(SRC
+  src/backend_dxf.c
+  src/backend_eps.c
+  src/backend_geojson.c
+  src/backend_pdf.c
+  src/backend_pgm.c
+  src/backend_svg.c
+  src/backend_xfig.c
+  src/bbox.c
+  src/bitmap_io.c
+  src/curve.c
+  src/decompose.c
+  src/flate.c
+  #src/getopt.c
+  #src/getopt1.c
+  src/greymap.c
+  src/lzw.c
+  #src/mkbitmap.c
+  src/potracelib.c
+  src/progress_bar.c
+  src/render.c
+  src/trace.c
+  src/trans.c
+)
+set(LIB
+)
+
+if(WIN32)
+  add_definitions(/D_USE_MATH_DEFINES)
+endif()
+
+# normally given by configure.sh
+add_definitions(/DPOTRACE="POTrace")
+add_definitions(/DVERSION="Blender")
+add_definitions(/DHAVE_INTTYPES_H)
+
+blender_add_lib(extern_potrace "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+
+#demo for testing the library, can be removed 
+#add_executable(potrace src/potracelib_demo.c)
+#target_link_libraries(potrace extern_potrace)
diff --git a/extern/potrace/COPYING b/extern/potrace/COPYING
new file mode 100644
index 00000000000..4c1337ff7df
--- /dev/null
+++ b/extern/potrace/COPYING
@@ -0,0 +1,341 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.  
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+

+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+

+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the follo

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list