From a1e7b434253b505baa99f44fe95c487d054c29f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 19 Apr 2020 22:46:35 +0200 Subject: [PATCH] xpolymonk.lv2: Initial add 0.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../0001-Adjust-to-oe-build.patch | 73 +++++++++++++++++++ ...-host-machine-s-ld-to-pack-resources.patch | 36 +++++++++ .../xmonk.lv2/xpolymonk.lv2_git.bb | 34 +++++++++ .../packagegroups/musicians-world.bb | 4 +- 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 recipes-musicians/xmonk.lv2/xpolymonk.lv2/0001-Adjust-to-oe-build.patch create mode 100644 recipes-musicians/xmonk.lv2/xpolymonk.lv2/0002-Do-not-use-host-machine-s-ld-to-pack-resources.patch create mode 100644 recipes-musicians/xmonk.lv2/xpolymonk.lv2_git.bb diff --git a/recipes-musicians/xmonk.lv2/xpolymonk.lv2/0001-Adjust-to-oe-build.patch b/recipes-musicians/xmonk.lv2/xpolymonk.lv2/0001-Adjust-to-oe-build.patch new file mode 100644 index 0000000..f5820ea --- /dev/null +++ b/recipes-musicians/xmonk.lv2/xpolymonk.lv2/0001-Adjust-to-oe-build.patch @@ -0,0 +1,73 @@ +From cac14ae87d8c72bf9016435cb98a2952f6b28bed Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 19 Apr 2020 20:42:37 +0200 +Subject: [PATCH] Adjust to oe-build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andreas Müller +--- + XPolyMonk/Makefile | 37 ++++--------------------------------- + 1 file changed, 4 insertions(+), 33 deletions(-) + +diff --git a/XPolyMonk/Makefile b/XPolyMonk/Makefile +index 8422a63..0ea1a09 100644 +--- a/XPolyMonk/Makefile ++++ b/XPolyMonk/Makefile +@@ -1,36 +1,7 @@ + +- UNAME := $(shell uname) + STRIP ?= strip + # check if user is root +- user = $(shell whoami) +- ifeq ($(user),root) + INSTALL_DIR ?= /usr/lib/lv2 +- else +- INSTALL_DIR ?= ~/.lv2 +- endif +- +- # check CPU and supported optimization flags +- ifeq ($(UNAME), Linux) +- ifneq ($(shell cat /proc/cpuinfo | grep sse3 ) , ) +- SSE_CFLAGS = -msse3 -mfpmath=sse +- else ifneq ($(shell cat /proc/cpuinfo | grep sse2 ) , ) +- SSE_CFLAGS = -msse2 -mfpmath=sse +- else ifneq ($(shell cat /proc/cpuinfo | grep sse ) , ) +- SSE_CFLAGS = -msse -mfpmath=sse +- else ifneq ($(shell cat /proc/cpuinfo | grep ARM ) , ) +- ifneq ($(shell cat /proc/cpuinfo | grep ARMv7 ) , ) +- ifneq ($(shell cat /proc/cpuinfo | grep vfpd32 ) , ) +- SSE_CFLAGS = -march=armv7-a -mfpu=vfpv3 +- else ifneq ($(shell cat /proc/cpuinfo | grep vfpv3 ) , ) +- SSE_CFLAGS = -march=armv7-a -mfpu=vfpv3 +- endif +- else +- ARMCPU = "YES" +- endif +- else +- SSE_CFLAGS = +- endif +- endif + + # set bundle name + NAME = XPolyMonk +@@ -43,10 +14,10 @@ + # set compile flags + CXXFLAGS += -D_FORTIFY_SOURCE=2 -I. -I./dsp -I./plugin -fPIC -DPIC -O2 -Wall -fstack-protector -funroll-loops \ + -ffast-math -fomit-frame-pointer -fstrength-reduce -fdata-sections \ +- -Wl,--gc-sections -Wl,-z,relro,-z,now -Wl,--exclude-libs,ALL -Wl,-z,defs $(SSE_CFLAGS) +- LDFLAGS += -I. -shared -lm -Wl,-z,noexecstack -fvisibility=hidden ++ -Wl,--gc-sections -Wl,-z,relro,-z,now -Wl,--exclude-libs,ALL -Wl,-z,defs + GUI_LDFLAGS += -I./gui -I$(HEADER_DIR) -Wl,-z,noexecstack -fvisibility=hidden \ +- -L. $(LIB_DIR)libxputty.a -shared `pkg-config --cflags --libs cairo x11` -lm ++ $(LDFLAGS) -L. $(LIB_DIR)libxputty.a -shared `pkg-config --cflags --libs cairo x11` -lm ++ LDFLAGS += -I. -shared -lm -Wl,-z,noexecstack -fvisibility=hidden + # invoke build files + OBJECTS = plugin/$(NAME).cpp + GUI_OBJECTS = gui/$(NAME)_x11ui.c +-- +2.21.1 + diff --git a/recipes-musicians/xmonk.lv2/xpolymonk.lv2/0002-Do-not-use-host-machine-s-ld-to-pack-resources.patch b/recipes-musicians/xmonk.lv2/xpolymonk.lv2/0002-Do-not-use-host-machine-s-ld-to-pack-resources.patch new file mode 100644 index 0000000..c388a1e --- /dev/null +++ b/recipes-musicians/xmonk.lv2/xpolymonk.lv2/0002-Do-not-use-host-machine-s-ld-to-pack-resources.patch @@ -0,0 +1,36 @@ +From db0f9c81a45491cab960e094520b742a93188f0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 19 Apr 2020 22:20:17 +0200 +Subject: [PATCH] Do not use host machine's ld to pack resources +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Took a while - error message on cross build of XPolyMonk.lv2 was (not helpful exactly): + +| xmidi_keyboard.c:(.text+0x2a30): undefined reference to `_binary_midikeyboard_png_start' +| collect2: error: ld returned 1 exit status + +Upstream-Status: Submitted [https://github.com/brummer10/libxputty/pull/2] + +Signed-off-by: Andreas Müller +--- + libxputty/Build/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libxputty/Build/Makefile b/libxputty/Build/Makefile +index 39877a8..099166d 100644 +--- a/libxputty/Build/Makefile ++++ b/libxputty/Build/Makefile +@@ -68,7 +68,7 @@ $(XDG_OBJ): $(XDG_SOURCES) + $(CC) -MMD -Wall -DHAVE_MMAP -c $(addprefix $(XDG_DIR),$(patsubst %.o,%.c,$@)) -o $@ $(INCLUDES) $(LDFLAGS) + + $(RESOURCES_OBJ): $(RESOURCES) +- cd $(RESOURCES_DIR) && ld -r -b binary $(patsubst %.o,%.png,$@) -o ../../Build/$@ ++ cd $(RESOURCES_DIR) && $(LD) -r -b binary $(patsubst %.o,%.png,$@) -o ../../Build/$@ + + $(DIALOG_OBJ): $(DIALOG_SOURCES) + $(CC) -MMD -Wall -c $(addprefix $(DIALOG_DIR),$(patsubst %.o,%.c,$@)) -o $@ $(INCLUDES) $(LDFLAGS) +-- +2.21.1 + diff --git a/recipes-musicians/xmonk.lv2/xpolymonk.lv2_git.bb b/recipes-musicians/xmonk.lv2/xpolymonk.lv2_git.bb new file mode 100644 index 0000000..5fc78a0 --- /dev/null +++ b/recipes-musicians/xmonk.lv2/xpolymonk.lv2_git.bb @@ -0,0 +1,34 @@ +SUMMARY = "Polyphonic version of Xmonk.lv2" +HOMEPAGE = "https://github.com/brummer10/XPolyMonk.lv2" +LICENSE = "BSD-0-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1102993e593e0f97408b1bd982836a" + +inherit pkgconfig features_check + +REQUIRED_DISTRO_FEATURES = "x11" + +DEPENDS += " \ + virtual/libx11 \ + cairo \ + lv2 \ +" + +SRC_URI = " \ + gitsm://github.com/brummer10/XPolyMonk.lv2.git;protocol=https \ + file://0001-Adjust-to-oe-build.patch \ + file://0002-Do-not-use-host-machine-s-ld-to-pack-resources.patch \ +" +SRCREV = "512d109d20e0a46d87ece9fea9576052da60ab86" +PV = "0.6" +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += " \ + PREFIX=${prefix} \ + STRIP=echo \ +" + +do_install() { + oe_runmake DESTDIR=${D} PREFIX=${prefix} LIBDIR=${libdir} install +} + +FILES_${PN} += "${libdir}/lv2" diff --git a/recipes-support/packagegroups/musicians-world.bb b/recipes-support/packagegroups/musicians-world.bb index 6bb7f4b..48e4b75 100644 --- a/recipes-support/packagegroups/musicians-world.bb +++ b/recipes-support/packagegroups/musicians-world.bb @@ -156,7 +156,9 @@ RDEPENDS_${PN} += " \ tuna.lv2 \ \ \ - xmonk.lv2 \ + xmonk.lv2 xpolymonk.lv2 \ + \ + \ ykchorus ykchorus-dssi ykchorus-lv2 ykchorus-vst \ yoshimi \ zam-plugins-standalone zam-plugins-ladspa zam-plugins-lv2 zam-plugins-vst \