pkgsrc/graphics/evas/Makefile.common
jperkin ac56158090 Attempt to bring sanity to how ABI and MACHINE_ARCH are set.
Previously there were at least 5 different ways MACHINE_ARCH could be set,
some statically and some at run time, and in many cases these settings
differed, leading to issues at pkg_add time where there was conflict
between the setting encoded into the package and that used by pkg_install.

Instead, move to a single source of truth where the correct value based on
the host and the chosen (or default) ABI is determined in the bootstrap
script.  The value can still be overridden in mk.conf if necessary, e.g.
for cross-compiling.

ABI is now set by default and if unset a default is calculated based on
MACHINE_ARCH.  This fixes some OS, e.g. Linux, where the wrong default was
previously chosen.

As a result of the refactoring there is no need for LOWER_ARCH, with
references to it replaced by MACHINE_ARCH.  SPARC_TARGET_ARCH is also
removed.
2016-01-24 16:14:44 +00:00

65 lines
2 KiB
Text

# $NetBSD: Makefile.common,v 1.15 2016/01/24 16:14:44 jperkin Exp $
# used by graphics/evas-buffer/Makefile
# used by graphics/evas-edb/Makefile
# used by graphics/evas-eet/Makefile
# used by graphics/evas-gif/Makefile
# used by graphics/evas-jpeg/Makefile
# used by graphics/evas-pmaps/Makefile
# used by graphics/evas-png/Makefile
# used by graphics/evas-sdl/Makefile
# used by graphics/evas-sdl-16/Makefile
# used by graphics/evas-software-x11/Makefile
# used by graphics/evas-tiff/Makefile
# used by graphics/evas-xpm/Makefile
EVAS_VERSION= 1.7.7
DISTNAME= evas-${EVAS_VERSION}
CATEGORIES= graphics
MASTER_SITES= http://download.enlightenment.org/releases/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= joerg@NetBSD.org
HOMEPAGE= http://enlightenment.org/
LICENSE= 2-clause-bsd
DISTINFO_FILE= ${.CURDIR}/../../graphics/evas/distinfo
PATCHDIR= ${.CURDIR}/../../graphics/evas/patches
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= gmake pkg-config
.for mod in software-ddraw software-16-ddraw direct3d software-16-wince \
software-xlib software-16-x11 software-xcb directfb sdl \
sdl-primitive fb buffer software-qtopia gl-xlib quartz gl-glew \
xrender-x11 xrender-xcb glitz-x11 wayland-shm wayland-egl
. if defined(EVAS_ENGINES) && !empty(EVAS_ENGINES:M${mod})
CONFIGURE_ARGS+= --enable-${mod}
. else
CONFIGURE_ARGS+= --disable-${mod}
. endif
.endfor
.for mod in gif png jpeg eet edb tiff xpm svg pmaps
. if defined(EVAS_IMAGE_LOADERS) && !empty(EVAS_IMAGE_LOADERS:M${mod})
CONFIGURE_ARGS+= --enable-image-loader-${mod}
. else
CONFIGURE_ARGS+= --disable-image-loader-${mod}
. endif
.endfor
CONFIGURE_ENV+= ACLOCAL=: AUTOCONF=: AUTOMAKE=:
.include "../../mk/bsd.prefs.mk"
.if !empty(MACHINE_PLATFORM:M*-powerpc)
CONFIGURE_ARGS+= --enable-cpu-altivec
.endif
# currently it is like it is
MODULE_ARCH= ${LOWER_OPSYS}-${MACHINE_ARCH}-${EVAS_VERSION}
PLIST_SUBST= MODULE_ARCH=${MODULE_ARCH}
PRINT_PLIST_AWK+= { gsub(/${MODULE_ARCH}/, "$${MODULE_ARCH}") }
MAKE_FLAGS+= MODULE_ARCH=${MODULE_ARCH}