From 6c04efe38570a09d2a0ffd3e5d8ea9117a7f3033 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 31 Jul 2019 07:22:46 -0700 Subject: [PATCH] bump-up to libspiro 1.0 (#20) * Fix C:R:A bug. Add version Major.Minor function. Time to update library. Fixed CRA bug similar to libuninameslist brought up by @lemzwerg issue7 In summary: Libraries have a libtool version of the form current:revision:age. Libraries have a package version of the form major.minor.micro. Simplify package name to just the date code. Added note about ldconfig in Readme files. Added libuninameslist ${AC_LOCAL} braces fix pointed-out by Phil Krylov add latest config.guess config.sub --- AUTHORS | 3 +- ChangeLog | 19 ++++ Makefile.am | 2 +- README | 10 ++ README.md | 11 ++ config.guess | 264 +++++++++++++++++++++++++++++++++++---------- config.sub | 50 ++++----- configure.ac | 51 +++++++-- spiro.c | 6 ++ spiro.h | 5 +- spiroentrypoints.h | 1 + 11 files changed, 329 insertions(+), 93 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1d6a4a8..8bfabcb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,7 +5,7 @@ Joe Da Silva, www.joescat.com Patent Grant and Copyright (C) 2007 Raph Levien -Extra edits, patches, updates... (2013,2014,2015...) +Extra edits, patches, updates... (2013...,2019) Dave Crossland Shriramana Sharma Joe Da Silva @@ -13,3 +13,4 @@ Horváth Balázs Luigi Scarso Jeremy Tan Wiesław Šoltés +Mingye Wang diff --git a/ChangeLog b/ChangeLog index e99367d..1f8d3e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +- 2019-Jul-31 + * Libspiro Version 20190731 + * Corrected library to report correctly as next version up. This is + probably a significant change, therefore bumped library to start + at 1.0 even though backwards compatibility remains close to same. + * Scaling bug fixed. Libspiro can accept points that can be shifted + and/or scaled, this gives libspiro more flexiblity with graphics + and templates. Large or small spiros created before this fix may + need adjusting to fit the new calculations, but they're resizable + and movable afterwards. + * Added toggle switch ncq giving users additional functionality not + easily accessible through spiro paths, including quad0 access. + * Removed the excessively long package name, which you'll note as a + so-bump change with Fedora and also Debian in naming this package. + * Some Java alignment fixed - Thanks to Mingye Wang + * Added new anchor and handle {'a','h'} which may be useful to many. + * Fix System.arraycopy and README.md - Thanks to Wieslaw Soltes. + * Include config header before DO_TIME_DAY - Thanks to Jeremy Tan. + - 2015-Jul-19 * Add patch for failure in hurd-i386 build (debian 1%0.5.20150702-2) diff --git a/Makefile.am b/Makefile.am index e84d869..da16580 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ test_programs = call-test0 call-test1 call-test2 call-test3 call-test4 \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libspiro.pc -ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_FLAGS) +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_CFLAGS = $(WCFLAGS) $(LS_CFLAGS) AM_LDFLAGS = $(WLSLIB) $(LS_LIB) -no-undefined --mode=link diff --git a/README b/README index a0f3034..ec33b99 100644 --- a/README +++ b/README @@ -56,3 +56,13 @@ Installing on Windows 64-bit > make clean > make > make install + +NOTE: Some Distros and Operating Systems may require you to run 'ldconfig' +to recognize LibSpiro if you are not rebooting your computer first before +installing another program that depends on LibSpiro. To do this, you may +need to run 'ldconfig' in 'su -' mode after you have done 'make install': + + $ su - + # ldconfig + # exit + $ diff --git a/README.md b/README.md index 3456e51..74df8b1 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,17 @@ make make install ``` +NOTE: Some Distros and Operating Systems may require you to run 'ldconfig' +to recognize LibSpiro if you are not rebooting your computer first before +installing another program that depends on LibSpiro. To do this, you may +need to run 'ldconfig' in 'su -' mode after you have done 'make install': +```sh + $ su - + # ldconfig + # exit + $ +``` + ## Usage ### In FontForge diff --git a/config.guess b/config.guess index 8e2a58b..97ad073 100644 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-01-03' +timestamp='2019-07-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -262,6 +262,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; @@ -275,8 +278,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -385,20 +388,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - set_cc_for_build - SUN_ARCH=sparc - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __sparcv9'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=sparcv9 - fi - fi - echo "$SUN_ARCH"-sun-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" @@ -998,22 +988,50 @@ EOF exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1126,7 +1144,7 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -1310,38 +1328,39 @@ EOF echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; @@ -1446,6 +1465,143 @@ EOF exit ;; esac +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in diff --git a/config.sub b/config.sub index 75bb6a3..a318a46 100644 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-01-01' +timestamp='2019-06-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -337,17 +337,14 @@ case $1 in basic_machine=m88k-harris os=sysv3 ;; - hp300) + hp300 | hp300hpux) basic_machine=m68k-hp + os=hpux ;; hp300bsd) basic_machine=m68k-hp os=bsd ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux - ;; hppaosf) basic_machine=hppa1.1-hp os=osf @@ -360,10 +357,6 @@ case $1 in basic_machine=i386-mach os=mach ;; - vsta) - basic_machine=i386-pc - os=vsta - ;; isi68 | isi) basic_machine=m68k-isi os=sysv @@ -612,6 +605,10 @@ case $1 in basic_machine=vax-dec os=vms ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; vxworks960) basic_machine=i960-wrs os=vxworks @@ -822,7 +819,9 @@ case $basic_machine in cpu=m68k vendor=next case $os in - nextstep* ) + openstep*) + ;; + nextstep*) ;; ns2*) os=nextstep2 @@ -919,7 +918,7 @@ case $basic_machine in ;; *-*) - # shellcheck disable=SC2162 + # shellcheck disable=SC2162 IFS="-" read cpu vendor <