From: Ricardo Salveti de Araujo Date: Fri, 20 Dec 2013 01:05:59 +0000 (-0200) Subject: Imported Debian patch 4.2.2-2-0ubuntu1 X-Git-Tag: debian/4.2.2-2-0ubuntu1^0 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=HEAD;p=deb_android-headers.git Imported Debian patch 4.2.2-2-0ubuntu1 --- diff --git a/debian/android-headers.install b/debian/android-headers.install new file mode 100644 index 0000000..e93e613 --- /dev/null +++ b/debian/android-headers.install @@ -0,0 +1,10 @@ +debian/android-headers.pc usr/lib/pkgconfig/ +android usr/include/android/ +android-version.h usr/include/android/ +cutils usr/include/android/ +hardware usr/include/android/ +hardware_legacy usr/include/android/ +linux usr/include/android/ +private usr/include/android/ +sync usr/include/android/ +system usr/include/android/ diff --git a/debian/android-headers.pc b/debian/android-headers.pc new file mode 100644 index 0000000..e0d6701 --- /dev/null +++ b/debian/android-headers.pc @@ -0,0 +1,9 @@ +Name: Android Platform Header Files +Description: Header files needed to write applications for the Android platform +Version: 4.2.2 + +prefix=/usr +exec_prefix=${prefix} +includedir=${prefix}/include + +Cflags: -I${includedir}/android diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f4ff603 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,20 @@ +android-headers (4.2.2-2-0ubuntu1) trusty; urgency=low + + * Syncing hardware/gralloc.h and hardware/hardware.h with AOSP-4.2.2_r1.2 + + -- Ricardo Salveti de Araujo Thu, 19 Dec 2013 23:05:59 -0200 + +android-headers (4.2.2-1-0ubuntu2) trusty; urgency=low + + * Changing breaks to conflicts, following policy so the older package is + removed from the system during upgrades + + -- Ricardo Salveti de Araujo Sun, 15 Dec 2013 20:54:54 -0200 + +android-headers (4.2.2-1-0ubuntu1) trusty; urgency=low + + * Initial release. + - Split from libhybris, and new package name (following libhybris + upstream) + + -- Ricardo Salveti de Araujo Fri, 13 Dec 2013 07:39:49 -0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b0ce712 --- /dev/null +++ b/debian/control @@ -0,0 +1,24 @@ +Source: android-headers +Priority: extra +Section: libdevel +Maintainer: Ubuntu Developers +Build-Depends: debhelper (>= 9), quilt +Standards-Version: 3.9.4 +Vcs-Bzr: lp:~ubuntu-core-dev/libhybris/android-headers + +Package: android-headers +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends} +Replaces: android-platform-headers +Conflicts: android-platform-headers +Description: Android Platform Headers from AOSP releases + Android NDK provided by Google contains subset of AOSP platform + headers which are deemed "external interface" by Google. However, + writing advanced software for Android necessitates access to complete + platform. Many aspects of it change, sometimes drastically, between + releases, so compiling user source code against platform headers for + different releases is required (e.g. for libhybris). + . + This package provides the platform development headers for core components + of AOSP (Android Open Source Project), for the 4.2.2 release diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..458448a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: android-headers +Source: https://android.googlesource.com/ + +Files: * +Copyright: 2007-2010 The Android Open Source Project + 2012 Google, Inc +License: Apache 2.0 + +License: Apache 2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/debian/extract-headers.sh b/debian/extract-headers.sh new file mode 100755 index 0000000..0d6e65e --- /dev/null +++ b/debian/extract-headers.sh @@ -0,0 +1,124 @@ +#! /bin/sh +# +# Original script available in the libhybris project: +# https://github.com/libhybris/libhybris/blob/master/utils/extract-headers.sh +# + +ANDROID_ROOT=$1 +HEADERPATH=$2 +MAJOR=$3 +MINOR=$4 + +PATCH=$5 +PATCH2=$6 +PATCH3=$7 + +if [ x$ANDROID_ROOT = x -o "x$HEADERPATH" = x ]; then + echo "Syntax: extract-headers.sh ANDROID_ROOT HEADERPATH [MAJOR] [MINOR] [PATCH] [PATCH2] [PATCH3]" + exit 1 +fi + + +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 + } + + if [ ! -f $VERSION_DEFAULTS ]; then + parse_defaults_failed + fi + + PLATFORM_VERSION=$(egrep -o "PLATFORM_VERSION := [0-9.]+" $VERSION_DEFAULTS | awk '{ print $3 }') + if [ x$PLATFORM_VERSION = x ]; then + parse_defaults_failed + fi + + MAJOR=$(echo $PLATFORM_VERSION | cut -d. -f1) + MINOR=$(echo $PLATFORM_VERSION | cut -d. -f2) + PATCH=$(echo $PLATFORM_VERSION | cut -d. -f3) + PATCH2=$(echo $PLATFORM_VERSION | cut -d. -f4) + PATCH3=$(echo $PLATFORM_VERSION | cut -d. -f5) + + if [ x$MAJOR = x -o x$MINOR = x -o x$PATCH = x ]; then + parse_defaults_failed + fi + + echo -n "Auto-detected version: ${MAJOR}.${MINOR}.${PATCH}" + if [ x$PATCH3 != x ]; then + echo ".${PATCH2}.${PATCH3}" + elif [ x$PATCH2 != x ]; then + echo ".${PATCH2}" + else + echo "" + fi +fi + +# Make sure that the dir given contains at least some of the assumed structures. +if [ ! -d "$ANDROID_ROOT/hardware/libhardware/include/hardware/" ]; then + echo "Given Android root dir '$ANDROID_ROOT/hardware/libhardware/include/hardware/' doesn't exist." + exit 1 +fi + +mkdir -p $HEADERPATH + +if [ x$PATCH2 = x ]; then + PATCH2=0 +fi + +if [ x$PATCH3 = x ]; then + PATCH3=0 +fi + +cat > $HEADERPATH/android-version.h << EOF +#ifndef ANDROID_VERSION_H_ +#define ANDROID_VERSION_H_ + +#define ANDROID_VERSION_MAJOR $MAJOR +#define ANDROID_VERSION_MINOR $MINOR +#define ANDROID_VERSION_PATCH $PATCH +#define ANDROID_VERSION_PATCH2 $PATCH2 +#define ANDROID_VERSION_PATCH3 $PATCH3 + +#endif +EOF + +mkdir -p $HEADERPATH/hardware/ +cp $ANDROID_ROOT/hardware/libhardware/include/hardware/* $HEADERPATH/hardware/ + +mkdir -p $HEADERPATH/hardware_legacy/ +cp $ANDROID_ROOT/hardware/libhardware_legacy/include/hardware_legacy/audio_policy_conf.h $HEADERPATH/hardware_legacy/ + +mkdir -p $HEADERPATH/cutils/ +cp $ANDROID_ROOT/system/core/include/cutils/* $HEADERPATH/cutils/ + +mkdir -p $HEADERPATH/system/ +cp $ANDROID_ROOT/system/core/include/system/* $HEADERPATH/system/ + +mkdir -p $HEADERPATH/android/ +cp $ANDROID_ROOT/system/core/include/android/* $HEADERPATH/android/ + +if [ -e $ANDROID_ROOT/external/kernel-headers/original/linux/sync.h ]; then + mkdir -p $HEADERPATH/linux + cp $ANDROID_ROOT/external/kernel-headers/original/linux/sync.h $HEADERPATH/linux + cp $ANDROID_ROOT/external/kernel-headers/original/linux/sw_sync.h $HEADERPATH/linux +fi + +if [ -e $ANDROID_ROOT/system/core/include/sync/sync.h ]; then + mkdir -p $HEADERPATH/sync/ + cp $ANDROID_ROOT/system/core/include/sync/* $HEADERPATH/sync/ +fi + +if [ -e $ANDROID_ROOT/external/libnfc-nxp/inc/phNfcConfig.h ]; then + mkdir -p $HEADERPATH/libnfc-nxp/ + cp $ANDROID_ROOT/external/libnfc-nxp/inc/*.h $HEADERPATH/libnfc-nxp/ + cp $ANDROID_ROOT/external/libnfc-nxp/src/*.h $HEADERPATH/libnfc-nxp/ +fi + +mkdir -p $HEADERPATH/private +cp $ANDROID_ROOT/system/core/include/private/android_filesystem_config.h $HEADERPATH/private + +exit 0 diff --git a/debian/patches/0001-audio.h-handling-the-float-based-function-calls-with.patch b/debian/patches/0001-audio.h-handling-the-float-based-function-calls-with.patch new file mode 100644 index 0000000..df5491c --- /dev/null +++ b/debian/patches/0001-audio.h-handling-the-float-based-function-calls-with.patch @@ -0,0 +1,72 @@ +From: Ricardo Salveti de Araujo +Subject: audio.h: handling the float based function calls with aapcs + +Patch by David Henningsson + +Origin: vendor +Forwarded: no + +diff --git a/hardware/audio.h b/hardware/audio.h +index b1de42c..7a82d40 100644 +--- a/hardware/audio.h ++++ b/hardware/audio.h +@@ -29,6 +29,12 @@ + #include + #include + ++#ifdef __ARM_PCS_VFP ++#define FP_ATTRIB __attribute__((pcs("aapcs"))) ++#else ++#define FP_ATTRIB ++#endif ++ + __BEGIN_DECLS + + /** +@@ -235,7 +241,7 @@ struct audio_stream_out { + * This method might produce multiple PCM outputs or hardware accelerated + * codecs, such as MP3 or AAC. + */ +- int (*set_volume)(struct audio_stream_out *stream, float left, float right); ++ int (*set_volume)(struct audio_stream_out *stream, float left, float right) FP_ATTRIB; + + /** + * Write audio buffer to driver. Returns number of bytes written, or a +@@ -267,7 +273,7 @@ struct audio_stream_in { + + /** set the input gain for the audio driver. This method is for + * for future use */ +- int (*set_gain)(struct audio_stream_in *stream, float gain); ++ int (*set_gain)(struct audio_stream_in *stream, float gain) FP_ATTRIB; + + /** Read audio buffer in from audio driver. Returns number of bytes read, or a + * negative status_t. If at least one frame was read prior to the error, +@@ -346,14 +352,14 @@ struct audio_hw_device { + int (*init_check)(const struct audio_hw_device *dev); + + /** set the audio volume of a voice call. Range is between 0.0 and 1.0 */ +- int (*set_voice_volume)(struct audio_hw_device *dev, float volume); ++ int (*set_voice_volume)(struct audio_hw_device *dev, float volume) FP_ATTRIB; + + /** + * set the audio volume for all audio activities other than voice call. + * Range between 0.0 and 1.0. If any value other than 0 is returned, + * the software mixer will emulate this capability. + */ +- int (*set_master_volume)(struct audio_hw_device *dev, float volume); ++ int (*set_master_volume)(struct audio_hw_device *dev, float volume) FP_ATTRIB; + + /** + * Get the current master volume value for the HAL, if the HAL supports +@@ -362,7 +368,7 @@ struct audio_hw_device { + * the initial master volume across all HALs. HALs which do not support + * this method may leave it set to NULL. + */ +- int (*get_master_volume)(struct audio_hw_device *dev, float *volume); ++ int (*get_master_volume)(struct audio_hw_device *dev, float *volume) FP_ATTRIB; + + /** + * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode +-- +1.8.3.2 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..1832b32 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-audio.h-handling-the-float-based-function-calls-with.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1e4efc0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with quilt diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)