Changes of Revision 4
[-] [+] | Changed | _service:tar_git:libhybris.changes |
[-] [+] | Changed | _service:tar_git:libhybris.spec ^ |
[-] [+] | Changed | _service ^ |
@@ -1,7 +1,7 @@ <services> <service name="tar_git"> - <param name="url">https://github.com/sailfishos-sony-tama/mer-libhybris.git</param> - <param name="branch">tama</param> + <param name="url">https://github.com/mer-hybris/libhybris.git</param> + <param name="branch"></param> <param name="revision"></param> <param name="token"/> <param name="debian">N</param> | ||
[-] [+] | Changed | _service:tar_git:libhybris-0.0.5.34.tar.bz2/.gitmodules ^ |
@@ -1,3 +1,3 @@ [submodule "libhybris"] path = libhybris - url = https://github.com/sailfishos-sony-tama/libhybris + url = https://github.com/libhybris/libhybris | ||
[-] [+] | Changed | _service:tar_git:libhybris-0.0.5.34.tar.bz2/libhybris/hybris/include/EGL/egl.h ^ |
@@ -41,6 +41,8 @@ /* EGL Types */ /* EGLint is defined in eglplatform.h */ +typedef intptr_t EGLAttrib; +typedef khronos_utime_nanoseconds_t EGLTime; typedef unsigned int EGLBoolean; typedef unsigned int EGLenum; typedef void *EGLConfig; @@ -48,6 +50,8 @@ typedef void *EGLDisplay; typedef void *EGLSurface; typedef void *EGLClientBuffer; +typedef void *EGLSync; +typedef void *EGLImage; /* EGL Versioning */ #define EGL_VERSION_1_0 1 @@ -55,6 +59,7 @@ #define EGL_VERSION_1_2 1 #define EGL_VERSION_1_3 1 #define EGL_VERSION_1_4 1 +#define EGL_VERSION_1_5 1 /* EGL Enumerants. Bitmasks and other exceptional cases aside, most * enums are assigned unique values starting at 0x3000. @@ -242,6 +247,50 @@ * a bug in Khronos Bugzilla against task "Registry". */ +/* EGL 1.5 tokens */ +#define EGL_CONTEXT_MAJOR_VERSION 0x3098 +#define EGL_CONTEXT_MINOR_VERSION 0x30FB +#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD +#define EGL_NO_RESET_NOTIFICATION 0x31BE +#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF +#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 +#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 +#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 +#define EGL_OPENGL_ES3_BIT 0x00000040 +#define EGL_CL_EVENT_HANDLE 0x309C +#define EGL_SYNC_CL_EVENT 0x30FE +#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 +#define EGL_SYNC_TYPE 0x30F7 +#define EGL_SYNC_STATUS 0x30F1 +#define EGL_SYNC_CONDITION 0x30F8 +#define EGL_SIGNALED 0x30F2 +#define EGL_UNSIGNALED 0x30F3 +#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 +#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull +#define EGL_TIMEOUT_EXPIRED 0x30F5 +#define EGL_CONDITION_SATISFIED 0x30F6 +#define EGL_NO_SYNC EGL_CAST(EGLSync,0) +#define EGL_SYNC_FENCE 0x30F9 +#define EGL_GL_COLORSPACE 0x309D +#define EGL_GL_COLORSPACE_SRGB 0x3089 +#define EGL_GL_COLORSPACE_LINEAR 0x308A +#define EGL_GL_RENDERBUFFER 0x30B9 +#define EGL_GL_TEXTURE_2D 0x30B1 +#define EGL_GL_TEXTURE_LEVEL 0x30BC +#define EGL_GL_TEXTURE_3D 0x30B2 +#define EGL_GL_TEXTURE_ZOFFSET 0x30BD +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 +#define EGL_IMAGE_PRESERVED 0x30D2 +#define EGL_NO_IMAGE EGL_CAST(EGLImage,0) /* EGL Functions */ @@ -313,6 +362,18 @@ EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); +/* EGL 1.5 */ +EGLAPI EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); +EGLAPI EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image); +EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform, void *native_display, const EGLAttrib *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags); + /* This is a generic function pointer type, whose name indicates it must * be cast to the proper type *and calling convention* before use. */ | ||
[-] [+] | Changed | _service:tar_git:libhybris-0.0.5.34.tar.bz2/libhybris/utils/extract-headers.sh ^ |
@@ -1,61 +1,89 @@ -#!/bin/sh - -ANDROID_ROOT=$1 -HEADERPATH=$2 -MAJOR=$3 -MINOR=$4 - -PATCH=$5 -PATCH2=$6 -PATCH3=$7 +#! /bin/sh +error() { + echo "Error: $1" >&2 +} usage() { - echo "Usage: extract-headers.sh <ANDROID_ROOT> <HEADER_PATH> [Android Platform Version]" + echo "Usage: extract-headers.sh [Options] <ANDROID_ROOT> <HEADER_PATH>" echo echo " ANDROID_ROOT: Directory containing the Android source tree." echo " HEADER_PATH: Where the headers will be extracted to." echo - echo "Android Platform Version:" - echo " This field is optional. If not specified, automatic extraction is attempted." - echo - echo "Ex:" - echo " ./extract-headers.sh android-aosp/ /tmp/android-headers/ 4 2 2" - + echo "Options:" + echo " -v|--version MAJOR.MINOR.PATCH.[PATCH2].[PATCH3]]" + echo " Override the Android version detected by this script" + echo " -p|--pkgconfigpath <path>" + echo " pkgconfig path for the headers installed location" + exit 1 } -if [ x$ANDROID_ROOT = x -o "x$HEADERPATH" = x ]; then - usage +############## +while [ $# -gt 0 ]; do + case $1 in + *-version|-v) + if [ x$2 = x ]; then error "--version needs an argument"; usage; fi + IFS="." read MAJOR MINOR PATCH PATCH2 PATCH3 <<EOF +$2 +EOF + echo "Using version ${MAJOR}.${MINOR}.${PATCH}.${PATCH2}.${PATCH3}" + shift 2 + ;; + *-pkgconfigpath|-p) + if [ "$2" = "" ]; then error "--pkgconfigpath needs an argument"; usage; fi + PKGCONFIGPATH=$2 + shift 2 + ;; + *) + break + ;; + esac +done + +############## +ANDROID_ROOT=$1 +HEADER_PATH=$2 + +# Required arguments +[ x$ANDROID_ROOT = x ] && error "missing argument ANDROID_ROOT" && usage +[ x$HEADER_PATH = x ] && error "missing argument HEADER_PATH" && usage + +shift 2 + +# check if android source exists +if [ ! -e "$ANDROID_ROOT" ]; then + error "Cannot extract headers: '$ANDROID_ROOT' does not exist." exit 1 fi - +# In case one of the version number is missing, +# try to extract if from the version_defaults.mk if [ x$MAJOR = x -o x$MINOR = x -o x$PATCH = x ]; then VERSION_DEFAULTS=$ANDROID_ROOT/build/core/version_defaults.mk - parse_defaults_failed() { - echo "Error: Cannot read PLATFORM_VERSION from ${VERSION_DEFAULTS}." - echo "Please specify MAJOR, MINOR and PATCH manually to continue." - exit 1 - } - + echo "not all version fields supplied: trying to extract from $VERSION_DEFAULTS" if [ ! -f $VERSION_DEFAULTS ]; then - parse_defaults_failed + error "$VERSION_DEFAULTS not found" fi IFS="." read MAJOR MINOR PATCH PATCH2 PATCH3 <<EOF -$(IFS="." awk '/PLATFORM_VERSION := ([0-9.]+)/ { print $3; }' < $VERSION_DEFAULTS) +$(IFS="." awk '/PLATFORM_VERSION[A-Z0-9.]* := ([0-9.]+)/ { print $3; }' < $VERSION_DEFAULTS) EOF - - if [ x$MAJOR = x -o x$MINOR = x ]; then - parse_defaults_failed + if [ x$MINOR = x ]; then + MINOR=0 fi if [ x$PATCH = x ]; then - PATCH=0 + PATCH=0 + fi + if [ x$MAJOR = x -o x$MINOR = x -o x$PATCH = x ]; then + error "Cannot read PLATFORM_VERSION from ${VERSION_DEFAULTS}." + error "Please specify MAJOR, MINOR and PATCH manually to continue." + exit 1 fi echo -n "Auto-detected version: ${MAJOR}.${MINOR}.${PATCH}";echo "${PATCH2:+.${PATCH2}}${PATCH3:+.${PATCH3}}" fi +############## require_sources() { # require_sources [FILE|DIR] ... # Check if the given paths exist in the Android source @@ -64,7 +92,7 @@ shift if [ ! -e "$SOURCE_PATH" ]; then - echo "Cannot extract headers: '$SOURCE_PATH' does not exist." + error "Cannot extract headers: '$SOURCE_PATH' does not exist." exit 1 fi done @@ -74,41 +102,51 @@ # extract_headers_to <TARGET> [FILE|DIR] ... # For each FILE argument, copy it to TARGET # For each DIR argument, copy all its contents to TARGET - TARGET_DIRECTORY=$HEADERPATH/$1 + TARGET_DIRECTORY=$HEADER_PATH/$1 + if [ ! -d "$TARGET_DIRECTORY" ]; then + mkdir -p "$TARGET_DIRECTORY" + fi echo " $1" shift while [ $# -gt 0 ]; do SOURCE_PATH=$ANDROID_ROOT/$1 if [ -d $SOURCE_PATH ]; then - for file in $SOURCE_PATH/*.h; do + for file in $SOURCE_PATH/*; do echo " $1/$(basename $file)" - mkdir -p $TARGET_DIRECTORY - cp $file $TARGET_DIRECTORY/ + cp -L $file $TARGET_DIRECTORY/ done - elif [ -f $SOURCE_PATH ]; then - echo " $1" - mkdir -p $TARGET_DIRECTORY - cp $SOURCE_PATH $TARGET_DIRECTORY/ else - echo "Missing file: $1" + echo " $1" + cp -L $SOURCE_PATH $TARGET_DIRECTORY/ fi shift done } +check_header_exists() { + # check_header_exists <FILENAME> + HEADER_FILE=$ANDROID_ROOT/$1 + if [ ! -e "$HEADER_FILE" ]; then + return 1 + fi + + return 0 +} + +############## # Make sure that the dir given contains at least some of the assumed structures. require_sources \ hardware/libhardware/include/hardware -mkdir -p $HEADERPATH +mkdir -p $HEADER_PATH # Default PATCH2,3 to 0 PATCH2=${PATCH2:-0} PATCH3=${PATCH3:-0} -cat > $HEADERPATH/android-version.h << EOF +cat > $HEADER_PATH/android-version.h << EOF #ifndef ANDROID_VERSION_H_ #define ANDROID_VERSION_H_ @@ -121,14 +159,14 @@ #endif EOF -cat > $HEADERPATH/android-config.h << EOF +cat > $HEADER_PATH/android-config.h << EOF |