From cb279fe0bd10ed73170ae03cd93e38ebe55aa5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 24 Jul 2015 00:13:02 +0200 Subject: [PATCH] antimony: initial add 0.8.0b MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- recipes-cad/antimony/antimony_0.8.0b.bb | 25 +++++++++++ ...001-remove-paths-from-python3-config.patch | 45 +++++++++++++++++++ ...ython3-library-detection-wont-t-work.patch | 37 +++++++++++++++ ...03-align-binary-installation-folders.patch | 35 +++++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 recipes-cad/antimony/antimony_0.8.0b.bb create mode 100644 recipes-cad/antimony/files/0001-remove-paths-from-python3-config.patch create mode 100644 recipes-cad/antimony/files/0002-hardcode-boost_python3-library-detection-wont-t-work.patch create mode 100644 recipes-cad/antimony/files/0003-align-binary-installation-folders.patch diff --git a/recipes-cad/antimony/antimony_0.8.0b.bb b/recipes-cad/antimony/antimony_0.8.0b.bb new file mode 100644 index 00000000..e404d362 --- /dev/null +++ b/recipes-cad/antimony/antimony_0.8.0b.bb @@ -0,0 +1,25 @@ +SUMMARY = "Antimony is a computer-aided design (CAD) tool from a parallel universe" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://README.md;beginline=23;endline=48;md5=42ef7697397331e7aa0d2251830f3df3" + +inherit qmake5 python3native + +DEPENDS = "qtbase python3 boost lemon" + +SRC_URI = " \ + https://github.com/mkeeter/${BPN}/archive/${PV}.tar.gz \ + file://0001-remove-paths-from-python3-config.patch \ + file://0002-hardcode-boost_python3-library-detection-wont-t-work.patch \ + file://0003-align-binary-installation-folders.patch \ +" +SRC_URI[md5sum] = "22e632ffb9351ac9deb6db6be933c433" +SRC_URI[sha256sum] = "24d26c513e3d7abfe89a14cf8c2fc4dc0ff6e35581efdfa4721946deb353804c" + +QMAKE_PROFILES = "${S}/qt/${BPN}.pro" + +CXXFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}m" + +do_configure_append() { + # binary is in build dir + sed -i 's:${S}/qt/antimony:${B}/antimony:g' ${B}/Makefile +} diff --git a/recipes-cad/antimony/files/0001-remove-paths-from-python3-config.patch b/recipes-cad/antimony/files/0001-remove-paths-from-python3-config.patch new file mode 100644 index 00000000..87e04103 --- /dev/null +++ b/recipes-cad/antimony/files/0001-remove-paths-from-python3-config.patch @@ -0,0 +1,45 @@ +From b9bb2efb85657a74c075186764659a4252111de5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 21 Jul 2015 09:47:55 +0200 +Subject: [PATCH] remove paths from python3-config +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Müller +--- + qt/fab.pri | 2 +- + qt/shared.pri | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/qt/fab.pri b/qt/fab.pri +index a54813b..b500536 100644 +--- a/qt/fab.pri ++++ b/qt/fab.pri +@@ -54,7 +54,7 @@ DEFINES += '_STATIC_= ' + + linux { + QMAKE_CFLAGS += -std=gnu99 +- QMAKE_CXXFLAGS += $$system(/usr/bin/python3-config --includes) ++ QMAKE_CXXFLAGS += $$system(python3-config --includes) + LIBS += -lpng + } + +diff --git a/qt/shared.pri b/qt/shared.pri +index e7d0e3a..5ee0b5d 100644 +--- a/qt/shared.pri ++++ b/qt/shared.pri +@@ -39,8 +39,8 @@ macx { + } + + linux { +- QMAKE_CXXFLAGS += $$system(/usr/bin/python3-config --includes) +- QMAKE_LFLAGS += $$system(/usr/bin/python3-config --ldflags) ++ QMAKE_CXXFLAGS += $$system(python3-config --includes) ++ QMAKE_LFLAGS += $$system(python3-config --ldflags) + + # Even though this is in QMAKE_LFLAGS, the linker is picky about + # library ordering (so it needs to be here too). +-- +1.9.3 + diff --git a/recipes-cad/antimony/files/0002-hardcode-boost_python3-library-detection-wont-t-work.patch b/recipes-cad/antimony/files/0002-hardcode-boost_python3-library-detection-wont-t-work.patch new file mode 100644 index 00000000..8d8f0e69 --- /dev/null +++ b/recipes-cad/antimony/files/0002-hardcode-boost_python3-library-detection-wont-t-work.patch @@ -0,0 +1,37 @@ +From dc197a74f73664a08f9747f63df4bbd0dc466d2d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Wed, 22 Jul 2015 00:14:09 +0200 +Subject: [PATCH] hardcode boost_python3 library - detection wont't work +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Müller +--- + qt/shared.pri | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/qt/shared.pri b/qt/shared.pri +index 5ee0b5d..b996eb2 100644 +--- a/qt/shared.pri ++++ b/qt/shared.pri +@@ -63,14 +63,8 @@ linux { + error("Could not find ldconfig!") + } + +- # Check for different boost::python naming schemes +- LDCONFIG_OUT = $$system($$LDCONFIG_BIN -p|grep python) +- for (b, $$list(boost_python-py34 boost_python3)) { +- contains(LDCONFIG_OUT, "lib$${b}.so") { +- LIBS += "-l$$b" +- GOT_BOOST_PYTHON = True +- } +- } ++ LIBS += "-lboost_python3" ++ GOT_BOOST_PYTHON = True + + # If we couldn't find boost::python, exit with an error. + isEmpty(GOT_BOOST_PYTHON) { +-- +1.9.3 + diff --git a/recipes-cad/antimony/files/0003-align-binary-installation-folders.patch b/recipes-cad/antimony/files/0003-align-binary-installation-folders.patch new file mode 100644 index 00000000..8ec6173b --- /dev/null +++ b/recipes-cad/antimony/files/0003-align-binary-installation-folders.patch @@ -0,0 +1,35 @@ +From 80a6a407f3e868be9203c98d38f5471141e2014c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Wed, 22 Jul 2015 00:53:39 +0200 +Subject: [PATCH] align binary installation folders +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Müller +--- + qt/antimony.pro | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/qt/antimony.pro b/qt/antimony.pro +index 9d586f4..9c423f8 100644 +--- a/qt/antimony.pro ++++ b/qt/antimony.pro +@@ -125,11 +125,11 @@ macx { + } + + linux { +- executable.path = /usr/local/bin ++ executable.path = /usr/bin + executable.files = antimony +- nodes_folder.path = /usr/local/bin/sb/nodes ++ nodes_folder.path = /usr/bin/sb/nodes + nodes_folder.files = ../py/nodes/* +- fab_folder.path = /usr/local/bin/sb/fab ++ fab_folder.path = /usr/bin/sb/fab + fab_folder.files = ../py/fab/* + INSTALLS += executable nodes_folder fab_folder + } +-- +1.9.3 +