From b8950d1e7a82e19531f1866f6ce92643d0f942f2 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Thu, 23 Jan 2020 01:08:23 +1100 Subject: [PATCH] dumb: make allegro4, examples optional & build the latter as dumb-examples --- common/shlibs | 4 ++-- srcpkgs/dumb-examples | 1 + srcpkgs/dumb/template | 24 +++++++++++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) create mode 120000 srcpkgs/dumb-examples diff --git a/common/shlibs b/common/shlibs index 35fcd4de243cbb..bdccd749a70d4d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1739,8 +1739,8 @@ libportmidi.so portmidi-217_1 libsox.so.3 sox-14.4.2_1 libsoxr.so.0 libsoxr-0.1.2_1 libsoxr-lsr.so.0 libsoxr-0.1.2_1 -libdumb.so.2 dumb-2.0.3_1 -libaldmb.so.2 dumb-2.0.3_1 +libdumb.so.2 dumb-2.0.3_2 +libaldmb.so.2 dumb-2.0.3_2 libframe.so.6 frame-2.5.0_1 libgrail.so.6 grail-3.1.0_1 libgeis.so.1 geis-2.2.16_1 diff --git a/srcpkgs/dumb-examples b/srcpkgs/dumb-examples new file mode 120000 index 00000000000000..6509fa65327d52 --- /dev/null +++ b/srcpkgs/dumb-examples @@ -0,0 +1 @@ +dumb \ No newline at end of file diff --git a/srcpkgs/dumb/template b/srcpkgs/dumb/template index 41dac7e92b1a39..a20ceccc7ab203 100644 --- a/srcpkgs/dumb/template +++ b/srcpkgs/dumb/template @@ -1,12 +1,15 @@ # Template file for 'dumb' pkgname=dumb version=2.0.3 -revision=1 +revision=2 build_style=cmake -configure_args="-DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -GNinja" +configure_args="-GNinja -DBUILD_SHARED_LIBS=ON + $(vopt_bool allegro4 BUILD_ALLEGRO4) + $(vopt_bool examples BUILD_EXAMPLES)" make_cmd=ninja hostmakedepends="ninja" -makedepends="allegro4-devel" +makedepends="$(vopt_if allegro4 allegro4-devel) + $(vopt_if examples argtable-devel) $(vopt_if examples SDL2-devel)" short_desc="IT, XM, S3M and MOD player library" maintainer="Orphaned " license="custom:DUMB" @@ -14,6 +17,12 @@ homepage="http://dumb.sourceforge.net/" distfiles="https://github.com/kode54/dumb/archive/${version}.tar.gz" checksum=99bfac926aeb8d476562303312d9f47fd05b43803050cd889b44da34a9b2a4f9 +# Package build options +build_options="allegro4 examples" +desc_option_allegro4="Enable optional Allegro 4 support" +desc_option_examples="Enable building example programs (dumbplay & dumbout)" +build_options_default="allegro4 examples" + case "$XBPS_TARGET_MACHINE" in i686*|x86_64*) configure_args+=" -DUSE_SSE=ON" @@ -42,3 +51,12 @@ dumb-devel_package() { vmove usr/lib/pkgconfig } } + +if [ "$build_option_examples" ]; then + dumb-examples_package() { + short_desc="Reference IT, XM, S3M, MOD player programs using DUMB and SDL2" + pkg_install() { + vmove usr/bin + } + } +fi