Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanpurkhiser/a4165472802ffc80fadd to your computer and use it in GitHub Desktop.
Save evanpurkhiser/a4165472802ffc80fadd to your computer and use it in GitHub Desktop.
From 05ba57e041f5cbf780a8802174a7d7709efdd159 Mon Sep 17 00:00:00 2001
From: Evan Purkhiser <evanpurkhiser@gmail.com>
Date: Sun, 13 Sep 2015 01:08:46 -0700
Subject: [PATCH] Update PKGBUILD for latest libkeyfinder
This fixes a few issues
- boost is no longer required as of
https://github.com/ibsh/libKeyFinder/commit/816f37c9ec4f04bed9219748543e1e43d92e72a1
- qt5 has always been only a *build dependency* and is not a runtime
requirement (libkeyfinder only uses the .pro for makefile generation
as far as I can tell)
- Because the .Pro file structure has changed in some recent commits
the patch included with this package is no longer needed. However,
a new patch is needed for the generated Makefile's install target to
actually do anything.
For this see Pull Request 9 [1]. This pull request fixes a few things
related to installing (headers and the library), allowing us to
simplifying the install step to simply execute `make install`
[1]: https://github.com/ibsh/libKeyFinder/pull/9
---
.SRCINFO | 12 +++++-------
PKGBUILD | 30 ++++++++++++++----------------
build.patch | 23 -----------------------
3 files changed, 19 insertions(+), 46 deletions(-)
delete mode 100644 build.patch
diff --git a/.SRCINFO b/.SRCINFO
index 394180a..e180e25 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,20 @@
pkgbase = libkeyfinder-git
pkgdesc = Musical key detection for digital audio.
- pkgver = 133.56a9f04
+ pkgver = 221.97a98cc
pkgrel = 1
url = http://www.ibrahimshaath.co.uk/keyfinder/
arch = i686
arch = x86_64
license = GPL3
makedepends = git
- makedepends = boost
- depends = qt5-base
+ makedepends = qt5-base
depends = fftw
- depends = boost-libs
provides = libkeyfinder
conflicts = libkeyfinder
- source = git://github.com/ibsh/libKeyFinder.git
- source = build.patch
+ source = libkeyfinder-git::git://github.com/ibsh/libKeyFinder.git
+ source = https://github.com/ibsh/libKeyFinder/pull/9.patch
sha256sums = SKIP
- sha256sums = ae4dc6a62290e2efd3ac0c5adc4f9a931567ed3c61d0a7545026e83fbc774a0c
+ sha256sums = 0b8f3292045321831560d9120c5f15dc3ac4132aff1cef594fb7df60e86aa78a
pkgname = libkeyfinder-git
diff --git a/PKGBUILD b/PKGBUILD
index 6ff2650..0d21873 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,39 @@
-#Maintainer: Lubosz Sarnecki <lubosz@gmail.com>
+#Maintainer: Lubosz Sarnecki <lubosz@gmail.com>
+#Contributor: Evan Purkhiser <evanpurkhiser@gmail.com>
_realname=libkeyfinder
pkgname=$_realname-git
-pkgver=133.56a9f04
+pkgver=221.97a98cc
pkgrel=1
pkgdesc="Musical key detection for digital audio."
arch=('i686' 'x86_64')
url="http://www.ibrahimshaath.co.uk/keyfinder/"
license=('GPL3')
-depends=('qt5-base' 'fftw' 'boost-libs')
-makedepends=('git' 'boost')
+depends=('fftw')
+makedepends=('git' 'qt5-base')
provides=($_realname)
conflicts=($_realname)
-_gitname=libKeyFinder
-
-source=("git://github.com/ibsh/libKeyFinder.git" "build.patch")
-sha256sums=("SKIP" 'ae4dc6a62290e2efd3ac0c5adc4f9a931567ed3c61d0a7545026e83fbc774a0c')
+source=("$pkgname::git://github.com/ibsh/libKeyFinder.git" "https://github.com/ibsh/libKeyFinder/pull/9.patch")
+sha256sums=('SKIP' '0b8f3292045321831560d9120c5f15dc3ac4132aff1cef594fb7df60e86aa78a')
pkgver() {
- cd $_gitname
+ cd "$srcdir/$pkgname"
echo $(git rev-list --count master).$(git rev-parse --short master)
}
build() {
- cd $_gitname
- patch -p1 < ../../build.patch
+ cd "$srcdir/$pkgname"
- qmake-qt5 PREFIX=/usr
+ patch -p1 < "$srcdir/9.patch"
+
+ qmake-qt5
make
}
package() {
- cd $_gitname
+ cd "$srcdir/$pkgname"
- make INSTALL_ROOT="${pkgdir}" install
-
mkdir -p ${pkgdir}/usr/include/keyfinder
- cp ${srcdir}/${_gitname}/*.h ${pkgdir}/usr/include/keyfinder
+ make INSTALL_ROOT="${pkgdir}" install
}
diff --git a/build.patch b/build.patch
deleted file mode 100644
index 72461f7..0000000
--- a/build.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/LibKeyFinder.pro b/LibKeyFinder.pro
-index cbb1e8d..07c8c2a 100644
---- a/LibKeyFinder.pro
-+++ b/LibKeyFinder.pro
-@@ -29,6 +29,8 @@ VERSION = 0.2.2
-
- DEFINES += LIBKEYFINDER_LIBRARY
-
-+PREFIX = /usr
-+
- HEADERS += \
- keyfinder.h \
- chromagram.h \
-@@ -114,7 +116,7 @@ unix:!symbian {
- maemo5 {
- target.path = /opt/usr/lib
- } else {
-- target.path = /usr/local/lib
-+ target.path = /usr/lib
- }
- INSTALLS += target
- }
-
--
2.5.1
@alienvenom
Copy link

How would someone go about using this patch? I can't get it to work.

@evanpurkhiser
Copy link
Author

Because this was supposed to be applied on top of b510b1, which is an earlier commit. @lubosz made some changes but the package still doesn't seem to actually install the shared library.

Here's the PKGBUILD with the patch applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment