Skip to content

Commit

Permalink
[lib32-lv2] Fix the patch.
Browse files Browse the repository at this point in the history
- Bump pkgrel to force a rebuild.
- Use waf provided by source.
- Move lv2 from makedepends to depends: the executables and headers are expected to be provided by lv2.
- Replace lib32-python with python: python is only used to run the build scripts.
- Remove python from optdepends: lv2specgen.py is provided by lv2 rather than this package
- Replace library packages in optdepends with their lib32 counterparts.
- Use CFLAGS and LDFLAGS to add the -m32 flag: CC and CXX won't work because the whole environment variable will be interpreted as path to the compiler executable.
- Add the check function to run "waf test"
  • Loading branch information
DDoSolitary committed Feb 17, 2020
1 parent 26d69c7 commit a0ecac4
Showing 1 changed file with 45 additions and 39 deletions.
84 changes: 45 additions & 39 deletions lib32-lv2.patch
Original file line number Diff line number Diff line change
@@ -1,64 +1,66 @@
diff --git a/.SRCINFO b/.SRCINFO
index 0ddc466..bfcbb41 100644
index ea59ca4..89cd544 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,10 +6,10 @@ pkgbase = lib32-lv2
@@ -1,18 +1,17 @@
pkgbase = lib32-lv2
pkgdesc = Successor to the LADSPA audio plug-in standard
pkgver = 1.16.0
- pkgrel = 1
+ pkgrel = 2
url = http://lv2plug.in/
arch = x86_64
license = LGPL
license = custom
- makedepends = lib32-python
+ makedepends = python2
+ makedepends = python
makedepends = lib32-libsndfile
makedepends = lib32-gtk2
- makedepends = lv2
- optdepends = libsndfile: Example sampler
- optdepends = gtk2: Example sampler
- optdepends = python2: Scripts
+ depends = lv2
optdepends = libsndfile: Example sampler
optdepends = gtk2: Example sampler
optdepends = python2: Scripts
@@ -17,9 +17,7 @@ pkgbase = lib32-lv2
+ optdepends = lib32-libsndfile: Example sampler
+ optdepends = lib32-gtk2: Example sampler
provides = lib32-lv2core
conflicts = lib32-lv2core
replaces = lib32-lv2core
source = http://lv2plug.in/spec/lv2-1.16.0.tar.bz2
- source = lv2-1.16.0-fix_lv2_validate.patch::https://github.com/ventosus/lv2/commit/51e6005c9f33a9dd6ac5004a09fcb6ffbdee8dee.patch
sha512sums = ead6d590cded5dd7a548d6ffe0f2f9f8efadfa7bb9e8b4fa0aea6664ccdfbb3ca697514bddebe695a9442fba5b62714b5cd45c1bf7d0aaef12ffe50972c2d88c
- sha512sums = 448cc7d3d8cac70ae4abda5ea1b6c4320084649a0af8fcacaa9e86f3dfd7c6599a4c25e8c452f1f30385fa9a363b67e87b634a63d70c7add9de29effef7f3c28

pkgname = lib32-lv2

