dumb: Add example frontend
This commit is contained in:
parent
3a44fdb66b
commit
e477feeff8
11
srcpkgs/dumb/patches/example-use-1.0-api.patch
Normal file
11
srcpkgs/dumb/patches/example-use-1.0-api.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- %_example_wrksrc%/dumb2wav.c.orig
|
||||||
|
+++ %_example_wrksrc%/dumb2wav.c
|
||||||
|
@@ -221,7 +221,7 @@
|
||||||
|
if (!duh) {
|
||||||
|
duh = dumb_load_s3m(fn);
|
||||||
|
if (!duh) {
|
||||||
|
- duh = dumb_load_mod(fn);
|
||||||
|
+ duh = dumb_load_mod(fn, 0);
|
||||||
|
if (!duh) {
|
||||||
|
fprintf(stderr, "Unable to open %s!\n", fn);
|
||||||
|
return EXIT_FAILURE;
|
|
@ -1,5 +1,5 @@
|
||||||
--- dumb/cmake/CMakeLists.txt.orig
|
--- %_library_wrksrc%/cmake/CMakeLists.txt.orig
|
||||||
+++ dumb/cmake/CMakeLists.txt
|
+++ %_library_wrksrc%/cmake/CMakeLists.txt
|
||||||
@@ -1,7 +1,7 @@
|
@@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(libdumb C)
|
project(libdumb C)
|
||||||
|
|
|
@ -2,7 +2,13 @@
|
||||||
pkgname=dumb
|
pkgname=dumb
|
||||||
version=1.0
|
version=1.0
|
||||||
revision=1
|
revision=1
|
||||||
build_wrksrc=${pkgname}/cmake
|
create_wrksrc=yes
|
||||||
|
wrksrc=sources
|
||||||
|
|
||||||
|
_library_wrksrc=${pkgname}-${version}/${pkgname}
|
||||||
|
_example_wrksrc=${pkgname}-0.9.3/examples
|
||||||
|
build_wrksrc=${_library_wrksrc}/cmake
|
||||||
|
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DBUILD_SHARED_LIBS:BOOL=ON"
|
configure_args="-DBUILD_SHARED_LIBS:BOOL=ON"
|
||||||
hostmakedepends="cmake"
|
hostmakedepends="cmake"
|
||||||
|
@ -10,8 +16,14 @@ short_desc="IT, XM, S3M and MOD player library"
|
||||||
maintainer="beefcurtains <beefcurtains@users.noreply.github.com>"
|
maintainer="beefcurtains <beefcurtains@users.noreply.github.com>"
|
||||||
license="BSD"
|
license="BSD"
|
||||||
homepage="http://${pkgname}.sourceforge.net/"
|
homepage="http://${pkgname}.sourceforge.net/"
|
||||||
distfiles="https://github.com/kode54/${pkgname}/archive/${version}.tar.gz"
|
distfiles="
|
||||||
checksum=09ea62fd01f6e71cb28a8a8c1c1e356e7eb38f5e003b684e12eb1944c6d35fa5
|
https://github.com/kode54/${pkgname}/archive/${version}.tar.gz
|
||||||
|
${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/0.9.3/${pkgname}-0.9.3.tar.gz
|
||||||
|
"
|
||||||
|
checksum="
|
||||||
|
09ea62fd01f6e71cb28a8a8c1c1e356e7eb38f5e003b684e12eb1944c6d35fa5
|
||||||
|
8d44fbc9e57f3bac9f761c3b12ce102d47d717f0dd846657fb988e0bb5d1ea33
|
||||||
|
"
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*|x86_64*)
|
i686*|x86_64*)
|
||||||
|
@ -19,7 +31,22 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
pre_fetch() {
|
||||||
|
sed -i \
|
||||||
|
-e "s,%_library_wrksrc%,$_library_wrksrc," \
|
||||||
|
-e "s,%_example_wrksrc%,$_example_wrksrc," \
|
||||||
|
$PATCHESDIR/*
|
||||||
|
}
|
||||||
|
|
||||||
|
post_build() {
|
||||||
|
( set -x
|
||||||
|
${CC} ${wrksrc}/${_example_wrksrc}/dumb2wav.c \
|
||||||
|
${CFLAGS} ${CPPFLAGS} -I../../include \
|
||||||
|
${LDFLAGS} -L. -ldumb -lm -o dumb2wav )
|
||||||
|
}
|
||||||
|
|
||||||
pre_install() {
|
pre_install() {
|
||||||
|
vbin build/dumb2wav
|
||||||
vdoc ../readme.txt
|
vdoc ../readme.txt
|
||||||
vdoc ../release.txt
|
vdoc ../release.txt
|
||||||
vlicense ../licence.txt
|
vlicense ../licence.txt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user