View | Details | Raw Unified | Return to bug 278112
Collapse All | Expand All

(-)b/audio/portmidi/Makefile (-3 / +5 lines)
Lines 1-10 Link Here
1
PORTNAME=	portmidi
1
PORTNAME=	portmidi
2
PORTVERSION=	236
2
DISTVERSION=	2.0.4
3
DISTVERSIONPREFIX=v
4
PORTEPOCH=	1
3
CATEGORIES=	audio
5
CATEGORIES=	audio
4
6
5
MAINTAINER=	acm@FreeBSD.org
7
MAINTAINER=	acm@FreeBSD.org
6
COMMENT=	Library for real time MIDI input and output
8
COMMENT=	Library for real time MIDI input and output
7
WWW=		https://github.com/mixxxdj/portmidi
9
WWW=		https://github.com/PortMidi
8
10
9
LICENSE=	PL
11
LICENSE=	PL
10
LICENSE_NAME=	PortMidi license
12
LICENSE_NAME=	PortMidi license
Lines 16-21 LIB_DEPENDS= libasound.so:audio/alsa-lib Link Here
16
USES=		cmake dos2unix localbase:ldflags
18
USES=		cmake dos2unix localbase:ldflags
17
19
18
USE_GITHUB=	yes
20
USE_GITHUB=	yes
19
GH_ACCOUNT=	mixxxdj
21
GH_ACCOUNT=	PortMidi
20
22
21
.include <bsd.port.mk>
23
.include <bsd.port.mk>
(-)b/audio/portmidi/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1627687847
1
TIMESTAMP = 1711992528
2
SHA256 (mixxxdj-portmidi-236_GH0.tar.gz) = 5db9bcb78c728eb81218e905faa5f02eab1f851b3ae5e5b13312755b9b0db943
2
SHA256 (PortMidi-portmidi-v2.0.4_GH0.tar.gz) = 64893e823ae146cabd3ad7f9a9a9c5332746abe7847c557b99b2577afa8a607c
3
SIZE (mixxxdj-portmidi-236_GH0.tar.gz) = 725831
3
SIZE (PortMidi-portmidi-v2.0.4_GH0.tar.gz) = 263225
(-)a/audio/portmidi/files/patch-src_portmidi_linux_finddefault.c (-21 lines)
Removed Link Here
1
--- src/portmidi/linux/finddefault.c.orig	2021-07-17 02:14:06 UTC
2
+++ src/portmidi/linux/finddefault.c
3
@@ -5,6 +5,9 @@
4
 #include <stdlib.h>
5
 #include <stdio.h>
6
 #include <string.h>
7
+#if defined(__FreeBSD__)
8
+#include <ctype.h>
9
+#endif
10
 #include "portmidi.h"
11
 
12
 #define STRING_MAX 256
13
@@ -27,7 +30,7 @@ int match_string(FILE *inf, char *s)
14
 
15
 
16
 /* 
17
-/* Parse preference files, find default device, search devices --
18
+ * Parse preference files, find default device, search devices --
19
  */
20
 PmDeviceID find_default_device(char *path, int input, PmDeviceID id)
21
 /* path -- the name of the preference we are searching for
(-)a/audio/portmidi/files/patch-src_porttime_ptlinux.c (-51 lines)
Removed Link Here
1
--- src/porttime/ptlinux.c.orig	2021-07-17 02:14:06 UTC
2
+++ src/porttime/ptlinux.c
3
@@ -1,3 +1,4 @@
4
+
5
 /* ptlinux.c -- portable timer implementation for linux */
6
 
7
 
8
@@ -31,14 +32,14 @@ CHANGE LOG
9
 #include "porttime.h"
10
 #include "sys/time.h"
11
 #include "sys/resource.h"
12
-#include "sys/timeb.h"
13
 #include "pthread.h"
14
 
15
 #define TRUE 1
16
 #define FALSE 0
17
 
18
 static int time_started_flag = FALSE;
19
-static struct timeb time_offset = {0, 0, 0, 0};
20
+static struct timeval *time_offset;
21
+
22
 static pthread_t pt_thread_pid;
23
 static int pt_thread_created = FALSE;
24
 
25
@@ -79,7 +80,8 @@ static void *Pt_CallbackProc(void *p)
26
 PtError Pt_Start(int resolution, PtCallback *callback, void *userData)
27
 {
28
     if (time_started_flag) return ptNoError;
29
-    ftime(&time_offset); /* need this set before process runs */
30
+    gettimeofday(time_offset, NULL);
31
+
32
     if (callback) {
33
         int res;
34
         pt_callback_parameters *parms = (pt_callback_parameters *) 
35
@@ -121,10 +123,12 @@ int Pt_Started()
36
 PtTimestamp Pt_Time()
37
 {
38
     long seconds, milliseconds;
39
-    struct timeb now;
40
-    ftime(&now);
41
-    seconds = now.time - time_offset.time;
42
-    milliseconds = now.millitm - time_offset.millitm;
43
+    struct timeval *now;
44
+
45
+    gettimeofday(now, NULL);
46
+
47
+    seconds = now->tv_sec - time_offset->tv_sec;
48
+    milliseconds = now->tv_usec - time_offset->tv_usec;
49
     return seconds * 1000 + milliseconds;
50
 }
51
 
(-)b/audio/portmidi/pkg-plist (-5 / +2 lines)
Lines 6-14 lib/cmake/PortMidi/PortMidiConfigVersion.cmake Link Here
6
lib/cmake/PortMidi/PortMidiTargets-%%CMAKE_BUILD_TYPE%%.cmake
6
lib/cmake/PortMidi/PortMidiTargets-%%CMAKE_BUILD_TYPE%%.cmake
7
lib/cmake/PortMidi/PortMidiTargets.cmake
7
lib/cmake/PortMidi/PortMidiTargets.cmake
8
lib/libportmidi.so
8
lib/libportmidi.so
9
lib/libportmidi.so.1
9
lib/libportmidi.so.2
10
lib/libportmidi.so.1.0.236
10
lib/libportmidi.so.2.0.3
11
lib/libporttime.so
12
lib/libporttime.so.1
13
lib/libporttime.so.1.0.236
14
libdata/pkgconfig/portmidi.pc
11
libdata/pkgconfig/portmidi.pc

Return to bug 278112