summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaporeon2022-06-27 15:29:39 +1200
committerVaporeon2022-06-27 15:29:39 +1200
commitb87cbaaa0b637e70bafb4c017eebac46438cc857 (patch)
treebea4de6b5068bd045ba0c99a4af9d9f2eb5f8d84
parent4a52c9762d71dbeebca63fcd0e52f5985d200a51 (diff)
downloadaur-b87cbaaa0b637e70bafb4c017eebac46438cc857.tar.gz
Update to 1.3.4 and switch to cmake build system.
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD65
2 files changed, 49 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9aeaa7e98b9..8d6384984820 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,19 @@
-# Generated by mksrcinfo v8
-# Fri Apr 7 19:03:19 UTC 2017
pkgbase = mingw-w64-flac
pkgdesc = Free Lossless Audio Codec (mingw-w64)
- pkgver = 1.3.2
+ pkgver = 1.3.4
pkgrel = 1
url = http://flac.sourceforge.net/
arch = any
license = BSD
license = GPL
- makedepends = nasm
- makedepends = mingw-w64-configure
+ makedepends = mingw-w64-cmake
+ makedepends = ninja
depends = mingw-w64-libogg
depends = mingw-w64-crt
options = !strip
options = !buildflags
options = staticlibs
- source = http://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz
- md5sums = 454f1bfa3f93cc708098d7890d0499bd
+ source = https://github.com/xiph/flac/releases/download/1.3.4/flac-1.3.4.tar.xz
+ sha256sums = 8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737
pkgname = mingw-w64-flac
-
diff --git a/PKGBUILD b/PKGBUILD
index 4092b4555c53..dda4a8093adb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,63 @@
+# Maintainer: Vaporeon <vaporeon@vaporeon.io>
# Contributor: naelstrof <naelstrof@gmail.com>
pkgname=mingw-w64-flac
-pkgver=1.3.2
+pkgver=1.3.4
pkgrel=1
pkgdesc="Free Lossless Audio Codec (mingw-w64)"
arch=('any')
url="http://flac.sourceforge.net/"
license=('BSD' 'GPL')
depends=('mingw-w64-libogg' 'mingw-w64-crt')
-makedepends=('nasm' 'mingw-w64-configure')
+makedepends=('mingw-w64-cmake' 'ninja')
options=(!strip !buildflags staticlibs)
-source=("http://downloads.xiph.org/releases/flac/flac-${pkgver}.tar.xz")
-md5sums=('454f1bfa3f93cc708098d7890d0499bd')
+source=("https://github.com/xiph/flac/releases/download/${pkgver}/flac-${pkgver}.tar.xz")
+sha256sums=('8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
_pkgname="flac"
build() {
- cd "$srcdir/${_pkgname}-${pkgver}"
- for _arch in ${_architectures}; do
- mkdir -p build-${_arch} && pushd build-${_arch}
- touch config.rpath
- ${_arch}-configure --disable-xmms-plugin --disable-sse --disable-asm-optimizations --with-pic
- make
- popd
- done
+ for _arch in ${_architectures}; do
+ ${_arch}-cmake -S flac-${pkgver} -B ${_arch} -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr/${_arch} \
+ -DBUILD_SHARED_LIBS=ON \
+ -DBUILD_DOCS=OFF \
+ -DBUILD_EXAMPLES=OFF \
+ -DBUILD_PROGRAMS=OFF \
+ -DBUILD_TESTING=OFF \
+ -DWITH_STACK_PROTECTOR=OFF \
+ -DWITH_ASM=OFF \
+ -DINSTALL_MANPAGES=OFF
+
+ ${_arch}-cmake -S flac-${pkgver} -B ${_arch}-static -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr/${_arch}/static \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DBUILD_DOCS=OFF \
+ -DBUILD_EXAMPLES=OFF \
+ -DBUILD_PROGRAMS=OFF \
+ -DBUILD_TESTING=OFF \
+ -DWITH_STACK_PROTECTOR=OFF \
+ -DWITH_ASM=OFF \
+ -DINSTALL_MANPAGES=OFF
+
+ cmake --build ${_arch}
+ cmake --build ${_arch}-static
+ done
}
package() {
- for _arch in ${_architectures}; do
- cd ${srcdir}/$_pkgname-$pkgver/build-${_arch}
- make DESTDIR="$pkgdir/" install
- rm "$pkgdir"/usr/${_arch}/bin/*.exe
- rm -r $pkgdir/usr/${_arch}/share/doc/
- rm -r $pkgdir/usr/${_arch}/share/man/
- ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
- ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
- done
+ for _arch in ${_architectures}; do
+ DESTDIR="${pkgdir}" cmake --install ${_arch}
+ # DESTDIR="${pkgdir}" cmake --install ${_arch}-static
+ # Rather than do a proper static install, we copy the static libs into the same prefix as the shared libs.
+ # This is bad, but so are most AUR mingw packages and this is how 'mingw-w64-flac' was previously packaged.
+ install -Dm644 ${srcdir}/${_arch}-static/src/libFLAC/libFLAC.a "${pkgdir}"/usr/${_arch}/lib/
+ install -Dm644 ${srcdir}/${_arch}-static/src/libFLAC++/libFLAC++.a "${pkgdir}"/usr/${_arch}/lib/
+ install -Dm644 flac-${pkgver}/src/*/*.m4 -t "${pkgdir}/usr/${_arch}/share/aclocal"
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
+ done
}