diff --git a/audio/portmidi/Makefile b/audio/portmidi/Makefile index 53bc51d7766a..1244355cbdf7 100644 --- a/audio/portmidi/Makefile +++ b/audio/portmidi/Makefile @@ -1,21 +1,23 @@ PORTNAME= portmidi -PORTVERSION= 236 +DISTVERSION= 2.0.4 +DISTVERSIONPREFIX=v +PORTEPOCH= 1 CATEGORIES= audio MAINTAINER= acm@FreeBSD.org COMMENT= Library for real time MIDI input and output -WWW= https://github.com/mixxxdj/portmidi +WWW= https://github.com/PortMidi LICENSE= PL LICENSE_NAME= PortMidi license LICENSE_FILE= ${WRKSRC}/license.txt LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LIB_DEPENDS= libasound.so:audio/alsa-lib USES= cmake dos2unix localbase:ldflags USE_GITHUB= yes -GH_ACCOUNT= mixxxdj +GH_ACCOUNT= PortMidi .include diff --git a/audio/portmidi/distinfo b/audio/portmidi/distinfo index ace49e4c704c..5efc84c80524 100644 --- a/audio/portmidi/distinfo +++ b/audio/portmidi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1627687847 -SHA256 (mixxxdj-portmidi-236_GH0.tar.gz) = 5db9bcb78c728eb81218e905faa5f02eab1f851b3ae5e5b13312755b9b0db943 -SIZE (mixxxdj-portmidi-236_GH0.tar.gz) = 725831 +TIMESTAMP = 1711992528 +SHA256 (PortMidi-portmidi-v2.0.4_GH0.tar.gz) = 64893e823ae146cabd3ad7f9a9a9c5332746abe7847c557b99b2577afa8a607c +SIZE (PortMidi-portmidi-v2.0.4_GH0.tar.gz) = 263225 diff --git a/audio/portmidi/files/patch-porttime_ptlinux.c b/audio/portmidi/files/patch-porttime_ptlinux.c new file mode 100644 index 000000000000..955f77f6e516 --- /dev/null +++ b/audio/portmidi/files/patch-porttime_ptlinux.c @@ -0,0 +1,31 @@ +--- porttime/ptlinux.c.orig 2024-04-01 19:43:35.367808000 +0200 ++++ porttime/ptlinux.c 2024-04-01 19:43:57.157503000 +0200 +@@ -29,9 +29,8 @@ + #include + #include + #include "porttime.h" +-#include "time.h" ++#include + #include "sys/resource.h" +-#include "sys/timeb.h" + #include "pthread.h" + + #define TRUE 1 +@@ -80,7 +79,7 @@ + { + if (time_started_flag) return ptNoError; + /* need this set before process runs: */ +- clock_gettime(CLOCK_MONOTONIC_RAW, &time_offset); ++ clock_gettime(CLOCK_MONOTONIC_FAST, &time_offset); + if (callback) { + int res; + pt_callback_parameters *parms = (pt_callback_parameters *) +@@ -123,7 +122,7 @@ + { + long seconds, ms; + struct timespec now; +- clock_gettime(CLOCK_MONOTONIC_RAW, &now); ++ clock_gettime(CLOCK_MONOTONIC_FAST, &now); + seconds = now.tv_sec - time_offset.tv_sec; + ms = (now.tv_nsec - time_offset.tv_nsec) / 1000000; /* round down */ + return seconds * 1000 + ms; diff --git a/audio/portmidi/files/patch-src_portmidi_linux_finddefault.c b/audio/portmidi/files/patch-src_portmidi_linux_finddefault.c deleted file mode 100644 index acff9dfac8cf..000000000000 --- a/audio/portmidi/files/patch-src_portmidi_linux_finddefault.c +++ /dev/null @@ -1,21 +0,0 @@ ---- src/portmidi/linux/finddefault.c.orig 2021-07-17 02:14:06 UTC -+++ src/portmidi/linux/finddefault.c -@@ -5,6 +5,9 @@ - #include - #include - #include -+#if defined(__FreeBSD__) -+#include -+#endif - #include "portmidi.h" - - #define STRING_MAX 256 -@@ -27,7 +30,7 @@ int match_string(FILE *inf, char *s) - - - /* --/* Parse preference files, find default device, search devices -- -+ * Parse preference files, find default device, search devices -- - */ - PmDeviceID find_default_device(char *path, int input, PmDeviceID id) - /* path -- the name of the preference we are searching for diff --git a/audio/portmidi/files/patch-src_porttime_ptlinux.c b/audio/portmidi/files/patch-src_porttime_ptlinux.c deleted file mode 100644 index 6d04c73d9ca7..000000000000 --- a/audio/portmidi/files/patch-src_porttime_ptlinux.c +++ /dev/null @@ -1,51 +0,0 @@ ---- src/porttime/ptlinux.c.orig 2021-07-17 02:14:06 UTC -+++ src/porttime/ptlinux.c -@@ -1,3 +1,4 @@ -+ - /* ptlinux.c -- portable timer implementation for linux */ - - -@@ -31,14 +32,14 @@ CHANGE LOG - #include "porttime.h" - #include "sys/time.h" - #include "sys/resource.h" --#include "sys/timeb.h" - #include "pthread.h" - - #define TRUE 1 - #define FALSE 0 - - static int time_started_flag = FALSE; --static struct timeb time_offset = {0, 0, 0, 0}; -+static struct timeval *time_offset; -+ - static pthread_t pt_thread_pid; - static int pt_thread_created = FALSE; - -@@ -79,7 +80,8 @@ static void *Pt_CallbackProc(void *p) - PtError Pt_Start(int resolution, PtCallback *callback, void *userData) - { - if (time_started_flag) return ptNoError; -- ftime(&time_offset); /* need this set before process runs */ -+ gettimeofday(time_offset, NULL); -+ - if (callback) { - int res; - pt_callback_parameters *parms = (pt_callback_parameters *) -@@ -121,10 +123,12 @@ int Pt_Started() - PtTimestamp Pt_Time() - { - long seconds, milliseconds; -- struct timeb now; -- ftime(&now); -- seconds = now.time - time_offset.time; -- milliseconds = now.millitm - time_offset.millitm; -+ struct timeval *now; -+ -+ gettimeofday(now, NULL); -+ -+ seconds = now->tv_sec - time_offset->tv_sec; -+ milliseconds = now->tv_usec - time_offset->tv_usec; - return seconds * 1000 + milliseconds; - } - diff --git a/audio/portmidi/pkg-plist b/audio/portmidi/pkg-plist index 0e9653173310..1dc05070d242 100644 --- a/audio/portmidi/pkg-plist +++ b/audio/portmidi/pkg-plist @@ -1,14 +1,11 @@ include/pmutil.h include/portmidi.h include/porttime.h lib/cmake/PortMidi/PortMidiConfig.cmake lib/cmake/PortMidi/PortMidiConfigVersion.cmake lib/cmake/PortMidi/PortMidiTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/PortMidi/PortMidiTargets.cmake lib/libportmidi.so -lib/libportmidi.so.1 -lib/libportmidi.so.1.0.236 -lib/libporttime.so -lib/libporttime.so.1 -lib/libporttime.so.1.0.236 +lib/libportmidi.so.2 +lib/libportmidi.so.2.0.3 libdata/pkgconfig/portmidi.pc