summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ivanov2015-06-23 10:30:43 +0200
committerPeter Ivanov2015-06-23 10:30:43 +0200
commita824f3c7a458f5f472bd76ac4d110627daa50c62 (patch)
tree94abcca48a28a97eb6ecff3dc6c18b12696687d2
downloadaur-a824f3c7a458f5f472bd76ac4d110627daa50c62.tar.gz
Initial import
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD52
-rw-r--r--boost.patch11
-rw-r--r--linuxcnc-sim.install4
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ce29ef6208e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = linuxcnc-sim
+ pkgdesc = It can interpret G-code and simulate a CNC machine (formerly EMC2).
+ pkgver = 20150219
+ pkgrel = 1
+ url = http://linuxcnc.org/
+ install = linuxcnc-sim.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ depends = bc
+ depends = bwidget
+ depends = tcl
+ depends = tk
+ depends = xorg-server
+ depends = python2-libgnome
+ depends = python2-imaging
+ depends = tkimg
+ depends = python2-gtkglext
+ depends = tclx
+ source = linuxcnc::git://git.linuxcnc.org/git/linuxcnc.git
+ source = boost.patch
+ md5sums = SKIP
+ md5sums = ba6948dc5dc155849f55039e454cdbd6
+
+pkgname = linuxcnc-sim
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8b5f330eb0d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Peter Ivanov <ivanovp@gmail.com>
+# Contributor: Alec Ari <neotheuser@ymail.com>
+
+pkgname=linuxcnc-sim
+pkgver=20150219
+pkgrel=1
+pkgdesc="It can interpret G-code and simulate a CNC machine (formerly EMC2)."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://linuxcnc.org/"
+depends=('bc' 'bwidget' 'tcl' 'tk' 'xorg-server' 'python2-libgnome' 'python2-imaging' 'tkimg' 'python2-gtkglext' 'tclx')
+install=$pkgname.install
+_gitname='linuxcnc'
+source=($_gitname::'git://git.linuxcnc.org/git/linuxcnc.git' 'boost.patch')
+#source=($_gitname::'git://git.linuxcnc.org/git/linuxcnc.git#tag=739df958aca9d246daad36f439c82bfbeac681b9' 'boost.patch')
+md5sums=('SKIP'
+ 'ba6948dc5dc155849f55039e454cdbd6')
+makedepends=('git')
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+ git log -1 --format="%cd" --date=short | tr -d '-'
+}
+
+build () {
+ cd $srcdir/$_gitname/src
+ patch -p1 <../../boost.patch
+# #This Makefile line fixes a seg fault due to changed CFLAGS
+# cp -PR $srcdir/Makefile $srcdir/$pkgname-$pkgver/src/Makefile
+# #This fixes build for updated Python libraries
+# cp -PR $srcdir/Submakefile $srcdir/$pkgname-$pkgver/src/hal/drivers/Submakefile
+# #Another Python fix
+# cd $srcdir/$pkgname-$pkgver
+# patch -Np1 < $srcdir/jepler-modsilent.patch
+# cd $srcdir/$pkgname-$pkgver/src
+ find . -iname fixpaths.py|xargs perl -p -i -e "s/python/python2/"
+ ./autogen.sh
+ ./configure --enable-simulator --without-libmodbus --prefix=/usr --with-python=/usr/bin/python2.7 || return 1
+ make || return 1
+}
+
+package() {
+ cd $srcdir/linuxcnc/src
+ make install DESTDIR=${pkgdir} || return 1
+ #Fix lsmod
+# sed -i 's/sbin/bin/g' $pkgdir/etc/init.d/realtime
+ #Stop hiding it from GNOME
+ cp -PR $srcdir/linuxcnc/share/applications $pkgdir/usr/share/
+ mkdir -p $pkgdir/etc/xdg
+ cp -PR $srcdir/linuxcnc/share/menus $pkgdir/etc/xdg/
+}
+
diff --git a/boost.patch b/boost.patch
new file mode 100644
index 00000000000..e7d1b2aceb9
--- /dev/null
+++ b/boost.patch
@@ -0,0 +1,11 @@
+--- ./emc/rs274ngc/rs274ngc_pre.cc 2014-10-22 06:40:15.674483981 +0200
++++ ./emc/rs274ngc/rs274ngc_pre.cc 2014-10-22 06:40:30.550990352 +0200
+@@ -129,7 +129,7 @@
+ // since interp.init() may be called repeatedly this would create a new
+ // wrapper instance on every init(), abandoning the old one and all user attributes
+ // tacked onto it, so make sure this is done exactly once
+- _setup.pythis = boost::python::object(boost::cref(this));
++ _setup.pythis = boost::python::object(boost::cref(*this));
+
+ // alias to 'interpreter.this' for the sake of ';py, .... ' comments
+ // besides 'this', eventually use proper instance names to handle
diff --git a/linuxcnc-sim.install b/linuxcnc-sim.install
new file mode 100644
index 00000000000..c7e6af28aa8
--- /dev/null
+++ b/linuxcnc-sim.install
@@ -0,0 +1,4 @@
+post_install () {
+ echo "To copy linuxcnc to desktop run:"
+ echo "ln -s /usr/bin/linuxcnc ~/Desktop/linuxcnc"
+}