Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2024 18:42:58 GMT
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 034ea72797c7 - main - audio/portmidi: update 236 -> 2.0.4 with new upstream
Message-ID:  <202404021842.432IgwoN011198@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=034ea72797c76ee89f85c7c6f77b3e2e907c09ca

commit 034ea72797c76ee89f85c7c6f77b3e2e907c09ca
Author:     Kurt Jaeger <pi@FreeBSD.org>
AuthorDate: 2024-04-02 18:41:16 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2024-04-02 18:41:16 +0000

    audio/portmidi: update 236 -> 2.0.4 with new upstream
    
    PR:             278112
    Approved:       acm
    Changes:        https://github.com/PortMidi/portmidi/releases
---
 audio/portmidi/Makefile                            |  8 ++--
 audio/portmidi/distinfo                            |  6 +--
 audio/portmidi/files/patch-porttime_ptlinux.c      | 31 +++++++++++++
 .../files/patch-src_portmidi_linux_finddefault.c   | 21 ---------
 audio/portmidi/files/patch-src_porttime_ptlinux.c  | 51 ----------------------
 audio/portmidi/pkg-plist                           |  7 +--
 6 files changed, 41 insertions(+), 83 deletions(-)

diff --git a/audio/portmidi/Makefile b/audio/portmidi/Makefile
index 53bc51d7766a..1244355cbdf7 100644
--- a/audio/portmidi/Makefile
+++ b/audio/portmidi/Makefile
@@ -1,10 +1,12 @@
 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
@@ -16,6 +18,6 @@ LIB_DEPENDS=	libasound.so:audio/alsa-lib
 USES=		cmake dos2unix localbase:ldflags
 
 USE_GITHUB=	yes
-GH_ACCOUNT=	mixxxdj
+GH_ACCOUNT=	PortMidi
 
 .include <bsd.port.mk>
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 <unistd.h>
+ #include <sys/types.h>
+ #include "porttime.h"
+-#include "time.h"
++#include <time.h>
+ #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 <stdlib.h>
- #include <stdio.h>
- #include <string.h>
-+#if defined(__FreeBSD__)
-+#include <ctype.h>
-+#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
@@ -6,9 +6,6 @@ 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404021842.432IgwoN011198>