131 lines
3.8 KiB
Bash
131 lines
3.8 KiB
Bash
# Template file for 'emacs'
|
|
pkgname=emacs
|
|
version=25.1
|
|
revision=6
|
|
nocross=yes
|
|
nopie=yes
|
|
hostmakedepends="pkg-config"
|
|
makedepends="ncurses-devel libXaw-devel gtk+-devel gtk+3-devel webkitgtk-devel
|
|
dbus-devel acl-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="--with-file-notification=inotify --with-modules
|
|
$(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="Christian Neukirchen <chneukirchen@gmail.com>"
|
|
license="GPL-3"
|
|
homepage="http://www.gnu.org/software/${pkgname}/"
|
|
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
|
|
checksum=19f2798ee3bc26c95dca3303e7ab141e7ad65d6ea2b6945eeba4dbea7df48f33
|
|
|
|
# Package build options
|
|
build_options="jpeg tiff gif png xpm svg xml imagemagick gnutls sound"
|
|
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"
|
|
|
|
post_extract() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) patch -p0 <${FILESDIR}/musl.patch
|
|
esac
|
|
}
|
|
|
|
pre_configure() {
|
|
# Just configuring in different directories results in
|
|
# spurious emacs rebuilds with incompatible build numbers.
|
|
mkdir -p nox
|
|
mv * nox || true
|
|
cp -a nox x11
|
|
cp -a nox gtk2
|
|
cp -a nox gtk3
|
|
}
|
|
|
|
do_configure() {
|
|
cd $wrksrc/nox
|
|
./configure --without-x --without-dbus ${configure_args}
|
|
|
|
cd $wrksrc/x11
|
|
./configure --with-x-toolkit=athena --without-toolkit-scroll-bars \
|
|
--without-dbus ${configure_args}
|
|
|
|
cd $wrksrc/gtk2
|
|
./configure --with-x-toolkit=gtk2 ${configure_args}
|
|
|
|
cd $wrksrc/gtk3
|
|
./configure --with-x-toolkit=gtk3 --with-xwidgets ${configure_args}
|
|
}
|
|
|
|
do_build() {
|
|
make ${makejobs} -C nox
|
|
make ${makejobs} -C x11
|
|
make ${makejobs} -C gtk2
|
|
make ${makejobs} -C gtk3
|
|
}
|
|
|
|
do_install() {
|
|
make DESTDIR=$DESTDIR -C ${wrksrc}/nox install
|
|
rm -f ${DESTDIR}/usr/bin/ctags
|
|
rm -f ${DESTDIR}/usr/share/man/man1/ctags.1*
|
|
rm -f ${DESTDIR}/usr/share/info/info.info
|
|
rm -rf ${DESTDIR}/usr/share/applications
|
|
rm -rf ${DESTDIR}/usr/share/icons
|
|
}
|
|
|
|
emacs-common_package() {
|
|
short_desc+=" - common files"
|
|
noarch=yes
|
|
pkg_install() {
|
|
vmove usr/share/emacs
|
|
vmove usr/share/man
|
|
vmove usr/share/info
|
|
vmove var/games/emacs
|
|
rm -f ${PKGDESTDIR}/usr/share/info/info.info.gz
|
|
}
|
|
}
|
|
|
|
emacs-x11_package() {
|
|
depends="emacs-common-${version}_${revision}"
|
|
provides="emacs-${version}_${revision}"
|
|
replaces="emacs>=0"
|
|
short_desc+=" - X11 version"
|
|
pkg_install() {
|
|
make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/x11 install
|
|
rm -f ${PKGDESTDIR}/usr/bin/ctags
|
|
rm -rf ${PKGDESTDIR}/usr/share
|
|
rm -rf ${PKGDESTDIR}/var/games/emacs
|
|
}
|
|
}
|
|
|
|
emacs-gtk2_package() {
|
|
depends="emacs-common-${version}_${revision} desktop-file-utils hicolor-icon-theme"
|
|
provides="emacs-${version}_${revision}"
|
|
replaces="emacs>=0"
|
|
short_desc+=" - GTK+2 version"
|
|
pkg_install() {
|
|
make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/gtk2 install
|
|
rm -f ${PKGDESTDIR}/usr/bin/ctags
|
|
rm -rf ${PKGDESTDIR}/usr/share/{emacs,man,info}
|
|
rm -rf ${PKGDESTDIR}/var/games/emacs
|
|
}
|
|
}
|
|
|
|
emacs-gtk3_package() {
|
|
depends="emacs-common-${version}_${revision} desktop-file-utils hicolor-icon-theme"
|
|
provides="emacs-${version}_${revision}"
|
|
replaces="emacs>=0"
|
|
short_desc+=" - GTK+3 version"
|
|
pkg_install() {
|
|
make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/gtk3 install
|
|
rm -f ${PKGDESTDIR}/usr/bin/ctags
|
|
rm -rf ${PKGDESTDIR}/usr/share/{emacs,man,info}
|
|
rm -rf ${PKGDESTDIR}/var/games/emacs
|
|
}
|
|
}
|