emacs: use new vopt helpers

the emacs template, and previously the qemu template, were adjusted to
use the new vopt helpers, to serve as examples.

We're not going to update all other templates at once though. They'll be
adjusted once they require other changes (e.g. a version bump).
This commit is contained in:
Dominik Honnef 2014-08-30 00:37:53 +02:00
parent cd031319cc
commit cef570e100

View file

@ -4,11 +4,19 @@ version=24.3
revision=8
nocross=yes
hostmakedepends="pkg-config"
makedepends="ncurses-devel libXaw-devel gtk+-devel"
makedepends="ncurses-devel libXaw-devel gtk+-devel $(vopt_if dbus dbus-devel)
$(vopt_if jpeg libjpeg-turbo-devel) $(vopt_if tiff tiff-devel)
$(vopt_if gif giflib-devel) $(vopt_if png libpng-devel) $(vopt_if xpm libXpm-devel)
$(vopt_if svg librsvg-devel) $(vopt_if imagemagick libmagick-devel)
$(vopt_if xml libxml2-devel) $(vopt_if gnutls gnutls-devel)
$(vopt_if sound alsa-lib-devel)"
depends="emacs-common-${version}_${revision}"
replaces="emacs>=0"
build_style="gnu-configure"
configure_args="ac_cv_lib_gif_EGifPutExtensionLast=yes"
configure_args="ac_cv_lib_gif_EGifPutExtensionLast=yes
$(vopt_with dbus) $(vopt_with jpeg) $(vopt_with tiff) $(vopt_with gif)
$(vopt_with png) $(vopt_with xpm) $(vopt_with svg rsvg) $(vopt_with imagemagick)
$(vopt_with xml xml2) $(vopt_with gnutls) $(vopt_with sound)"
short_desc="GNU Emacs editor"
maintainer="Philipp Hirsch <itself@hanspolo.net>"
license="GPL-3"
@ -22,83 +30,6 @@ desc_option_xpm="Enable support for XPM images"
desc_option_sound="Enable support for sound"
build_options_default="jpeg tiff gif png xpm svg xml gnutls sound"
if [ "$build_option_dbus" ]; then
configure_args+=" --with-dbus"
makedepends+=" dbus-devel"
else
configure_args+=" --without-dbus"
fi
if [ "$build_option_jpeg" ]; then
configure_args+=" --with-jpeg"
makedepends+=" libjpeg-turbo-devel"
else
configure_args+=" --without-jpeg"
fi
if [ "$build_option_tiff" ]; then
configure_args+=" --with-tiff"
makedepends+=" tiff-devel"
else
configure_args+=" --without-tiff"
fi
if [ "$build_option_gif" ]; then
configure_args+=" --with-gif"
makedepends+=" giflib-devel"
else
configure_args+=" --without-gif"
fi
if [ "$build_option_png" ]; then
configure_args+=" --with-png"
makedepends+=" libpng-devel"
else
configure_args+=" --without-png"
fi
if [ "$build_option_xpm" ]; then
configure_args+=" --with-xpm"
makedepends+=" libXpm-devel"
else
configure_args+=" --without-xpm"
fi
if [ "$build_option_svg" ]; then
configure_args+=" --with-rsvg"
makedepends+=" librsvg-devel"
else
configure_args+=" --without-rsvg"
fi
if [ "$build_option_imagemagick" ]; then
configure_args+=" --with-imagemagick"
makedepends+=" libmagick-devel"
else
configure_args+=" --without-imagemagick"
fi
if [ "$build_option_xml" ]; then
configure_args+=" --with-xml2"
makedepends+=" libxml2-devel"
else
configure_args+=" --without-xml2"
fi
if [ "$build_option_gnutls" ]; then
configure_args+=" --with-gnutls"
makedepends+=" gnutls-devel"
else
configure_args+=" --without-gnutls"
fi
if [ "$build_option_sound" ]; then
configure_args+=" --with-sound"
makedepends+=" alsa-lib-devel"
else
configure_args+=" --without-sound"
fi
pre_configure() {
# Just configuring in different directories results in
# spurious emacs rebuilds with incompatible build numbers.