Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions debian/control.top.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Build-Depends:
python3-dev,
python3-tk,
python3-xlib,
tcl,
tcl@TCLTK_VERSION@-dev,
tclx,
tk@TCLTK_VERSION@-dev,
Expand Down
2 changes: 1 addition & 1 deletion debian/linuxcnc.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ usr/bin/xyzbc-trt-gui
usr/lib/lib*.so.*
usr/lib/linuxcnc
usr/lib/python3
usr/lib/tcltk
usr/share/tcltk

usr/share/axis
usr/share/glade
Expand Down
4 changes: 2 additions & 2 deletions debian/rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ override_dh_compress:
override_dh_fixperms:
dh_fixperms -X/linuxcnc_module_helper -X/rtapi_app
# In case that only the indep packages are built
if [ -x "$(DESTDIR)/usr/lib/tcltk/linuxcnc/linuxcnc.tcl" ]; then \
chmod -x $(DESTDIR)/usr/lib/tcltk/linuxcnc/linuxcnc.tcl; \
if [ -x "$(DESTDIR)/usr/share/tcltk/linuxcnc/linuxcnc.tcl" ]; then \
chmod -x $(DESTDIR)/usr/share/tcltk/linuxcnc/linuxcnc.tcl; \
fi
# override_dh_python3: # not executed, so we attach it to fixperms
DEB_HOST_ARCH=`dpkg-architecture -qDEB_HOST_ARCH` dh_python3
Expand Down
1 change: 1 addition & 0 deletions lib/python/nf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def find_prefix(f):
return find_prefix(os.path.dirname(f))

PREFIX = "@prefix@"
EMC2_TCL_DIR = "@EMC2_TCL_DIR@"
SHARE = os.path.join(PREFIX, "share", "axis")
tcl_libdir = os.path.join(SHARE, "tcl")

Expand Down
9 changes: 4 additions & 5 deletions lib/python/rs274/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

import nf, os

# lib/tcltk/emc2 for installed emc
# tcl for run-in-place emc
for candidate in 'lib/tcltk/linuxcnc', 'tcl':
LINUXCNC_TCL = os.path.join(nf.PREFIX, candidate, 'linuxcnc.tcl')
if os.path.exists(LINUXCNC_TCL): break
# system Tcl path for installed emc
# tcl for run-in-place emc
rip = os.path.join(nf.PREFIX, 'tcl', 'linuxcnc.tcl')
LINUXCNC_TCL = rip if os.path.exists(rip) else os.path.join(nf.EMC2_TCL_DIR, 'linuxcnc.tcl')

options = '''
. configure -bg #d9d9d9
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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 = @EMC2_TCL_DIR@


# /Standard configure directories
Expand Down
14 changes: 11 additions & 3 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,15 @@ AC_DEFINE_UNQUOTED([EMC2_DEFAULT_TOOLTABLE], "$DEFAULT_TOOLTABLE", [Default nml
# we decide based on RIP or install where stuff goes #
##############################################################################

AC_ARG_WITH([tcl-dir],
[AS_HELP_STRING([--with-tcl-dir=DIR],
[directory for LinuxCNC Tcl scripts (default: auto-detected from tcl_pkgPath)])],
[EMC2_TCL_DIR="$withval"],
[TCL_GET_DIR=$(echo [['set d [lindex [lsearch -all -inline -glob $tcl_pkgPath /usr/share/*] 0]; if {$d eq ""} {set d [lindex [lsearch -all -inline -glob $tcl_pkgPath /usr/lib*] 0]}; puts $d']] | tclsh 2>/dev/null)
AS_IF([test -z "$TCL_GET_DIR"],
[AC_MSG_ERROR([could not determine Tcl package dir from tcl_pkgPath])])
EMC2_TCL_DIR="$TCL_GET_DIR/linuxcnc"])

fe () {
# Fully expand argument. Example:
# ${datadir} -> ${datarootdir} -> ${prefix}/share -> /usr/local
Expand Down Expand Up @@ -726,9 +735,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_LANG_DIR=${prefix}/lib/tcltk/linuxcnc/msgs
EMC2_TCL_LIB_DIR="${EMC2_TCL_DIR}"
EMC2_LANG_DIR="${EMC2_TCL_DIR}/msgs"
EMC2_PO_DIR=${prefix}/share/locale
EMC2_HELP_DIR=${prefix}/share/doc/linuxcnc
case $MODULE_DIR in
Expand Down
Loading