author | Jan Alexander Steffens
<heftig@archlinux.org> 2020-01-11 19:14:54 UTC |
committer | Jan Alexander Steffens
<heftig@archlinux.org> 2020-01-11 19:14:54 UTC |
parent | 3e6bed909f26d900e3c60de9d8f721f7d8487cf2 |
PKGBUILD | +35 | -18 |
cmake-man.diff | +11 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index e09b0e0..fac8b88 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,27 +5,44 @@ pkgname=libmikmod pkgver=3.3.11.1 -pkgrel=3 -pkgdesc="A module player and library supporting many formats, including mod, s3m, it, and xm" -license=('GPL2' 'LGPL2.1') -url="http://mikmod.sourceforge.net" -arch=('x86_64') -depends=('alsa-lib' 'glibc' 'libpulse' 'sh') -makedepends=('cmake') -provides=('libmikmod.so') -source=("https://downloads.sourceforge.net/mikmod/$pkgname-$pkgver.tar.gz") -sha512sums=('f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de') +pkgrel=4 +pkgdesc="Module player library supporting many formats, including MOD, S3M, IT and XM" +url=http://mikmod.sourceforge.net +license=(GPL2 LGPL2.1) +arch=(x86_64) +depends=(glibc libpulse sh) +makedepends=(alsa-lib cmake) +provides=(libmikmod.so) +source=(https://downloads.sourceforge.net/mikmod/$pkgname-$pkgver.tar.gz + cmake-man.diff) +md5sums=('f69d7dd06d307e888f466fc27f4f680b' + 'e8a338d92027072971f49b495e87c442') +sha256sums=('ad9d64dfc8f83684876419ea7cd4ff4a41d8bcd8c23ef37ecb3a200a16b46d19' + '3331b6ff7f6f3dfd33f543d64affc10a127f61bed1160f75b07344c03f21b840') + +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i ../cmake-man.diff +} build() { - cd "$pkgname-$pkgver" - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -B build \ - -S . - make -C build VERBOSE=1 + # cmake ignores CPPFLAGS + CFLAGS+=" $CPPFLAGS" + + cmake -H$pkgname-$pkgver -Bbuild \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DENABLE_DL=1 + cmake --build build } package() { - cd "$pkgname-$pkgver" - make -C build DESTDIR="$pkgdir" install - install -vDm 644 {NEWS,README,TODO} -t "${pkgdir}/usr/share/doc/${pkgname}" + DESTDIR="$pkgdir" cmake --build build --target install + + install -Dt "$pkgdir/usr/share/aclocal" -m644 $pkgname-$pkgver/libmikmod.m4 + install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 \ + $pkgname-$pkgver/{NEWS,README,TODO} build/docs/mikmod.html + install -Dt "$pkgdir/usr/share/info" build/docs/mikmod.info + install -Dt "$pkgdir/usr/share/man/man1" build/docs/libmikmod-config.1 } + +# vim: ts=2 sw=2 et: diff --git a/cmake-man.diff b/cmake-man.diff new file mode 100644 index 0000000..9cc6b44 --- /dev/null +++ b/cmake-man.diff @@ -0,0 +1,11 @@ +diff -u -r libmikmod-3.3.11.1/docs/CMakeLists.txt libmikmod-3.3.11.1-man/docs/CMakeLists.txt +--- libmikmod-3.3.11.1/docs/CMakeLists.txt 2014-07-10 07:37:00.000000000 +0000 ++++ libmikmod-3.3.11.1-man/docs/CMakeLists.txt 2020-01-11 18:54:48.154853499 +0000 +@@ -20,5 +20,7 @@ + COMMENT "Creating HTML file ${html_out}" + VERBATIM) + ++configure_file(libmikmod-config.1.in libmikmod-config.1 @ONLY) ++ + add_custom_target(info ALL DEPENDS ${info_out} ${html_out}) + ENDIF(ENABLE_DOC)