Date: Friday, November 22, 2019 @ 11:24:00
  Author: dvzrv
Revision: 531911

Adding adljack.

Added:
  adljack/
  adljack/repos/
  adljack/trunk/
  adljack/trunk/PKGBUILD
  adljack/trunk/adljack-1.2.0-devendor-rtaudio-rtmidi.patch

---------------------------------------------+
 PKGBUILD                                    |   37 ++++++
 adljack-1.2.0-devendor-rtaudio-rtmidi.patch |  160 ++++++++++++++++++++++++++
 2 files changed, 197 insertions(+)

Added: adljack/trunk/PKGBUILD
===================================================================
--- adljack/trunk/PKGBUILD                              (rev 0)
+++ adljack/trunk/PKGBUILD      2019-11-22 11:24:00 UTC (rev 531911)
@@ -0,0 +1,37 @@
+# Maintainer: David Runge <dv...@archlinux.org>
+
+pkgname=adljack
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="A standalone synthesizer for ADLMIDI and OPNMIDI on the text console"
+arch=('x86_64')
+url="https://github.com/jpcima/adljack";
+license=('Boost')
+groups=('pro-audio')
+depends=('gcc-libs' 'glibc' 'libjack.so' 'liblo.so' 'librtaudio.so'
+'librtmidi.so')
+makedepends=('cmake')
+source=("https://github.com/jpcima/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz";
+        "${pkgname}-1.2.0-devendor-rtaudio-rtmidi.patch")
+sha512sums=('2b579fbb3b47c814bc33b68c749b3335c39feee88115cfe41eb9261775d4b296eebf09905adab8cbba1879af13eff3d0f6af390a29b13c6485eca113851012ae'
+            
'59991d9e55dab988668c644f856fb37bbb01d551ef9c8fe6bd51d414c0c1c1fadef0602409c37cd6f97cbb3fff4ea8cb74e6456cbde42f4e88e0fd46c9fd03bf')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch -Np1 -i ../"${pkgname}-1.2.0-devendor-rtaudio-rtmidi.patch"
+  mkdir -vp build
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  cmake -DCMAKE_INSTALL_PREFIX=/usr \
+        -DCMAKE_BUILD_TYPE=Release \
+        -B build \
+        -S .
+  make -C build VERBOSE=1
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  make -C build DESTDIR="$pkgdir/" install
+}

Added: adljack/trunk/adljack-1.2.0-devendor-rtaudio-rtmidi.patch
===================================================================
--- adljack/trunk/adljack-1.2.0-devendor-rtaudio-rtmidi.patch                   
        (rev 0)
