From 6c9d248c6ac4cdab81d033dd4a22d3d8430e7c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 24 Jan 2020 22:26:07 +0100 Subject: [PATCH] triceratops-lv2: upgrade 0.3.1 -> 0.3.2 & hack build with python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../0001-Replace-lv2core-by-lv2.patch | 43 ------------ .../0001-wscript-Start-python3-support.patch | 37 +++++++++++ .../triceratops/triceratops-lv2_0.3.1.bb | 28 -------- .../triceratops/triceratops-lv2_0.3.2.bb | 66 +++++++++++++++++++ 4 files changed, 103 insertions(+), 71 deletions(-) delete mode 100644 recipes-musicians/triceratops/triceratops-lv2/0001-Replace-lv2core-by-lv2.patch create mode 100644 recipes-musicians/triceratops/triceratops-lv2/0001-wscript-Start-python3-support.patch delete mode 100644 recipes-musicians/triceratops/triceratops-lv2_0.3.1.bb create mode 100644 recipes-musicians/triceratops/triceratops-lv2_0.3.2.bb diff --git a/recipes-musicians/triceratops/triceratops-lv2/0001-Replace-lv2core-by-lv2.patch b/recipes-musicians/triceratops/triceratops-lv2/0001-Replace-lv2core-by-lv2.patch deleted file mode 100644 index 25849fa..0000000 --- a/recipes-musicians/triceratops/triceratops-lv2/0001-Replace-lv2core-by-lv2.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d6671a285d8c2f5c42f2f55e490a98afab758324 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Fri, 18 Jan 2019 18:05:18 +0100 -Subject: [PATCH] Replace lv2core by lv2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When building lv2 from git, triceratops fails because it cannot find lv2 any -more. - -Reason: lv2core.pc was removed in lv2 [1]. - -Using lv2.pc works perfectly fine - the contents of both files in lv2 version -1.14 are similar from pkg-config point of view. - -[1] https://github.com/drobilla/lv2/commit/4db67120efca2d4c200d2e1ba5cf3d7b97cab97e - -Upstream-Status: submitted [2] - -[2] https://github.com/thunderox/triceratops/pull/4 - -Signed-off-by: Andreas Müller ---- - wscript | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wscript b/wscript -index 8dd3385..3f48ca8 100644 ---- a/wscript -+++ b/wscript -@@ -34,7 +34,7 @@ def configure(conf): - conf.env.append_unique('CXXFLAGS', ['-fPIC','-fpermissive','-finline-functions']) - - if not autowaf.is_child(): -- autowaf.check_pkg(conf, 'lv2core', uselib_store='LV2CORE') -+ autowaf.check_pkg(conf, 'lv2', uselib_store='LV2CORE') - autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM') - - # Set env['pluginlib_PATTERN'] --- -2.20.1 - diff --git a/recipes-musicians/triceratops/triceratops-lv2/0001-wscript-Start-python3-support.patch b/recipes-musicians/triceratops/triceratops-lv2/0001-wscript-Start-python3-support.patch new file mode 100644 index 0000000..3ab1661 --- /dev/null +++ b/recipes-musicians/triceratops/triceratops-lv2/0001-wscript-Start-python3-support.patch @@ -0,0 +1,37 @@ +From f1415c629d745c9835356b1bb0af3ff77e8b9d8b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Fri, 17 Jan 2020 00:01:09 +0100 +Subject: [PATCH] wscript: Start python3 support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* Fix (mixed) indention +* call print the python3 way +* replace maxint by maxsize + +Signed-off-by: Andreas Müller +--- + wscript | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/wscript b/wscript +index 07c8a7a..71c38d0 100755 +--- a/wscript ++++ b/wscript +@@ -29,9 +29,9 @@ def configure(conf): + else: + conf.env.append_unique('CXXFLAGS', ['-O2','-funroll-loops','-std=c++0x','-g']) + +- if sys.maxint >= 9223372036854775807: +- print "detected 64 bit architecture, enabling -fPIC" +- conf.env.append_unique('CXXFLAGS', ['-fPIC','-fpermissive','-finline-functions']) ++ if sys.maxsize >= 9223372036854775807: ++ print("detected 64 bit architecture, enabling -fPIC") ++ conf.env.append_unique('CXXFLAGS', ['-fPIC','-fpermissive','-finline-functions']) + + if not autowaf.is_child(): + autowaf.check_pkg(conf, 'lv2', uselib_store='LV2CORE') +-- +2.21.0 + diff --git a/recipes-musicians/triceratops/triceratops-lv2_0.3.1.bb b/recipes-musicians/triceratops/triceratops-lv2_0.3.1.bb deleted file mode 100644 index fd9e4e7..0000000 --- a/recipes-musicians/triceratops/triceratops-lv2_0.3.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Polyphonic synthesizer LV2 plugin" -HOMEPAGE = "http://thunderox.com/thor/?q=node/2" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS += " \ - gtkmm \ - jack \ - lv2 \ - liblo \ -" - -inherit waf pkgconfig - -SRC_URI = " \ - ${SOURCEFORGE_MIRROR}/project/triceratops/${BPN}-v${PV}.tar.gz;subdir=${BPN}-${PV} \ - file://0001-Replace-lv2core-by-lv2.patch \ -" -SRC_URI[md5sum] = "cdd3e94b05247061820e17d7c3d900e4" -SRC_URI[sha256sum] = "0f678f2bebf5cd1e7aa3de82afa8bcbca64302cafb92d53dbb49143361517033" - -EXTRA_OECONF = "\ - --libdir=${libdir} \ -" - -FILES_${PN} += " \ - ${libdir}/lv2 \ -" diff --git a/recipes-musicians/triceratops/triceratops-lv2_0.3.2.bb b/recipes-musicians/triceratops/triceratops-lv2_0.3.2.bb new file mode 100644 index 0000000..416101e --- /dev/null +++ b/recipes-musicians/triceratops/triceratops-lv2_0.3.2.bb @@ -0,0 +1,66 @@ +SUMMARY = "Polyphonic synthesizer LV2 plugin" +HOMEPAGE = "http://thunderox.com/thor/?q=node/2" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS += " \ + gtkmm \ + jack \ + lv2 \ + liblo \ +" + +inherit waf pkgconfig python3native + +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/project/triceratops/triceratops_${PV}.tar.gz;subdir=${BPN}-${PV} \ + file://0001-wscript-Start-python3-support.patch \ +" +SRC_URI[md5sum] = "8f3ea6902cd8bf90f6337c2c4f531b8d" +SRC_URI[sha256sum] = "8056b9e2dbfe3cd5b8e30eb28f5ce2a4f34e272c8bf5c897d02410b905fa91ed" + +EXTRA_OECONF = "\ + --libdir=${libdir} \ +" + +waf_preconfigure() { +} + +do_configure_prepend() { + cd ${S} + + # link python -> python3 + ln -sf `which python3` ${B}/python + export PATH="${PATH}:${B}" + + # dummy call -> unpacks waf + ./waf configure -o ${B} --prefix=${prefix} ${EXTRA_OECONF} || true + + for py in `find .waf3-* -name '*.py'`; do + + # -> python3 + 2to3 -w -x import $py + + # hmmm + sed -i 's:^.*raise StopIteration::g' $py + + done + + ./waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF} +} + +do_compile() { + export PATH="${PATH}:${B}" + + # waf breaks but gets far enough to build what's necessary + (cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}) || true +} + +do_install() { + export PATH="${PATH}:${B}" + (cd ${S} && ./waf install --destdir=${D}) || true +} + +FILES_${PN} += " \ + ${libdir}/lv2 \ +"