addpkg(x11/praat): Doing phonetics by computer

This commit is contained in:
sogaiu 2022-10-20 21:14:23 +09:00 committed by Henrik Grimler
parent f182b5cd20
commit b244d6a54d
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
3 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,13 @@
TERMUX_PKG_HOMEPAGE=https://www.praat.org
TERMUX_PKG_DESCRIPTION="Doing phonetics by computer"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=6.2.23
TERMUX_PKG_SRCURL=https://github.com/praat/praat/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=cc2041656a9d8b36a7dd5115ddde2af09d669c6179d252330b83da9504483b62
TERMUX_PKG_DEPENDS="gtk3, pulseaudio, xorgproto"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin praat
}

View File

@ -0,0 +1,28 @@
diff -uNr praat-6.2.23/makefile.defs praat-6.2.23.mod/makefile.defs
--- praat-6.2.23/makefile.defs 1970-01-01 09:00:00.000000000 +0900
+++ praat-6.2.23.mod/makefile.defs 2022-10-20 18:01:48.926769740 +0900
@@ -0,0 +1,23 @@
+# File: makefile.defs.linux.termux
+
+# System: Android via termux
+
+CC ?= gcc
+CXX ?= g++
+LINK ?= $(CXX) -Wl,-rpath=@TERMUX_PREFIX@/lib
+
+PKG_CONFIG ?= "pkg-config"
+
+COMMONFLAGS = -DPA_LITTLE_ENDIAN -D_FILE_OFFSET_BITS=64 -DUNIX -Dlinux -DHAVE_PULSEAUDIO `$(PKG_CONFIG) --cflags gtk+-3.0` \
+ -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1
+
+CFLAGS = -std=gnu99 $(COMMONFLAGS) -Werror=missing-prototypes -Werror=implicit
+
+CXXFLAGS = -std=c++17 $(COMMONFLAGS) -Wshadow
+
+EXECUTABLE = praat
+
+LIBS = `$(PKG_CONFIG) --libs gtk+-3.0` -lm -lpulse
+
+ICON =
+MAIN_ICON =

View File

@ -0,0 +1,36 @@
diff -uNr praat-6.2.23/fon/Sound_audio.cpp praat-6.2.23.mod/fon/Sound_audio.cpp
--- praat-6.2.23/fon/Sound_audio.cpp 2022-10-08 21:02:21.000000000 +0900
+++ praat-6.2.23.mod/fon/Sound_audio.cpp 2022-10-18 20:22:25.338023046 +0900
@@ -43,7 +43,7 @@
#if defined (__OpenBSD__) || defined (__NetBSD__)
#include <soundcard.h>
#else
- #include <sys/soundcard.h>
+ #include <linux/soundcard.h>
#endif
#endif
#include <sys/ioctl.h> /* ioctl */
diff -uNr praat-6.2.23/foned/SoundRecorder.h praat-6.2.23.mod/foned/SoundRecorder.h
--- praat-6.2.23/foned/SoundRecorder.h 2022-10-08 21:02:21.000000000 +0900
+++ praat-6.2.23.mod/foned/SoundRecorder.h 2022-10-18 20:22:53.188252747 +0900
@@ -38,7 +38,7 @@
#if defined (__OpenBSD__) || defined (__NetBSD__)
#include <soundcard.h>
#else
- #include <sys/soundcard.h>
+ #include <linux/soundcard.h>
#endif
#endif
#endif
diff -uNr praat-6.2.23/melder/melder_audio.cpp praat-6.2.23.mod/melder/melder_audio.cpp
--- praat-6.2.23/melder/melder_audio.cpp 2022-10-08 21:02:21.000000000 +0900
+++ praat-6.2.23.mod/melder/melder_audio.cpp 2022-10-18 20:19:13.633103382 +0900
@@ -36,7 +36,7 @@
#if defined (__OpenBSD__) || defined (__NetBSD__)
#include <soundcard.h>
#else
- #include <sys/soundcard.h>
+ #include <linux/soundcard.h>
#endif
#endif
#include <errno.h>