+++ adljack/trunk/adljack-1.2.0-devendor-rtaudio-rtmidi.patch   2019-11-22 
11:24:00 UTC (rev 531911)
@@ -0,0 +1,160 @@
+diff -ruN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt   2019-03-19 19:59:57.000000000 +0100
++++ b/CMakeLists.txt   2019-11-22 00:36:37.566049853 +0100
+@@ -112,6 +112,8 @@
+ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
+   pkg_check_modules(JACK "jack")
+   pkg_check_modules(PULSEAUDIO "libpulse-simple")
++  pkg_check_modules(RTAUDIO "rtaudio")
++  pkg_check_modules(RTMIDI "rtmidi")
+   if(ENABLE_VIRTUALMIDI)
+     message(FATAL_ERROR "virtualMIDI is only available on Windows")
+   endif()
+@@ -148,6 +150,8 @@
+ print_feature("PdCurses" PDCURSES_FOUND)
+ print_feature("Jack" JACK_FOUND)
+ print_feature("LibLO" LIBLO_FOUND)
++print_feature("RtAudio" RTAUDIO_FOUND)
++print_feature("RtMidi" RTMIDI_FOUND)
+ print_feature("Pulseaudio" PULSEAUDIO_FOUND)
+ print_feature("virtualMIDI" ENABLE_VIRTUALMIDI)
+ print_feature("gettext" ENABLE_GETTEXT)
+@@ -212,64 +216,68 @@
+   endif()
+ endif()
+ 
+-## RtMidi library
+-add_library(RtMidi STATIC EXCLUDE_FROM_ALL "thirdparty/rtmidi/RtMidi.cpp")
+-target_include_directories(RtMidi PUBLIC "thirdparty/rtmidi")
+-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+-  target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
+-  target_link_libraries(RtMidi PUBLIC "asound")
+-elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+-  target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
+-  target_link_libraries(RtMidi PUBLIC "winmm")
+-elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+-  target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
+-  find_library(COREMIDI_LIBRARY "CoreMIDI")
+-  find_library(FOUNDATION_LIBRARY "Foundation")
+-  target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}" 
"${FOUNDATION_LIBRARY}")
+-endif()
+-if(JACK_FOUND)
+-  target_compile_definitions(RtMidi PUBLIC "__UNIX_JACK__")
+-  target_include_directories(RtMidi PUBLIC ${JACK_INCLUDE_DIRS})
+-  link_directories(${JACK_LIBRARY_DIRS})
+-  target_link_libraries(RtMidi PUBLIC ${JACK_LIBRARIES})
++if(NOT RTMIDI_FOUND)
++  ## RtMidi library
++  add_library(RtMidi STATIC EXCLUDE_FROM_ALL "thirdparty/rtmidi/RtMidi.cpp")
++  target_include_directories(RtMidi PUBLIC "thirdparty/rtmidi")
++  if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++    target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
++    target_link_libraries(RtMidi PUBLIC "asound")
++  elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
++    target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
++    target_link_libraries(RtMidi PUBLIC "winmm")
++  elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++    target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
++    find_library(COREMIDI_LIBRARY "CoreMIDI")
++    find_library(FOUNDATION_LIBRARY "Foundation")
++    target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}" 
"${FOUNDATION_LIBRARY}")
++  endif()
++  if(JACK_FOUND)
++    target_compile_definitions(RtMidi PUBLIC "__UNIX_JACK__")
++    target_include_directories(RtMidi PUBLIC ${JACK_INCLUDE_DIRS})
++    link_directories(${JACK_LIBRARY_DIRS})
++    target_link_libraries(RtMidi PUBLIC ${JACK_LIBRARIES})
++  endif()
+ endif()
+ 
+-## RtAudio library
+-add_library(RtAudio STATIC EXCLUDE_FROM_ALL "thirdparty/rtaudio/RtAudio.cpp")
+-target_include_directories(RtAudio PUBLIC "thirdparty/rtaudio")
+-target_include_directories(RtAudio PRIVATE "thirdparty/rtaudio/include")
+-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+-  target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
+-  target_link_libraries(RtAudio PUBLIC "asound")
+-  if(PULSEAUDIO_FOUND)
+-    target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
+-    target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
+-    link_directories(${PULSEAUDIO_LIBRARY_DIRS})
+-    target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
+-  endif()
+-  # target_compile_definitions(RtAudio PUBLIC "__LINUX_OSS__")
+-elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+-  target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
+-  target_link_libraries(RtAudio PUBLIC "dsound")
+-  target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
+-  target_link_libraries(RtAudio PUBLIC "ksguid")
+-  target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
+-  target_sources(RtAudio PRIVATE
+-    "thirdparty/rtaudio/include/asio.cpp"
+-    "thirdparty/rtaudio/include/asiodrivers.cpp"
+-    "thirdparty/rtaudio/include/asiolist.cpp"
+-    "thirdparty/rtaudio/include/iasiothiscallresolver.cpp")
+-elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+-  target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
+-  find_library(COREAUDIO_LIBRARY "CoreAudio")
+-  find_library(FOUNDATION_LIBRARY "Foundation")
+-  target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}" 
"${FOUNDATION_LIBRARY}")
+-endif()
+-if(JACK_FOUND)
+-  target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
+-  target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
+-  link_directories(${JACK_LIBRARY_DIRS})
+-  target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
++if(NOT RTAUDIO_FOUND)
++  ## RtAudio library
++  add_library(RtAudio STATIC EXCLUDE_FROM_ALL 
"thirdparty/rtaudio/RtAudio.cpp")
++  target_include_directories(RtAudio PUBLIC "thirdparty/rtaudio")
++  target_include_directories(RtAudio PRIVATE "thirdparty/rtaudio/include")
++  if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++    target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
++    target_link_libraries(RtAudio PUBLIC "asound")
++    if(PULSEAUDIO_FOUND)
++      target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
++      target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
++      link_directories(${PULSEAUDIO_LIBRARY_DIRS})
++      target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
++    endif()
++    # target_compile_definitions(RtAudio PUBLIC "__LINUX_OSS__")
++  elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
++    target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
++    target_link_libraries(RtAudio PUBLIC "dsound")
++    target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
++    target_link_libraries(RtAudio PUBLIC "ksguid")
++    target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
++    target_sources(RtAudio PRIVATE
++      "thirdparty/rtaudio/include/asio.cpp"
++      "thirdparty/rtaudio/include/asiodrivers.cpp"
++      "thirdparty/rtaudio/include/asiolist.cpp"
++      "thirdparty/rtaudio/include/iasiothiscallresolver.cpp")
++  elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++    target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
++    find_library(COREAUDIO_LIBRARY "CoreAudio")
++    find_library(FOUNDATION_LIBRARY "Foundation")
++    target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}" 
"${FOUNDATION_LIBRARY}")
++  endif()
++  if(JACK_FOUND)
++    target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
++    target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
++    link_directories(${JACK_LIBRARY_DIRS})
++    target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
++  endif()
+ endif()
+ 
+ ## Ring buffer
+@@ -279,7 +287,12 @@
+ ## Cross platform version
+ add_executable(adlrt WIN32 "sources/rtmain.cc" ${adl_sources})
+ target_compile_definitions(adlrt PRIVATE 
"ADLJACK_PREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+-target_link_libraries(adlrt PRIVATE ADLMIDI_static OPNMIDI_static ring_buffer 
RtAudio RtMidi ${CMAKE_THREAD_LIBS_INIT})
++if(NOT RTAUDIO_FOUND AND NOT RTMIDI_FOUND)
++  target_link_libraries(adlrt PRIVATE ADLMIDI_static OPNMIDI_static 
ring_buffer RtAudio RtMidi ${CMAKE_THREAD_LIBS_INIT})
++else()
++  target_include_directories(adlrt PRIVATE "${RTAUDIO_INCLUDE_DIRS}" 
"${RTMIDI_INCLUDE_DIRS}")
++  target_link_libraries(adlrt PRIVATE ADLMIDI_static OPNMIDI_static 
ring_buffer "${RTAUDIO_LIBRARIES}" "${RTMIDI_LIBRARIES}" 
${CMAKE_THREAD_LIBS_INIT})
++endif()
+ if(CURSES_FOUND)
+   target_compile_definitions(adlrt PRIVATE "ADLJACK_USE_CURSES")
+   target_include_directories(adlrt PRIVATE "${CURSES_INCLUDE_DIR}")

Reply via email to