efl: added multiple build options and make rpi build with OpenGL/ES.

This commit is contained in:
Juan RP 2013-12-18 10:46:07 +01:00
parent 92095e8fb4
commit 0ae6a33c3f
1 changed files with 111 additions and 12 deletions

View File

@ -1,21 +1,19 @@
# Template file for 'efl' # Template file for 'efl'
pkgname=efl pkgname=efl
version=1.8.2 version=1.8.2
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
# XXX needs bullet for ephysics. # XXX needs bullet for ephysics.
configure_args="--enable-xinput22 --enable-multisense --enable-systemd configure_args="--enable-xinput22 --enable-multisense --enable-systemd
--enable-image-loader-webp --enable-harfbuzz --enable-wayland --enable-drm --enable-image-loader-webp --disable-physics"
--disable-physics"
hostmakedepends="pkg-config" hostmakedepends="pkg-config"
makedepends="openssl-devel systemd-devel glib-devel harfbuzz-devel makedepends="openssl-devel systemd-devel glib-devel libXdamage-devel
libjpeg-turbo-devel fontconfig-devel fribidi-devel libXrender-devel libXi-devel libjpeg-turbo-devel fontconfig-devel fribidi-devel libXrender-devel libXi-devel
giflib-devel libpng-devel tiff-devel libwebp-devel gst-plugins-base-devel giflib-devel libpng-devel tiff-devel libwebp-devel gst-plugins-base-devel
alsa-lib-devel pulseaudio-devel libsndfile-devel libXcursor-devel libXcomposite-devel alsa-lib-devel alsa-lib-devel libsndfile-devel libXcursor-devel libXcomposite-devel
libXinerama-devel xcb-util-devel xcb-util-keysyms-devel xcb-util-image-devel libXinerama-devel xcb-util-devel xcb-util-keysyms-devel xcb-util-image-devel
xcb-util-renderutil-devel xcb-util-wm-devel pixman-devel libxkbcommon-devel xcb-util-renderutil-devel xcb-util-wm-devel pixman-devel libxkbcommon-devel
printproto libXp-devel libXrandr-devel libXScrnSaver-devel libmount-devel lua-devel printproto libXp-devel libXrandr-devel libXScrnSaver-devel libmount-devel lua-devel"
wayland-devel MesaLib-devel"
homepage="http://enlightenment.org" homepage="http://enlightenment.org"
short_desc="Enlightenment Foundation Libraries" short_desc="Enlightenment Foundation Libraries"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
@ -23,12 +21,102 @@ license="BSD"
distfiles="http://download.enlightenment.org/rel/libs/efl/efl-${version}.tar.gz" distfiles="http://download.enlightenment.org/rel/libs/efl/efl-${version}.tar.gz"
checksum=282d1f7b6c364a8bc95482a87123fbf3884beeeecd5cc05ddb960751ef35edaf checksum=282d1f7b6c364a8bc95482a87123fbf3884beeeecd5cc05ddb960751ef35edaf
if [ "$XBPS_TARGET_MACHINE" = "i686" ] || [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
# Enable DRM and OpenGL on x86.
configure_args+=" --enable-drm --with-opengl=full"
makedepends+=" MesaLib-devel"
fi
if [ "$CROSS_BUILD" ]; then
# XXX needs host edje_cc
hostmakedepends+=" automake gettext-devel libtool efl>=1.8"
configure_args+=" --with-bin-edje-cc=/usr/bin/edje_cc"
pre_configure() {
autoreconf -fi
}
fi
# Package build options
build_options="framebuffer gles2 harfbuzz opengl pulseaudio wayland"
desc_option_framebuffer="Enable support for the Framebuffer"
desc_option_gles2="Enable support for GLESv2"
desc_option_harfbuzz="enable support for Harfbuzz"
desc_option_opengl="Enable support for OpenGL"
desc_option_pulseaudio="Enable support for Pulseaudio"
desc_option_wayland="Enable support for Wayland"
# Enable harfbuzz, pulseaudio and wayland by default.
build_options_default="harfbuzz pulseaudio wayland"
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
# Enable opengl by default on x86.
build_options_default+=" opengl"
elif [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
# XXX only RaspberryPi: enable OpenGL/ES.
build_options_default+=" gles2"
fi
if [ "$build_option_fb" ]; then
configure_args+=" --enable-fb"
else
configure_args+=" --disable-fb"
fi
if [ "$build_option_harfbuzz" ]; then
configure_args+=" --enable-harfbuzz"
makedepends+=" harfbuzz-devel"
else
configure_args+=" --disable-harfbuzz"
fi
if [ "$build_option_opengl" ]; then
configure_args+=" --with-opengl=full"
makedepends+=" MesaLib-devel"
elif [ "$build_option_gles2" ]; then
configure_args+=" --with-opengl=es"
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vmcs_host/linux"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib -lbcm_host -lvcos -lvchiq_arm"
else
makedepends+=" MesaLib-devel"
fi
else
configure_args+=" --with-opengl=none"
fi
if [ "$build_option_pulseaudio" ]; then
configure_args+=" --enable-pulseaudio"
makedepends+=" pulseaudio-devel"
else
configure_args+=" --disable-pulseaudio"
fi
if [ "$build_option_wayland" ]; then
configure_args+=" --enable-wayland"
makedepends+=" wayland-devel"
else
configure_args+=" --disable-wayland"
fi
efl-devel_package() { efl-devel_package() {
short_desc+=" - development files" short_desc+=" - development files"
depends="${makedepends} efl>=${version}_${revision}" depends="${makedepends} efl>=${version}_${revision}"
replaces="ecore-devel>=0 evas-devel>=0 edje-devel>=0 eio-devel>=0 replaces="
emotion-devel>=0 e_dbus-devel>=0 eet-devel>=0 eina-devel>=0 ecore-devel>=0
efreet-devel>=0 embryo-devel>=0 ethumb-devel>=0 eeze-devel>=0" evas-devel>=0
edje-devel>=0
eio-devel>=0
emotion-devel>=0
e_dbus-devel>=0
eet-devel>=0
eina-devel>=0
efreet-devel>=0
embryo-devel>=0
ethumb-devel>=0
eeze-devel>=0"
pkg_install() { pkg_install() {
vmove usr/include vmove usr/include
vmove "usr/lib/*.so" vmove "usr/lib/*.so"
@ -38,8 +126,19 @@ efl-devel_package() {
} }
efl_package() { efl_package() {
replaces="ecore>=0 evas>=0 edje>=0 eio>=0 eina>=0 emotion>=0 eeze>=0 replaces="
e_dbus>=0 eet>=0 evas>=0 embryo>=0 efreet>=0 ethumb>=0" ecore>=0
evas>=0
edje>=0
eio>=0
eina>=0
emotion>=0
eeze>=0
e_dbus>=0
eet>=0
embryo>=0
efreet>=0
ethumb>=0"
pkg_install() { pkg_install() {
vmove all vmove all
} }