mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
audio/portmidi: update 236 -> 2.0.4 with new upstream
PR: 278112 Approved: acm Changes: https://github.com/PortMidi/portmidi/releases
This commit is contained in:
parent
e0b453209f
commit
034ea72797
6 changed files with 41 additions and 83 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
31
audio/portmidi/files/patch-porttime_ptlinux.c
Normal file
31
audio/portmidi/files/patch-porttime_ptlinux.c
Normal file
|
@ -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;
|
|
@ -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
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue