diff options
-rw-r--r-- | audio/praat/Makefile | 46 | ||||
-rw-r--r-- | audio/praat/distinfo | 5 | ||||
-rw-r--r-- | audio/praat/files/makefile.defs.freebsd.alsa | 19 | ||||
-rw-r--r-- | audio/praat/files/patch-external_portaudio_Makefile | 9 | ||||
-rw-r--r-- | audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c | 10 | ||||
-rw-r--r-- | audio/praat/files/patch-sys_melder.h | 81 | ||||
-rw-r--r-- | audio/praat/files/patch-sys_melder__alloc.cpp | 13 | ||||
-rw-r--r-- | audio/praat/files/patch-sys_melder__files.cpp | 11 | ||||
-rw-r--r-- | audio/praat/files/patch-sys_melder__strings.cpp | 11 |
9 files changed, 59 insertions, 146 deletions
diff --git a/audio/praat/Makefile b/audio/praat/Makefile index 2a1583af8f06..2b964e426b09 100644 --- a/audio/praat/Makefile +++ b/audio/praat/Makefile @@ -1,28 +1,49 @@ # $FreeBSD$ -PORTNAME= praat -PORTVERSION= 5.4.08 +PORTNAME= praat DISTVERSIONPREFIX= v -PORTREVISION= 4 -CATEGORIES= audio science +DISTVERSION= 6.1.13 +CATEGORIES= audio science -MAINTAINER= jwb@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Phonetics by Computer LICENSE= GPLv2 +LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 \ + libjack.so:audio/jack \ + libasound.so:audio/alsa-lib + USES= compiler:c++11-lang dos2unix gnome iconv pkgconfig +USE_GNOME= cairo gdkpixbuf2 gtk20 USE_GITHUB= yes + DOS2UNIX_REGEX= .*Makefile -USE_GNOME= gtk20 -MAKEFILE= makefile PLIST_FILES= bin/praat man/man1/praat.1.gz +HARDCPPFLAGS= ${WRKSRC}/EEG/Makefile \ + ${WRKSRC}/FFNet/Makefile \ + ${WRKSRC}/LPC/Makefile \ + ${WRKSRC}/artsynth/Makefile \ + ${WRKSRC}/dwsys/Makefile \ + ${WRKSRC}/dwtools/Makefile \ + ${WRKSRC}/external/clapack/blas/Makefile \ + ${WRKSRC}/external/clapack/lapack/Makefile \ + ${WRKSRC}/external/espeak/Makefile \ + ${WRKSRC}/external/flac/Makefile \ + ${WRKSRC}/external/gsl/Makefile \ + ${WRKSRC}/external/mp3/Makefile \ + ${WRKSRC}/fon/Makefile \ + ${WRKSRC}/gram/Makefile \ + ${WRKSRC}/kar/Makefile \ + ${WRKSRC}/main/Makefile \ + ${WRKSRC}/melder/Makefile \ + ${WRKSRC}/stat/Makefile \ + ${WRKSRC}/sys/Makefile + post-patch: - @${FIND} ${WRKSRC} -name Makefile -exec \ - ${REINPLACE_CMD} -e 's|^CFLAGS =|CFLAGS +=|' {} \; - @${FIND} ${WRKSRC} -name Makefile -exec \ - ${REINPLACE_CMD} -e 's|^CPPFLAGS =|CPPFLAGS +=|' {} \; + @${REINPLACE_CMD} -e 's|^CPPFLAGS =|CPPFLAGS +=|' ${HARDCPPFLAGS} @${CP} ${FILESDIR}/makefile.defs.freebsd.alsa \ ${WRKSRC}/makefile.defs @${REINPLACE_CMD} -e 's|%%WRKSRC%%|${WRKSRC}|g' \ @@ -31,8 +52,7 @@ post-patch: @${REINPLACE_CMD} -e 's| log2| NUMlog2|g' \ -e 's|feof (f)|feof (f.get_ptr())|g' \ -e 's|ferror (f)|ferror (f.get_ptr())|g' \ - ${WRKSRC}/dwtools/Sound_extensions.cpp \ - ${WRKSRC}/fon/Sound_files.cpp + ${WRKSRC}/dwtools/Sound_extensions.cpp do-install: ${INSTALL_PROGRAM} ${WRKSRC}/praat ${STAGEDIR}${PREFIX}/bin diff --git a/audio/praat/distinfo b/audio/praat/distinfo index f352b1782eaa..21395c5543c7 100644 --- a/audio/praat/distinfo +++ b/audio/praat/distinfo @@ -1,2 +1,3 @@ -SHA256 (praat-praat-v5.4.08_GH0.tar.gz) = 820f6c6e43a46c565778c2494fef6de3b0c5100e78ae5e2979194619c332e165 -SIZE (praat-praat-v5.4.08_GH0.tar.gz) = 6973960 +TIMESTAMP = 1587744774 +SHA256 (praat-praat-v6.1.13_GH0.tar.gz) = 986988da02091bd9fa011fcf7118a453c6b39b95bebaf44fc18b5a9bd134ec82 +SIZE (praat-praat-v6.1.13_GH0.tar.gz) = 30971542 diff --git a/audio/praat/files/makefile.defs.freebsd.alsa b/audio/praat/files/makefile.defs.freebsd.alsa index cbbdf2701dd2..43d3ed0b3c74 100644 --- a/audio/praat/files/makefile.defs.freebsd.alsa +++ b/audio/praat/files/makefile.defs.freebsd.alsa @@ -2,24 +2,31 @@ # File: makefile.defs.linux.alsa # System: Linux -# Paul Boersma, 26 October 2013 +# Paul Boersma, 23 March 2020 +# J Bacon, 24 April 2020 CC ?= gcc - CXX ?= g++ -CFLAGS = -std=gnu99 -DUNIX -Dlinux -DHAVE_SYS_SOUNDCARD_H `pkg-config --cflags gtk+-2.0` -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 +# -DALSA or -DJACK: Use ALSA or Jack audio in pa_unix_hostapis.c +COMMONFLAGS = -DUNIX -Dlinux -DALSA -D_FILE_OFFSET_BITS=64 `pkg-config --cflags gtk+-2.0` -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -pthread + +CFLAGS = -DHAVE_SYS_SOUNDCARD_H -std=gnu99 $(COMMONFLAGS) -Werror=implicit -CXXFLAGS = -std=gnu++11 -Wshadow -DUNIX -Dlinux -DHAVE_SYS_SOUNDCARD_H `pkg-config --cflags gtk+-2.0` -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -I%%WRKSRC%%/sys -I%%WRKSRC%%/dwsys -I%%WRKSRC%%/num -I%%WRKSRC%%/stat -I%%WRKSRC%%/kar -I%%WRKSRC%%/dwtools -I%%WRKSRC%%/fon -I%%WRKSRC%%/LPC -I%%WRKSRC%%/EEG -I%%WRKSRC%%/external/espeak -I%%WRKSRC%%/external/flac -I%%WRKSRC%%/external/mp3 -I%%WRKSRC%%/external/gsl -I%%LOCALBASE%%/include -I%%LOCALBASE%%/include/unicode +CXXFLAGS = -std=c++17 $(COMMONFLAGS) -Wshadow -DHAVE_SYS_SOUNDCARD_H -Werror=implicit -I%%WRKSRC%%/sys -I%%WRKSRC%%/dwsys -I%%WRKSRC%%/num -I%%WRKSRC%%/stat -I%%WRKSRC%%/kar -I%%WRKSRC%%/dwtools -I%%WRKSRC%%/fon -I%%WRKSRC%%/LPC -I%%WRKSRC%%/EEG -I%%WRKSRC%%/melder -I%%WRKSRC%%/external/espeak -I%%WRKSRC%%/external/flac -I%%WRKSRC%%/external/mp3 -I%%WRKSRC%%/external/gsl -I%%WRKSRC%%/external/clapack -I%%LOCALBASE%%/include -I%%LOCALBASE%%/include/unicode LINK ?= $(CXX) EXECUTABLE = praat -LIBS = `pkg-config --libs gtk+-2.0` -L%%LOCALBASE%%/lib -lm -lpthread -ltinfow +LIBS = `pkg-config --libs gtk+-2.0` -L%%LOCALBASE%%/lib -lasound -lm -lpthread -ltinfow AR = ar RANLIB = ls ICON = MAIN_ICON = -PA_BACKEND = pa_unix_oss.o + +# Replace pa_linux_alsa.o in portaudio/Makefile. +# Does not seem necessary anymore. If not, the portaudio patches can probably +# be removed as well. +# PA_BACKEND = pa_unix_oss.o diff --git a/audio/praat/files/patch-external_portaudio_Makefile b/audio/praat/files/patch-external_portaudio_Makefile index 455236105f6a..e244a4c1e2a5 100644 --- a/audio/praat/files/patch-external_portaudio_Makefile +++ b/audio/praat/files/patch-external_portaudio_Makefile @@ -1,13 +1,14 @@ ---- external/portaudio/Makefile.orig 2016-07-26 15:41:19 UTC +--- external/portaudio/Makefile.orig 2019-11-27 13:52:21 UTC +++ external/portaudio/Makefile -@@ -3,8 +3,9 @@ +@@ -3,8 +3,10 @@ include ../../makefile.defs +PA_BACKEND ?= pa_linux_alsa.o ++ OBJECTS = \ -- pa_unix_hostapis.o pa_unix_util.o pa_linux_alsa.o \ -+ pa_unix_hostapis.o pa_unix_util.o $(PA_BACKEND) \ +- pa_unix_hostapis.o pa_unix_util.o pa_linux_alsa.o pa_jack.o pa_ringbuffer.o \ ++ pa_unix_hostapis.o pa_unix_util.o $(PA_BACKEND) pa_jack.o pa_ringbuffer.o \ pa_win_hostapis.o pa_win_util.o pa_win_wmme.o pa_win_waveformat.o \ pa_front.o pa_debugprint.o pa_cpuload.o \ pa_allocation.o pa_process.o pa_converters.o pa_dither.o \ diff --git a/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c b/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c index 4527980036ce..b0ad5c809ba7 100644 --- a/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c +++ b/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c @@ -1,9 +1,9 @@ ---- external/portaudio/pa_unix_hostapis.c.orig 2015-05-20 01:47:31 UTC +--- external/portaudio/pa_unix_hostapis.c.orig 2019-11-26 11:48:46 UTC +++ external/portaudio/pa_unix_hostapis.c -@@ -60,6 +60,8 @@ PaUtilHostApiInitializer *paHostApiIniti - { - #if defined (linux) && defined (ALSA) - PaAlsa_Initialize, // ppgb +@@ -64,6 +64,8 @@ PaUtilHostApiInitializer *paHostApiInitializers[] = + #elif defined (JACK) + PaJack_Initialize, + #endif + #else + PaOSS_Initialize, #endif diff --git a/audio/praat/files/patch-sys_melder.h b/audio/praat/files/patch-sys_melder.h deleted file mode 100644 index f90bdd43c20a..000000000000 --- a/audio/praat/files/patch-sys_melder.h +++ /dev/null @@ -1,81 +0,0 @@ ---- sys/melder.h.orig 2015-05-20 01:47:31 UTC -+++ sys/melder.h -@@ -51,6 +51,8 @@ - #define INT54_MIN -9007199254740991LL - #endif - -+#include <uchar.h> -+ - typedef wchar_t wchar; - typedef uint8_t char8_t; - typedef char32_t char32; -@@ -222,7 +224,7 @@ static inline int64_t str16len (const ch - return (int64_t) wcslen ((const wchar_t *) string); - } else { - int64_t result = 0; -- while (* string ++ != u'\0') result ++; -+ while (* string ++ != (char16_t)'\0') result ++; - return result; - } - } -@@ -230,8 +232,8 @@ static inline void str16cpy (char16_t *t - if (sizeof (wchar_t) == 2) { - wcscpy ((wchar_t *) target, (const wchar_t *) source); - } else { -- while (* source != u'\0') * target ++ = * source ++; -- * target = u'\0'; -+ while (* source != (char16_t)'\0') * target ++ = * source ++; -+ * target = (char16_t)'\0'; - } - } - static inline int str16cmp (const char16_t *string1, const char16_t *string2) { -@@ -239,7 +241,7 @@ static inline int str16cmp (const char16 - return wcscmp ((const wchar_t *) string1, (const wchar_t *) string2); - } else { - while (*string1 == *string2 ++) { -- if (*string1 ++ == u'\0') { -+ if (*string1 ++ == (char16_t)'\0') { - return 0; - } - } -@@ -251,7 +253,7 @@ static inline int64_t str32len (const ch - return (int64_t) wcslen ((const wchar_t *) string); - } else { - int64_t result = 0; -- while (* string ++ != U'\0') result ++; -+ while (* string ++ != (char32_t)'\0') result ++; - return result; - } - } -@@ -259,8 +261,8 @@ static inline void str32cpy (char32_t *t - if (sizeof (wchar_t) == 4) { - wcscpy ((wchar_t *) target, (const wchar_t *) source); - } else { -- while (* source != U'\0') * target ++ = * source ++; -- * target = U'\0'; -+ while (* source != (char32_t)'\0') * target ++ = * source ++; -+ * target = (char32_t)'\0'; - } - } - static inline int str32cmp (const char32_t *string1, const char32_t *string2) { -@@ -268,7 +270,7 @@ static inline int str32cmp (const char32 - return wcscmp ((const wchar_t *) string1, (const wchar_t *) string2); - } else { - while (*string1 == *string2 ++) { -- if (*string1 ++ == U'\0') { -+ if (*string1 ++ == (char32_t)'\0') { - return 0; - } - } -@@ -1171,6 +1173,11 @@ public: - Melder_fclose (file, tmp); - } - } -+ // operator () is not working in Sound_files.cpp:226 for some reason -+ FILE * get_ptr(void) -+ { -+ return ptr; -+ } - }; - - class autoMelderFile { diff --git a/audio/praat/files/patch-sys_melder__alloc.cpp b/audio/praat/files/patch-sys_melder__alloc.cpp deleted file mode 100644 index 261cb1dcbfc8..000000000000 --- a/audio/praat/files/patch-sys_melder__alloc.cpp +++ /dev/null @@ -1,13 +0,0 @@ ---- sys/melder_alloc.cpp.orig 2015-05-20 01:47:31 UTC -+++ sys/melder_alloc.cpp -@@ -317,8 +317,8 @@ int Melder_strcmp (const char *string1, - } - - int Melder_str32cmp (const char32 *string1, const char32 *string2) { -- if (string1 == NULL) string1 = U""; -- if (string2 == NULL) string2 = U""; -+ if (string1 == NULL) string1 = (char32 *)""; -+ if (string2 == NULL) string2 = (char32 *)""; - return str32cmp (string1, string2); - } - diff --git a/audio/praat/files/patch-sys_melder__files.cpp b/audio/praat/files/patch-sys_melder__files.cpp deleted file mode 100644 index 9111bdb9f637..000000000000 --- a/audio/praat/files/patch-sys_melder__files.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- sys/melder_files.cpp.orig 2015-05-20 01:47:31 UTC -+++ sys/melder_files.cpp -@@ -301,7 +301,7 @@ void MelderFile_setToNull (MelderFile fi - } - - bool MelderFile_isNull (MelderFile file) { -- return file == nullptr || file -> path [0] == '\0'; -+ return file == NULL || file -> path [0] == '\0'; - } - - void MelderDir_setToNull (MelderDir dir) { diff --git a/audio/praat/files/patch-sys_melder__strings.cpp b/audio/praat/files/patch-sys_melder__strings.cpp deleted file mode 100644 index 3bcacb5fef90..000000000000 --- a/audio/praat/files/patch-sys_melder__strings.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- sys/melder_strings.cpp.orig 2015-05-20 01:47:31 UTC -+++ sys/melder_strings.cpp -@@ -386,7 +386,7 @@ void MelderString32_appendCharacter (Mel - expandIfNecessary (char32) - my string [my length] = character; - my length ++; -- my string [my length] = U'\0'; -+ my string [my length] = (char32)'\0'; - } - - void MelderString_get (MelderString *me, wchar_t *destination) { |