├── ArchLinux ├── Makefile ├── bwidget │ └── PKGBUILD ├── linux-raspberrypi-rt │ ├── 60-linux.hook │ ├── 90-linux.hook │ ├── PKGBUILD │ ├── cmdline.txt │ ├── config │ ├── config.txt │ ├── linux-raspberrypi.install │ └── linux.preset ├── mklatencyplot │ ├── latency_4.19.71-1-rt24-ARCH.png │ └── mklatencyplot.bash ├── python2-pyqt5 │ └── PKGBUILD ├── python2-scipy │ ├── python2-scipy-1.2.3-1-armv7h.pkg.tar.xz │ └── python2-scipy-1.2.3-1-armv7h.pkg.tar.xz.sig ├── python2-vtk │ └── PKGBUILD ├── rt-tests │ └── PKGBUILD ├── stamp-h1 ├── stamp-h2 ├── tcllib │ └── PKGBUILD ├── tclx │ ├── PKGBUILD │ ├── interperrorline.patch │ └── pre-commit ├── tif_config.h ├── tiffconf.h ├── tkimg │ └── PKGBUILD └── yapps-source │ └── usr │ ├── bin │ └── yapps │ └── lib │ └── pthon2.7 │ └── site-packages │ └── yapps │ ├── __init__.py │ ├── __init__.pyc │ ├── grammar.py │ ├── grammar.pyc │ ├── parsetree.py │ ├── parsetree.pyc │ ├── runtime.py │ └── runtime.pyc ├── Pi OS └── vtk_7.1.1-qt5py2-1_armhf.deb ├── PyQt5 └── libpyqt5.so ├── README.md ├── docs ├── 1 LinuxCNC Install.md ├── 2 Enable UART.md ├── 3 Faster compiling on RPi.md ├── 4. VTK for QtPyVCP.md ├── _config.yml ├── about.md ├── images │ ├── RaspberryPi.jpg │ ├── header-brand.png │ ├── jekyll.png │ ├── linuxcnc-wizard.gif │ ├── liquid-icon.png │ ├── liquid.png │ ├── markdown.png │ ├── octocat.jpg │ ├── octojekyll.png │ ├── ruby.png │ ├── sass-icon.png │ ├── sass.png │ ├── yaml-icon.png │ └── yaml.png └── index.md ├── kernels └── kernel_4_19_71-rt24-v7 │ └── rt-kernel.tgz └── libtirpc.patch /ArchLinux/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.12.4 from Makefile.am. 2 | # libtiff/Makefile. Generated from Makefile.in by configure. 3 | 4 | # Copyright (C) 1994-2012 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | 16 | 17 | # Tag Image File Format (TIFF) Software 18 | # 19 | # Copyright (C) 2004, Andrey Kiselev 20 | # 21 | # Permission to use, copy, modify, distribute, and sell this software and 22 | # its documentation for any purpose is hereby granted without fee, provided 23 | # that (i) the above copyright notices and this permission notice appear in 24 | # all copies of the software and related documentation, and (ii) the names of 25 | # Sam Leffler and Silicon Graphics may not be used in any advertising or 26 | # publicity relating to the software without the specific, prior written 27 | # permission of Sam Leffler and Silicon Graphics. 28 | # 29 | # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 30 | # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 31 | # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 32 | # 33 | # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 34 | # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 35 | # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 36 | # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 37 | # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 38 | # OF THIS SOFTWARE. 39 | 40 | # Process this file with automake to produce Makefile.in. 41 | 42 | 43 | 44 | VPATH = .././../compat/libtiff/libtiff 45 | am__make_dryrun = \ 46 | { \ 47 | am__dry=no; \ 48 | case $$MAKEFLAGS in \ 49 | *\\[\ \ ]*) \ 50 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ 51 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ 52 | *) \ 53 | for am__flg in $$MAKEFLAGS; do \ 54 | case $$am__flg in \ 55 | *=*|--*) ;; \ 56 | *n*) am__dry=yes; break;; \ 57 | esac; \ 58 | done;; \ 59 | esac; \ 60 | test $$am__dry = yes; \ 61 | } 62 | pkgdatadir = $(datadir)/tiff 63 | pkgincludedir = $(includedir)/tiff 64 | pkglibdir = $(libdir)/tiff 65 | pkglibexecdir = $(libexecdir)/tiff 66 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 67 | install_sh_DATA = $(install_sh) -c -m 644 68 | install_sh_PROGRAM = $(install_sh) -c 69 | install_sh_SCRIPT = $(install_sh) -c 70 | INSTALL_HEADER = $(INSTALL_DATA) 71 | transform = $(program_transform_name) 72 | NORMAL_INSTALL = : 73 | PRE_INSTALL = : 74 | POST_INSTALL = : 75 | NORMAL_UNINSTALL = : 76 | PRE_UNINSTALL = : 77 | POST_UNINSTALL = : 78 | build_triplet = armv7l-unknown-linux-gnu 79 | host_triplet = armv7l-unknown-linux-gnu 80 | am__append_1 = tiffio.hxx 81 | am__append_2 = libtiffxx.la 82 | #am__append_3 = $(LIBDIR) 83 | #am__append_4 = -Wl,--version-script=$(srcdir)/libtiff.map 84 | #am__append_5 = $(LIBDIR) 85 | #am__append_6 = -Wl,--version-script=$(srcdir)/libtiffxx.map 86 | noinst_PROGRAMS = mkg3states$(EXEEXT) 87 | subdir = libtiff 88 | DIST_COMMON = $(am__libtiffinclude_HEADERS_DIST) $(noinst_HEADERS) \ 89 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ 90 | $(srcdir)/tif_config.h.in $(srcdir)/tiffconf.h.in \ 91 | $(top_srcdir)/config/depcomp \ 92 | $(top_srcdir)/config/mkinstalldirs 93 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 94 | am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ 95 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ 96 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ 97 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac 98 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 99 | $(ACLOCAL_M4) 100 | mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs 101 | CONFIG_HEADER = tif_config.h tiffconf.h 102 | CONFIG_CLEAN_FILES = 103 | CONFIG_CLEAN_VPATH_FILES = 104 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 105 | am__vpath_adj = case $$p in \ 106 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 107 | *) f=$$p;; \ 108 | esac; 109 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 110 | am__install_max = 40 111 | am__nobase_strip_setup = \ 112 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 113 | am__nobase_strip = \ 114 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 115 | am__nobase_list = $(am__nobase_strip_setup); \ 116 | for p in $$list; do echo "$$p $$p"; done | \ 117 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 118 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 119 | if (++n[$$2] == $(am__install_max)) \ 120 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 121 | END { for (dir in files) print dir, files[dir] }' 122 | am__base_list = \ 123 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 124 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 125 | am__uninstall_files_from_dir = { \ 126 | test -z "$$files" \ 127 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 128 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 129 | $(am__cd) "$$dir" && rm -f $$files; }; \ 130 | } 131 | am__installdirs = "$(DESTDIR)$(libdir)" \ 132 | "$(DESTDIR)$(libtiffincludedir)" \ 133 | "$(DESTDIR)$(libtiffincludedir)" 134 | LTLIBRARIES = $(lib_LTLIBRARIES) 135 | libtiff_la_DEPENDENCIES = $(LIBPORT) 136 | am_libtiff_la_OBJECTS = tif_aux.lo tif_close.lo tif_codec.lo \ 137 | tif_color.lo tif_compress.lo tif_dir.lo tif_dirinfo.lo \ 138 | tif_dirread.lo tif_dirwrite.lo tif_dumpmode.lo tif_error.lo \ 139 | tif_extension.lo tif_fax3.lo tif_fax3sm.lo tif_flush.lo \ 140 | tif_getimage.lo tif_jbig.lo tif_jpeg.lo tif_luv.lo tif_lzw.lo \ 141 | tif_next.lo tif_ojpeg.lo tif_open.lo tif_packbits.lo \ 142 | tif_pixarlog.lo tif_predict.lo tif_print.lo tif_read.lo \ 143 | tif_strip.lo tif_swab.lo tif_thunder.lo tif_tile.lo \ 144 | tif_unix.lo tif_version.lo tif_warning.lo tif_write.lo \ 145 | tif_zip.lo 146 | libtiff_la_OBJECTS = $(am_libtiff_la_OBJECTS) 147 | AM_V_lt = $(am__v_lt_$(V)) 148 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) 149 | am__v_lt_0 = --silent 150 | am__v_lt_1 = 151 | libtiff_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 152 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 153 | $(libtiff_la_LDFLAGS) $(LDFLAGS) -o $@ 154 | am_libtiffxx_la_OBJECTS = tif_stream.lo 155 | libtiffxx_la_OBJECTS = $(am_libtiffxx_la_OBJECTS) 156 | libtiffxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 157 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 158 | $(CXXFLAGS) $(libtiffxx_la_LDFLAGS) $(LDFLAGS) -o $@ 159 | am_libtiffxx_la_rpath = -rpath $(libdir) 160 | PROGRAMS = $(noinst_PROGRAMS) 161 | am_mkg3states_OBJECTS = mkg3states.$(OBJEXT) 162 | mkg3states_OBJECTS = $(am_mkg3states_OBJECTS) 163 | mkg3states_DEPENDENCIES = $(LIBPORT) 164 | AM_V_P = $(am__v_P_$(V)) 165 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) 166 | am__v_P_0 = false 167 | am__v_P_1 = : 168 | AM_V_GEN = $(am__v_GEN_$(V)) 169 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) 170 | am__v_GEN_0 = @echo " GEN " $@; 171 | am__v_GEN_1 = 172 | AM_V_at = $(am__v_at_$(V)) 173 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) 174 | am__v_at_0 = @ 175 | am__v_at_1 = 176 | DEFAULT_INCLUDES = -I. -I$(srcdir) 177 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp 178 | am__depfiles_maybe = depfiles 179 | am__mv = mv -f 180 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 181 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 182 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 183 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 184 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 185 | $(AM_CFLAGS) $(CFLAGS) 186 | AM_V_CC = $(am__v_CC_$(V)) 187 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) 188 | am__v_CC_0 = @echo " CC " $@; 189 | am__v_CC_1 = 190 | CCLD = $(CC) 191 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 192 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 193 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ 194 | AM_V_CCLD = $(am__v_CCLD_$(V)) 195 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) 196 | am__v_CCLD_0 = @echo " CCLD " $@; 197 | am__v_CCLD_1 = 198 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 199 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 200 | LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 201 | $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ 202 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 203 | $(AM_CXXFLAGS) $(CXXFLAGS) 204 | AM_V_CXX = $(am__v_CXX_$(V)) 205 | am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) 206 | am__v_CXX_0 = @echo " CXX " $@; 207 | am__v_CXX_1 = 208 | CXXLD = $(CXX) 209 | CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 210 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 211 | $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 212 | AM_V_CXXLD = $(am__v_CXXLD_$(V)) 213 | am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) 214 | am__v_CXXLD_0 = @echo " CXXLD " $@; 215 | am__v_CXXLD_1 = 216 | SOURCES = $(libtiff_la_SOURCES) $(libtiffxx_la_SOURCES) \ 217 | $(mkg3states_SOURCES) 218 | DIST_SOURCES = $(libtiff_la_SOURCES) $(libtiffxx_la_SOURCES) \ 219 | $(mkg3states_SOURCES) 220 | am__can_run_installinfo = \ 221 | case $$AM_UPDATE_INFO_DIR in \ 222 | n|no|NO) false;; \ 223 | *) (install-info --version) >/dev/null 2>&1;; \ 224 | esac 225 | am__libtiffinclude_HEADERS_DIST = tiff.h tiffio.h tiffvers.h \ 226 | tiffio.hxx 227 | HEADERS = $(libtiffinclude_HEADERS) $(nodist_libtiffinclude_HEADERS) \ 228 | $(noinst_HEADERS) 229 | ETAGS = etags 230 | CTAGS = ctags 231 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 232 | ACLOCAL = ${SHELL} /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/compat/libtiff/config/missing --run aclocal-1.12 233 | AMTAR = $${TAR-tar} 234 | AM_DEFAULT_VERBOSITY = 1 235 | AR = ar 236 | AS = as 237 | AUTOCONF = ${SHELL} /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/compat/libtiff/config/missing --run autoconf 238 | AUTOHEADER = ${SHELL} /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/compat/libtiff/config/missing --run autoheader 239 | AUTOMAKE = ${SHELL} /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/compat/libtiff/config/missing --run automake-1.12 240 | AWK = gawk 241 | CC = gcc 242 | CCDEPMODE = depmode=gcc3 243 | CFLAGS = -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -pipe -Wall -W 244 | CPP = gcc -E 245 | CPPFLAGS = -D_FORTIFY_SOURCE=2 246 | CXX = g++ 247 | CXXCPP = g++ -E 248 | CXXDEPMODE = depmode=gcc3 249 | CXXFLAGS = -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt 250 | CYGPATH_W = echo 251 | DEFS = -DHAVE_CONFIG_H 252 | DEPDIR = .deps 253 | DLLTOOL = false 254 | DSYMUTIL = 255 | DUMPBIN = 256 | ECHO_C = 257 | ECHO_N = -n 258 | ECHO_T = 259 | EGREP = /usr/bin/grep -E 260 | EXEEXT = 261 | FGREP = /usr/bin/grep -F 262 | GLUT_CFLAGS = -pthread 263 | GLUT_LIBS = -lglut -lSM -lICE -lXmu -lXi -lGLU -lGL -lm 264 | GLU_CFLAGS = -pthread 265 | GLU_LIBS = -lGLU -lGL -lm 266 | GL_CFLAGS = -pthread 267 | GL_LIBS = -lGL -lm 268 | GREP = /usr/bin/grep 269 | INSTALL = /usr/bin/install -c 270 | INSTALL_DATA = ${INSTALL} -m 644 271 | INSTALL_PROGRAM = ${INSTALL} 272 | INSTALL_SCRIPT = ${INSTALL} 273 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s 274 | LD = /usr/bin/ld 275 | LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now 276 | LIBDIR = 277 | LIBOBJS = 278 | LIBS = -lm -lc 279 | LIBTIFF_ALPHA_VERSION = 280 | LIBTIFF_DOCDIR = ${prefix}/share/doc/tiff-3.9.7 281 | LIBTIFF_MAJOR_VERSION = 3 282 | LIBTIFF_MICRO_VERSION = 7 283 | LIBTIFF_MINOR_VERSION = 9 284 | LIBTIFF_RELEASE_DATE = 20191204 285 | LIBTIFF_VERSION = 3.9.7 286 | LIBTIFF_VERSION_INFO = 3:9:7 287 | LIBTOOL = $(SHELL) $(top_builddir)/libtool 288 | LIPO = 289 | LN_S = ln -s 290 | LTLIBOBJS = 291 | MAINT = # 292 | MAKEINFO = ${SHELL} /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/compat/libtiff/config/missing --run makeinfo 293 | MANIFEST_TOOL = : 294 | MKDIR_P = /usr/bin/mkdir -p 295 | NM = /usr/bin/nm -B 296 | NMEDIT = 297 | OBJDUMP = objdump 298 | OBJEXT = o 299 | OTOOL = 300 | OTOOL64 = 301 | PACKAGE = tiff 302 | PACKAGE_BUGREPORT = tiff@lists.maptools.org 303 | PACKAGE_NAME = LibTIFF Software 304 | PACKAGE_STRING = LibTIFF Software 3.9.7 305 | PACKAGE_TARNAME = tiff 306 | PACKAGE_URL = 307 | PACKAGE_VERSION = 3.9.7 308 | PATH_SEPARATOR = : 309 | PTHREAD_CC = gcc 310 | PTHREAD_CFLAGS = -pthread 311 | PTHREAD_LIBS = 312 | RANLIB = ranlib 313 | SED = /usr/bin/sed 314 | SET_MAKE = 315 | SHELL = /bin/sh 316 | STRIP = strip 317 | VERSION = 3.9.7 318 | XMKMF = 319 | X_CFLAGS = 320 | X_EXTRA_LIBS = 321 | X_LIBS = 322 | X_PRE_LIBS = -lSM -lICE 323 | abs_builddir = /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/libtiff/libtiff 324 | abs_srcdir = /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/libtiff/./../compat/libtiff/libtiff 325 | abs_top_builddir = /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/libtiff 326 | abs_top_srcdir = /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/libtiff/./../compat/libtiff 327 | ac_ct_AR = ar 328 | ac_ct_CC = gcc 329 | ac_ct_CXX = g++ 330 | ac_ct_DUMPBIN = 331 | acx_pthread_config = 332 | am__include = include 333 | am__leading_dot = . 334 | am__quote = 335 | am__tar = $${TAR-tar} chof - "$$tardir" 336 | am__untar = $${TAR-tar} xf - 337 | bindir = ${exec_prefix}/bin 338 | build = armv7l-unknown-linux-gnu 339 | build_alias = 340 | build_cpu = armv7l 341 | build_os = linux-gnu 342 | build_vendor = unknown 343 | builddir = . 344 | datadir = ${datarootdir} 345 | datarootdir = ${prefix}/share 346 | docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} 347 | dvidir = ${docdir} 348 | exec_prefix = ${prefix} 349 | host = armv7l-unknown-linux-gnu 350 | host_alias = 351 | host_cpu = armv7l 352 | host_os = linux-gnu 353 | host_vendor = unknown 354 | htmldir = ${docdir} 355 | includedir = ${prefix}/include 356 | infodir = ${datarootdir}/info 357 | install_sh = ${SHELL} /home/alarm/development/linuxcnc_deps/tkimg2/src/Img-1.4.9/compat/libtiff/config/install-sh 358 | libdir = ${exec_prefix}/lib 359 | libexecdir = ${exec_prefix}/libexec 360 | localedir = ${datarootdir}/locale 361 | localstatedir = ${prefix}/var 362 | mandir = ${datarootdir}/man 363 | mkdir_p = $(MKDIR_P) 364 | oldincludedir = /usr/include 365 | pdfdir = ${docdir} 366 | prefix = /usr/local 367 | program_transform_name = s,x,x, 368 | psdir = ${docdir} 369 | sbindir = ${exec_prefix}/sbin 370 | sharedstatedir = ${prefix}/com 371 | srcdir = .././../compat/libtiff/libtiff 372 | sysconfdir = ${prefix}/etc 373 | target_alias = 374 | top_build_prefix = ../ 375 | top_builddir = .. 376 | top_srcdir = .././../compat/libtiff 377 | LIBPORT = $(top_builddir)/port/libport.la 378 | LIBTIFF = $(top_builddir)/libtiff/libtiff.la 379 | libtiffincludedir = $(includedir) 380 | EXTRA_DIST = Makefile.vc \ 381 | SConstruct \ 382 | tif_config.h-vms \ 383 | tif_config.vc.h \ 384 | tif_config.wince.h \ 385 | tiffconf.vc.h \ 386 | tiffconf.wince.h \ 387 | libtiff.def \ 388 | libtiff.map \ 389 | libtiffxx.map \ 390 | $(EXTRA_SRCS) 391 | 392 | libtiffinclude_HEADERS = tiff.h tiffio.h tiffvers.h $(am__append_1) 393 | noinst_HEADERS = \ 394 | t4.h \ 395 | tif_dir.h \ 396 | tif_predict.h \ 397 | tiffiop.h \ 398 | uvcode.h 399 | 400 | nodist_libtiffinclude_HEADERS = \ 401 | tiffconf.h 402 | 403 | libtiff_la_SOURCES = \ 404 | tif_aux.c \ 405 | tif_close.c \ 406 | tif_codec.c \ 407 | tif_color.c \ 408 | tif_compress.c \ 409 | tif_dir.c \ 410 | tif_dirinfo.c \ 411 | tif_dirread.c \ 412 | tif_dirwrite.c \ 413 | tif_dumpmode.c \ 414 | tif_error.c \ 415 | tif_extension.c \ 416 | tif_fax3.c \ 417 | tif_fax3sm.c \ 418 | tif_flush.c \ 419 | tif_getimage.c \ 420 | tif_jbig.c \ 421 | tif_jpeg.c \ 422 | tif_luv.c \ 423 | tif_lzw.c \ 424 | tif_next.c \ 425 | tif_ojpeg.c \ 426 | tif_open.c \ 427 | tif_packbits.c \ 428 | tif_pixarlog.c \ 429 | tif_predict.c \ 430 | tif_print.c \ 431 | tif_read.c \ 432 | tif_strip.c \ 433 | tif_swab.c \ 434 | tif_thunder.c \ 435 | tif_tile.c \ 436 | tif_unix.c \ 437 | tif_version.c \ 438 | tif_warning.c \ 439 | tif_write.c \ 440 | tif_zip.c 441 | 442 | libtiffxx_la_SOURCES = \ 443 | tif_stream.cxx 444 | 445 | EXTRA_SRCS = \ 446 | tif_acorn.c \ 447 | tif_apple.c \ 448 | tif_atari.c \ 449 | tif_msdos.c \ 450 | tif_next.c \ 451 | tif_win3.c \ 452 | tif_win32.c 453 | 454 | lib_LTLIBRARIES = libtiff.la $(am__append_2) 455 | libtiff_la_LDFLAGS = -no-undefined -version-number \ 456 | $(LIBTIFF_VERSION_INFO) $(am__append_3) $(am__append_4) 457 | libtiff_la_LIBADD = $(LIBPORT) 458 | libtiffxx_la_LDFLAGS = -no-undefined -version-number \ 459 | $(LIBTIFF_VERSION_INFO) $(am__append_5) $(am__append_6) 460 | libtiffxx_la_LIBADD = $(LIBTIFF) $(LIBPORT) 461 | libtiffxx_la_DEPENDENCIES = libtiff.la 462 | mkg3states_SOURCES = mkg3states.c tif_fax3.h 463 | mkg3states_LDADD = $(LIBPORT) 464 | all: tif_config.h tiffconf.h 465 | $(MAKE) $(AM_MAKEFLAGS) all-am 466 | 467 | .SUFFIXES: 468 | .SUFFIXES: .c .cxx .lo .o .obj 469 | $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) 470 | @for dep in $?; do \ 471 | case '$(am__configure_deps)' in \ 472 | *$$dep*) \ 473 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 474 | && { if test -f $@; then exit 0; else break; fi; }; \ 475 | exit 1;; \ 476 | esac; \ 477 | done; \ 478 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libtiff/Makefile'; \ 479 | $(am__cd) $(top_srcdir) && \ 480 | $(AUTOMAKE) --foreign libtiff/Makefile 481 | .PRECIOUS: Makefile 482 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 483 | @case '$?' in \ 484 | *config.status*) \ 485 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 486 | *) \ 487 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 488 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 489 | esac; 490 | 491 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 492 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 493 | 494 | $(top_srcdir)/configure: # $(am__configure_deps) 495 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 496 | $(ACLOCAL_M4): # $(am__aclocal_m4_deps) 497 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 498 | $(am__aclocal_m4_deps): 499 | 500 | tif_config.h: stamp-h1 501 | @if test ! -f $@; then rm -f stamp-h1; else :; fi 502 | @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi 503 | 504 | stamp-h1: $(srcdir)/tif_config.h.in $(top_builddir)/config.status 505 | @rm -f stamp-h1 506 | cd $(top_builddir) && $(SHELL) ./config.status libtiff/tif_config.h 507 | $(srcdir)/tif_config.h.in: # $(am__configure_deps) 508 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) 509 | rm -f stamp-h1 510 | touch $@ 511 | 512 | tiffconf.h: stamp-h2 513 | @if test ! -f $@; then rm -f stamp-h2; else :; fi 514 | @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi 515 | 516 | stamp-h2: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status 517 | @rm -f stamp-h2 518 | cd $(top_builddir) && $(SHELL) ./config.status libtiff/tiffconf.h 519 | 520 | distclean-hdr: 521 | -rm -f tif_config.h stamp-h1 tiffconf.h stamp-h2 522 | install-libLTLIBRARIES: $(lib_LTLIBRARIES) 523 | @$(NORMAL_INSTALL) 524 | @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ 525 | list2=; for p in $$list; do \ 526 | if test -f $$p; then \ 527 | list2="$$list2 $$p"; \ 528 | else :; fi; \ 529 | done; \ 530 | test -z "$$list2" || { \ 531 | echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ 532 | $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ 533 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ 534 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ 535 | } 536 | 537 | uninstall-libLTLIBRARIES: 538 | @$(NORMAL_UNINSTALL) 539 | @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ 540 | for p in $$list; do \ 541 | $(am__strip_dir) \ 542 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ 543 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ 544 | done 545 | 546 | clean-libLTLIBRARIES: 547 | -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) 548 | @list='$(lib_LTLIBRARIES)'; \ 549 | locs=`for p in $$list; do echo $$p; done | \ 550 | sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ 551 | sort -u`; \ 552 | test -z "$$locs" || { \ 553 | echo rm -f $${locs}; \ 554 | rm -f $${locs}; \ 555 | } 556 | libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES) $(EXTRA_libtiff_la_DEPENDENCIES) 557 | $(AM_V_CCLD)$(libtiff_la_LINK) -rpath $(libdir) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS) 558 | libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES) $(EXTRA_libtiffxx_la_DEPENDENCIES) 559 | $(AM_V_CXXLD)$(libtiffxx_la_LINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS) 560 | 561 | clean-noinstPROGRAMS: 562 | @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ 563 | echo " rm -f" $$list; \ 564 | rm -f $$list || exit $$?; \ 565 | test -n "$(EXEEXT)" || exit 0; \ 566 | list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 567 | echo " rm -f" $$list; \ 568 | rm -f $$list 569 | mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES) $(EXTRA_mkg3states_DEPENDENCIES) 570 | @rm -f mkg3states$(EXEEXT) 571 | $(AM_V_CCLD)$(LINK) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS) 572 | 573 | mostlyclean-compile: 574 | -rm -f *.$(OBJEXT) 575 | 576 | distclean-compile: 577 | -rm -f *.tab.c 578 | 579 | include ./$(DEPDIR)/mkg3states.Po 580 | include ./$(DEPDIR)/tif_aux.Plo 581 | include ./$(DEPDIR)/tif_close.Plo 582 | include ./$(DEPDIR)/tif_codec.Plo 583 | include ./$(DEPDIR)/tif_color.Plo 584 | include ./$(DEPDIR)/tif_compress.Plo 585 | include ./$(DEPDIR)/tif_dir.Plo 586 | include ./$(DEPDIR)/tif_dirinfo.Plo 587 | include ./$(DEPDIR)/tif_dirread.Plo 588 | include ./$(DEPDIR)/tif_dirwrite.Plo 589 | include ./$(DEPDIR)/tif_dumpmode.Plo 590 | include ./$(DEPDIR)/tif_error.Plo 591 | include ./$(DEPDIR)/tif_extension.Plo 592 | include ./$(DEPDIR)/tif_fax3.Plo 593 | include ./$(DEPDIR)/tif_fax3sm.Plo 594 | include ./$(DEPDIR)/tif_flush.Plo 595 | include ./$(DEPDIR)/tif_getimage.Plo 596 | include ./$(DEPDIR)/tif_jbig.Plo 597 | include ./$(DEPDIR)/tif_jpeg.Plo 598 | include ./$(DEPDIR)/tif_luv.Plo 599 | include ./$(DEPDIR)/tif_lzw.Plo 600 | include ./$(DEPDIR)/tif_next.Plo 601 | include ./$(DEPDIR)/tif_ojpeg.Plo 602 | include ./$(DEPDIR)/tif_open.Plo 603 | include ./$(DEPDIR)/tif_packbits.Plo 604 | include ./$(DEPDIR)/tif_pixarlog.Plo 605 | include ./$(DEPDIR)/tif_predict.Plo 606 | include ./$(DEPDIR)/tif_print.Plo 607 | include ./$(DEPDIR)/tif_read.Plo 608 | include ./$(DEPDIR)/tif_stream.Plo 609 | include ./$(DEPDIR)/tif_strip.Plo 610 | include ./$(DEPDIR)/tif_swab.Plo 611 | include ./$(DEPDIR)/tif_thunder.Plo 612 | include ./$(DEPDIR)/tif_tile.Plo 613 | include ./$(DEPDIR)/tif_unix.Plo 614 | include ./$(DEPDIR)/tif_version.Plo 615 | include ./$(DEPDIR)/tif_warning.Plo 616 | include ./$(DEPDIR)/tif_write.Plo 617 | include ./$(DEPDIR)/tif_zip.Plo 618 | 619 | .c.o: 620 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 621 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 622 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ 623 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 624 | # $(AM_V_CC_no)$(COMPILE) -c $< 625 | 626 | .c.obj: 627 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 628 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 629 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ 630 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 631 | # $(AM_V_CC_no)$(COMPILE) -c `$(CYGPATH_W) '$<'` 632 | 633 | .c.lo: 634 | $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 635 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo 636 | # $(AM_V_CC)source='$<' object='$@' libtool=yes \ 637 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 638 | # $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< 639 | 640 | .cxx.o: 641 | $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 642 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 643 | # $(AM_V_CXX)source='$<' object='$@' libtool=no \ 644 | # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ 645 | # $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< 646 | 647 | .cxx.obj: 648 | $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 649 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 650 | # $(AM_V_CXX)source='$<' object='$@' libtool=no \ 651 | # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ 652 | # $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 653 | 654 | .cxx.lo: 655 | $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 656 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo 657 | # $(AM_V_CXX)source='$<' object='$@' libtool=yes \ 658 | # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ 659 | # $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $< 660 | 661 | mostlyclean-libtool: 662 | -rm -f *.lo 663 | 664 | clean-libtool: 665 | -rm -rf .libs _libs 666 | install-libtiffincludeHEADERS: $(libtiffinclude_HEADERS) 667 | @$(NORMAL_INSTALL) 668 | @list='$(libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ 669 | if test -n "$$list"; then \ 670 | echo " $(MKDIR_P) '$(DESTDIR)$(libtiffincludedir)'"; \ 671 | $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)" || exit 1; \ 672 | fi; \ 673 | for p in $$list; do \ 674 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 675 | echo "$$d$$p"; \ 676 | done | $(am__base_list) | \ 677 | while read files; do \ 678 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtiffincludedir)'"; \ 679 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtiffincludedir)" || exit $$?; \ 680 | done 681 | 682 | uninstall-libtiffincludeHEADERS: 683 | @$(NORMAL_UNINSTALL) 684 | @list='$(libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ 685 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 686 | dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir) 687 | install-nodist_libtiffincludeHEADERS: $(nodist_libtiffinclude_HEADERS) 688 | @$(NORMAL_INSTALL) 689 | @list='$(nodist_libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ 690 | if test -n "$$list"; then \ 691 | echo " $(MKDIR_P) '$(DESTDIR)$(libtiffincludedir)'"; \ 692 | $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)" || exit 1; \ 693 | fi; \ 694 | for p in $$list; do \ 695 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 696 | echo "$$d$$p"; \ 697 | done | $(am__base_list) | \ 698 | while read files; do \ 699 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtiffincludedir)'"; \ 700 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtiffincludedir)" || exit $$?; \ 701 | done 702 | 703 | uninstall-nodist_libtiffincludeHEADERS: 704 | @$(NORMAL_UNINSTALL) 705 | @list='$(nodist_libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ 706 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 707 | dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir) 708 | 709 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 710 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 711 | unique=`for i in $$list; do \ 712 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 713 | done | \ 714 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 715 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 716 | mkid -fID $$unique 717 | tags: TAGS 718 | 719 | TAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \ 720 | $(TAGS_FILES) $(LISP) 721 | set x; \ 722 | here=`pwd`; \ 723 | list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \ 724 | unique=`for i in $$list; do \ 725 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 726 | done | \ 727 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 728 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 729 | shift; \ 730 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 731 | test -n "$$unique" || unique=$$empty_fix; \ 732 | if test $$# -gt 0; then \ 733 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 734 | "$$@" $$unique; \ 735 | else \ 736 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 737 | $$unique; \ 738 | fi; \ 739 | fi 740 | ctags: CTAGS 741 | CTAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \ 742 | $(TAGS_FILES) $(LISP) 743 | list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \ 744 | unique=`for i in $$list; do \ 745 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 746 | done | \ 747 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 748 | END { if (nonempty) { for (i in files) print i; }; }'`; \ 749 | test -z "$(CTAGS_ARGS)$$unique" \ 750 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 751 | $$unique 752 | 753 | GTAGS: 754 | here=`$(am__cd) $(top_builddir) && pwd` \ 755 | && $(am__cd) $(top_srcdir) \ 756 | && gtags -i $(GTAGS_ARGS) "$$here" 757 | 758 | cscopelist: $(HEADERS) $(SOURCES) $(LISP) 759 | list='$(SOURCES) $(HEADERS) $(LISP)'; \ 760 | case "$(srcdir)" in \ 761 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 762 | *) sdir=$(subdir)/$(srcdir) ;; \ 763 | esac; \ 764 | for i in $$list; do \ 765 | if test -f "$$i"; then \ 766 | echo "$(subdir)/$$i"; \ 767 | else \ 768 | echo "$$sdir/$$i"; \ 769 | fi; \ 770 | done >> $(top_builddir)/cscope.files 771 | 772 | distclean-tags: 773 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 774 | 775 | distdir: $(DISTFILES) 776 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 777 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 778 | list='$(DISTFILES)'; \ 779 | dist_files=`for file in $$list; do echo $$file; done | \ 780 | sed -e "s|^$$srcdirstrip/||;t" \ 781 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 782 | case $$dist_files in \ 783 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 784 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 785 | sort -u` ;; \ 786 | esac; \ 787 | for file in $$dist_files; do \ 788 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 789 | if test -d $$d/$$file; then \ 790 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 791 | if test -d "$(distdir)/$$file"; then \ 792 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 793 | fi; \ 794 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 795 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 796 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 797 | fi; \ 798 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 799 | else \ 800 | test -f "$(distdir)/$$file" \ 801 | || cp -p $$d/$$file "$(distdir)/$$file" \ 802 | || exit 1; \ 803 | fi; \ 804 | done 805 | check-am: all-am 806 | check: check-am 807 | all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) tif_config.h \ 808 | tiffconf.h 809 | installdirs: 810 | for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libtiffincludedir)" "$(DESTDIR)$(libtiffincludedir)"; do \ 811 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 812 | done 813 | install: install-am 814 | install-exec: install-exec-am 815 | install-data: install-data-am 816 | uninstall: uninstall-am 817 | 818 | install-am: all-am 819 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 820 | 821 | installcheck: installcheck-am 822 | install-strip: 823 | if test -z '$(STRIP)'; then \ 824 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 825 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 826 | install; \ 827 | else \ 828 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 829 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 830 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 831 | fi 832 | mostlyclean-generic: 833 | 834 | clean-generic: 835 | 836 | distclean-generic: 837 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 838 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 839 | 840 | maintainer-clean-generic: 841 | @echo "This command is intended for maintainers to use" 842 | @echo "it deletes files that may require special tools to rebuild." 843 | clean: clean-am 844 | 845 | clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ 846 | clean-noinstPROGRAMS mostlyclean-am 847 | 848 | distclean: distclean-am 849 | -rm -rf ./$(DEPDIR) 850 | -rm -f Makefile 851 | distclean-am: clean-am distclean-compile distclean-generic \ 852 | distclean-hdr distclean-tags 853 | 854 | dvi: dvi-am 855 | 856 | dvi-am: 857 | 858 | html: html-am 859 | 860 | html-am: 861 | 862 | info: info-am 863 | 864 | info-am: 865 | 866 | install-data-am: install-libtiffincludeHEADERS \ 867 | install-nodist_libtiffincludeHEADERS 868 | 869 | install-dvi: install-dvi-am 870 | 871 | install-dvi-am: 872 | 873 | install-exec-am: install-libLTLIBRARIES 874 | 875 | install-html: install-html-am 876 | 877 | install-html-am: 878 | 879 | install-info: install-info-am 880 | 881 | install-info-am: 882 | 883 | install-man: 884 | 885 | install-pdf: install-pdf-am 886 | 887 | install-pdf-am: 888 | 889 | install-ps: install-ps-am 890 | 891 | install-ps-am: 892 | 893 | installcheck-am: 894 | 895 | maintainer-clean: maintainer-clean-am 896 | -rm -rf ./$(DEPDIR) 897 | -rm -f Makefile 898 | maintainer-clean-am: distclean-am maintainer-clean-generic 899 | 900 | mostlyclean: mostlyclean-am 901 | 902 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 903 | mostlyclean-libtool 904 | 905 | pdf: pdf-am 906 | 907 | pdf-am: 908 | 909 | ps: ps-am 910 | 911 | ps-am: 912 | 913 | uninstall-am: uninstall-libLTLIBRARIES uninstall-libtiffincludeHEADERS \ 914 | uninstall-nodist_libtiffincludeHEADERS 915 | 916 | .MAKE: all install-am install-strip 917 | 918 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ 919 | clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \ 920 | cscopelist ctags distclean distclean-compile distclean-generic \ 921 | distclean-hdr distclean-libtool distclean-tags distdir dvi \ 922 | dvi-am html html-am info info-am install install-am \ 923 | install-data install-data-am install-dvi install-dvi-am \ 924 | install-exec install-exec-am install-html install-html-am \ 925 | install-info install-info-am install-libLTLIBRARIES \ 926 | install-libtiffincludeHEADERS install-man \ 927 | install-nodist_libtiffincludeHEADERS install-pdf \ 928 | install-pdf-am install-ps install-ps-am install-strip \ 929 | installcheck installcheck-am installdirs maintainer-clean \ 930 | maintainer-clean-generic mostlyclean mostlyclean-compile \ 931 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 932 | tags uninstall uninstall-am uninstall-libLTLIBRARIES \ 933 | uninstall-libtiffincludeHEADERS \ 934 | uninstall-nodist_libtiffincludeHEADERS 935 | 936 | 937 | faxtable: mkg3states 938 | (rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c) 939 | 940 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 941 | # Otherwise a system limit (for SysV at least) may be exceeded. 942 | .NOEXPORT: 943 | -------------------------------------------------------------------------------- /ArchLinux/bwidget/PKGBUILD: -------------------------------------------------------------------------------- 1 | # $Id: PKGBUILD 226630 2017-05-03 13:48:02Z spupykin $ 2 | # Maintainer: Sergej Pupykin 3 | # Contributor: Alessio 'mOLOk' Bolognino 4 | 5 | pkgname=bwidget 6 | pkgver=1.9.13 7 | pkgrel=1 8 | pkgdesc="A suite of megawidgets for Tk" 9 | arch=('any') 10 | url="https://wiki.tcl.tk/2251" 11 | license=('GPL') 12 | depends=('bash' 'tcl') 13 | source=("http://downloads.sourceforge.net/project/tcllib/BWidget/$pkgver/bwidget-$pkgver.tar.gz") 14 | sha256sums=('76d8f42280e7160242186d12437949830eabd5009a6c14f4e7dba0f661403a81') 15 | 16 | package() { 17 | cd "${srcdir}" 18 | install -d "${pkgdir}"/usr/lib/tcl8.6 19 | cp -r bwidget-$pkgver "${pkgdir}"/usr/lib/tcl8.6/ 20 | } -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/60-linux.hook: -------------------------------------------------------------------------------- 1 | [Trigger] 2 | Type = File 3 | Operation = Install 4 | Operation = Upgrade 5 | Operation = Remove 6 | Target = usr/lib/modules/%KERNVER%/* 7 | Target = usr/lib/modules/%EXTRAMODULES%/* 8 | 9 | [Action] 10 | Description = Updating %PKGBASE% module dependencies... 11 | When = PostTransaction 12 | Exec = /usr/bin/depmod %KERNVER% 13 | -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/90-linux.hook: -------------------------------------------------------------------------------- 1 | [Trigger] 2 | Type = File 3 | Operation = Install 4 | Operation = Upgrade 5 | Target = boot/kernel.img 6 | Target = boot/kernel7.img 7 | Target = usr/lib/initcpio/* 8 | 9 | [Action] 10 | Description = Updating %PKGBASE% initcpios... 11 | When = PostTransaction 12 | Exec = /usr/bin/mkinitcpio -p %PKGBASE% 13 | -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Dave Higham 2 | # Maintainer: Kevin Mihelich 3 | # Maintainer: Oleg Rakhmanov 4 | 5 | buildarch=20 6 | 7 | pkgbase=linux-raspberrypi 8 | _commit=e2e9cec6fb061ba58304fd391ef76747f2963557 9 | _srcname=linux-${_commit} 10 | _kernelname=${pkgbase#linux} 11 | _desc="Raspberry Pi RT" 12 | pkgver=4.19.71 13 | pkgrel=1 14 | arch=('armv6h' 'armv7h') 15 | url="http://www.kernel.org/" 16 | license=('GPL2') 17 | makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'flex') 18 | options=('!strip') 19 | source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz" 20 | 'config.txt' 21 | 'cmdline.txt' 22 | 'config' 23 | 'linux.preset' 24 | '60-linux.hook' 25 | '90-linux.hook') 26 | md5sums=('053032ea586e15376db1c5b1c682306d' 27 | '7c6b37a1353caccf6d3786bb4161c218' 28 | '60bc3624123c183305677097bcd56212' 29 | '29bcb2521e9adf4b740530522b0b8e08' 30 | '86d4a35722b5410e3b29fc92dae15d4b' 31 | 'ce6c81ad1ad1f8b333fd6077d47abdaf' 32 | '69e1db90d78f691dc446fe2ab94727eb') 33 | 34 | prepare() { 35 | cd "${srcdir}/${_srcname}" 36 | 37 | cat "${srcdir}/config" > ./.config 38 | 39 | # add pkgrel to extraversion 40 | sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile 41 | 42 | # don't run depmod on 'make install'. We'll do this ourselves in packaging 43 | sed -i '2iexit 0' scripts/depmod.sh 44 | } 45 | 46 | build() { 47 | cd "${srcdir}/${_srcname}" 48 | 49 | # get kernel version 50 | make prepare 51 | 52 | # load configuration 53 | # Configure the kernel. Replace the line below with one of your choice. 54 | #make menuconfig # CLI menu for configuration 55 | #make nconfig # new CLI menu for configuration 56 | #make xconfig # X-based configuration 57 | #make oldconfig # using old config from previous kernel version 58 | #make bcmrpi_defconfig # using RPi defconfig 59 | # ... or manually edit .config 60 | 61 | # Copy back our configuration (use with new kernel version) 62 | #cp ./.config ../${pkgver}.config 63 | 64 | #################### 65 | # stop here 66 | # this is useful to configure the kernel 67 | #msg "Stopping build" 68 | #return 1 69 | #################### 70 | 71 | #yes "" | make config 72 | 73 | make ${MAKEFLAGS} zImage modules dtbs 74 | } 75 | 76 | _package() { 77 | pkgdesc="The Linux Kernel and modules - ${_desc}" 78 | depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'firmware-raspberrypi') 79 | optdepends=('crda: to set the correct wireless channels of your country') 80 | provides=('kernel26' "linux=${pkgver}") 81 | conflicts=('kernel26' 'linux') 82 | install=${pkgname}.install 83 | backup=('boot/config.txt' 'boot/cmdline.txt') 84 | replaces=('linux-raspberrypi-latest') 85 | 86 | cd "${srcdir}/${_srcname}" 87 | 88 | KARCH=arm 89 | 90 | # get kernel version 91 | _kernver="$(make kernelrelease)" 92 | _basekernel=${_kernver%%-*} 93 | _basekernel=${_basekernel%.*} 94 | 95 | mkdir -p "${pkgdir}"/{boot,usr/lib/modules} 96 | make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install 97 | make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install 98 | 99 | [[ $CARCH == "armv6h" ]] && cp arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel.img" \ 100 | && rm -f "${pkgdir}"/boot/bcm{2836,2837,2838,2709,2710,2711}*.dtb 101 | [[ $CARCH == "armv7h" ]] && cp arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel7.img" \ 102 | && rm -f "${pkgdir}"/boot/bcm{2835,2838,2708,2711}*.dtb 103 | cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays" 104 | 105 | # make room for external modules 106 | local _extramodules="extramodules-${_basekernel}${_kernelname}" 107 | ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules" 108 | 109 | # add real version for building modules and running depmod from hook 110 | echo "${_kernver}" | 111 | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version" 112 | 113 | # remove build and source links 114 | rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build} 115 | 116 | # now we call depmod... 117 | depmod -b "${pkgdir}/usr" -F System.map "${_kernver}" 118 | 119 | # sed expression for following substitutions 120 | local _subst=" 121 | s|%PKGBASE%|${pkgbase}|g 122 | s|%KERNVER%|${_kernver}|g 123 | s|%EXTRAMODULES%|${_extramodules}|g 124 | " 125 | 126 | # install mkinitcpio preset file 127 | sed "${_subst}" ../linux.preset | 128 | install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" 129 | 130 | # install pacman hooks 131 | sed "${_subst}" ../60-linux.hook | 132 | install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook" 133 | sed "${_subst}" ../90-linux.hook | 134 | install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" 135 | 136 | # install boot files 137 | install -m644 ../config.txt ../cmdline.txt "${pkgdir}/boot" 138 | } 139 | 140 | _package-headers() { 141 | pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}" 142 | provides=("linux-headers=${pkgver}") 143 | conflicts=('linux-headers') 144 | replaces=('linux-raspberrypi-latest-headers') 145 | 146 | cd ${_srcname} 147 | local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build" 148 | 149 | install -Dt "${_builddir}" -m644 Makefile .config Module.symvers 150 | install -Dt "${_builddir}/kernel" -m644 kernel/Makefile 151 | 152 | mkdir "${_builddir}/.tmp_versions" 153 | 154 | cp -t "${_builddir}" -a include scripts 155 | 156 | install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile 157 | install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s arch/$KARCH/kernel/module.lds 158 | 159 | cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include 160 | 161 | install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h 162 | install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h 163 | 164 | # http://bugs.archlinux.org/task/13146 165 | install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h 166 | 167 | # http://bugs.archlinux.org/task/20402 168 | install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h 169 | install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h 170 | install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h 171 | 172 | # add xfs and shmem for aufs building 173 | mkdir -p "${_builddir}"/{fs/xfs,mm} 174 | 175 | # copy in Kconfig files 176 | find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \; 177 | 178 | # remove unneeded architectures 179 | local _arch 180 | for _arch in "${_builddir}"/arch/*/; do 181 | [[ ${_arch} == */${KARCH}/ ]] && continue 182 | rm -r "${_arch}" 183 | done 184 | 185 | # remove files already in linux-docs package 186 | rm -r "${_builddir}/Documentation" 187 | 188 | # remove now broken symlinks 189 | find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete 190 | 191 | # Fix permissions 192 | chmod -R u=rwX,go=rX "${_builddir}" 193 | 194 | # strip scripts directory 195 | local _binary _strip 196 | while read -rd '' _binary; do 197 | case "$(file -bi "${_binary}")" in 198 | *application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so) 199 | *application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a) 200 | *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries 201 | *) continue ;; 202 | esac 203 | /usr/bin/strip ${_strip} "${_binary}" 204 | done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null) 205 | } 206 | 207 | pkgname=("${pkgbase}" "${pkgbase}-headers") 208 | for _p in ${pkgname[@]}; do 209 | eval "package_${_p}() { 210 | _package${_p#${pkgbase}} 211 | }" 212 | done 213 | -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/cmdline.txt: -------------------------------------------------------------------------------- 1 | root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop dwc_otg.fiq_fsm_enable=0 dwc_otg.fiq_enable=0 dwc_otg.nak_holdoff=0 2 | 3 | -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/config.txt: -------------------------------------------------------------------------------- 1 | # See /boot/overlays/README for all available options 2 | 3 | gpu_mem=64 4 | initramfs initramfs-linux.img followkernel 5 | -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/linux-raspberrypi.install: -------------------------------------------------------------------------------- 1 | disable_cma() { 2 | if [[ -f /boot/config.txt && $(grep '^cma' /boot/config.txt) != '' ]]; then 3 | echo ">>> You appear to have dynamic memory (CMA) enabled, which is currently broken" 4 | echo ">>> in newer kernels and will cause many issues if left enabled." 5 | echo ">>> Disabling that for you now." 6 | sed -i 's/^cma_/#cma_/g' /boot/config.txt 7 | fi 8 | } 9 | 10 | post_install () { 11 | disable_cma 12 | } 13 | 14 | post_upgrade() { 15 | if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then 16 | if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then 17 | echo "WARNING: /boot appears to be a separate partition but is not mounted." 18 | echo " You probably just broke your system. Congratulations." 19 | fi 20 | fi 21 | 22 | disable_cma 23 | 24 | if [ "$(vercmp $2 3.18.3)" -lt 0 ]; then 25 | echo "________________________________________________________________________________" 26 | echo "" 27 | echo "WARNING: This kernel provides updated config.txt and cmdline.txt files." 28 | echo " Check for pacnew files in /boot and merge or replace the existing files" 29 | echo " with the new versions." 30 | echo "________________________________________________________________________________" 31 | echo "" 32 | fi 33 | 34 | if [[ $(grep 'Raspberry Pi 4' /sys/firmware/devicetree/base/model) ]]; then 35 | echo "________________________________________________________________________________" 36 | echo "" 37 | echo "WARNING: You must switch to a different kernel for the Raspberry Pi 4:" 38 | echo " pacman -S linux-raspberrypi4" 39 | echo "________________________________________________________________________________" 40 | echo "" 41 | fi 42 | } 43 | 44 | post_remove() { 45 | rm -f boot/initramfs-linux.img 46 | } 47 | -------------------------------------------------------------------------------- /ArchLinux/linux-raspberrypi-rt/linux.preset: -------------------------------------------------------------------------------- 1 | # mkinitcpio preset file for the '%PKGBASE%' package 2 | 3 | ALL_config="/etc/mkinitcpio.conf" 4 | ALL_kver="%KERNVER%" 5 | 6 | PRESETS=('default') 7 | 8 | #default_config="/etc/mkinitcpio.conf" 9 | default_image="/boot/initramfs-linux.img" 10 | #default_options="" 11 | -------------------------------------------------------------------------------- /ArchLinux/mklatencyplot/latency_4.19.71-1-rt24-ARCH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/ArchLinux/mklatencyplot/latency_4.19.71-1-rt24-ARCH.png -------------------------------------------------------------------------------- /ArchLinux/mklatencyplot/mklatencyplot.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 1. Run cyclictest 4 | cyclictest -l100000000 -m -Sp90 -i200 -h400 -q >output 5 | 6 | # 2. Get maximum latency 7 | max=`grep "Max Latencies" output | tr " " "\n" | sort -n | tail -1 | sed s/^0*//` 8 | 9 | # 3. Grep data lines, remove empty lines and create a common field separator 10 | grep -v -e "^#" -e "^$" output | tr " " "\t" >histogram 11 | 12 | # 4. Set the number of cores, for example 13 | cores=4 14 | 15 | # 5. Create two-column data sets with latency classes and frequency values for each core, for example 16 | for i in `seq 1 $cores` 17 | do 18 | column=`expr $i + 1` 19 | cut -f1,$column histogram >histogram$i 20 | done 21 | 22 | # 6. Create plot command header 23 | echo -n -e "set title \"Latency plot\"\n\ 24 | set terminal png\n\ 25 | set xlabel \"Latency (us), max $max us\"\n\ 26 | set logscale y\n\ 27 | set xrange [0:400]\n\ 28 | set yrange [0.8:*]\n\ 29 | set ylabel \"Number of latency samples\"\n\ 30 | set output \"plot.png\"\n\ 31 | plot " >plotcmd 32 | 33 | # 7. Append plot command data references 34 | for i in `seq 1 $cores` 35 | do 36 | if test $i != 1 37 | then 38 | echo -n ", " >>plotcmd 39 | fi 40 | cpuno=`expr $i - 1` 41 | if test $cpuno -lt 10 42 | then 43 | title=" CPU$cpuno" 44 | else 45 | title="CPU$cpuno" 46 | fi 47 | echo -n "\"histogram$i\" using 1:2 title \"$title\" with histeps" >>plotcmd 48 | done 49 | 50 | # 8. Execute plot command 51 | gnuplot -persist 2 | # Maintainer: Bruno Pagani 3 | # Contributor: Ray Rashif 4 | # Contributor: Andrzej Giniewicz 5 | # Contributor: Thomas Dziedzic 6 | 7 | pkgname=python2-vtk 8 | pkgver=8.2.0 9 | pkgrel=2 10 | pkgdesc="A software system for 3D computer graphics, image processing, and visualization" 11 | arch=('armv7h' 'aarch64') 12 | url="https://www.vtk.org/" 13 | license=('BSD') 14 | depends=('gcc-libs' 'double-conversion') 15 | makedepends=('cmake' 'boost' 'doxygen' 'ffmpeg' 'gdal' 'gnuplot' 16 | 'java-environment' 'openmpi' 'python-matplotlib' 'qt5-base' 17 | 'qt5-tools' 'qt5-webkit' 'qt5-x11extras' 'tk' 'unixodbc' 'wget' 18 | 'double-conversion' 'eigen' 'expat' 'freetype2' 'glew' 'hdf5' 19 | 'libjpeg' 'jsoncpp' 'libxml2' 'lz4' 'xz' 'python-mpi4py' 'netcdf' 20 | 'libogg' 'pegtl' 'libpng' 'pugixml' 'libtheora' 'libtiff' 'zlib' 21 | 'proj' 'sqlite') 22 | optdepends=('gnuplot: plotting tools' 23 | 'graphviz: drawing tools' 24 | 'java-runtime: java bindings' 25 | 'python: python bindings' 26 | 'python-mpi4py: OpenMPI python support' 27 | 'python-matplotlib: for Matplotlib rendering' 28 | 'openmpi: OpenMPI support' 29 | 'qt5-x11extras' 30 | 'qt5-webkit: WebKit support' 31 | 'tk: tcl bindings' 32 | 'ffmpeg' 33 | 'gdal' 34 | 'glew' 35 | 'hdf5' 36 | 'jsoncpp' 37 | 'lz4' 38 | 'netcdf' 39 | 'pugixml' 40 | 'proj' 41 | 'sqlite' 42 | 'unixodbc') 43 | source=("${url}/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz") 44 | options=(staticlibs) 45 | sha512sums=('521bd4dabedbc24b0e80a314a34ecd7554b04af28a7973245e3a9cf99a09b995d1b8ac42305c8e53369f226a0a6da3cdb29105ba2c90b46492736ef717760286') 46 | 47 | prepare() { 48 | mkdir build 49 | } 50 | 51 | build() { 52 | cd build 53 | 54 | # to help cmake find java 55 | export JAVA_HOME=/usr/lib/jvm/default 56 | 57 | # GL2PS blocked by http://www.vtk.org/Bug/view.php?id=16083 58 | # LIBHARU blocked by https://github.com/libharu/libharu/pull/157 59 | # exodusII,kissfft,verdict,VPIC,xdmf2/3,zfp not packaged in Arch 60 | # Note: VTK explicitly disables system GLEW dependency, it uses embedded sources with modifications 61 | local VTK_USE_SYSTEM_LIB="" 62 | # Common with ParaView 63 | for lib in DOUBLECONVERSION EIGEN EXPAT FREETYPE GLEW HDF5 JPEG JSONCPP LIBXML2 LZ4 LZMA MPI4PY NETCDF OGG PEGTL PNG PUGIXML THEORA TIFF ZLIB; do 64 | VTK_USE_SYSTEM_LIB+="-DVTK_USE_SYSTEM_${lib}=ON " 65 | done 66 | for lib in LIBPROJ SQLITE; do 67 | VTK_USE_SYSTEM_LIB+="-DVTK_USE_SYSTEM_${lib}=ON " 68 | done 69 | 70 | local _tkver=$(echo 'puts $tcl_version' | tclsh) 71 | 72 | cmake ../VTK-${pkgver} \ 73 | -Wno-dev \ 74 | -DCMAKE_SKIP_RPATH=ON \ 75 | -DCMAKE_INSTALL_LIBDIR=lib \ 76 | -DBUILD_SHARED_LIBS=ON \ 77 | -DCMAKE_INSTALL_PREFIX=/usr \ 78 | -DBUILD_DOCUMENTATION=OFF \ 79 | -DDOXYGEN_KEEP_TEMP=ON \ 80 | -DDOCUMENTATION_HTML_HELP=OFF \ 81 | -DDOCUMENTATION_HTML_TARZ=OFF \ 82 | -DBUILD_EXAMPLES=OFF \ 83 | -DXDMF_STATIC_AND_SHARED=OFF \ 84 | -DVTK_USE_FFMPEG_ENCODER=ON \ 85 | -DVTK_BUILD_ALL_MODULES=ON \ 86 | -DVTK_USE_LARGE_DATA=NO \ 87 | -DVTK_QT_VERSION="5" \ 88 | -DVTK_WRAP_JAVA=OFF \ 89 | -DVTK_WRAP_PYTHON=ON \ 90 | -DVTK_WRAP_TCL=OFF \ 91 | -DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \ 92 | -DVTK_PYTHON_VERSION="2" \ 93 | -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ 94 | -DVTK_INSTALL_INCLUDE_DIR=include/vtk \ 95 | -DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \ 96 | ${VTK_USE_SYSTEM_LIB} \ 97 | -DCMAKE_BUILD_TYPE=Release 98 | 99 | make 100 | } 101 | 102 | package() { 103 | cd build 104 | 105 | make DESTDIR="${pkgdir}" install 106 | 107 | # Move the vtk.jar to the arch-specific location 108 | install -dv "${pkgdir}"/usr/share/java/vtk 109 | # mv -v "${pkgdir}"/usr/lib/vtk.jar "${pkgdir}"/usr/share/java/vtk 110 | # rm -rf "${pkgdir}"/usr/lib/vtk-${pkgver%.*}/java 111 | 112 | # Install license 113 | install -Dm644 ../VTK-${pkgver}/Copyright.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}/ 114 | 115 | # Fix path of QtDesigner plugin 116 | install -dv "${pkgdir}"/usr/lib/qt 117 | mv "${pkgdir}"/usr/plugins "${pkgdir}"/usr/lib/qt/plugins 118 | } 119 | -------------------------------------------------------------------------------- /ArchLinux/rt-tests/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: David Runge 2 | # Contributor: Joakim Hernberg 3 | 4 | pkgname=rt-tests 5 | pkgver=1.5 6 | pkgrel=2 7 | pkgdesc="A collection of latency testing tools for the linux(-rt) kernel" 8 | arch=('armv7h') 9 | url="https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/about/" 10 | license=('GPL2') 11 | groups=('realtime') 12 | depends=('python') 13 | source=("https://git.kernel.org/pub/scm/utils/${pkgname}/${pkgname}.git/snapshot/${pkgname}-${pkgver}.tar.gz") 14 | sha512sums=('fc8129a992ce09a9ebeae890d8ef9fc7ece3bbe4dbc2c290f2fc14818089882b7bdc24d1514ae5d3b4941d61f5248da76b01a660a82bb88ad5de09c89b3fb0e4') 15 | 16 | build() { 17 | cd "${pkgname}-${pkgver}" 18 | export PYLIB=$(python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())') 19 | make 20 | } 21 | 22 | package() { 23 | cd "${pkgname}-${pkgver}" 24 | make prefix=/usr DESTDIR="${pkgdir}" install 25 | install -vDm 644 {MAINTAINERS,README.markdown} \ 26 | -t "${pkgdir}/usr/share/doc/${pkgname}" 27 | # removing stale directories 28 | rmdir -v "${pkgdir}/usr/"{src,share/man/man4} 29 | } -------------------------------------------------------------------------------- /ArchLinux/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for libtiff/tif_config.h 2 | -------------------------------------------------------------------------------- /ArchLinux/stamp-h2: -------------------------------------------------------------------------------- 1 | timestamp for libtiff/tiffconf.h 2 | -------------------------------------------------------------------------------- /ArchLinux/tcllib/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gabriel Souza Franco 2 | # Contributor: Sergej Pupykin 3 | # Contributor: dtw 4 | # Contributor: Mathieu Gauthier 5 | # Contributor: Pawel Bogur 6 | 7 | pkgname=tcllib 8 | pkgver=1.19 9 | pkgrel=3 10 | pkgdesc="Set of pure-Tcl extensions." 11 | arch=('any') 12 | url="http://core.tcl.tk/tcllib/" 13 | license=('bsd') 14 | depends=('tcl') 15 | source=("https://core.tcl-lang.org/tcllib/uv/tcllib-$pkgver.tar.gz") 16 | sha256sums=('01fe87cf1855b96866cf5394b6a786fd40b314022714b34110aeb6af545f6a9c') 17 | 18 | package(){ 19 | cd "$srcdir"/tcllib-$pkgver 20 | tclsh installer.tcl -pkg-path "$pkgdir"/usr/lib/tcllib \ 21 | -app-path "$pkgdir"/usr/bin \ 22 | -nroff-path "$pkgdir"/usr/share/man/mann \ 23 | -no-examples -no-html \ 24 | -no-wait -no-gui 25 | install -Dm644 license.terms "$pkgdir"/usr/share/licenses/$pkgname/COPYING 26 | for manp in graph; do 27 | mv "$pkgdir"/usr/share/man/mann/{,tcllib-}$manp.n 28 | done 29 | } -------------------------------------------------------------------------------- /ArchLinux/tclx/PKGBUILD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/ArchLinux/tclx/PKGBUILD -------------------------------------------------------------------------------- /ArchLinux/tclx/interperrorline.patch: -------------------------------------------------------------------------------- 1 | diff -rupN generic/tclXgeneral.c generic_fix/tclXgeneral.c 2 | --- generic/tclXgeneral.c 2002-04-04 01:09:05.000000000 -0500 3 | +++ generic_fix/tclXgeneral.c 2013-07-19 17:49:57.726435546 -0400 4 | @@ -405,7 +405,7 @@ TclX_LoopObjCmd (dummy, interp, objc, ob 5 | char buf [64]; 6 | 7 | sprintf (buf, "\n (\"loop\" body line %d)", 8 | - interp->errorLine); 9 | + Tcl_GetErrorLine(interp)); 10 | Tcl_AddErrorInfo (interp, buf); 11 | } 12 | break; 13 | diff -rupN generic/tclXlib.c generic_fix/tclXlib.c 14 | --- generic/tclXlib.c 2005-03-24 00:04:38.000000000 -0500 15 | +++ generic_fix/tclXlib.c 2013-07-19 17:49:57.739768878 -0400 16 | @@ -239,7 +239,7 @@ EvalFilePart (interp, fileName, offset, 17 | */ 18 | buf = ckalloc (strlen (fileName) + 64); 19 | sprintf (buf, "\n (file \"%s\" line %d)", fileName, 20 | - interp->errorLine); 21 | + Tcl_GetErrorLine(interp)); 22 | Tcl_AddErrorInfo (interp, buf); 23 | ckfree (buf); 24 | goto errorExit; 25 | -------------------------------------------------------------------------------- /ArchLinux/tclx/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mksrcinfo 4 | git add -f .SRCINFO 5 | exit 0 6 | -------------------------------------------------------------------------------- /ArchLinux/tif_config.h: -------------------------------------------------------------------------------- 1 | /* libtiff/tif_config.h. Generated from tif_config.h.in by configure. */ 2 | /* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define if building universal (internal helper macro) */ 5 | /* #undef AC_APPLE_UNIVERSAL_BUILD */ 6 | 7 | /* Support CCITT Group 3 & 4 algorithms */ 8 | #define CCITT_SUPPORT 1 9 | 10 | /* Pick up YCbCr subsampling info from the JPEG data stream to support files 11 | lacking the tag (default enabled). */ 12 | #define CHECK_JPEG_YCBCR_SUBSAMPLING 1 13 | 14 | /* Support C++ stream API (requires C++ compiler) */ 15 | #define CXX_SUPPORT 1 16 | 17 | /* Treat extra sample as alpha (default enabled). The RGBA interface will 18 | treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many 19 | packages produce RGBA files but don't mark the alpha properly. */ 20 | #define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 21 | 22 | /* Use the Apple OpenGL framework. */ 23 | /* #undef HAVE_APPLE_OPENGL_FRAMEWORK */ 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_ASSERT_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_DLFCN_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_FCNTL_H 1 33 | 34 | /* Define to 1 if you have the `floor' function. */ 35 | #define HAVE_FLOOR 1 36 | 37 | /* Define to 1 if you have the `getopt' function. */ 38 | #define HAVE_GETOPT 1 39 | 40 | /* Define as 0 or 1 according to the floating point format suported by the 41 | machine */ 42 | #define HAVE_IEEEFP 1 43 | 44 | /* Define to 1 if the system has the type `int16'. */ 45 | /* #undef HAVE_INT16 */ 46 | 47 | /* Define to 1 if the system has the type `int32'. */ 48 | /* #undef HAVE_INT32 */ 49 | 50 | /* Define to 1 if the system has the type `int8'. */ 51 | /* #undef HAVE_INT8 */ 52 | 53 | /* Define to 1 if you have the header file. */ 54 | #define HAVE_INTTYPES_H 1 55 | 56 | /* Define to 1 if you have the header file. */ 57 | /* #undef HAVE_IO_H */ 58 | 59 | /* Define to 1 if you have the `isascii' function. */ 60 | #define HAVE_ISASCII 1 61 | 62 | /* Define to 1 if you have the `jbg_newlen' function. */ 63 | /* #undef HAVE_JBG_NEWLEN */ 64 | 65 | /* Define to 1 if you have the `lfind' function. */ 66 | #define HAVE_LFIND 1 67 | 68 | /* Define to 1 if you have the `c' library (-lc). */ 69 | #define HAVE_LIBC 1 70 | 71 | /* Define to 1 if you have the `m' library (-lm). */ 72 | #define HAVE_LIBM 1 73 | 74 | /* Define to 1 if you have the header file. */ 75 | #define HAVE_LIMITS_H 1 76 | 77 | /* Define to 1 if you have the header file. */ 78 | #define HAVE_MALLOC_H 1 79 | 80 | /* Define to 1 if you have the `memmove' function. */ 81 | #define HAVE_MEMMOVE 1 82 | 83 | /* Define to 1 if you have the header file. */ 84 | #define HAVE_MEMORY_H 1 85 | 86 | /* Define to 1 if you have the `memset' function. */ 87 | #define HAVE_MEMSET 1 88 | 89 | /* Define to 1 if you have the `mmap' function. */ 90 | #define HAVE_MMAP 1 91 | 92 | /* Define to 1 if you have the `pow' function. */ 93 | #define HAVE_POW 1 94 | 95 | /* Define if you have POSIX threads libraries and header files. */ 96 | #define HAVE_PTHREAD 1 97 | 98 | /* Define to 1 if you have the header file. */ 99 | #define HAVE_SEARCH_H 1 100 | 101 | /* Define to 1 if you have the `setmode' function. */ 102 | /* #undef HAVE_SETMODE */ 103 | 104 | /* Define to 1 if you have the `sqrt' function. */ 105 | #define HAVE_SQRT 1 106 | 107 | /* Define to 1 if you have the header file. */ 108 | #define HAVE_STDINT_H 1 109 | 110 | /* Define to 1 if you have the header file. */ 111 | #define HAVE_STDLIB_H 1 112 | 113 | /* Define to 1 if you have the `strcasecmp' function. */ 114 | #define HAVE_STRCASECMP 1 115 | 116 | /* Define to 1 if you have the `strchr' function. */ 117 | #define HAVE_STRCHR 1 118 | 119 | /* Define to 1 if you have the header file. */ 120 | #define HAVE_STRINGS_H 1 121 | 122 | /* Define to 1 if you have the header file. */ 123 | #define HAVE_STRING_H 1 124 | 125 | /* Define to 1 if you have the `strrchr' function. */ 126 | #define HAVE_STRRCHR 1 127 | 128 | /* Define to 1 if you have the `strstr' function. */ 129 | #define HAVE_STRSTR 1 130 | 131 | /* Define to 1 if you have the `strtol' function. */ 132 | #define HAVE_STRTOL 1 133 | 134 | /* Define to 1 if you have the `strtoul' function. */ 135 | #define HAVE_STRTOUL 1 136 | 137 | /* Define to 1 if you have the header file. */ 138 | #define HAVE_SYS_STAT_H 1 139 | 140 | /* Define to 1 if you have the header file. */ 141 | #define HAVE_SYS_TIME_H 1 142 | 143 | /* Define to 1 if you have the header file. */ 144 | #define HAVE_SYS_TYPES_H 1 145 | 146 | /* Define to 1 if you have the header file. */ 147 | #define HAVE_UNISTD_H 1 148 | 149 | /* Define to 1 if you have the header file. */ 150 | /* #undef HAVE_WINDOWS_H */ 151 | 152 | /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian 153 | (Intel) */ 154 | #define HOST_BIGENDIAN 0 155 | 156 | /* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ 157 | #define HOST_FILLORDER FILLORDER_MSB2LSB 158 | 159 | /* Support ISO JBIG compression (requires JBIG-KIT library) */ 160 | /* #undef JBIG_SUPPORT */ 161 | 162 | /* Support JPEG compression (requires IJG JPEG library) */ 163 | /* #undef JPEG_SUPPORT */ 164 | 165 | /* Support LogLuv high dynamic range encoding */ 166 | #define LOGLUV_SUPPORT 1 167 | 168 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 169 | */ 170 | #define LT_OBJDIR ".libs/" 171 | 172 | /* Support LZW algorithm */ 173 | #define LZW_SUPPORT 1 174 | 175 | /* Support Microsoft Document Imaging format */ 176 | #define MDI_SUPPORT 1 177 | 178 | /* Support NeXT 2-bit RLE algorithm */ 179 | #define NEXT_SUPPORT 1 180 | 181 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 182 | /* #undef NO_MINUS_C_MINUS_O */ 183 | 184 | /* Support Old JPEG compresson (read-only) */ 185 | /* #undef OJPEG_SUPPORT */ 186 | 187 | /* Support Macintosh PackBits algorithm */ 188 | #define PACKBITS_SUPPORT 1 189 | 190 | /* Support Pixar log-format algorithm (requires Zlib) */ 191 | /* #undef PIXARLOG_SUPPORT */ 192 | 193 | /* Define to necessary symbol if this constant uses a non-standard name on 194 | your system. */ 195 | /* #undef PTHREAD_CREATE_JOINABLE */ 196 | 197 | /* The size of `int', as computed by sizeof. */ 198 | #define SIZEOF_INT 4 199 | 200 | /* The size of `long', as computed by sizeof. */ 201 | #define SIZEOF_LONG 4 202 | 203 | /* The size of `signed long', as computed by sizeof. */ 204 | #define SIZEOF_SIGNED_LONG 4 205 | 206 | /* The size of `signed long long', as computed by sizeof. */ 207 | #define SIZEOF_SIGNED_LONG_LONG 8 208 | 209 | /* The size of `unsigned long', as computed by sizeof. */ 210 | #define SIZEOF_UNSIGNED_LONG 4 211 | 212 | /* The size of `unsigned long long', as computed by sizeof. */ 213 | #define SIZEOF_UNSIGNED_LONG_LONG 8 214 | 215 | /* Define to 1 if you have the ANSI C header files. */ 216 | #define STDC_HEADERS 1 217 | 218 | /* Support strip chopping (whether or not to convert single-strip uncompressed 219 | images to mutiple strips of specified size to reduce memory usage) */ 220 | #define STRIPCHOP_DEFAULT TIFF_STRIPCHOP 221 | 222 | /* Default size of the strip in bytes (when strip chopping enabled) */ 223 | #define STRIP_SIZE_DEFAULT 8192 224 | 225 | /* Enable SubIFD tag (330) support */ 226 | #define SUBIFD_SUPPORT 1 227 | 228 | /* Support ThunderScan 4-bit RLE algorithm */ 229 | #define THUNDER_SUPPORT 1 230 | 231 | /* Signed 64-bit type formatter */ 232 | #define TIFF_INT64_FORMAT "%lld" 233 | 234 | /* Signed 64-bit type */ 235 | #define TIFF_INT64_T signed long long 236 | 237 | /* Unsigned 64-bit type formatter */ 238 | #define TIFF_UINT64_FORMAT "%llu" 239 | 240 | /* Unsigned 64-bit type */ 241 | #define TIFF_UINT64_T unsigned long long 242 | 243 | /* Define to 1 if you can safely include both and . */ 244 | #define TIME_WITH_SYS_TIME 1 245 | 246 | /* Define to 1 if your declares `struct tm'. */ 247 | /* #undef TM_IN_SYS_TIME */ 248 | 249 | /* Version number of package */ 250 | #define VERSION "3.9.7" 251 | 252 | /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most 253 | significant byte first (like Motorola and SPARC, unlike Intel). */ 254 | #if defined AC_APPLE_UNIVERSAL_BUILD 255 | # if defined __BIG_ENDIAN__ 256 | # define WORDS_BIGENDIAN 1 257 | # endif 258 | #else 259 | # ifndef WORDS_BIGENDIAN 260 | /* # undef WORDS_BIGENDIAN */ 261 | # endif 262 | #endif 263 | 264 | /* Define to 1 if the X Window System is missing or not being used. */ 265 | /* #undef X_DISPLAY_MISSING */ 266 | 267 | /* Support Deflate compression */ 268 | /* #undef ZIP_SUPPORT */ 269 | 270 | /* Enable large inode numbers on Mac OS X 10.5. */ 271 | #ifndef _DARWIN_USE_64_BIT_INODE 272 | # define _DARWIN_USE_64_BIT_INODE 1 273 | #endif 274 | 275 | /* Number of bits in a file offset, on hosts where this is settable. */ 276 | #define _FILE_OFFSET_BITS 64 277 | 278 | /* Define for large files, on AIX-style hosts. */ 279 | /* #undef _LARGE_FILES */ 280 | 281 | /* Define to empty if `const' does not conform to ANSI C. */ 282 | /* #undef const */ 283 | 284 | /* Define to `__inline__' or `__inline' if that's what the C compiler 285 | calls it, or to nothing if 'inline' is not supported under any name. */ 286 | #ifndef __cplusplus 287 | /* #undef inline */ 288 | #endif 289 | 290 | /* Define to `long int' if does not define. */ 291 | /* #undef off_t */ 292 | 293 | /* Define to `unsigned int' if does not define. */ 294 | /* #undef size_t */ 295 | -------------------------------------------------------------------------------- /ArchLinux/tiffconf.h: -------------------------------------------------------------------------------- 1 | /* libtiff/tiffconf.h. Generated from tiffconf.h.in by configure. */ 2 | /* 3 | Configuration defines for installed libtiff. 4 | This file maintained for backward compatibility. Do not use definitions 5 | from this file in your programs. 6 | */ 7 | 8 | #ifndef _TIFFCONF_ 9 | #define _TIFFCONF_ 10 | 11 | /* Define to 1 if the system has the type `int16'. */ 12 | /* #undef HAVE_INT16 */ 13 | 14 | /* Define to 1 if the system has the type `int32'. */ 15 | /* #undef HAVE_INT32 */ 16 | 17 | /* Define to 1 if the system has the type `int8'. */ 18 | /* #undef HAVE_INT8 */ 19 | 20 | /* The size of a `int', as computed by sizeof. */ 21 | #define SIZEOF_INT 4 22 | 23 | /* The size of a `long', as computed by sizeof. */ 24 | #define SIZEOF_LONG 4 25 | 26 | /* Compatibility stuff. */ 27 | 28 | /* Define as 0 or 1 according to the floating point format suported by the 29 | machine */ 30 | #define HAVE_IEEEFP 1 31 | 32 | /* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ 33 | #define HOST_FILLORDER FILLORDER_MSB2LSB 34 | 35 | /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian 36 | (Intel) */ 37 | #define HOST_BIGENDIAN 0 38 | 39 | /* Support CCITT Group 3 & 4 algorithms */ 40 | #define CCITT_SUPPORT 1 41 | 42 | /* Support JPEG compression (requires IJG JPEG library) */ 43 | /* #undef JPEG_SUPPORT */ 44 | 45 | /* Support JBIG compression (requires JBIG-KIT library) */ 46 | /* #undef JBIG_SUPPORT */ 47 | 48 | /* Support LogLuv high dynamic range encoding */ 49 | #define LOGLUV_SUPPORT 1 50 | 51 | /* Support LZW algorithm */ 52 | #define LZW_SUPPORT 1 53 | 54 | /* Support NeXT 2-bit RLE algorithm */ 55 | #define NEXT_SUPPORT 1 56 | 57 | /* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation 58 | fails with unpatched IJG JPEG library) */ 59 | /* #undef OJPEG_SUPPORT */ 60 | 61 | /* Support Macintosh PackBits algorithm */ 62 | #define PACKBITS_SUPPORT 1 63 | 64 | /* Support Pixar log-format algorithm (requires Zlib) */ 65 | /* #undef PIXARLOG_SUPPORT */ 66 | 67 | /* Support ThunderScan 4-bit RLE algorithm */ 68 | #define THUNDER_SUPPORT 1 69 | 70 | /* Support Deflate compression */ 71 | /* #undef ZIP_SUPPORT */ 72 | 73 | /* Support strip chopping (whether or not to convert single-strip uncompressed 74 | images to mutiple strips of ~8Kb to reduce memory usage) */ 75 | #define STRIPCHOP_DEFAULT TIFF_STRIPCHOP 76 | 77 | /* Enable SubIFD tag (330) support */ 78 | #define SUBIFD_SUPPORT 1 79 | 80 | /* Treat extra sample as alpha (default enabled). The RGBA interface will 81 | treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many 82 | packages produce RGBA files but don't mark the alpha properly. */ 83 | #define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 84 | 85 | /* Pick up YCbCr subsampling info from the JPEG data stream to support files 86 | lacking the tag (default enabled). */ 87 | #define CHECK_JPEG_YCBCR_SUBSAMPLING 1 88 | 89 | /* Support MS MDI magic number files as TIFF */ 90 | #define MDI_SUPPORT 1 91 | 92 | /* 93 | * Feature support definitions. 94 | * XXX: These macros are obsoleted. Don't use them in your apps! 95 | * Macros stays here for backward compatibility and should be always defined. 96 | */ 97 | #define COLORIMETRY_SUPPORT 98 | #define YCBCR_SUPPORT 99 | #define CMYK_SUPPORT 100 | #define ICC_SUPPORT 101 | #define PHOTOSHOP_SUPPORT 102 | #define IPTC_SUPPORT 103 | 104 | #endif /* _TIFFCONF_ */ 105 | -------------------------------------------------------------------------------- /ArchLinux/tkimg/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Andrew O'Neill 2 | # Contributor: Stefan Husmann 3 | # Contributor: Martin C. Doege 4 | # Contributor: kotyz 5 | 6 | pkgname=tkimg 7 | _pkgname=Img-Source 8 | pkgver=1.4.7 9 | pkgrel=1 10 | pkgdesc="This package enhances Tk, adding support for many other Image formats: BMP, XBM, XPM, GIF, PNG, JPEG, TIFF and postscript." 11 | url="http://tkimg.sourceforge.net" 12 | #arch=('x86_64') 13 | arch=('any') 14 | license=('custom') 15 | depends=('zlib' 'libjpeg' 'libpng' 'libtiff' 'tcl' 'tk' 'tcllib') 16 | source=(http://downloads.sourceforge.net/${pkgname}/${_pkgname}-${pkgver}.tar.gz) 17 | sha256sums=('5e513e0913e1f36f6802abf60cf9b8bfd6810bcc4b5a27c340e53bb4d12ab2ee') 18 | 19 | build() { 20 | cd ${_pkgname}-${pkgver} 21 | 22 | ./configure --prefix=/usr --enable-64bit --enable-threads 23 | make all 24 | } 25 | 26 | package() { 27 | cd ${_pkgname}-${pkgver} 28 | 29 | make INSTALL_ROOT="${pkgdir}" install 30 | install -Dm644 license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 31 | } -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/bin/yapps: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | # 4 | # Yapps 2 - yet another python parser system 5 | # Copyright 1999-2003 by Amit J. Patel 6 | # 7 | # This version of Yapps 2 can be distributed under the 8 | # terms of the MIT open source license, either found in the LICENSE file 9 | # included with the Yapps distribution 10 | # or at 11 | # 12 | # 13 | 14 | import sys, re 15 | 16 | from yapps import runtime, parsetree 17 | 18 | def generate(inputfilename, outputfilename='', dump=0, **flags): 19 | """Generate a grammar, given an input filename (X.g) 20 | and an output filename (defaulting to X.py).""" 21 | 22 | if not outputfilename: 23 | if inputfilename.endswith('.g'): 24 | outputfilename = inputfilename[:-2] + '.py' 25 | else: 26 | raise Exception('Must specify output filename if input filename is not *.g') 27 | 28 | DIVIDER = '\n%%\n' # This pattern separates the pre/post parsers 29 | preparser, postparser = None, None # Code before and after the parser desc 30 | 31 | # Read the entire file 32 | s = open(inputfilename,'r').read() 33 | 34 | # See if there's a separation between the pre-parser and parser 35 | f = s.find(DIVIDER) 36 | if f >= 0: preparser, s = s[:f]+'\n\n', s[f+len(DIVIDER):] 37 | 38 | # See if there's a separation between the parser and post-parser 39 | f = s.find(DIVIDER) 40 | if f >= 0: s, postparser = s[:f], '\n\n'+s[f+len(DIVIDER):] 41 | 42 | # Create the parser and scanner and parse the text 43 | scanner = grammar.ParserDescriptionScanner(s, filename=inputfilename) 44 | if preparser: scanner.del_line += preparser.count('\n') 45 | 46 | parser = grammar.ParserDescription(scanner) 47 | t = runtime.wrap_error_reporter(parser, 'Parser') 48 | if t is None: return 1 # Failure 49 | if preparser is not None: t.preparser = preparser 50 | if postparser is not None: t.postparser = postparser 51 | 52 | # Check the options 53 | for f in t.options.keys(): 54 | for opt,_,_ in yapps_options: 55 | if f == opt: break 56 | else: 57 | print >>sys.stderr, 'Warning: unrecognized option', f 58 | # Add command line options to the set 59 | for f in flags.keys(): t.options[f] = flags[f] 60 | 61 | # Generate the output 62 | if dump: 63 | t.dump_information() 64 | else: 65 | t.output = open(outputfilename, 'w') 66 | t.generate_output() 67 | return 0 68 | 69 | if __name__ == '__main__': 70 | import doctest 71 | doctest.testmod(sys.modules['__main__']) 72 | doctest.testmod(parsetree) 73 | 74 | # Someday I will use optparse, but Python 2.3 is too new at the moment. 75 | yapps_options = [ 76 | ('context-insensitive-scanner', 77 | 'context-insensitive-scanner', 78 | 'Scan all tokens (see docs)'), 79 | ] 80 | 81 | import getopt 82 | optlist, args = getopt.getopt(sys.argv[1:], 'f:', ['help', 'dump', 'use-devel-grammar']) 83 | if not args or len(args) > 2: 84 | print >>sys.stderr, 'Usage:' 85 | print >>sys.stderr, ' python', sys.argv[0], '[flags] input.g [output.py]' 86 | print >>sys.stderr, 'Flags:' 87 | print >>sys.stderr, (' --dump' + ' '*40)[:35] + 'Dump out grammar information' 88 | print >>sys.stderr, (' --use-devel-grammar' + ' '*40)[:35] + 'Use the devel grammar parser from yapps_grammar.py instead of the stable grammar from grammar.py' 89 | for flag, _, doc in yapps_options: 90 | print >>sys.stderr, (' -f' + flag + ' '*40)[:35] + doc 91 | else: 92 | # Read in the options and create a list of flags 93 | flags = {} 94 | use_devel_grammar = 0 95 | for opt in optlist: 96 | for flag, name, _ in yapps_options: 97 | if opt == ('-f', flag): 98 | flags[name] = 1 99 | break 100 | else: 101 | if opt == ('--dump', ''): 102 | flags['dump'] = 1 103 | elif opt == ('--use-devel-grammar', ''): 104 | use_devel_grammar = 1 105 | else: 106 | print >>sys.stderr, 'Warning: unrecognized option', opt[0], opt[1] 107 | 108 | if use_devel_grammar: 109 | import yapps_grammar as grammar 110 | else: 111 | from yapps import grammar 112 | 113 | sys.exit(generate(*tuple(args), **flags)) 114 | -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/__init__.py: -------------------------------------------------------------------------------- 1 | # empty 2 | -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/__init__.pyc -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/grammar.py: -------------------------------------------------------------------------------- 1 | # grammar.py, part of Yapps 2 - yet another python parser system 2 | # Copyright 1999-2003 by Amit J. Patel 3 | # 4 | # This version of the Yapps 2 grammar can be distributed under the 5 | # terms of the MIT open source license, either found in the LICENSE 6 | # file included with the Yapps distribution 7 | # or at 8 | # 9 | # 10 | 11 | """Parser for Yapps grammars. 12 | 13 | This file defines the grammar of Yapps grammars. Naturally, it is 14 | implemented in Yapps. The grammar.py module needed by Yapps is built 15 | by running Yapps on yapps_grammar.g. (Holy circularity, Batman!) 16 | 17 | """ 18 | 19 | import sys, re 20 | from yapps import parsetree 21 | 22 | ###################################################################### 23 | def cleanup_choice(rule, lst): 24 | if len(lst) == 0: return Sequence(rule, []) 25 | if len(lst) == 1: return lst[0] 26 | return parsetree.Choice(rule, *tuple(lst)) 27 | 28 | def cleanup_sequence(rule, lst): 29 | if len(lst) == 1: return lst[0] 30 | return parsetree.Sequence(rule, *tuple(lst)) 31 | 32 | def resolve_name(rule, tokens, id, args): 33 | if id in [x[0] for x in tokens]: 34 | # It's a token 35 | if args: 36 | print 'Warning: ignoring parameters on TOKEN %s<<%s>>' % (id, args) 37 | return parsetree.Terminal(rule, id) 38 | else: 39 | # It's a name, so assume it's a nonterminal 40 | return parsetree.NonTerminal(rule, id, args) 41 | 42 | 43 | # Begin -- grammar generated by Yapps 44 | import sys, re 45 | from yapps import runtime 46 | 47 | class ParserDescriptionScanner(runtime.Scanner): 48 | patterns = [ 49 | ('"rule"', re.compile('rule')), 50 | ('"ignore"', re.compile('ignore')), 51 | ('"token"', re.compile('token')), 52 | ('"option"', re.compile('option')), 53 | ('":"', re.compile(':')), 54 | ('"parser"', re.compile('parser')), 55 | ('[ \t\r\n]+', re.compile('[ \t\r\n]+')), 56 | ('#.*?\r?\n', re.compile('#.*?\r?\n')), 57 | ('EOF', re.compile('$')), 58 | ('ATTR', re.compile('<<.+?>>')), 59 | ('STMT', re.compile('{{.+?}}')), 60 | ('ID', re.compile('[a-zA-Z_][a-zA-Z_0-9]*')), 61 | ('STR', re.compile('[rR]?\'([^\\n\'\\\\]|\\\\.)*\'|[rR]?"([^\\n"\\\\]|\\\\.)*"')), 62 | ('LP', re.compile('\\(')), 63 | ('RP', re.compile('\\)')), 64 | ('LB', re.compile('\\[')), 65 | ('RB', re.compile('\\]')), 66 | ('OR', re.compile('[|]')), 67 | ('STAR', re.compile('[*]')), 68 | ('PLUS', re.compile('[+]')), 69 | ('QUEST', re.compile('[?]')), 70 | ('COLON', re.compile(':')), 71 | ] 72 | def __init__(self, str,*args,**kw): 73 | runtime.Scanner.__init__(self,None,{'[ \t\r\n]+':None,'#.*?\r?\n':None,},str,*args,**kw) 74 | 75 | class ParserDescription(runtime.Parser): 76 | Context = runtime.Context 77 | def Parser(self, _parent=None): 78 | _context = self.Context(_parent, self._scanner, 'Parser', []) 79 | self._scan('"parser"', context=_context) 80 | ID = self._scan('ID', context=_context) 81 | self._scan('":"', context=_context) 82 | Options = self.Options(_context) 83 | Tokens = self.Tokens(_context) 84 | Rules = self.Rules(Tokens, _context) 85 | EOF = self._scan('EOF', context=_context) 86 | return parsetree.Generator(ID,Options,Tokens,Rules) 87 | 88 | def Options(self, _parent=None): 89 | _context = self.Context(_parent, self._scanner, 'Options', []) 90 | opt = {} 91 | while self._peek('"option"', '"token"', '"ignore"', 'EOF', '"rule"', context=_context) == '"option"': 92 | self._scan('"option"', context=_context) 93 | self._scan('":"', context=_context) 94 | Str = self.Str(_context) 95 | opt[Str] = 1 96 | return opt 97 | 98 | def Tokens(self, _parent=None): 99 | _context = self.Context(_parent, self._scanner, 'Tokens', []) 100 | tok = [] 101 | while self._peek('"token"', '"ignore"', 'EOF', '"rule"', context=_context) in ['"token"', '"ignore"']: 102 | _token = self._peek('"token"', '"ignore"', context=_context) 103 | if _token == '"token"': 104 | self._scan('"token"', context=_context) 105 | ID = self._scan('ID', context=_context) 106 | self._scan('":"', context=_context) 107 | Str = self.Str(_context) 108 | tok.append( (ID,Str) ) 109 | else: # == '"ignore"' 110 | self._scan('"ignore"', context=_context) 111 | self._scan('":"', context=_context) 112 | Str = self.Str(_context) 113 | ign = ('#ignore',Str) 114 | if self._peek('STMT', '"token"', '"ignore"', 'EOF', '"rule"', context=_context) == 'STMT': 115 | STMT = self._scan('STMT', context=_context) 116 | ign = ign + (STMT[2:-2],) 117 | tok.append( ign ) 118 | return tok 119 | 120 | def Rules(self, tokens, _parent=None): 121 | _context = self.Context(_parent, self._scanner, 'Rules', [tokens]) 122 | rul = [] 123 | while self._peek('"rule"', 'EOF', context=_context) == '"rule"': 124 | self._scan('"rule"', context=_context) 125 | ID = self._scan('ID', context=_context) 126 | OptParam = self.OptParam(_context) 127 | self._scan('":"', context=_context) 128 | ClauseA = self.ClauseA(ID, tokens, _context) 129 | rul.append( (ID, OptParam, ClauseA) ) 130 | return rul 131 | 132 | def ClauseA(self, rule, tokens, _parent=None): 133 | _context = self.Context(_parent, self._scanner, 'ClauseA', [rule, tokens]) 134 | ClauseB = self.ClauseB(rule,tokens, _context) 135 | v = [ClauseB] 136 | while self._peek('OR', 'RP', 'RB', '"rule"', 'EOF', context=_context) == 'OR': 137 | OR = self._scan('OR', context=_context) 138 | ClauseB = self.ClauseB(rule,tokens, _context) 139 | v.append(ClauseB) 140 | return cleanup_choice(rule,v) 141 | 142 | def ClauseB(self, rule,tokens, _parent=None): 143 | _context = self.Context(_parent, self._scanner, 'ClauseB', [rule,tokens]) 144 | v = [] 145 | while self._peek('STR', 'ID', 'LP', 'LB', 'STMT', 'OR', 'RP', 'RB', '"rule"', 'EOF', context=_context) in ['STR', 'ID', 'LP', 'LB', 'STMT']: 146 | ClauseC = self.ClauseC(rule,tokens, _context) 147 | v.append(ClauseC) 148 | return cleanup_sequence(rule, v) 149 | 150 | def ClauseC(self, rule,tokens, _parent=None): 151 | _context = self.Context(_parent, self._scanner, 'ClauseC', [rule,tokens]) 152 | ClauseD = self.ClauseD(rule,tokens, _context) 153 | _token = self._peek('PLUS', 'STAR', 'QUEST', 'STR', 'ID', 'LP', 'LB', 'STMT', 'OR', 'RP', 'RB', '"rule"', 'EOF', context=_context) 154 | if _token == 'PLUS': 155 | PLUS = self._scan('PLUS', context=_context) 156 | return parsetree.Plus(rule, ClauseD) 157 | elif _token == 'STAR': 158 | STAR = self._scan('STAR', context=_context) 159 | return parsetree.Star(rule, ClauseD) 160 | elif _token == 'QUEST': 161 | QUEST = self._scan('QUEST', context=_context) 162 | return parsetree.Option(rule, ClauseD) 163 | else: 164 | return ClauseD 165 | 166 | def ClauseD(self, rule,tokens, _parent=None): 167 | _context = self.Context(_parent, self._scanner, 'ClauseD', [rule,tokens]) 168 | _token = self._peek('STR', 'ID', 'LP', 'LB', 'STMT', context=_context) 169 | if _token == 'STR': 170 | STR = self._scan('STR', context=_context) 171 | t = (STR, eval(STR,{},{})) 172 | if t not in tokens: tokens.insert( 0, t ) 173 | return parsetree.Terminal(rule, STR) 174 | elif _token == 'ID': 175 | ID = self._scan('ID', context=_context) 176 | OptParam = self.OptParam(_context) 177 | return resolve_name(rule,tokens, ID, OptParam) 178 | elif _token == 'LP': 179 | LP = self._scan('LP', context=_context) 180 | ClauseA = self.ClauseA(rule,tokens, _context) 181 | RP = self._scan('RP', context=_context) 182 | return ClauseA 183 | elif _token == 'LB': 184 | LB = self._scan('LB', context=_context) 185 | ClauseA = self.ClauseA(rule,tokens, _context) 186 | RB = self._scan('RB', context=_context) 187 | return parsetree.Option(rule, ClauseA) 188 | else: # == 'STMT' 189 | STMT = self._scan('STMT', context=_context) 190 | return parsetree.Eval(rule, STMT[2:-2]) 191 | 192 | def OptParam(self, _parent=None): 193 | _context = self.Context(_parent, self._scanner, 'OptParam', []) 194 | if self._peek('ATTR', '":"', 'PLUS', 'STAR', 'QUEST', 'STR', 'ID', 'LP', 'LB', 'STMT', 'OR', 'RP', 'RB', '"rule"', 'EOF', context=_context) == 'ATTR': 195 | ATTR = self._scan('ATTR', context=_context) 196 | return ATTR[2:-2] 197 | return '' 198 | 199 | def Str(self, _parent=None): 200 | _context = self.Context(_parent, self._scanner, 'Str', []) 201 | STR = self._scan('STR', context=_context) 202 | return eval(STR,{},{}) 203 | 204 | 205 | def parse(rule, text): 206 | P = ParserDescription(ParserDescriptionScanner(text)) 207 | return runtime.wrap_error_reporter(P, rule) 208 | 209 | # End -- grammar generated by Yapps 210 | 211 | 212 | -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/grammar.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/grammar.pyc -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/parsetree.py: -------------------------------------------------------------------------------- 1 | # parsetree.py, part of Yapps 2 - yet another python parser system 2 | # Copyright 1999-2003 by Amit J. Patel 3 | # 4 | # This version of the Yapps 2 Runtime can be distributed under the 5 | # terms of the MIT open source license, either found in the LICENSE file 6 | # included with the Yapps distribution 7 | # or at 8 | # 9 | # 10 | 11 | """Classes used to represent parse trees and generate output. 12 | 13 | This module defines the Generator class, which drives the generation 14 | of Python output from a grammar parse tree. It also defines nodes 15 | used to represent the parse tree; they are derived from class Node. 16 | 17 | The main logic of Yapps is in this module. 18 | """ 19 | 20 | import sys, re 21 | 22 | ###################################################################### 23 | INDENT = ' '*4 24 | class Generator: 25 | 26 | # TODO: many of the methods here should be class methods, not instance methods 27 | 28 | def __init__(self, name, options, tokens, rules): 29 | self.change_count = 0 30 | self.name = name 31 | self.options = options 32 | self.preparser = '' 33 | self.postparser = None 34 | 35 | self.tokens = {} # Map from tokens to regexps 36 | self.ignore = {} # List of token names to ignore in parsing, map to statements 37 | self.terminals = [] # List of token names (to maintain ordering) 38 | for t in tokens: 39 | if len(t) == 3: 40 | n,t,s = t 41 | else: 42 | n,t = t 43 | s = None 44 | 45 | if n == '#ignore': 46 | n = t 47 | self.ignore[n] = s 48 | if n in self.tokens.keys() and self.tokens[n] != t: 49 | print >>sys.stderr, 'Warning: token %s defined more than once.' % n 50 | self.tokens[n] = t 51 | self.terminals.append(n) 52 | 53 | self.rules = {} # Map from rule names to parser nodes 54 | self.params = {} # Map from rule names to parameters 55 | self.goals = [] # List of rule names (to maintain ordering) 56 | for n,p,r in rules: 57 | self.params[n] = p 58 | self.rules[n] = r 59 | self.goals.append(n) 60 | 61 | self.output = sys.stdout 62 | 63 | def has_option(self, name): 64 | return self.options.get(name, 0) 65 | 66 | def non_ignored_tokens(self): 67 | return [x for x in self.terminals if x not in self.ignore] 68 | 69 | def changed(self): 70 | """Increments the change count. 71 | 72 | >>> t = Generator('', [], [], []) 73 | >>> old_count = t.change_count 74 | >>> t.changed() 75 | >>> assert t.change_count == old_count + 1 76 | """ 77 | self.change_count = 1+self.change_count 78 | 79 | def set_subtract(self, a, b): 80 | """Returns the elements of a that are not in b. 81 | 82 | >>> t = Generator('', [], [], []) 83 | >>> t.set_subtract([], []) 84 | [] 85 | >>> t.set_subtract([1, 2], [1, 2]) 86 | [] 87 | >>> t.set_subtract([1, 2, 3], [2]) 88 | [1, 3] 89 | >>> t.set_subtract([1], [2, 3, 4]) 90 | [1] 91 | """ 92 | result = [] 93 | for x in a: 94 | if x not in b: 95 | result.append(x) 96 | return result 97 | 98 | def subset(self, a, b): 99 | """True iff all elements of sequence a are inside sequence b 100 | 101 | >>> t = Generator('', [], [], []) 102 | >>> t.subset([], [1, 2, 3]) 103 | 1 104 | >>> t.subset([1, 2, 3], []) 105 | 0 106 | >>> t.subset([1], [1, 2, 3]) 107 | 1 108 | >>> t.subset([3, 2, 1], [1, 2, 3]) 109 | 1 110 | >>> t.subset([1, 1, 1], [1, 2, 3]) 111 | 1 112 | >>> t.subset([1, 2, 3], [1, 1, 1]) 113 | 0 114 | """ 115 | for x in a: 116 | if x not in b: 117 | return 0 118 | return 1 119 | 120 | def equal_set(self, a, b): 121 | """True iff subset(a, b) and subset(b, a) 122 | 123 | >>> t = Generator('', [], [], []) 124 | >>> a_set = [1, 2, 3] 125 | >>> t.equal_set(a_set, a_set) 126 | 1 127 | >>> t.equal_set(a_set, a_set[:]) 128 | 1 129 | >>> t.equal_set([], a_set) 130 | 0 131 | >>> t.equal_set([1, 2, 3], [3, 2, 1]) 132 | 1 133 | """ 134 | if len(a) != len(b): return 0 135 | if a == b: return 1 136 | return self.subset(a, b) and self.subset(b, a) 137 | 138 | def add_to(self, parent, additions): 139 | "Modify _parent_ to include all elements in _additions_" 140 | for x in additions: 141 | if x not in parent: 142 | parent.append(x) 143 | self.changed() 144 | 145 | def equate(self, a, b): 146 | """Extend (a) and (b) so that they contain each others' elements. 147 | 148 | >>> t = Generator('', [], [], []) 149 | >>> a = [1, 2] 150 | >>> b = [2, 3] 151 | >>> t.equate(a, b) 152 | >>> a 153 | [1, 2, 3] 154 | >>> b 155 | [2, 3, 1] 156 | """ 157 | self.add_to(a, b) 158 | self.add_to(b, a) 159 | 160 | def write(self, *args): 161 | for a in args: 162 | self.output.write(a) 163 | 164 | def in_test(self, expr, full, set): 165 | """Generate a test of (expr) being in (set), where (set) is a subset of (full) 166 | 167 | expr is a string (Python expression) 168 | set is a list of values (which will be converted with repr) 169 | full is the list of all values expr could possibly evaluate to 170 | 171 | >>> t = Generator('', [], [], []) 172 | >>> t.in_test('x', [1,2,3,4], []) 173 | '0' 174 | >>> t.in_test('x', [1,2,3,4], [1,2,3,4]) 175 | '1' 176 | >>> t.in_test('x', [1,2,3,4], [1]) 177 | 'x == 1' 178 | >>> t.in_test('a+b', [1,2,3,4], [1,2]) 179 | 'a+b in [1, 2]' 180 | >>> t.in_test('x', [1,2,3,4,5], [1,2,3]) 181 | 'x not in [4, 5]' 182 | >>> t.in_test('x', [1,2,3,4,5], [1,2,3,4]) 183 | 'x != 5' 184 | """ 185 | 186 | if not set: return '0' 187 | if len(set) == 1: return '%s == %s' % (expr, repr(set[0])) 188 | if full and len(set) > len(full)/2: 189 | # Reverse the sense of the test. 190 | not_set = [x for x in full if x not in set] 191 | return self.not_in_test(expr, full, not_set) 192 | return '%s in %s' % (expr, repr(set)) 193 | 194 | def not_in_test(self, expr, full, set): 195 | """Like in_test, but the reverse test.""" 196 | if not set: return '1' 197 | if len(set) == 1: return '%s != %s' % (expr, repr(set[0])) 198 | return '%s not in %s' % (expr, repr(set)) 199 | 200 | def peek_call(self, a): 201 | """Generate a call to scan for a token in the set 'a'""" 202 | assert type(a) == type([]) 203 | a_set = (repr(a)[1:-1]) 204 | if self.equal_set(a, self.non_ignored_tokens()): a_set = '' 205 | if self.has_option('context-insensitive-scanner'): a_set = '' 206 | if a_set: a_set += "," 207 | 208 | return 'self._peek(%s context=_context)' % a_set 209 | 210 | def peek_test(self, a, b): 211 | """Generate a call to test whether the next token (which could be any of 212 | the elements in a) is in the set b.""" 213 | if self.subset(a, b): return '1' 214 | if self.has_option('context-insensitive-scanner'): a = self.non_ignored_tokens() 215 | return self.in_test(self.peek_call(a), a, b) 216 | 217 | def not_peek_test(self, a, b): 218 | """Like peek_test, but the opposite sense.""" 219 | if self.subset(a, b): return '0' 220 | return self.not_in_test(self.peek_call(a), a, b) 221 | 222 | def calculate(self): 223 | """The main loop to compute the epsilon, first, follow sets. 224 | The loop continues until the sets converge. This works because 225 | each set can only get larger, so when they stop getting larger, 226 | we're done.""" 227 | # First we determine whether a rule accepts epsilon (the empty sequence) 228 | while 1: 229 | for r in self.goals: 230 | self.rules[r].setup(self) 231 | if self.change_count == 0: break 232 | self.change_count = 0 233 | 234 | # Now we compute the first/follow sets 235 | while 1: 236 | for r in self.goals: 237 | self.rules[r].update(self) 238 | if self.change_count == 0: break 239 | self.change_count = 0 240 | 241 | def dump_information(self): 242 | """Display the grammar in somewhat human-readable form.""" 243 | self.calculate() 244 | for r in self.goals: 245 | print ' _____' + '_'*len(r) 246 | print ('___/Rule '+r+'\\' + '_'*80)[:79] 247 | queue = [self.rules[r]] 248 | while queue: 249 | top = queue[0] 250 | del queue[0] 251 | 252 | print 'Rule', repr(top), 'of class', top.__class__.__name__ 253 | top.first.sort() 254 | top.follow.sort() 255 | eps = [] 256 | if top.accepts_epsilon: eps = ['(null)'] 257 | print ' FIRST:', ', '.join(top.first+eps) 258 | print ' FOLLOW:', ', '.join(top.follow) 259 | for x in top.get_children(): queue.append(x) 260 | 261 | def repr_ignore(self): 262 | out="{" 263 | for t,s in self.ignore.iteritems(): 264 | if s is None: s=repr(s) 265 | out += "%s:%s," % (repr(t),s) 266 | out += "}" 267 | return out 268 | 269 | def generate_output(self): 270 | self.calculate() 271 | self.write(self.preparser) 272 | self.write("# Begin -- grammar generated by Yapps\n") 273 | self.write("import sys, re\n") 274 | self.write("from yapps import runtime\n") 275 | self.write("\n") 276 | self.write("class ", self.name, "Scanner(runtime.Scanner):\n") 277 | self.write(" patterns = [\n") 278 | for p in self.terminals: 279 | self.write(" (%s, re.compile(%s)),\n" % ( 280 | repr(p), repr(self.tokens[p]))) 281 | self.write(" ]\n") 282 | self.write(" def __init__(self, str,*args,**kw):\n") 283 | self.write(" runtime.Scanner.__init__(self,None,%s,str,*args,**kw)\n" % 284 | self.repr_ignore()) 285 | self.write("\n") 286 | 287 | self.write("class ", self.name, "(runtime.Parser):\n") 288 | self.write(INDENT, "Context = runtime.Context\n") 289 | for r in self.goals: 290 | self.write(INDENT, "def ", r, "(self") 291 | if self.params[r]: self.write(", ", self.params[r]) 292 | self.write(", _parent=None):\n") 293 | self.write(INDENT+INDENT, "_context = self.Context(_parent, self._scanner, %s, [%s])\n" % 294 | (repr(r), self.params.get(r, ''))) 295 | self.rules[r].output(self, INDENT+INDENT) 296 | self.write("\n") 297 | 298 | self.write("\n") 299 | self.write("def parse(rule, text):\n") 300 | self.write(" P = ", self.name, "(", self.name, "Scanner(text))\n") 301 | self.write(" return runtime.wrap_error_reporter(P, rule)\n") 302 | self.write("\n") 303 | if self.postparser is not None: 304 | self.write("# End -- grammar generated by Yapps\n") 305 | self.write(self.postparser) 306 | else: 307 | self.write("if __name__ == '__main__':\n") 308 | self.write(INDENT, "from sys import argv, stdin\n") 309 | self.write(INDENT, "if len(argv) >= 2:\n") 310 | self.write(INDENT*2, "if len(argv) >= 3:\n") 311 | self.write(INDENT*3, "f = open(argv[2],'r')\n") 312 | self.write(INDENT*2, "else:\n") 313 | self.write(INDENT*3, "f = stdin\n") 314 | self.write(INDENT*2, "print parse(argv[1], f.read())\n") 315 | self.write(INDENT, "else: print >>sys.stderr, 'Args: []'\n") 316 | self.write("# End -- grammar generated by Yapps\n") 317 | 318 | ###################################################################### 319 | class Node: 320 | """This is the base class for all components of a grammar.""" 321 | def __init__(self, rule): 322 | self.rule = rule # name of the rule containing this node 323 | self.first = [] 324 | self.follow = [] 325 | self.accepts_epsilon = 0 326 | 327 | def setup(self, gen): 328 | # Setup will change accepts_epsilon, 329 | # sometimes from 0 to 1 but never 1 to 0. 330 | # It will take a finite number of steps to set things up 331 | pass 332 | 333 | def used(self, vars): 334 | "Return two lists: one of vars used, and the other of vars assigned" 335 | return vars, [] 336 | 337 | def get_children(self): 338 | "Return a list of sub-nodes" 339 | return [] 340 | 341 | def __repr__(self): 342 | return str(self) 343 | 344 | def update(self, gen): 345 | if self.accepts_epsilon: 346 | gen.add_to(self.first, self.follow) 347 | 348 | def output(self, gen, indent): 349 | "Write out code to _gen_ with _indent_:string indentation" 350 | gen.write(indent, "assert 0 # Invalid parser node\n") 351 | 352 | class Terminal(Node): 353 | """This class stores terminal nodes, which are tokens.""" 354 | def __init__(self, rule, token): 355 | Node.__init__(self, rule) 356 | self.token = token 357 | self.accepts_epsilon = 0 358 | 359 | def __str__(self): 360 | return self.token 361 | 362 | def update(self, gen): 363 | Node.update(self, gen) 364 | if self.first != [self.token]: 365 | self.first = [self.token] 366 | gen.changed() 367 | 368 | def output(self, gen, indent): 369 | gen.write(indent) 370 | if re.match('[a-zA-Z_][a-zA-Z_0-9]*$', self.token): 371 | gen.write(self.token, " = ") 372 | gen.write("self._scan(%s, context=_context)\n" % repr(self.token)) 373 | 374 | class Eval(Node): 375 | """This class stores evaluation nodes, from {{ ... }} clauses.""" 376 | def __init__(self, rule, expr): 377 | Node.__init__(self, rule) 378 | self.expr = expr 379 | 380 | def setup(self, gen): 381 | Node.setup(self, gen) 382 | if not self.accepts_epsilon: 383 | self.accepts_epsilon = 1 384 | gen.changed() 385 | 386 | def __str__(self): 387 | return '{{ %s }}' % self.expr.strip() 388 | 389 | def output(self, gen, indent): 390 | gen.write(indent, self.expr.strip(), '\n') 391 | 392 | class NonTerminal(Node): 393 | """This class stores nonterminal nodes, which are rules with arguments.""" 394 | def __init__(self, rule, name, args): 395 | Node.__init__(self, rule) 396 | self.name = name 397 | self.args = args 398 | 399 | def setup(self, gen): 400 | Node.setup(self, gen) 401 | try: 402 | self.target = gen.rules[self.name] 403 | if self.accepts_epsilon != self.target.accepts_epsilon: 404 | self.accepts_epsilon = self.target.accepts_epsilon 405 | gen.changed() 406 | except KeyError: # Oops, it's nonexistent 407 | print >>sys.stderr, 'Error: no rule <%s>' % self.name 408 | self.target = self 409 | 410 | def __str__(self): 411 | return '%s' % self.name 412 | 413 | def update(self, gen): 414 | Node.update(self, gen) 415 | gen.equate(self.first, self.target.first) 416 | gen.equate(self.follow, self.target.follow) 417 | 418 | def output(self, gen, indent): 419 | gen.write(indent) 420 | gen.write(self.name, " = ") 421 | args = self.args 422 | if args: args += ', ' 423 | args += '_context' 424 | gen.write("self.", self.name, "(", args, ")\n") 425 | 426 | class Sequence(Node): 427 | """This class stores a sequence of nodes (A B C ...)""" 428 | def __init__(self, rule, *children): 429 | Node.__init__(self, rule) 430 | self.children = children 431 | 432 | def setup(self, gen): 433 | Node.setup(self, gen) 434 | for c in self.children: c.setup(gen) 435 | 436 | if not self.accepts_epsilon: 437 | # If it's not already accepting epsilon, it might now do so. 438 | for c in self.children: 439 | # any non-epsilon means all is non-epsilon 440 | if not c.accepts_epsilon: break 441 | else: 442 | self.accepts_epsilon = 1 443 | gen.changed() 444 | 445 | def get_children(self): 446 | return self.children 447 | 448 | def __str__(self): 449 | return '( %s )' % ' '.join(map(str, self.children)) 450 | 451 | def update(self, gen): 452 | Node.update(self, gen) 453 | for g in self.children: 454 | g.update(gen) 455 | 456 | empty = 1 457 | for g_i in range(len(self.children)): 458 | g = self.children[g_i] 459 | 460 | if empty: gen.add_to(self.first, g.first) 461 | if not g.accepts_epsilon: empty = 0 462 | 463 | if g_i == len(self.children)-1: 464 | next = self.follow 465 | else: 466 | next = self.children[1+g_i].first 467 | gen.add_to(g.follow, next) 468 | 469 | if self.children: 470 | gen.add_to(self.follow, self.children[-1].follow) 471 | 472 | def output(self, gen, indent): 473 | if self.children: 474 | for c in self.children: 475 | c.output(gen, indent) 476 | else: 477 | # Placeholder for empty sequences, just in case 478 | gen.write(indent, 'pass\n') 479 | 480 | class Choice(Node): 481 | """This class stores a choice between nodes (A | B | C | ...)""" 482 | def __init__(self, rule, *children): 483 | Node.__init__(self, rule) 484 | self.children = children 485 | 486 | def setup(self, gen): 487 | Node.setup(self, gen) 488 | for c in self.children: c.setup(gen) 489 | 490 | if not self.accepts_epsilon: 491 | for c in self.children: 492 | if c.accepts_epsilon: 493 | self.accepts_epsilon = 1 494 | gen.changed() 495 | 496 | def get_children(self): 497 | return self.children 498 | 499 | def __str__(self): 500 | return '( %s )' % ' | '.join(map(str, self.children)) 501 | 502 | def update(self, gen): 503 | Node.update(self, gen) 504 | for g in self.children: 505 | g.update(gen) 506 | 507 | for g in self.children: 508 | gen.add_to(self.first, g.first) 509 | gen.add_to(self.follow, g.follow) 510 | for g in self.children: 511 | gen.add_to(g.follow, self.follow) 512 | if self.accepts_epsilon: 513 | gen.add_to(self.first, self.follow) 514 | 515 | def output(self, gen, indent): 516 | test = "if" 517 | gen.write(indent, "_token = ", gen.peek_call(self.first), "\n") 518 | tokens_seen = [] 519 | tokens_unseen = self.first[:] 520 | if gen.has_option('context-insensitive-scanner'): 521 | # Context insensitive scanners can return ANY token, 522 | # not only the ones in first. 523 | tokens_unseen = gen.non_ignored_tokens() 524 | for c in self.children: 525 | testset = c.first[:] 526 | removed = [] 527 | for x in testset: 528 | if x in tokens_seen: 529 | testset.remove(x) 530 | removed.append(x) 531 | if x in tokens_unseen: tokens_unseen.remove(x) 532 | tokens_seen = tokens_seen + testset 533 | if removed: 534 | if not testset: 535 | print >>sys.stderr, 'Error in rule', self.rule+':' 536 | else: 537 | print >>sys.stderr, 'Warning in rule', self.rule+':' 538 | print >>sys.stderr, ' *', self 539 | print >>sys.stderr, ' * These tokens could be matched by more than one clause:' 540 | print >>sys.stderr, ' *', ' '.join(removed) 541 | 542 | if testset: 543 | if not tokens_unseen: # context sensitive scanners only! 544 | if test == 'if': 545 | # if it's the first AND last test, then 546 | # we can simply put the code without an if/else 547 | c.output(gen, indent) 548 | else: 549 | gen.write(indent, "else:") 550 | t = gen.in_test('', [], testset) 551 | if len(t) < 70-len(indent): 552 | gen.write(' #', t) 553 | gen.write("\n") 554 | c.output(gen, indent+INDENT) 555 | else: 556 | gen.write(indent, test, " ", 557 | gen.in_test('_token', tokens_unseen, testset), 558 | ":\n") 559 | c.output(gen, indent+INDENT) 560 | test = "elif" 561 | 562 | if tokens_unseen: 563 | gen.write(indent, "else:\n") 564 | gen.write(indent, INDENT, "raise runtime.SyntaxError(_token[0], ") 565 | gen.write("'Could not match ", self.rule, "')\n") 566 | 567 | class Wrapper(Node): 568 | """This is a base class for nodes that modify a single child.""" 569 | def __init__(self, rule, child): 570 | Node.__init__(self, rule) 571 | self.child = child 572 | 573 | def setup(self, gen): 574 | Node.setup(self, gen) 575 | self.child.setup(gen) 576 | 577 | def get_children(self): 578 | return [self.child] 579 | 580 | def update(self, gen): 581 | Node.update(self, gen) 582 | self.child.update(gen) 583 | gen.add_to(self.first, self.child.first) 584 | gen.equate(self.follow, self.child.follow) 585 | 586 | class Option(Wrapper): 587 | """This class represents an optional clause of the form [A]""" 588 | def setup(self, gen): 589 | Wrapper.setup(self, gen) 590 | if not self.accepts_epsilon: 591 | self.accepts_epsilon = 1 592 | gen.changed() 593 | 594 | def __str__(self): 595 | return '[ %s ]' % str(self.child) 596 | 597 | def output(self, gen, indent): 598 | if self.child.accepts_epsilon: 599 | print >>sys.stderr, 'Warning in rule', self.rule+': contents may be empty.' 600 | gen.write(indent, "if %s:\n" % 601 | gen.peek_test(self.first, self.child.first)) 602 | self.child.output(gen, indent+INDENT) 603 | 604 | if gen.has_option('context-insensitive-scanner'): 605 | gen.write(indent, "if %s:\n" % 606 | gen.not_peek_test(gen.non_ignored_tokens(), self.follow)) 607 | gen.write(indent+INDENT, "raise runtime.SyntaxError(pos=self._scanner.get_pos(), context=_context, msg='Need one of ' + ', '.join(%s))\n" % 608 | repr(self.first)) 609 | 610 | 611 | class Plus(Wrapper): 612 | """This class represents a 1-or-more repetition clause of the form A+""" 613 | def setup(self, gen): 614 | Wrapper.setup(self, gen) 615 | if self.accepts_epsilon != self.child.accepts_epsilon: 616 | self.accepts_epsilon = self.child.accepts_epsilon 617 | gen.changed() 618 | 619 | def __str__(self): 620 | return '%s+' % str(self.child) 621 | 622 | def update(self, gen): 623 | Wrapper.update(self, gen) 624 | gen.add_to(self.child.follow, self.child.first) 625 | 626 | def output(self, gen, indent): 627 | if self.child.accepts_epsilon: 628 | print >>sys.stderr, 'Warning in rule', self.rule+':' 629 | print >>sys.stderr, ' * The repeated pattern could be empty. The resulting parser may not work properly.' 630 | gen.write(indent, "while 1:\n") 631 | self.child.output(gen, indent+INDENT) 632 | union = self.first[:] 633 | gen.add_to(union, self.follow) 634 | gen.write(indent+INDENT, "if %s: break\n" % 635 | gen.not_peek_test(union, self.child.first)) 636 | 637 | if gen.has_option('context-insensitive-scanner'): 638 | gen.write(indent, "if %s:\n" % 639 | gen.not_peek_test(gen.non_ignored_tokens(), self.follow)) 640 | gen.write(indent+INDENT, "raise runtime.SyntaxError(pos=self._scanner.get_pos(), context=_context, msg='Need one of ' + ', '.join(%s))\n" % 641 | repr(self.first)) 642 | 643 | 644 | class Star(Wrapper): 645 | """This class represents a 0-or-more repetition clause of the form A*""" 646 | def setup(self, gen): 647 | Wrapper.setup(self, gen) 648 | if not self.accepts_epsilon: 649 | self.accepts_epsilon = 1 650 | gen.changed() 651 | 652 | def __str__(self): 653 | return '%s*' % str(self.child) 654 | 655 | def update(self, gen): 656 | Wrapper.update(self, gen) 657 | gen.add_to(self.child.follow, self.child.first) 658 | 659 | def output(self, gen, indent): 660 | if self.child.accepts_epsilon: 661 | print >>sys.stderr, 'Warning in rule', self.rule+':' 662 | print >>sys.stderr, ' * The repeated pattern could be empty. The resulting parser probably will not work properly.' 663 | gen.write(indent, "while %s:\n" % 664 | gen.peek_test(self.follow, self.child.first)) 665 | self.child.output(gen, indent+INDENT) 666 | 667 | # TODO: need to generate tests like this in lots of rules 668 | if gen.has_option('context-insensitive-scanner'): 669 | gen.write(indent, "if %s:\n" % 670 | gen.not_peek_test(gen.non_ignored_tokens(), self.follow)) 671 | gen.write(indent+INDENT, "raise runtime.SyntaxError(pos=self._scanner.get_pos(), context=_context, msg='Need one of ' + ', '.join(%s))\n" % 672 | repr(self.first)) 673 | 674 | -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/parsetree.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/parsetree.pyc -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/runtime.py: -------------------------------------------------------------------------------- 1 | # Yapps 2 Runtime, part of Yapps 2 - yet another python parser system 2 | # Copyright 1999-2003 by Amit J. Patel 3 | # Enhancements copyright 2003-2004 by Matthias Urlichs 4 | # 5 | # This version of the Yapps 2 Runtime can be distributed under the 6 | # terms of the MIT open source license, either found in the LICENSE file 7 | # included with the Yapps distribution 8 | # or at 9 | # 10 | # 11 | 12 | """Run time libraries needed to run parsers generated by Yapps. 13 | 14 | This module defines parse-time exception classes, a scanner class, a 15 | base class for parsers produced by Yapps, and a context class that 16 | keeps track of the parse stack. 17 | 18 | """ 19 | 20 | import sys, re 21 | 22 | MIN_WINDOW=4096 23 | # File lookup window 24 | 25 | class SyntaxError(Exception): 26 | """When we run into an unexpected token, this is the exception to use""" 27 | def __init__(self, pos=None, msg="Bad Token", context=None): 28 | Exception.__init__(self) 29 | self.pos = pos 30 | self.msg = msg 31 | self.context = context 32 | 33 | def __str__(self): 34 | if not self.pos: return 'SyntaxError' 35 | else: return 'SyntaxError@%s(%s)' % (repr(self.pos), self.msg) 36 | 37 | class NoMoreTokens(Exception): 38 | """Another exception object, for when we run out of tokens""" 39 | pass 40 | 41 | class Token(object): 42 | """Yapps token. 43 | 44 | This is a container for a scanned token. 45 | """ 46 | 47 | def __init__(self, type,value, pos=None): 48 | """Initialize a token.""" 49 | self.type = type 50 | self.value = value 51 | self.pos = pos 52 | 53 | def __repr__(self): 54 | output = '<%s: %s' % (self.type, repr(self.value)) 55 | if self.pos: 56 | output += " @ " 57 | if self.pos[0]: 58 | output += "%s:" % self.pos[0] 59 | if self.pos[1]: 60 | output += "%d" % self.pos[1] 61 | if self.pos[2] is not None: 62 | output += ".%d" % self.pos[2] 63 | output += ">" 64 | return output 65 | 66 | in_name=0 67 | class Scanner(object): 68 | """Yapps scanner. 69 | 70 | The Yapps scanner can work in context sensitive or context 71 | insensitive modes. The token(i) method is used to retrieve the 72 | i-th token. It takes a restrict set that limits the set of tokens 73 | it is allowed to return. In context sensitive mode, this restrict 74 | set guides the scanner. In context insensitive mode, there is no 75 | restriction (the set is always the full set of tokens). 76 | 77 | """ 78 | 79 | def __init__(self, patterns, ignore, input="", 80 | file=None,filename=None,stacked=False): 81 | """Initialize the scanner. 82 | 83 | Parameters: 84 | patterns : [(terminal, uncompiled regex), ...] or None 85 | ignore : {terminal:None, ...} 86 | input : string 87 | 88 | If patterns is None, we assume that the subclass has 89 | defined self.patterns : [(terminal, compiled regex), ...]. 90 | Note that the patterns parameter expects uncompiled regexes, 91 | whereas the self.patterns field expects compiled regexes. 92 | 93 | The 'ignore' value is either None or a callable, which is called 94 | with the scanner and the to-be-ignored match object; this can 95 | be used for include file or comment handling. 96 | """ 97 | 98 | if not filename: 99 | global in_name 100 | filename="" % in_name 101 | in_name += 1 102 | 103 | self.input = input 104 | self.ignore = ignore 105 | self.file = file 106 | self.filename = filename 107 | self.pos = 0 108 | self.del_pos = 0 # skipped 109 | self.line = 1 110 | self.del_line = 0 # skipped 111 | self.col = 0 112 | self.tokens = [] 113 | self.stack = None 114 | self.stacked = stacked 115 | 116 | self.last_read_token = None 117 | self.last_token = None 118 | self.last_types = None 119 | 120 | if patterns is not None: 121 | # Compile the regex strings into regex objects 122 | self.patterns = [] 123 | for terminal, regex in patterns: 124 | self.patterns.append( (terminal, re.compile(regex)) ) 125 | 126 | def stack_input(self, input="", file=None, filename=None): 127 | """Temporarily parse from a second file.""" 128 | 129 | # Already reading from somewhere else: Go on top of that, please. 130 | if self.stack: 131 | # autogenerate a recursion-level-identifying filename 132 | if not filename: 133 | filename = 1 134 | else: 135 | try: 136 | filename += 1 137 | except TypeError: 138 | pass 139 | # now pass off to the include file 140 | self.stack.stack_input(input,file,filename) 141 | else: 142 | 143 | try: 144 | filename += 0 145 | except TypeError: 146 | pass 147 | else: 148 | filename = "" % filename 149 | 150 | # self.stack = object.__new__(self.__class__) 151 | # Scanner.__init__(self.stack,self.patterns,self.ignore,input,file,filename, stacked=True) 152 | 153 | # Note that the pattern+ignore are added by the generated 154 | # scanner code 155 | self.stack = self.__class__(input,file,filename, stacked=True) 156 | 157 | def get_pos(self): 158 | """Return a file/line/char tuple.""" 159 | if self.stack: return self.stack.get_pos() 160 | 161 | return (self.filename, self.line+self.del_line, self.col) 162 | 163 | # def __repr__(self): 164 | # """Print the last few tokens that have been scanned in""" 165 | # output = '' 166 | # for t in self.tokens: 167 | # output += '%s\n' % (repr(t),) 168 | # return output 169 | 170 | def print_line_with_pointer(self, pos, length=0, out=sys.stderr): 171 | """Print the line of 'text' that includes position 'p', 172 | along with a second line with a single caret (^) at position p""" 173 | 174 | file,line,p = pos 175 | if file != self.filename: 176 | if self.stack: return self.stack.print_line_with_pointer(pos,length=length,out=out) 177 | print >>out, "(%s: not in input buffer)" % file 178 | return 179 | 180 | text = self.input 181 | p += length-1 # starts at pos 1 182 | 183 | origline=line 184 | line -= self.del_line 185 | spos=0 186 | if line > 0: 187 | while 1: 188 | line = line - 1 189 | try: 190 | cr = text.index("\n",spos) 191 | except ValueError: 192 | if line: 193 | text = "" 194 | break 195 | if line == 0: 196 | text = text[spos:cr] 197 | break 198 | spos = cr+1 199 | else: 200 | print >>out, "(%s:%d not in input buffer)" % (file,origline) 201 | return 202 | 203 | # Now try printing part of the line 204 | text = text[max(p-80, 0):p+80] 205 | p = p - max(p-80, 0) 206 | 207 | # Strip to the left 208 | i = text[:p].rfind('\n') 209 | j = text[:p].rfind('\r') 210 | if i < 0 or (0 <= j < i): i = j 211 | if 0 <= i < p: 212 | p = p - i - 1 213 | text = text[i+1:] 214 | 215 | # Strip to the right 216 | i = text.find('\n', p) 217 | j = text.find('\r', p) 218 | if i < 0 or (0 <= j < i): i = j 219 | if i >= 0: 220 | text = text[:i] 221 | 222 | # Now shorten the text 223 | while len(text) > 70 and p > 60: 224 | # Cut off 10 chars 225 | text = "..." + text[10:] 226 | p = p - 7 227 | 228 | # Now print the string, along with an indicator 229 | print >>out, '> ',text 230 | print >>out, '> ',' '*p + '^' 231 | 232 | def grab_input(self): 233 | """Get more input if possible.""" 234 | if not self.file: return 235 | if len(self.input) - self.pos >= MIN_WINDOW: return 236 | 237 | data = self.file.read(MIN_WINDOW) 238 | if data is None or data == "": 239 | self.file = None 240 | 241 | # Drop bytes from the start, if necessary. 242 | if self.pos > 2*MIN_WINDOW: 243 | self.del_pos += MIN_WINDOW 244 | self.del_line += self.input[:MIN_WINDOW].count("\n") 245 | self.pos -= MIN_WINDOW 246 | self.input = self.input[MIN_WINDOW:] + data 247 | else: 248 | self.input = self.input + data 249 | 250 | def getchar(self): 251 | """Return the next character.""" 252 | self.grab_input() 253 | 254 | c = self.input[self.pos] 255 | self.pos += 1 256 | return c 257 | 258 | def token(self, restrict, context=None): 259 | """Scan for another token.""" 260 | 261 | while 1: 262 | if self.stack: 263 | try: 264 | return self.stack.token(restrict, context) 265 | except StopIteration: 266 | self.stack = None 267 | 268 | # Keep looking for a token, ignoring any in self.ignore 269 | self.grab_input() 270 | 271 | # special handling for end-of-file 272 | if self.stacked and self.pos==len(self.input): 273 | raise StopIteration 274 | 275 | # Search the patterns for the longest match, with earlier 276 | # tokens in the list having preference 277 | best_match = -1 278 | best_pat = '(error)' 279 | best_m = None 280 | for p, regexp in self.patterns: 281 | # First check to see if we're ignoring this token 282 | if restrict and p not in restrict and p not in self.ignore: 283 | continue 284 | m = regexp.match(self.input, self.pos) 285 | if m and m.end()-m.start() > best_match: 286 | # We got a match that's better than the previous one 287 | best_pat = p 288 | best_match = m.end()-m.start() 289 | best_m = m 290 | 291 | # If we didn't find anything, raise an error 292 | if best_pat == '(error)' and best_match < 0: 293 | msg = 'Bad Token' 294 | if restrict: 295 | msg = 'Trying to find one of '+', '.join(restrict) 296 | raise SyntaxError(self.get_pos(), msg, context=context) 297 | 298 | ignore = best_pat in self.ignore 299 | value = self.input[self.pos:self.pos+best_match] 300 | if not ignore: 301 | tok=Token(type=best_pat, value=value, pos=self.get_pos()) 302 | 303 | self.pos += best_match 304 | 305 | npos = value.rfind("\n") 306 | if npos > -1: 307 | self.col = best_match-npos 308 | self.line += value.count("\n") 309 | else: 310 | self.col += best_match 311 | 312 | # If we found something that isn't to be ignored, return it 313 | if not ignore: 314 | if len(self.tokens) >= 10: 315 | del self.tokens[0] 316 | self.tokens.append(tok) 317 | self.last_read_token = tok 318 | # print repr(tok) 319 | return tok 320 | else: 321 | ignore = self.ignore[best_pat] 322 | if ignore: 323 | ignore(self, best_m) 324 | 325 | def peek(self, *types, **kw): 326 | """Returns the token type for lookahead; if there are any args 327 | then the list of args is the set of token types to allow""" 328 | context = kw.get("context",None) 329 | if self.last_token is None: 330 | self.last_types = types 331 | self.last_token = self.token(types,context) 332 | elif self.last_types: 333 | for t in types: 334 | if t not in self.last_types: 335 | raise NotImplementedError("Unimplemented: restriction set changed") 336 | return self.last_token.type 337 | 338 | def scan(self, type, **kw): 339 | """Returns the matched text, and moves to the next token""" 340 | context = kw.get("context",None) 341 | 342 | if self.last_token is None: 343 | tok = self.token([type],context) 344 | else: 345 | if self.last_types and type not in self.last_types: 346 | raise NotImplementedError("Unimplemented: restriction set changed") 347 | 348 | tok = self.last_token 349 | self.last_token = None 350 | if tok.type != type: 351 | if not self.last_types: self.last_types=[] 352 | raise SyntaxError(tok.pos, 'Trying to find '+type+': '+ ', '.join(self.last_types)+", got "+tok.type, context=context) 353 | return tok.value 354 | 355 | class Parser(object): 356 | """Base class for Yapps-generated parsers. 357 | 358 | """ 359 | 360 | def __init__(self, scanner): 361 | self._scanner = scanner 362 | 363 | def _stack(self, input="",file=None,filename=None): 364 | """Temporarily read from someplace else""" 365 | self._scanner.stack_input(input,file,filename) 366 | self._tok = None 367 | 368 | def _peek(self, *types, **kw): 369 | """Returns the token type for lookahead; if there are any args 370 | then the list of args is the set of token types to allow""" 371 | return self._scanner.peek(*types, **kw) 372 | 373 | def _scan(self, type, **kw): 374 | """Returns the matched text, and moves to the next token""" 375 | return self._scanner.scan(type, **kw) 376 | 377 | class Context(object): 378 | """Class to represent the parser's call stack. 379 | 380 | Every rule creates a Context that links to its parent rule. The 381 | contexts can be used for debugging. 382 | 383 | """ 384 | 385 | def __init__(self, parent, scanner, rule, args=()): 386 | """Create a new context. 387 | 388 | Args: 389 | parent: Context object or None 390 | scanner: Scanner object 391 | rule: string (name of the rule) 392 | args: tuple listing parameters to the rule 393 | 394 | """ 395 | self.parent = parent 396 | self.scanner = scanner 397 | self.rule = rule 398 | self.args = args 399 | while scanner.stack: scanner = scanner.stack 400 | self.token = scanner.last_read_token 401 | 402 | def __str__(self): 403 | output = '' 404 | if self.parent: output = str(self.parent) + ' > ' 405 | output += self.rule 406 | return output 407 | 408 | def print_error(err, scanner, max_ctx=None): 409 | """Print error messages, the parser stack, and the input text -- for human-readable error messages.""" 410 | # NOTE: this function assumes 80 columns :-( 411 | # Figure out the line number 412 | pos = err.pos 413 | if not pos: 414 | pos = scanner.get_pos() 415 | 416 | file_name, line_number, column_number = pos 417 | print >>sys.stderr, '%s:%d:%d: %s' % (file_name, line_number, column_number, err.msg) 418 | 419 | scanner.print_line_with_pointer(pos) 420 | 421 | context = err.context 422 | token = None 423 | while context: 424 | print >>sys.stderr, 'while parsing %s%s:' % (context.rule, tuple(context.args)) 425 | if context.token: 426 | token = context.token 427 | if token: 428 | scanner.print_line_with_pointer(token.pos, length=len(token.value)) 429 | context = context.parent 430 | if max_ctx: 431 | max_ctx = max_ctx-1 432 | if not max_ctx: 433 | break 434 | 435 | def wrap_error_reporter(parser, rule, *args,**kw): 436 | try: 437 | return getattr(parser, rule)(*args,**kw) 438 | except SyntaxError, e: 439 | print_error(e, parser._scanner) 440 | except NoMoreTokens: 441 | print >>sys.stderr, 'Could not complete parsing; stopped around here:' 442 | print >>sys.stderr, parser._scanner 443 | -------------------------------------------------------------------------------- /ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/runtime.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/ArchLinux/yapps-source/usr/lib/pthon2.7/site-packages/yapps/runtime.pyc -------------------------------------------------------------------------------- /Pi OS/vtk_7.1.1-qt5py2-1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/Pi OS/vtk_7.1.1-qt5py2-1_armhf.deb -------------------------------------------------------------------------------- /PyQt5/libpyqt5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/PyQt5/libpyqt5.so -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LinuxCNC-on-RPi 2 | 3 | The full instructions at 4 | 5 | ## Whay LinuxCNC on Raspberry Pi? 6 | 7 | I've played with LinuxCNC for quite some years, from right back when it was known as EMC2. When PC's with parallel ports were common it was very straighforward to get up an going with a simple stepper system. 8 | 9 | Having a low cost and accessable hardware platform for LinuxCNC is important if we want to use LinuxCNC for 3D printing for example. Having a controller box the size of the printer itself makes no sense. A SoC based single board computer would be ideal for this application. The Beaglebone is proven in this area but is cost prohibitive. Is it possible for the humble RPi do do the job... 10 | 11 | It has been perceived that the Raspberry Pi has not been a viable hardware for LinuxCNC due to several reasons: 12 | 13 | - Realtime performance not great for `base-thread` step gernerators 14 | - UI performace poor resulting in frustrating user experience 15 | 16 | So what's changed...? 17 | 18 | ### Official RPi Preempt-RT 19 | 20 | Since 2018 there has now been an official RPI Preempt-RT kernel branch being maintained by Tiejun Chen. 21 | 22 | There is a great kernel building tuturial done be LeMaRiva. 23 | 24 | ### QtPyVCP 25 | 26 | The standard Axis UI for LinuxCNC placed a lot of load onto the RPi. There is now a new UI framework, QtPyVCP, that now has a VTK based G code backplot apparently is less resource heavy. 27 | 28 | > I'm currently testing QtPyVCP and I have also developed a HalPlot widget for a 3D Printer UI 29 | 30 | ### spiPRU 31 | 32 | I have developed **spiPRU** that turns a cheap 32bit 3D Printer control board into a PRU (programmable real-time unit) connected to the RPi via the SPI bus. This then gives hard real-time step generators for the RPi similar to the Beaglebone inbuilt RPU's. 33 | 34 | For <$150 it's now possible to have a LinuxCNC system! 35 | -------------------------------------------------------------------------------- /docs/1 LinuxCNC Install.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 1. LinuxCNC install 3 | nav: true 4 | --- 5 | 6 | # LinuxCNC install on Arch Linux - Raspberry Pi 7 | 8 | LinuxCNC development and installation instructions are Debian based. Therefore building LinuxCNC on Raspbian Stretch is reasonably straightforward as we are working in a Debian based distribution. 9 | 10 | Why Arch Linux then you may ask? Well, Raspbian Stretch worked great for an out of the box LinuxCNC build, but once I wanted to use QtPyVCP to develop a custom 3D printer UI I soon found that the stable release model would not work correctly due to older OpenGL libraries. 11 | 12 | Therefore, the search was on to find a distribution that would give this functionality on the Raspberry Pi. All the Debian based distros appeared to have the same problem. Arch Linux looked to be an option and pleasingly a fully functional Raspberry Pi 3 with LinuxCNC and QtPyVCP was the result. 13 | 14 | ## To install Arch Linux 15 | 16 | Arch Linux is a lightweight Linux distribution with rolling updates. Unlike Raspbian there is no prepared SD card image available so the initial installation is a little more involved. There is good installation instruction of the Arch Linux Arm site: 17 | 18 | 19 | 20 | 21 | > *TODO* – script use to create an image. This script also needs bsdtar, kpartx, and parted. 22 | 23 | Once the base system is installed we need to get everything setup ready to install LinuxCNC, Qt5 and PyQT5. 24 | 25 | 26 | ### STEP 1: Get onboard Wifi up and running 27 | 28 | Later we will setup Network Manager but initially we will configure wpa_supplicant to get the Wifi interface wlan0 up and running. 29 | 30 | ``` 31 | $ cd /etc/wpa_supplicant/ 32 | $ nano homenetwork` 33 | ``` 34 | 35 | ``` 36 | network={ 37 | ssid=“your ssid” 38 | psk=“your pass code” 39 | } 40 | ``` 41 | 42 | Start up the Wifi by specifying the interface, wlan0, and the configuration file we just created above. 43 | 44 | ``` 45 | $ wpa_supplicant –iwlan0 –c /etc/wpa_supplicant/homenetwork & 46 | ``` 47 | 48 | Manually start the DHCP daemon on the wireless interface. 49 | 50 | ``` 51 | $ dhcpcd wlan0 52 | ``` 53 | 54 | 55 | ### STEP 2: Update the system 56 | 57 | Now that the network is up, we can update the system. 58 | 59 | ``` 60 | $ pacman-key –-init 61 | $ pacman-key --populate archlinuxarm 62 | $ pacman -Syu 63 | ``` 64 | 65 | 66 | ### STEP 3: Set user “alarm” as super user 67 | 68 | Firstly, we need to install the sudo package. 69 | 70 | ``` 71 | $ pacman -S sudo 72 | ``` 73 | 74 | The default user is “alarm” so we need to setup super user privileges. 75 | 76 | ``` 77 | $ cd /etc/sudoers.d/ 78 | $ nano myOverrides 79 | ``` 80 | 81 | ``` 82 | alarm ALL=NOPASSWD: ALL 83 | ``` 84 | 85 | For the remainder of the installation we will switch over to the default user “alarm” 86 | 87 | ``` 88 | $ su alarm 89 | ``` 90 | 91 | 92 | ### STEP 4: Install X11 and desktop environment 93 | 94 | Install X11 and the Xfce desktop environment. 95 | 96 | ``` 97 | $ sudo pacman –S xorg-server xf86-video-fbdev xorg-xrefresh 98 | $ sudo pacman –S xfce4 99 | ``` 100 | 101 | If you want to keep a lightweight environment, you may want to skip the following and only install the utility software that you will need later. 102 | 103 | ``` 104 | $ sudo pacman –S xfce4-goodies 105 | ``` 106 | 107 | If not using a session manager, install xorg-xinit. 108 | 109 | ``` 110 | ~/.xinitrc 111 | ``` 112 | 113 | ``` 114 | exec startxfce4 115 | ``` 116 | 117 | 118 | ### STEP 5: Install session manager 119 | 120 | Install a session manager. We will use SDDM (Simple Desktop Display Manager). 121 | 122 | ``` 123 | $ sudo pacman –S sddm 124 | $ sudo sh –c “sddm --example-config > /etc/sddm.conf” 125 | $ sudo systemctl enable sddm 126 | $ sudo systemctl start sddm 127 | ``` 128 | 129 | Alternatively we can use lightdm. 130 | 131 | ``` 132 | $ sudo pacman -S lightdm lightdm-gtk-greater 133 | $ sudo systemctl enable lightdm 134 | $ sudo systemctl start lightdm 135 | ``` 136 | You should now be ready to login to the desktop environment. User “alarm” with password “alarm”. 137 | 138 | 139 | ### STEP 6: Install Network Manager 140 | 141 | Open a terminal, install Network Manager, and start it. 142 | 143 | ``` 144 | $ sudo pacman –S networkmanager network-manager-applet 145 | $ sudo systemctl enable NetworkManager 146 | $ sudo systemctl start NetworkManager 147 | ``` 148 | 149 | In the top right hand of the screen, you will now have access to wired and wireless network configuration. 150 | 151 | 152 | ### STEP 7: Install development tools 153 | 154 | Install some tools to enable compiling etc 155 | 156 | ``` 157 | $ sudo pacman –S make gcc git-core automake autoconf pkg-config 158 | $ sudo pacman –S libtool binutils patch 159 | ``` 160 | 161 | 162 | ### STEP 8: Install a desktop theme 163 | 164 | If you like, you can install a desktop theme. For a nice dark theme, try ARC 165 | 166 | ``` 167 | $ sudo pacman –S arc-gtk-theme 168 | ``` 169 | 170 | 171 | ### STEP 9: Enable auto mounting of USB media 172 | 173 | It is handy to be able to auto mount USB media rather than having to ```sudo mount``` all the time. With Thunar file manager installed we can add the ```thunar-volman``` plugin. However, this did not appear to be available for armv7h so had to be built from source. 174 | 175 | > `thunar-volman` now appears to be in the repos... 176 | 177 | Several other packages are also needed as well. 178 | 179 | ``` 180 | $ sudo pacman –S autofs gvfs udisks2 ntfs-3g 181 | ``` 182 | 183 | 184 | ### STEP 10: Install Python 2 185 | 186 | We only want to install Python2 at this stage. With both Python 2 and 3 installed in the system, I had issues getting PyQt5 to make the correct plugin module. 187 | 188 | > As a note, avoid using Pip to install Python packages! Pacman and Pip don't seem to play well together. 189 | 190 | ``` 191 | $ sudo pacman –S python2 192 | ``` 193 | 194 | 195 | ## To install TigerVNC 196 | 197 | Accessing the Raspberry Pi from another computer is an easy way to use the Pi. The Virtual Network Computing (VNC) protocol will be used with the TigerVNC package. 198 | 199 | ``` 200 | $ sudo pacman –S tigervnc 201 | ``` 202 | 203 | ### Create environment, config, and password files 204 | 205 | The first time vncserver is run, it creates its initial environment, config, and user password file. These will be stored in `~/.vnc`, which will be created if not present. 206 | 207 | ``` 208 | $ vncserver 209 | ``` 210 | 211 | ``` 212 | You will require a password to access your desktops. 213 | 214 | Password: 215 | Verify: 216 | 217 | New 'alarmpi:1 (facade)' desktop is alarmpi:1 218 | 219 | Creating default startup script /home/alarm/.vnc/xstartup 220 | Starting applications specified in /home/alarm/.vnc/xstartup 221 | Log file is /home/alarm/.vnc/alarmpi:1.log 222 | ``` 223 | 224 | We will use “System mode” to start the VNC server as required on the headless system. 225 | 226 | Create `/etc/systemd/system/vncserver@:1.service`, where :1 is the 5900 port increment (5900 + 1) to which the VNC server will be listening for connections (e.g vncserver@:5.service means the server will be listening to port 5905). Edit the service unit by defining the user (User=) to run the server, and the desired Vncserver options. 227 | 228 | ``` 229 | $ sudo nano /etc/systemd/system/vncserver@:1.service 230 | 231 | [Unit] 232 | Description=Remote desktop service (VNC) 233 | After=syslog.target network.target 234 | 235 | [Service] 236 | Type=simple 237 | User=alarm 238 | PAMName=login 239 | PIDFile=/home/%u/.vnc/%H%i.pid 240 | ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' 241 | ExecStartPre=/usr/bin/dbus-launch 242 | ExecStart=/usr/bin/vncserver %i -geometry 1440x900 -alwaysshared -fg 243 | ExecStop=/usr/bin/vncserver -kill %i 244 | 245 | [Install] 246 | WantedBy=multi-user.target 247 | ``` 248 | 249 | Start and enable the service to rat at boot time / shutdown. 250 | 251 | ``` 252 | $ sudo systemctl enable vncserver@:1.service 253 | $ sudo systemctl start vncserver@:1.service 254 | ``` 255 | 256 | We also need to setup TigerVNC to start our desktop environment when we connect remotely. Modify `/home/alarm/.vnc/xstartup` to read: 257 | 258 | ``` 259 | #!/bin/sh 260 | 261 | unset SESSION_MANAGER 262 | unset DBUS_SESSION_BUS_ADDRESS 263 | exec dbus-launch startxfce4 264 | ``` 265 | 266 | The Raspberry Pi can now be accessed via a VNC client using alarmpi:1 as the VNC server to connect to. 267 | 268 | 269 | ## To install LinuxCNC 270 | 271 | In the Arch Linux AUR (Arch User Repository) there is a package LinuxCNC-sim. This will build a “uspace” version of LinuxCNC into a package for installation. The dependencies and steps in the PKGBUILD were used as a starting point to build a run-in-place installation of LinuxCNC. 272 | 273 | 274 | ### STEP 1: Install dependencies 275 | 276 | Unfortunately there are not armv7h versions of all required dependencies available so we will need to build and install these first. 277 | 278 | Arch Linux dependencies needed by LinuxCNC: 279 | 280 | |Package| Repo Install | PKGBUILD | 281 | |:---|:---:|:---:| 282 | |intltool | Yes || 283 | |bc | Yes || 284 | |bwidget | | Build| 285 | |tcllib | | Build| 286 | |tclx | | Build| 287 | |tcl | Yes || 288 | |tk |Yes || 289 | |xorg-server |Yes || 290 | |python2-imaging | Yes || 291 | |tkimg | | Build| 292 | |python2-gtkglext | 293 | |tclx | | Build| 294 | |boost | Yes || 295 | |boost-libs | Yes || 296 | |libtirpc | Yes || 297 | |procps-ng | Yes || 298 | |psmisc | Yes || 299 | 300 | The fakeroot package is needed to build Arch Linux packages from a PKGBUILD. 301 | 302 | ``` 303 | $ sudo pacman –S fakeroot 304 | ``` 305 | 306 | New versions of LinuxCNC no longer include yapps in the source. Therefore, we need to install it in the system. However, Arch Linux does not seem to have a repo for this. I have included a Yapps source in the [repository](https://github.com/scottalford75/LinuxCNC-on-RPi/tree/master/ArchLinux) 307 | 308 | ``` 309 | /usr/bin 310 | ``` 311 | 312 | ``` 313 | yapps 314 | ``` 315 | 316 | In the above python file make sure that it is pointing at python 2. The first line should read 317 | 318 | ``` 319 | #!/usr/bin/python2 320 | ``` 321 | 322 | The following yapps directory in `site-packages` must include the files listed. 323 | 324 | ``` 325 | /usr/lib/python2.7/site-packages/yapps 326 | ``` 327 | 328 | ``` 329 | __init__ 330 | __init__.pyc 331 | grammar 332 | grammar.pyc 333 | parsetree 334 | parsetree.pyc 335 | runtime 336 | runtime.pyc 337 | ``` 338 | 339 | 340 | ## STEP 2: Get LinuxCNC source files 341 | 342 | You need to have git installed and configured. Then 343 | 344 | ``` 345 | $ git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev 346 | $ cd linuxcnc-dev 347 | ``` 348 | 349 | 350 | ## STEP 3: Fix Python 2 naming 351 | 352 | Arch Linux explicitly names both Python 2 and Python 3, whereas Debian systems use the Python and Python 3 naming convention. The following command will find the required files and change python to python2 within them. 353 | 354 | ``` 355 | $ find . -iname fixpaths.py -o -iname checkglade -o -iname update_ini|xargs perl -p -i -e "s/python/python2/" 356 | ``` 357 | 358 | > **Note:** run this command only once other wise you will end up with python22, python222 etc, and the compile will fail. 359 | 360 | 361 | ## STEP 4: Apply libtirpc patch 362 | 363 | The makefile needs a patch applied so that the make will succeed on Arch Linux. Copy `libtirpc.patch` into the LinuxCNC `/src` directory and execute the following command. 364 | 365 | ``` 366 | $ patch -Np2 -i libtirpc.patch 367 | ``` 368 | 369 | 370 | ## STEP 5: Run the autogen scripts 371 | 372 | ``` 373 | $ ./autogen.sh 374 | ``` 375 | 376 | 377 | ## STEP 6: Run the configuration script 378 | 379 | Run the configuration script with the following parameters. Note, if you need `libmodbus` this dependency can be installed. For armv7h this will need to be built from source. 380 | 381 | ``` 382 | $ ./configure --with-realtime=uspace --without-libmodbus --with-python=/usr/bin/python2.7 --enable-non-distributable=yes 383 | ``` 384 | 385 | The script should complete without errors. 386 | 387 | 388 | ## STEP 7: Compile LinuxCNC 389 | 390 | ``` 391 | $ make 392 | ``` 393 | 394 | 395 | ## STEP 8: Set permissions 396 | 397 | As we will be running a real machine, we need to setup the required permissions. 398 | 399 | ``` 400 | $ sudo make setuid 401 | ``` 402 | 403 | 404 | ## STEP 9: Run LinuxCNC 405 | 406 | LinuxCNC should now be ready to use as run-in-place (RIP). 407 | 408 | ``` 409 | $ . ./scripts/rip-environment 410 | $ linuxcnc 411 | ``` 412 | 413 | Linuxcnc should load and be able to open Axis or other non-Qt user interfaces. A RT-Preempt kernel needs to be installed before being able to run a real machine. 414 | 415 | -------------------------------------------------------------------------------- /docs/2 Enable UART.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2. Enable RPi UART on Arch Linux 3 | nav: true 4 | --- 5 | 6 | # Enable RPi UART on Arch Linux 7 | 8 | The Raspberry Pi 3 has the mini-UART mapped to the GPI header pins 14/15. By default, it is also configured as the serial console. The actual hardware UART on the BCM2837 SoC is assigned to handle Bluetooth with the BCM43438 Wifi/Bluetooth chip. 9 | 10 | To enable the hardware UART on pins 14/15 we need to do the following: 11 | 12 | ``` 13 | $ sudo nano /boot/config.txt 14 | ``` 15 | 16 | Add the following lines 17 | 18 | ``` 19 | dtoverlay=pi3-diable-bt 20 | enable_uart=1 21 | ``` 22 | 23 | Note: the above will disable Bluetooth. Alternately the mini-UART can be mapped to the Bluetooth module. Change the `dtoverlay` line to `pi3-miniuart-bt`. 24 | 25 | Next, we modify the cmdline.txt file to remove parameters involving serial port “ttyAMA0”. 26 | 27 | ``` 28 | $ sudo cp /boot/config.txt /boot/config_backup.txt 29 | $ sudo nano /boot/config.txt 30 | ``` 31 | 32 | Lastly, we add the default user “alarm” to the same group as the serial port. In this case “uucp” 33 | 34 | ``` 35 | $ sudo usermod –a –G uucp alarm 36 | ``` 37 | 38 | Reboot and test the serial port with a simple loopback between pins 14 and 15. For this, I used Cutecom built for armv7h. 39 | -------------------------------------------------------------------------------- /docs/3 Faster compiling on RPi.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3. Faster compiling on RPi 3 | nav: true 4 | --- 5 | 6 | # Faster compiling on RPi 7 | 8 | Compiling kernels and LinuxCNC on the RPi takes quite some time. This can be speed up by using Distcc to share the compiling workload to other ARM or x86_64 computers. The setup of Distcc is well documented on the [Arch Linux Arm Distributed Compiling](https://archlinuxarm.org/wiki/Distributed_Compiling) page but there are a couple of points that should be highlighted. 9 | 10 | 1. There is an AUR package called [distccd-alarm](https://aur.archlinux.org/pkgbase/distccd-alarm/) that takes away the work of installing on a x86_64 Arch Linux or Manjaro computer. It installs the cross compiling tools that are needed and sets everything up. The only thing that needs customisation is the DISTCC_HOSTS IP address range to suit your local network. Enable and start the appropriate distccd services for the ARM architectures that you wish to compile for. 11 | 12 | 2. The biggest catch was figuring out that the gcc version of the Master system and that in the x-tools installed on the Client system must be the same. At the time of writing the x-tools pre-built crosstool-ng toolchains is gcc 8.3.0. My Manjaro system had the latest version and required the gcc and gcc-libs packages to be downgraded to 8.3.0. Once this was done everying worked as it should. 13 | 14 | Building packages with Arch Linux / Manjaro can use distcc by adjusting the `makepkg.conf` configuration file. If not using makepkg and using `make` directly the following commands will invoke distcc during the build process. 15 | 16 | ``` 17 | $ export DISTCC_HOSTS=":" 18 | $ make -j8 CC="distcc gcc" CXX="distcc g++" 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/4. VTK for QtPyVCP.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 4. VTK for QtPyVCP on Raspberry Pi 3 | nav: true 4 | --- 5 | 6 | # VTK for QtPyVCP on Raspberry Pi 7 | 8 | QtPyVCP utilises VTK to provide GCode back plot functionality. Unfortunately there is no pip package for VTK and the normal installation of QtPyVCP fails. Below is the procedure using the development installation instructions with some adjustmentsto to use a specifically compiled version of VTK 7.1.1 with Qt5 and Python 2 wrapping. The key to being able to build VTK with OpenGL "legacy" is to install ```libopengl-dev``` and configure with ```VTK_RENDERING_BACKEND:STRING=OpenGL``` not OpenGL2 which tries to use later versions of OpenGL that are currently not supported on the RPi. 9 | 10 | 11 | ### STEP 1: Download and install 12 | 13 | Download and install the VTK deb pacakge. 14 | 15 | ``` 16 | wget https://github.com/scottalford75/LinuxCNC-on-RPi/blob/master/Pi%20OS/vtk_7.1.1-qt5py2-1_armhf.deb 17 | sudo dpkg -i vtk_7.1.1-qt5py2-1_armhf.deb 18 | ``` 19 | 20 | 21 | ### STEP 2: Update Python Path 22 | 23 | Modify your ```.bashrc``` file in your home directory and add the following line. This will add the path to your PYTHONPATH each time xwindows starts. 24 | 25 | ``` 26 | export PYTHONPATH=/usr/local/lib/python2.7/site-packages:/usr/local/lib/python2.7/site-packages/vtk:$PYTHONPATH 27 | export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH 28 | ``` 29 | 30 | 31 | ### STEP 3: Install dependencies 32 | 33 | Install dependencies as per the QtPyVCP installation guide. 34 | 35 | VTK 7.1.1 also has the following dependencies: 36 | 37 | ``` 38 | sudo apt-get install libhdf5-dev libnetcdf-cxx-legacy-dev libjsoncpp-dev libgl2ps-dev 39 | ``` 40 | 41 | 42 | ### STEP 4: Modify the install 43 | 44 | In the qtpyvcp source directory, modify the setup.py and comment out the VTK dependency. 45 | 46 | ``` 47 | install_requires=[ 48 | 'docopt', 49 | 'qtpy', 50 | 'pyudev', 51 | 'psutil', 52 | 'HiYaPyCo', 53 | 'pyopengl', 54 | #'vtk', 55 | 'pyqtgraph', 56 | 'more-itertools', 57 | ], 58 | ``` 59 | 60 | ### STEP 5: Install QtPyVCP 61 | 62 | Install QtPyVCP as per normal development installation instructions. 63 | 64 | ```pip install --editable .``` 65 | 66 | ### STEP 6: Add simulation configurations 67 | 68 | If you want to test with the simulation configurations simply copy the config directory from the ```~/qtpyvcp/linuxcnc/configs``` directory into your ```~/linuxcnc/configs``` directory. -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | # Notes: 2 | # - fig include, {% include figure.html file="my-cat.jpg" alt="cat" caption="My cat" width="50%" %} 3 | # - pages with "nav: true" in front matter will be in header nav 4 | # - use environment variable on build command to include analytics: JEKYLL_ENV=production jekyll build 5 | 6 | 7 | # site settings 8 | title: LinuxCNC-on-RPi 9 | description: "How to get LinuxCNC running on a RPi" 10 | keywords: "LinuxCNC, Raspberry Pi, RPi, spiPRU" 11 | 12 | 13 | # author settings for cc-by 14 | author: Scott Alford 15 | pub_year: 2019 16 | github_username: scottalford75 17 | 18 | 19 | # add the full url for the github repository 20 | repo: "https://github.com/scottalford75/LinuxCNC-on-RPi" 21 | 22 | 23 | # urls 24 | # your gh-pages url: https://username.github.io 25 | url: https://scottalford75.github.io 26 | 27 | # your repository name: /repository 28 | baseurl: /LinuxCNC-on-RPi 29 | 30 | 31 | # analytics if desired (and use environment variable on build command) 32 | # google_analytics: xxxxxx 33 | 34 | 35 | # defaults (to simplify front matter) 36 | defaults: 37 | - scope: 38 | path: "" 39 | values: 40 | layout: default 41 | 42 | 43 | # Build settings 44 | markdown: kramdown 45 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /docs/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | --- 5 | 6 | ### Test about page 7 | 8 | -------------------------------------------------------------------------------- /docs/images/RaspberryPi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/RaspberryPi.jpg -------------------------------------------------------------------------------- /docs/images/header-brand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/header-brand.png -------------------------------------------------------------------------------- /docs/images/jekyll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/jekyll.png -------------------------------------------------------------------------------- /docs/images/linuxcnc-wizard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/linuxcnc-wizard.gif -------------------------------------------------------------------------------- /docs/images/liquid-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/liquid-icon.png -------------------------------------------------------------------------------- /docs/images/liquid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/liquid.png -------------------------------------------------------------------------------- /docs/images/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/markdown.png -------------------------------------------------------------------------------- /docs/images/octocat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/octocat.jpg -------------------------------------------------------------------------------- /docs/images/octojekyll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/octojekyll.png -------------------------------------------------------------------------------- /docs/images/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/ruby.png -------------------------------------------------------------------------------- /docs/images/sass-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/sass-icon.png -------------------------------------------------------------------------------- /docs/images/sass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/sass.png -------------------------------------------------------------------------------- /docs/images/yaml-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/yaml-icon.png -------------------------------------------------------------------------------- /docs/images/yaml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/docs/images/yaml.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Home 3 | --- 4 | 5 |
6 | LinuxCNC 7 | RPi 8 |
9 |
10 |
11 | 12 | # LinuxCNC on RPi 13 | 14 | --- 15 | 16 |
17 | ## Contents: 18 | 19 | {% for topic in site.pages %} 20 | {% if topic.nav == true %}- [{{ topic.title }}]({{ topic.url | absolute_url }}){% endif %} 21 | {% endfor %} 22 |
23 | 24 | --- 25 | 26 | ## Why LinuxCNC on Raspberry Pi? 27 | 28 | I've played with LinuxCNC for quite some years, from right back when it was known as EMC2. When PC's with parallel ports were common it was very straighforward to get up an going with a simple stepper system. 29 | 30 | Having a low cost and accessable hardware platform for LinuxCNC is important if we want to use LinuxCNC for 3D printing for example. Having a controller box the size of the printer itself makes no sense. A SoC based single board computer would be ideal for this application. The Beaglebone is proven in this area but is cost prohibitive. Is it possible for the humble RPi do do the job... 31 | 32 | It has been perceived that the Raspberry Pi has not been a viable hardware for LinuxCNC due to several reasons: 33 | 34 | - Realtime performance is not great for `base-thread` step gernerators 35 | - UI performace poor resulting in frustrating user experience 36 | 37 | So what's changed...? 38 | 39 | ### Official RPi Preempt-RT 40 | 41 | Since 2018 there has now been an official RPI Preempt-RT kernel branch being maintained by Tiejun Chen. 42 | 43 | There is a great kernel building tuturial done be LeMaRiva. 44 | 45 | ### QtPyVCP 46 | 47 | The standard Axis UI for LinuxCNC placed a lot of load onto the RPi. There is now a new UI framework, QtPyVCP, that now has a VTK based G code backplot apparently is less resource heavy. 48 | 49 | > I'm currently testing QtPyVCP and I have also developed a HalPlot widget for a 3D Printer UI 50 | 51 | ### spiPRU 52 | 53 | I have developed **spiPRU** that turns a cheap 32bit 3D Printer control board into a PRU (programmable real-time unit) connected to the RPi via the SPI bus. This then gives hard real-time step generators for the RPi similar to the Beaglebone inbuilt RPU's. 54 | 55 | For <$150 it's now possible to have a LinuxCNC system! -------------------------------------------------------------------------------- /kernels/kernel_4_19_71-rt24-v7/rt-kernel.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottalford75/LinuxCNC-on-RPi/6b36bcf17330da8e98313a3555865bc90165f8f5/kernels/kernel_4_19_71-rt24-v7/rt-kernel.tgz -------------------------------------------------------------------------------- /libtirpc.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/Makefile b/src/Makefile 2 | index a99e52686..9b2b5705e 100644 3 | --- a/src/Makefile 4 | +++ b/src/Makefile 5 | @@ -139,7 +139,7 @@ ULAPISRCS := rtapi/$(RTPREFIX)_ulapi.c 6 | 7 | # Each item in INCLUDES is transformed into a -I directive later on 8 | # The top directory is always included 9 | -INCLUDES := . 10 | +INCLUDES := . /usr/include/tirpc/ 11 | 12 | USERSRCS := 13 | PROGRAMS := 14 | @@ -203,6 +203,8 @@ else 15 | LDFLAGS := -Wl,-rpath-link,../lib 16 | endif 17 | 18 | +LDFLAGS += -ltirpc 19 | + 20 | # Rules to make .o (object) files 21 | $(sort $(CUSEROBJS)) : objects/%.o: %.c 22 | $(ECHO) Compiling $< 23 | --------------------------------------------------------------------------------