nixpkgs/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch
MetaDark 8deca0d420 zynaddsubfx: use zyn-fusion as default gui module
- Added `guiModule` option that accepts "fltk", "ntk", "zest", or "off"

- Split FLTK dependencies from NTK dependencies

- Added support for building the FLTK gui

- Added support for building the Zyn-Fusion (zest) gui

- Added new derivation for the Zest UI framework (local to zynaddsubfx)
  It's not yet designed to be used outside of zynaddsubfx, but it
  may be in the future

- Added flags for all optional features

- Added & disabled `dssiSupport` by default

- Disabled `lashSupport` by default
  Slows down startup looking for LASH server if not running

- Added & enabled `portaudioSupport` by default
  Cross platform audio library that uses ALSA/JACK on Linux.
  Supports multiple audio streams without needing JACK.

- Enabled tests

- Removes nico202 as maintainer, as requested in code review
2021-01-07 15:00:35 -05:00

114 lines
5.1 KiB
Diff

diff --git a/Makefile b/Makefile
index f3e3be2..2398852 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,3 @@
-UV_DIR = libuv-v1.9.1
-UV_FILE = $(UV_DIR).tar.gz
-UV_URL = http://dist.libuv.org/dist/v1.9.1/$(UV_FILE)
-
-
all:
ruby ./rebuild-fcache.rb
cd deps/nanovg/src && $(CC) nanovg.c -c -fPIC
@@ -10,12 +5,12 @@ all:
# cd deps/pugl && python2 ./waf configure --no-cairo --static
cd deps/pugl && python2 ./waf configure --no-cairo --static --debug
cd deps/pugl && python2 ./waf
- cd src/osc-bridge && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib
+ cd src/osc-bridge && make lib
cd mruby && MRUBY_CONFIG=../build_config.rb rake
$(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \
./deps/libnanovg.a \
src/osc-bridge/libosc-bridge.a \
- ./deps/$(UV_DIR)/.libs/libuv.a -lm -lX11 -lGL -lpthread
+ -luv -lm -lX11 -lGL -lpthread
$(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99
osx:
@@ -25,12 +20,12 @@ osx:
cd deps/pugl && python2 ./waf configure --no-cairo --static
# cd deps/pugl && python2 ./waf configure --no-cairo --static --debug
cd deps/pugl && python2 ./waf
- cd src/osc-bridge && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib
+ cd src/osc-bridge && make lib
cd mruby && MRUBY_CONFIG=../build_config.rb rake
$(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \
./deps/libnanovg.a \
src/osc-bridge/libosc-bridge.a \
- ./deps/$(UV_DIR)/.libs/libuv.a -lm -framework OpenGL -lpthread
+ -luv -lm -framework OpenGL -lpthread
$(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -framework OpenGL -framework AppKit -lpthread -I deps/pugl -std=gnu99
windows:
@@ -38,38 +33,14 @@ windows:
$(AR) rc deps/libnanovg.a deps/nanovg/src/*.o
cd deps/pugl && CFLAGS="-mstackrealign" python2 ./waf configure --no-cairo --static --target=win32
cd deps/pugl && python2 ./waf
- cd src/osc-bridge && CFLAGS="-mstackrealign -I ../../deps/$(UV_DIR)/include " make lib
+ cd src/osc-bridge && CFLAGS="-mstackrealign" make lib
cd mruby && WINDOWS=1 MRUBY_CONFIG=../build_config.rb rake
$(CC) -mstackrealign -shared -o libzest.dll -static-libgcc `find mruby/build/w64 -type f | grep -e "\.o$$" | grep -v bin` \
./deps/libnanovg.a \
src/osc-bridge/libosc-bridge.a \
- ./deps/libuv-win.a \
- -lm -lpthread -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32
+ -luv -lm -lpthread -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32
$(CC) -mstackrealign -DWIN32 test-libversion.c deps/pugl/build/libpugl-0.a -o zest.exe -lpthread -I deps/pugl -std=c99 -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32
-
-builddep: deps/libuv.a
-deps/libuv.a:
- cd deps/$(UV_DIR) && ./autogen.sh
- cd deps/$(UV_DIR) && CFLAGS=-fPIC ./configure
- cd deps/$(UV_DIR) && CFLAGS=-fPIC make
- cp deps/$(UV_DIR)/.libs/libuv.a deps/
-
-builddepwin: deps/libuv-win.a
-deps/libuv-win.a:
- cd deps/$(UV_DIR) && ./autogen.sh
- cd deps/$(UV_DIR) && CFLAGS="-mstackrealign" ./configure --host=x86_64-w64-mingw32
- cd deps/$(UV_DIR) && LD=x86_64-w64-mingw32-gcc make
- cp deps/$(UV_DIR)/.libs/libuv.a deps/libuv-win.a
-
-deps/$(UV_DIR):
- cd deps && wget -4 $(UV_URL) && tar xvf $(UV_FILE)
-setup: deps/$(UV_DIR)
-
-setupwin:
- cd deps && wget -4 $(UV_URL)
- cd deps && tar xvf $(UV_FILE)
-
push:
cd src/osc-bridge && git push
cd src/mruby-qml-parse && git push
diff --git a/build_config.rb b/build_config.rb
index 00f1f69..11ac15b 100644
--- a/build_config.rb
+++ b/build_config.rb
@@ -96,7 +96,6 @@ build_type.new(build_name) do |conf|
conf.cc do |cc|
cc.include_paths << "#{`pwd`.strip}/../deps/nanovg/src"
cc.include_paths << "#{`pwd`.strip}/../deps/pugl/"
- cc.include_paths << "#{`pwd`.strip}/../deps/libuv-v1.9.1/include/"
cc.include_paths << "/usr/share/mingw-w64/include/" if windows
cc.include_paths << "/usr/x86_64-w64-mingw32/include/" if windows
cc.flags << "-DLDBL_EPSILON=1e-6" if windows
@@ -117,14 +116,14 @@ build_type.new(build_name) do |conf|
linker.flags_after_libraries << "#{`pwd`.strip}/../deps/pugl/build/libpugl-0.a"
linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libnanovg.a"
if(!windows)
- linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libuv.a"
+ linker.flags_after_libraries << "-luv"
if(ENV['OS'] != "Mac")
linker.libraries << 'GL'
linker.libraries << 'X11'
end
linker.flags_after_libraries << "-lpthread -ldl -lm"
else
- linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libuv-win.a"
+ linker.flags_after_libraries << "-luv"
linker.flags_after_libraries << "-lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi"
linker.flags_after_libraries << "-lglu32 -lgdi32 -lopengl32"
end