diff options
author | Christopher Arndt | 2022-05-20 21:15:48 +0200 |
---|---|---|
committer | Christopher Arndt | 2022-05-20 21:15:48 +0200 |
commit | 31ccaabb2038bdcfb2c398da59d61a7960aedece (patch) | |
tree | 30ae3191912e019aefd6a6dce0dbab017f5c9583 | |
parent | 7c37057297dbe8193911774254e9963744779dfc (diff) | |
download | aur-samplecat-git.tar.gz |
Remove obsolete patch; switch to 'ffmpeg-5' branch
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | libwaveform-peak-tempfiles.diff | 92 |
3 files changed, 9 insertions, 110 deletions
@@ -1,6 +1,6 @@ pkgbase = samplecat-git pkgdesc = A program for cataloguing and auditioning audio samples. - pkgver = 0.3.1.r15.g5e26576 + pkgver = 0.3.2.r1.g0bb17d2 pkgrel = 1 url = http://ayyi.github.io/samplecat arch = x86_64 @@ -20,12 +20,9 @@ pkgbase = samplecat-git depends = sqlite provides = samplecat conflicts = samplecat - source = git+https://github.com/ayyi/samplecat.git + source = git+https://github.com/ayyi/samplecat.git#branch=ffmpeg-5 source = git+https://github.com/ayyi/libwaveform.git - source = libwaveform-peak-tempfiles.diff - md5sums = SKIP - md5sums = SKIP - md5sums = 824d2703d40b2256253b14185171f6f6 + sha256sums = SKIP + sha256sums = SKIP pkgname = samplecat-git - @@ -3,7 +3,7 @@ _pkgname="samplecat" pkgname="${_pkgname}-git" -pkgver=0.3.1.r15.g5e26576 +pkgver=0.3.2.r1.g0bb17d2 pkgrel=1 pkgdesc="A program for cataloguing and auditioning audio samples." arch=(x86_64) @@ -28,12 +28,10 @@ makedepends=( ) provides=("${_pkgname}") conflicts=("${_pkgname}") -source=('git+https://github.com/ayyi/samplecat.git' - 'git+https://github.com/ayyi/libwaveform.git' - "libwaveform-peak-tempfiles.diff") -md5sums=('SKIP' - 'SKIP' - '824d2703d40b2256253b14185171f6f6') +source=('git+https://github.com/ayyi/samplecat.git#branch=ffmpeg-5' + 'git+https://github.com/ayyi/libwaveform.git') +sha256sums=('SKIP' + 'SKIP') pkgver() { @@ -49,10 +47,6 @@ prepare() { git submodule init git config submodule.waveform.url "${srcdir}/libwaveform" git submodule update - - # https://github.com/ayyi/libwaveform/pull/7 - cd lib/waveform - patch -p1 -N -r - -i "${srcdir}"/libwaveform-peak-tempfiles.diff || : } build() { diff --git a/libwaveform-peak-tempfiles.diff b/libwaveform-peak-tempfiles.diff deleted file mode 100644 index a1632a875c9e..000000000000 --- a/libwaveform-peak-tempfiles.diff +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/wf/peakgen.c b/wf/peakgen.c -index 405e0ba..6023657 100644 ---- a/wf/peakgen.c -+++ b/wf/peakgen.c -@@ -36,6 +36,7 @@ - #include <glib.h> - #include <glib/gprintf.h> - #include <glib/gstdio.h> -+#include <gio/gio.h> - #ifdef USE_SNDFILE - #include <sndfile.h> - #else -@@ -206,7 +207,7 @@ waveform_ensure_peakfile__sync (Waveform* w) - gchar* peak_filename = waveform_get_peak_filename(filename); - if(!peak_filename) goto out; - -- if(g_file_test(peak_filename, G_FILE_TEST_EXISTS)){ -+ if(g_file_test(peak_filename, G_FILE_TEST_EXISTS)){ - dbg (1, "peak file exists. (%s)", peak_filename); - - /* -@@ -329,7 +330,7 @@ wf_ff_peakgen (const char* infilename, const char* peak_filename) - if(!ad_open(&f, infilename)) return false; - - gchar* basename = g_path_get_basename(peak_filename); -- gchar* tmp_path = g_build_filename("/tmp", basename, NULL); -+ gchar* tmp_path = g_build_filename(g_get_tmp_dir(), basename, NULL); - g_free(basename); - - #ifdef USE_FFMPEG -@@ -520,9 +521,19 @@ wf_ff_peakgen (const char* infilename, const char* peak_filename) - #endif - - if(total_readcount){ -- int renamed = !rename(tmp_path, peak_filename); -+ GError *err = NULL; -+ GFile *tmp_file = g_file_new_for_path(tmp_path); -+ GFile *peak_file = g_file_new_for_path(peak_filename); -+ g_file_move(tmp_file, peak_file, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &err); -+ g_object_unref(tmp_file); -+ g_object_unref(peak_file); - g_free(tmp_path); -- if(!renamed) return false; -+ -+ if(err!=NULL) { -+ printf("Could not move peak file to %s: %s\n", peak_filename, err->message); -+ g_error_free(err); -+ return false; -+ } - }else{ - pwarn("failed to read from file %s", infilename); - g_unlink(tmp_path); -@@ -558,7 +569,7 @@ wf_ff_peakgen_split_stereo (const char* infilename, const char* peak_filename) - if(!ad_open(&f2, infilename2)) return false; - - gchar* basename = g_path_get_basename(peak_filename); -- gchar* tmp_path = g_build_filename("/tmp", basename, NULL); -+ gchar* tmp_path = g_build_filename(g_get_tmp_dir(), basename, NULL); - g_free(basename); - - #ifdef USE_FFMPEG -@@ -774,9 +785,19 @@ wf_ff_peakgen_split_stereo (const char* infilename, const char* peak_filename) - #endif - - if(total_readcount){ -- int renamed = !rename(tmp_path, peak_filename); -+ GError *err = NULL; -+ GFile *tmp_file = g_file_new_for_path(tmp_path); -+ GFile *peak_file = g_file_new_for_path(peak_filename); -+ g_file_move(tmp_file, peak_file, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &err); -+ g_object_unref(tmp_file); -+ g_object_unref(peak_file); - g_free(tmp_path); -- if(!renamed) return false; -+ -+ if(err!=NULL) { -+ printf("Could not move peak file to %s: %s\n", peak_filename, err->message); -+ g_error_free(err); -+ return false; -+ } - }else{ - pwarn("failed to read from file %s", infilename); - if(!g_unlink(tmp_path)){ -@@ -939,7 +960,7 @@ static unsigned long - sample2time(SF_INFO sfinfo, long samplenum) - { - // long is good up to 4.2GB -- -+ - return (10 * samplenum) / ((sfinfo.samplerate/100) * sfinfo.channels); - } - #endif |