diff --git a/PKGBUILD b/PKGBUILD
index b3b8145..7b23a3f 100644
index c3971c1..38c383b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,49 +9,31 @@ pkgdesc="Successor to the LADSPA audio plug-in standard"
@@ -4,15 +4,15 @@
_basename=lv2
pkgname=lib32-${_basename}
pkgver=1.16.0
-pkgrel=1
+pkgrel=2
pkgdesc="Successor to the LADSPA audio plug-in standard"
url="http://lv2plug.in/"
license=('LGPL' 'custom')
arch=('x86_64')
-makedepends=('lib32-python' 'lib32-libsndfile' 'lib32-gtk2' 'lv2') #lib32-python should be more correct
+depends=($_basename)
+makedepends=('python2' 'lib32-libsndfile' 'lib32-gtk2') #lib32-python should be more correct
optdepends=('libsndfile: Example sampler'
'gtk2: Example sampler'
'python2: Scripts')
-optdepends=('libsndfile: Example sampler'
- 'gtk2: Example sampler'
- 'python2: Scripts')
+depends=('lv2')
+makedepends=('python' 'lib32-libsndfile' 'lib32-gtk2')
+optdepends=('lib32-libsndfile: Example sampler'
+ 'lib32-gtk2: Example sampler')
provides=('lib32-lv2core')
conflicts=('lib32-lv2core')
replaces=('lib32-lv2core')
-source=("http://lv2plug.in/spec/$_basename-$pkgver.tar.bz2"
- "lv2-1.16.0-fix_lv2_validate.patch::https://github.com/ventosus/lv2/commit/51e6005c9f33a9dd6ac5004a09fcb6ffbdee8dee.patch"
- )
-sha512sums=('ead6d590cded5dd7a548d6ffe0f2f9f8efadfa7bb9e8b4fa0aea6664ccdfbb3ca697514bddebe695a9442fba5b62714b5cd45c1bf7d0aaef12ffe50972c2d88c'
- '448cc7d3d8cac70ae4abda5ea1b6c4320084649a0af8fcacaa9e86f3dfd7c6599a4c25e8c452f1f30385fa9a363b67e87b634a63d70c7add9de29effef7f3c28'
-)
+source=("http://lv2plug.in/spec/$_basename-$pkgver.tar.bz2")
+sha512sums=('ead6d590cded5dd7a548d6ffe0f2f9f8efadfa7bb9e8b4fa0aea6664ccdfbb3ca697514bddebe695a9442fba5b62714b5cd45c1bf7d0aaef12ffe50972c2d88c')
@@ -25,33 +25,27 @@ sha512sums=('ead6d590cded5dd7a548d6ffe0f2f9f8efadfa7bb9e8b4fa0aea6664ccdfbb3ca69

build() {
cd "$srcdir/$_basename-$pkgver"
- export CC='gcc -m32'
- export CXX='g++ -m32'
+ export CFLAGS="-m32"
+ export LDFLAGS="$CXX -m32"
+ export CFLAGS="$CFLAGS -m32"
+ export LDFLAGS="$LDFLAGS -m32"
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
-
- # let wscript(s) find the custom waf scripts
- mkdir -pv tools
- touch __init__.py
Expand All @@ -70,22 +72,26 @@ index b3b8145..7b23a3f 100644
- -e "s/load('autowaf'/load('autowaf', tooldir='tools'/g" \
- -e "s/load('lv2'/load('lv2', tooldir='tools'/g" \
- -i {,plugins/,plugins/*/}wscript
- patch -Np1 -i "../lv2-1.16.0-fix_lv2_validate.patch"
- # --docs is currently broken: https://gitlab.com/lv2/lv2/issues/28
patch -Np1 -i "../lv2-1.16.0-fix_lv2_validate.patch"
# --docs is currently broken: https://gitlab.com/lv2/lv2/issues/28
- waf -vv configure --prefix=/usr \
- --libdir=/usr/lib32 \
- --test
+ ./waf -vv configure --prefix=/usr \
--libdir=/usr/lib32 \
--test
- waf -vv build $MAKEFLAGS
+ ./waf -vv build $MAKEFLAGS
+}
+
+ python2 waf configure --prefix=/usr --libdir=/usr/lib32
+ python2 waf build $MAKEFLAGS
+check() {
+ cd "$srcdir/$_basename-$pkgver"
+ ./waf test
}

package() {
cd "$srcdir/$_basename-$pkgver"
#REMOVE includes and others
- waf install --destdir="$pkgdir"
+ python2 waf install --destdir="$pkgdir"
+ ./waf install --destdir="$pkgdir"
rm ${pkgdir}/usr/bin ${pkgdir}/usr/include ${pkgdir}/usr/share -Rf
}

0 comments on commit a0ecac4

Please sign in to comment.