.gear/rules | 5 + .gear/tags/list | 1 + .gear/upstream/remotes | 3 + lib/python/qtvcp/lib/virtual_keyboard.py | 2 +- linuxcnc-documentation.desktop | 12 + linuxcnc.spec | 370 +++++++++++++++++++++++++++++++ scripts/linuxcnc_info.in | 5 - src/Makefile | 2 +- src/Makefile.inc.in | 2 +- src/configure.ac | 8 +- 10 files changed, 398 insertions(+), 12 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 000000000..088c27dbc --- /dev/null +++ b/.gear/rules @@ -0,0 +1,5 @@ +tar: 2.9:. +diff: 2.9:. . +copy?: *.patch +spec: linuxcnc.spec +copy: linuxcnc-documentation.desktop diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 000000000..681bbba2e --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +a90edc3054c437ded8f7be2b892d22429bc5792f 2.9 diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes new file mode 100644 index 000000000..f68cd8916 --- /dev/null +++ b/.gear/upstream/remotes @@ -0,0 +1,3 @@ +[remote "upstream"] + url = https://github.com/LinuxCNC/linuxcnc + fetch = +refs/heads/*:refs/remotes/upstream/* diff --git a/lib/python/qtvcp/lib/virtual_keyboard.py b/lib/python/qtvcp/lib/virtual_keyboard.py index e4ec6f9e2..d88408460 100644 --- a/lib/python/qtvcp/lib/virtual_keyboard.py +++ b/lib/python/qtvcp/lib/virtual_keyboard.py @@ -5,7 +5,7 @@ log = logger.getLogger(__name__) import subprocess import os -from qtvcp.qt_glib import GStat +from hal_glib import GStat # Instantiate the libraries with global reference # GSTAT gives us status messages from linuxcnc diff --git a/linuxcnc-documentation.desktop b/linuxcnc-documentation.desktop new file mode 100644 index 000000000..ecb9e5d0b --- /dev/null +++ b/linuxcnc-documentation.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Exec=/usr/bin/xdg-open /usr/share/doc/linuxcnc/ +Icon=linuxcncicon +Terminal=false +Name=Documentation +Name[ru_RU]=Документация +Comment=LinuxCNC Documentation +Comment[ru_RU]=Документация LinuxCNC +StartupNotify=false +Categories=X-CNC; diff --git a/linuxcnc.spec b/linuxcnc.spec new file mode 100644 index 000000000..5df31f0be --- /dev/null +++ b/linuxcnc.spec @@ -0,0 +1,370 @@ +# Unpackaged files in buildroot should terminate build +%define _unpackaged_files_terminate_build 1 + +%set_verify_elf_method unresolved=relaxed +Name: linuxcnc +Version: 2.9.0 +Release: alt0.10.20230910 + +Summary: LinuxCNC controls CNC machines +Summary(ru_RU.UTF-8): Программа управления ЧПУ станков +License: GPLv2+ and LGPLv2 +Group: Engineering +Url: https://github.com/LinuxCNC/linuxcnc + +ExclusiveArch: aarch64 alpha %arm ia64 %ix86 x86_64 %e2k + +Source: %name-%version.tar +Patch: %name-%version-%release.patch +Buildrequires(pre): rpm-build-tcl rpm-build-python3 +Buildrequires: rpm-build-gir +Buildrequires: python3-devel +BuildRequires: gcc-c++ pkgconfig(glib-2.0) +BuildRequires: libgtk+3-gir-devel +BuildRequires: libgtk+2-devel +BuildRequires: python3-module-pygobject3 +BuildRequires: libGL-devel libGLU-devel +BuildRequires: libXaw-devel libXinerama-devel libXmu-devel libXt-devel xorg-cf-files +BuildRequires: libepoxy-devel +BuildRequires: pkgconfig(libmodbus) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(libudev) +BuildRequires: libncurses-devel libreadline-devel +BuildRequires: libtirpc-devel +BuildRequires: kmod +BuildRequires: man-db +BuildRequires: python3-modules-tkinter +#python3-modules-unittest +BuildRequires: python3-module-yapps2 +BuildRequires: boost-devel-headers +BuildRequires: boost-lockfree-devel +BuildRequires: boost-python3-devel +BuildRequires: tcl-devel tk-devel tcl-img tclx bwidget +#BuildRequires: tcl-blt-devel +BuildRequires: intltool +#BuildRequires: pkgconfig(libgnomeprintui-2.2) +BuildRequires: desktop-file-utils ImageMagick-tools +BuildRequires: asciidoc-a2x +BuildRequires: dos2unix + +Obsoletes: %name-data =< %EVR +Requires: lib%name = %EVR + +# for qtvcp +Requires: python3-module-PyQt5-devel + +# for gmoccapy +Requires: libgtksourceview3-gir +Requires: libX11-devel + +Requires: tclx tcl-blt +%py3_requires Xlib +%py3_requires PyQt5.Qsci + +# Fix me!!! +%add_python3_req_skip __main__ gi.repository.GdkPixbuf gst gtk gtk.glade Cairo +%add_python3_req_skip emccanon interpreter +%add_python3_req_skip plasmac qtvcp.lib.qt_pdf + +%filter_from_requires s/^.*rip-environment// +%filter_from_requires s/^.*typelib(Cairo)// + +%add_python3_path %_datadir/qtvcp +%add_python3_path %_datadir/%name/ncfiles + +%description +LinuxCNC is software that runs on Linux, on most standard PCs, that can +interpret G-code and run a CNC machine. It was originally developed on a +milling machine, but support was added for lathes and many other types of +machine. It can be used with mills, lathes, plasma cutters, routers, robots, +and so on. + +%description -l ru_RU.UTF-8 +LinuxCNC это программа, которая работает на ОС Linux на большинстве стандартных +ПК, которые могут интерпретировать G-код и запустить станок с ЧПУ. Изначально он +был разработан для фрезерного станка, но поддержка была добавлена и для токарных +станков и многих других типов машин. Он может быть использован с токарными +станками, станками плазменной резки, роботами и так далее. + +%package -n liblinuxcnc-devel +Summary: Development files for %name +Group: Development/C++ +Requires: %name = %EVR + +%description -n liblinuxcnc-devel +Development files for %name + +%package -n lib%name +Summary: Library for %name +Group: Engineering + +%description -n lib%name +Library for %name + +%package doc +Summary: Documementation for %name +Buildarch: noarch +Group: Documentation + +%description doc +Documementation for %name + +%package doc-fr +Summary: French documementation for %name +Buildarch: noarch +Group: Documentation +Requires: %name-doc = %version + +%description doc-fr +French documementation for %name + +%package doc-es +Summary: Spanish documementation for %name +Buildarch: noarch +Group: Documentation +Requires: %name-doc = %version + +%description doc-es +Spanish documementation for %name + +%prep +%setup +%autopatch -p1 + +sed -i 's|lib/tcltk/linuxcnc|%_lib/tcl/linuxcnc|' lib/python/rs274/options.py +sed -i 's|INCLUDES := .|INCLUDES := . /usr/include/tirpc|' src/Makefile +sed -i 's|LDFLAGS := |LDFLAGS := -ltirpc |' src/Makefile + +#fix make install +sed 's/ -o root//g' -i src/Makefile + +%ifarch %e2k +# unsupported as of lcc 1.25.17 +sed -i 's,-fno-fast-math,,' src/Makefile* +# need for correct detection of boost libs path +sed -i 's,sparc64|,&e2k|,' src/m4/ax_boost_base.m4 +%endif + +find . -name '*.py' -exec dos2unix "{}" \; + +# fix unavailable GROUP "plugdev" +sed -i 's/GROUP="plugdev"/GROUP="uucp"/g' debian/extras/lib/udev/rules.d/* + +%build +pushd src +./autogen.sh +%configure \ + --enable-non-distributable=yes \ + --with-realtime=uspace + +%make_build +popd + +%install +pushd src +%makeinstall_std +popd + +# install rules +mkdir -p %buildroot%_udevrulesdir +cp debian/extras/lib/udev/rules.d/* %buildroot%_udevrulesdir + +# fix desktop Name +sed 's/Name=/Name=LinuxCNC /g' -i %buildroot%_desktopdir/linuxcnc-*.desktop + +# fix desktop categories +desktop-file-install --dir %buildroot%_desktopdir \ + --remove-key=Version \ + --remove-category=X-CNC \ + --remove-category=Utility \ + %buildroot%_desktopdir/*.desktop + +### == desktop file documentation +cat>%buildroot%_desktopdir/%name-documentation.desktop< 2.9.0-alt0.10.20230910 +- new snapshot +- generate patch using git diff instead of individual patches + +* Mon Jul 31 2023 Anton Midyukov 2.9.0-alt0.9.20230413 +- replace unavailable GROUP "plugdev" with "uucp" in udev rules + +* Sun Apr 30 2023 Anton Midyukov 2.9.0-alt0.8.20230413 +- clear '_FORTIFY_SOURCE=2' compiler flag + (fix FTBFS with gcc 12.2.1-alt2: -D_FORTIFY_SOURCE=3) + +* Mon Apr 17 2023 Anton Midyukov 2.9.0-alt0.7.20230413 +- new snapshot +- cleanup spec, old patches +- build classicladder again + +* Fri May 06 2022 Ilya Kurdyukov 2.9.0-alt0.6.20220115.1 +- fixed build for Elbrus + +* Thu Jan 13 2022 Anton Midyukov 2.9.0-alt0.6.20220115 +- new snapshot + +* Fri Sep 10 2021 Anton Midyukov 2.9.0-alt0.5.20210910 +- new snapshot +- include pncconf, stepconf again +- disable gtk-1.0 build +- add missing requires for gmoccapy + +* Thu Aug 26 2021 Anton Midyukov 2.9.0-alt0.4.20210826 +- new snapshot +- remove unpackaged static libraries (fix build with LTO flag) +- cleanup spec + +* Sun Aug 01 2021 Anton Midyukov 2.9.0-alt0.3.20210801 +- new snapshot + +* Wed Jul 28 2021 Michael Shigorin 2.9.0-alt0.2 +- E2K: fix build + +* Mon Jul 26 2021 Anton Midyukov 2.9.0-alt0.1 +- New snapshot +- switch to python3 (Closes: 40376) +- exclude pncconf, stepconf (not support python3) + +* Fri Jun 25 2021 Anton Midyukov 2.8.2-alt1 +- new version 2.8.2 + +* Wed Apr 28 2021 Aleksei Nikiforov 2.8.1-alt3 +- Rebuilt with boost-1.76.0. + +* Thu Mar 11 2021 Aleksei Nikiforov 2.8.1-alt2 +- Fixed build with gcc-10 and rebuilt with new boost libraries. + +* Sun Dec 06 2020 Anton Midyukov 2.8.1-alt1 +- New version 2.8.1 + +* Thu Sep 17 2020 Aleksei Nikiforov 2.7.15-alt3 +- Fixed build on armh and rebuilt with new boost. + +* Thu Mar 12 2020 Anton Midyukov 2.7.15-alt2 +- Fixed tcl dir again + +* Fri Mar 06 2020 Anton Midyukov 2.7.15-alt1 +- New version 2.7.15 + +* Thu Mar 5 2020 Anton Midyukov 2.7.14-alt5 +- Fixed tcl dir +- Enabled hierarchical dependency search for python2 +- Update buildrequires +- Added missing requires + +* Mon Dec 16 2019 Aleksei Nikiforov 2.7.14-alt4 +- Rebuilt with boost-1.71.0. + +* Tue Oct 01 2019 Gleb F-Malinovskiy 2.7.14-alt3 +- Added ExclusiveArch tag to limit architectures to aarch64, alpha, %%arm, + ia64, %%ix86, and x86_64. +- Removed noarch from %%name-data subpackage. + +* Sat May 25 2019 Anton Midyukov 2.7.14-alt2 +- Add io.h for aarch64 (dummy) instead of without-sys-io.h-for-no-x86.patch +- Build with libtirpc + +* Tue Jul 03 2018 Anton Midyukov 2.7.14-alt1 +- new version 2.7.14 + +* Thu May 31 2018 Aleksei Nikiforov 2.7.13-alt1.1 +- NMU: rebuilt with boost-1.67.0 + +* Sun May 13 2018 Anton Midyukov 2.7.13-alt1 +- new version 2.7.13 + +* Tue Mar 06 2018 Anton Midyukov 2.7.12-alt2 +- replace requres python-module-gst -> python-module-gst1.0 +- disable build docs + +* Tue Jan 30 2018 Anton Midyukov 2.7.12-alt1 +- new version 2.7.12 +- Fix pathdir + +* Wed Aug 30 2017 Anton Midyukov 2.7.11-alt1 +- New version 2.7.11 +- Added missing requires + +* Sun Jul 30 2017 Anton Midyukov 2.7.10-alt2 +- Fix desktop categories. + +* Tue Jul 25 2017 Anton Midyukov 2.7.10-alt1 +- new version 2.7.10 + +* Sun Jun 11 2017 Anton Midyukov 2.7.9-alt1 +- New version 2.7.9 +- Remove fix_build_for_i586.patch + +* Fri Mar 24 2017 Vladimir D. Seleznev 2.7.8-alt1.qa1 +- Rebuilt against Tcl/Tk 8.6 + +* Sat Feb 04 2017 Anton Midyukov 2.7.8-alt1 +- New version 2.7.8 +- Fix build with libmodbus3.1.4 +- Fix build for i586 +- Remove subpackage python-module-linuxcnc and tcl-linuxcnc + +* Fri Jul 22 2016 Anton Midyukov 2.7.5-alt1 +- New version 2.7.5 +- Fix repocop warning. + +* Thu May 12 2016 Anton Midyukov 2.7.4-alt1.20160506.1 +- Initial build for Alt Linux Sisyphus. diff --git a/scripts/linuxcnc_info.in b/scripts/linuxcnc_info.in index 668634114..8ee3db68c 100755 --- a/scripts/linuxcnc_info.in +++ b/scripts/linuxcnc_info.in @@ -165,10 +165,5 @@ for n in $(linuxcnc_var all) ; do show "${n%%=*}" ${n##*=} done -echo -echo "dpkg -l '*linuxcnc*':" -dpkg -l '*linuxcnc*' -echo - [ -n "$VIEWER" ] && $VIEWER "$ofile" exit 0 diff --git a/src/Makefile b/src/Makefile index 0d8360845..c999dd1ee 100644 --- a/src/Makefile +++ b/src/Makefile @@ -252,7 +252,7 @@ INCLUDE += $(LIBTIRPC_CFLAGS) # Compilation options. Perhaps some of these should come from Makefile.inc? (CXXFLAGS now does) INTEGER_OVERFLOW_FLAGS := -fwrapv OPT := -Os $(INTEGER_OVERFLOW_FLAGS) -DEBUG := $(DEBUG) -g -Wall -D_FORTIFY_SOURCE=2 +DEBUG := $(DEBUG) -g -Wall CFLAGS := $(INCLUDE) $(OPT) $(DEBUG) $(EXTRA_DEBUG) -DULAPI -std=gnu11 -Werror=implicit-function-declaration $(CFLAGS) $(CPPFLAGS) CXXFLAGS := $(INCLUDE) $(EXTRA_DEBUG) -DULAPI $(DEBUG) $(OPT) -Werror=overloaded-virtual $(CXXFLAGS) $(CPPFLAGS) CXXFLAGS += -std=gnu++17 diff --git a/src/Makefile.inc.in b/src/Makefile.inc.in index 2bdcc2e42..03328b45e 100644 --- a/src/Makefile.inc.in +++ b/src/Makefile.inc.in @@ -65,7 +65,7 @@ LANGUAGES = @LANGUAGES@ docsdir = ${prefix}/share/doc/linuxcnc sampleconfsdir = ${prefix}/share/doc/linuxcnc/examples/sample-configs ncfilesdir = ${prefix}/share/linuxcnc/ncfiles -tcldir = ${prefix}/lib/tcltk/linuxcnc +tcldir = ${libdir}/tcl/linuxcnc # /Standard configure directories diff --git a/src/configure.ac b/src/configure.ac index 4afde5a88..9c03587c5 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -709,8 +709,8 @@ else EMC2_SCRIPT=$EMC2_BIN_DIR/linuxcnc EMC2_SUFFIX="" EMC2_ICON=linuxcncicon - EMC2_TCL_DIR=${prefix}/lib/tcltk/linuxcnc - EMC2_TCL_LIB_DIR=${prefix}/lib/tcltk/linuxcnc + EMC2_TCL_DIR=${libdir}/tcl/linuxcnc + EMC2_TCL_LIB_DIR=${libdir}/tcl/linuxcnc EMC2_LANG_DIR=${prefix}/lib/tcltk/linuxcnc/msgs EMC2_PO_DIR=${prefix}/share/locale EMC2_HELP_DIR=${prefix}/share/doc/linuxcnc @@ -933,7 +933,7 @@ then AC_MSG_ERROR([fuser not found]) fi -AC_PATH_PROGS(YAPPS, yapps yapps2, "none", $SPATH) +AC_PATH_PROGS(YAPPS, yapps yapps2 yapps2.py3, "none", $SPATH) if test $YAPPS = "none" then AC_MSG_ERROR([yapps/yapps2 and not found]) @@ -1671,7 +1671,7 @@ fi AC_MSG_RESULT([$PYTHON_TK_VERSION]) AC_MSG_CHECKING(for site-package location) -SITEPY=`$PYTHON -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'` +SITEPY=`$PYTHON -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(plat_specific=1))'` AC_MSG_RESULT($SITEPY) AC_MSG_CHECKING(for working GLU quadrics)