Hi,

To speed things up i'm using the following Makefile instead
of the ports one to build my emacs.

http://gir.theapt.org/~mike/Makefile.athena  (attached as well)

Please note that I don't use GNUS, therefore gnutls gets disabled as well.

Cheers,
Mike
COMMENT=                GNU editor: extensible, customizable, self-documenting

VERSION=                24.3
DISTNAME=               emacs-${VERSION}
REVISION=               3

CATEGORIES=             editors

HOMEPAGE=               https://www.gnu.org/software/emacs/

# GPLv3+
PERMIT_PACKAGE_CDROM=   Yes

WANTLIB=                c m ncurses pthread execinfo xml2

MASTER_SITES=           ${MASTER_SITE_GNU:=emacs/}

USE_GMAKE=              Yes

FLAVORS=                athena gtk2 gtk3 no_x11
FLAVOR?=                athena

GCCARCH=                ${MACHINE_ARCH}-unknown-openbsd

CONFIGURE_STYLE=        autoconf
AUTOCONF_VERSION=       2.69
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build-aux
CONFIGURE_ARGS=         --build="${GCCARCH}" \
                        --without-sound \
                        --without-compress-info

CONFIGURE_ENV=          CPPFLAGS="-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib -nopie"
CFLAGS+=                -fno-pie

MAKE_ENV=               INSTALL_EMACS="${INSTALL_SCRIPT}" \
                        LOGNAME="${SHAREOWN}"

SUBST_VARS=             GCCARCH VERSION

MODULES=                devel/gettext
RUN_DEPENDS=            devel/desktop-file-utils
LIB_DEPENDS=            devel/libexecinfo textproc/libxml

.if ${FLAVOR} == "no_x11"
CONFIGURE_ARGS+=        --without-x \
                        --without-dbus \
                        --without-gconf \
                        --without-gsettings
.else
. if ${FLAVOR} == "athena"
CONFIGURE_ARGS+=        --with-x-toolkit=athena \
                        --without-toolkit-scroll-bars \
                        --without-gnutls \
                        --without-dbus \
                        --without-gconf \
                        --without-gsettings \
                        --without-imagemagick \
                        --without-rsvg \
                        --without-jpeg \
                        --without-tiff \
                        --without-gif \
                        --without-png
LIB_DEPENDS+=           x11/Xaw3d
WANTLIB+=               ICE SM X11 Xaw3d Xext Xft Xmu Xpm Xrender Xt \
                        expat fontconfig freetype z
. else
LIB_DEPENDS+=           x11/dbus \
                        x11/gnome/librsvg \
                        devel/gconf2 \
                        graphics/jpeg \
                        graphics/png \
                        graphics/tiff \
                        graphics/giflib \
                        graphics/ImageMagick
WANTLIB+=               dbus-1 rsvg-2 gio-2.0 gdk_pixbuf-2.0 gobject-2.0 \
                        glib-2.0 gconf-2 cairo png jpeg tiff gif z \
                        MagickWand MagickCore
. endif
RUN_DEPENDS+=           devel/xdg-utils
. if ${FLAVOR} == "gtk2"
CONFIGURE_ARGS+=        --with-x-toolkit=gtk2
LIB_DEPENDS+=           x11/gtk+2
WANTLIB+=               ICE SM X11 Xcomposite Xcursor Xdamage Xext \
                        Xfixes Xft Xi Xinerama Xpm Xrandr Xrender \
                        atk-1.0 expat fontconfig freetype gdk-x11-2.0 \
                        gtk-x11-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0
. elif ${FLAVOR} == "gtk3"
CONFIGURE_ARGS+=        --with-x-toolkit=gtk3
LIB_DEPENDS+=           x11/gtk+3
WANTLIB+=               ICE SM X11 Xft Xpm Xrender atk-1.0 cairo-gobject \
                        expat fontconfig freetype gdk-3 gtk-3 pango-1.0 \
                        pangocairo-1.0 pangoft2-1.0
. else
ERRORS+=                "Fatal: Conflicting flavor: ${FLAVOR}"
. endif
.endif

post-install:
        chmod -t ${PREFIX}/bin/emacs-${VERSION}

.include <bsd.port.mk>

Reply via email to