2018-04-10 21:13:42 +00:00
|
|
|
pkgname=libhybris
|
|
|
|
pkgver=1.0_git20180212
|
2018-11-30 23:10:45 +00:00
|
|
|
pkgrel=4
|
2018-10-02 05:09:28 +00:00
|
|
|
arch="x86 armhf aarch64"
|
2018-04-10 21:13:42 +00:00
|
|
|
url="https://github.com/libhybris/libhybris"
|
|
|
|
license="Apache"
|
|
|
|
makedepends="autoconf automake libtool wayland-dev linux-headers bsd-compat-headers
|
|
|
|
libx11-dev libxcb-dev libxext-dev
|
2018-11-30 23:10:45 +00:00
|
|
|
android-headers-7.1 android-headers-4.4"
|
2018-04-10 21:13:42 +00:00
|
|
|
depends_dev="bsd-compat-headers android-headers-7.1"
|
2019-02-09 16:11:49 +00:00
|
|
|
_commit=4a7d95b73bf40bf6d03d12bf270974c3d0278099
|
|
|
|
source="$pkgname-$_commit.tar.gz::https://github.com/libhybris/libhybris/archive/$_commit.tar.gz
|
2018-04-10 21:13:42 +00:00
|
|
|
0001-Make-libhybris-compile-with-musl.patch
|
|
|
|
0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch
|
2018-11-30 23:10:45 +00:00
|
|
|
0003-Implement-X11-EGL-platform-based-on-wayland-code.patch
|
|
|
|
0004-Build-test-hwcomposer-7-caf.patch"
|
2018-04-10 21:13:42 +00:00
|
|
|
|
|
|
|
pkgdesc="libhybris allows to use bionic-based HW adaptations"
|
|
|
|
subpackages="$pkgname-dev $pkgname-egl $pkgname-gles $pkgname-libwayland-egl:_wayland
|
2018-11-30 23:10:45 +00:00
|
|
|
$pkgname-7.1:_specific $pkgname-4.4:_specific"
|
2018-04-10 21:13:42 +00:00
|
|
|
|
|
|
|
if [ "$CARCH" == "aarch64" ]; then
|
|
|
|
subpackages="$pkgname-dev $pkgname-egl $pkgname-gles $pkgname-libwayland-egl:_wayland
|
2018-11-30 23:10:45 +00:00
|
|
|
$pkgname-7.1:_specific"
|
2018-10-02 05:09:28 +00:00
|
|
|
elif [ "$CARCH" == "x86" ]; then
|
|
|
|
subpackages="$pkgname-dev $pkgname-egl $pkgname-gles $pkgname-libwayland-egl:_wayland
|
|
|
|
$pkgname-7.1:_specific $pkgname-4.4:_specific"
|
2018-04-10 21:13:42 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
options="!check !strip !tracedeps"
|
|
|
|
|
2019-02-09 16:11:49 +00:00
|
|
|
builddir="$srcdir/$pkgname-$_commit"
|
2018-04-10 21:13:42 +00:00
|
|
|
_tmppkgdir="$srcdir/tmpinstall"
|
|
|
|
_main_headers_ver=7.1
|
|
|
|
|
|
|
|
_bins_specific="test_audio test_camera test_egl_configs test_gps
|
2018-11-30 23:10:45 +00:00
|
|
|
test_hwcomposer test_hwcomposer_7_caf test_input test_lights test_media test_nfc
|
2018-04-10 21:13:42 +00:00
|
|
|
test_recorder test_sensors test_sf test_vibrator test_wifi"
|
|
|
|
|
|
|
|
_libs_specific="libcamera.so.1.0.0 libhardware.so.2.0.0
|
|
|
|
libhybris-common.so.1.0.0 libhybris-eglplatformcommon.so.1.0.0
|
|
|
|
libhybris-hwcomposerwindow.so.1.0.0 libis.so.1.0.0 libmedia.so.1
|
|
|
|
libmedia.so.1.0.0 libnfc_ndef_nxp.so.1.0.0 libnfc_nxp.so.1.0.0
|
|
|
|
libsf.so.1.0.0 libsync.so.2.0.0 libui.so.1.0.0 libvibrator.so.1.0.0
|
|
|
|
libwifi.so.1.0.0
|
|
|
|
libhybris/eglplatform_fbdev.so libhybris/eglplatform_hwcomposer.so
|
|
|
|
libhybris/eglplatform_null.so libhybris/eglplatform_wayland.so
|
|
|
|
libhybris/eglplatform_x11.so"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$builddir/hybris"
|
|
|
|
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
|
|
|
|
|
|
if [ "$CARCH" == "armhf" ]; then
|
2018-11-30 23:10:45 +00:00
|
|
|
_vers="7.1 4.4"
|
2018-04-10 21:13:42 +00:00
|
|
|
_ldpath="/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib"
|
|
|
|
_arch="arm"
|
|
|
|
elif [ "$CARCH" == "aarch64" ]; then
|
2018-11-30 23:10:45 +00:00
|
|
|
_vers="7.1"
|
2018-04-10 21:13:42 +00:00
|
|
|
_ldpath="/usr/libexec/droid-hybris/system/lib64:/vendor/lib64:/system/lib64"
|
|
|
|
_arch="arm64"
|
2018-10-02 05:09:28 +00:00
|
|
|
elif [ "$CARCH" == "x86" ]; then
|
|
|
|
_vers="7.1 4.4"
|
|
|
|
_ldpath="/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib"
|
|
|
|
_arch="x86"
|
2018-04-10 21:13:42 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
for _headers_ver in $_vers; do
|
|
|
|
msg "building $pkgname-$_headers_ver"
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-wayland \
|
|
|
|
--enable-trace \
|
|
|
|
--enable-debug \
|
|
|
|
--enable-experimental \
|
|
|
|
--with-android-headers=/usr/include/android-$_headers_ver \
|
|
|
|
--with-default-hybris-ld-library-path=$_ldpath \
|
|
|
|
--enable-arch=$_arch \
|
|
|
|
--enable-property-cache
|
2018-11-30 23:10:45 +00:00
|
|
|
make clean
|
2018-04-10 21:13:42 +00:00
|
|
|
make DESTDIR="${_tmppkgdir}/$pkgname-$_headers_ver" install
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$builddir/hybris"
|
|
|
|
|
|
|
|
# make DESTDIR="${pkgdir}" install
|
|
|
|
mkdir -p "${pkgdir}"
|
|
|
|
cp -a ${_tmppkgdir}/$pkgname-$_main_headers_ver/* "${pkgdir}"
|
|
|
|
|
|
|
|
for _bin in ${_bins_specific}; do
|
2018-11-30 23:10:45 +00:00
|
|
|
rm "${pkgdir}/usr/bin/${_bin}" || true
|
2018-04-10 21:13:42 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
for _lib in ${_libs_specific}; do
|
|
|
|
rm "${pkgdir}/usr/lib/${_lib}"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
_specific() {
|
2018-10-02 05:09:28 +00:00
|
|
|
depends="$pkgname"
|
|
|
|
|
2018-04-10 21:13:42 +00:00
|
|
|
for _bin in ${_bins_specific}; do
|
|
|
|
install -Dm755 "${_tmppkgdir}/${subpkgname}/usr/bin/${_bin}" \
|
2018-11-30 23:10:45 +00:00
|
|
|
"${subpkgdir}/usr/bin/${_bin}" || true
|
2018-04-10 21:13:42 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
for _lib in ${_libs_specific}; do
|
|
|
|
install -Dm755 "${_tmppkgdir}/${subpkgname}/usr/lib/${_lib}" \
|
|
|
|
"${subpkgdir}/usr/lib/${_lib}"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
egl() {
|
2018-10-02 05:09:28 +00:00
|
|
|
depends="$pkgname"
|
2018-04-10 21:13:42 +00:00
|
|
|
pkgdesc="libhybris libEGL runtime libraries"
|
2018-10-02 05:09:28 +00:00
|
|
|
install="$subpkgname.post-install"
|
|
|
|
|
|
|
|
install -d "$subpkgdir"/usr/lib/libhybris-egl
|
2018-04-10 21:13:42 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libEGL.so.* \
|
2018-10-02 05:09:28 +00:00
|
|
|
"$subpkgdir"/usr/lib/libhybris-egl/
|
2018-04-10 21:13:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gles() {
|
2018-10-02 05:09:28 +00:00
|
|
|
depends="$pkgname"
|
2018-04-10 21:13:42 +00:00
|
|
|
pkgdesc="libhybris libGLESv2 runtime libraries"
|
2018-10-02 05:09:28 +00:00
|
|
|
install -d "$subpkgdir"/usr/lib/libhybris-egl
|
2018-04-10 21:13:42 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libGLES*.so.* \
|
2018-10-02 05:09:28 +00:00
|
|
|
"$subpkgdir"/usr/lib/libhybris-egl/
|
2018-04-10 21:13:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_wayland() {
|
2018-10-02 05:09:28 +00:00
|
|
|
depends="$pkgname"
|
2018-04-10 21:13:42 +00:00
|
|
|
pkgdesc="libhybris libwayland-egl library"
|
2018-10-02 05:09:28 +00:00
|
|
|
mkdir -p "$subpkgdir"/usr/lib/libhybris-egl
|
|
|
|
mv "$pkgdir"/usr/lib/libwayland-egl.so.* "$subpkgdir"/usr/lib/libhybris-egl/ \
|
2018-04-10 21:13:42 +00:00
|
|
|
|| return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
dev() {
|
|
|
|
default_dev
|
|
|
|
|
|
|
|
# Avoid conflicts with mesa-dev
|
2018-10-02 05:09:28 +00:00
|
|
|
install -d "$subpkgdir"/usr/lib/libhybris-egl
|
|
|
|
|
|
|
|
mv "$subpkgdir"/usr/lib/lib*GL*.so "$subpkgdir"/usr/lib/libhybris-egl
|
|
|
|
mv "$subpkgdir"/usr/lib/libwayland-egl.so "$subpkgdir"/usr/lib/libhybris-egl
|
2018-04-10 21:13:42 +00:00
|
|
|
|
|
|
|
cd "$subpkgdir"/usr/lib/pkgconfig
|
|
|
|
rm -f egl.pc glesv*.pc wayland-egl.pc
|
|
|
|
|
|
|
|
cd "$subpkgdir"/usr/include
|
|
|
|
# Move libhybris-provided headers into hybris dir
|
|
|
|
mv CL EGL GLES GLES2 KHR VG hybris
|
|
|
|
|
|
|
|
# Symlink eglhybris.h
|
|
|
|
mkdir -p EGL
|
|
|
|
cd EGL
|
|
|
|
ln -s ../hybris/EGL/eglhybris.h .
|
|
|
|
}
|
|
|
|
|
2018-10-02 05:09:28 +00:00
|
|
|
sha512sums="378ad6815f2c17dec7c0043499833e55498f48634aa6dc8d5a5c2e8bfc4281f76690bca6f35e74f47a41b364baab1533ff8d8898d61a9e5b53897deb7d180f97 libhybris-4a7d95b73bf40bf6d03d12bf270974c3d0278099.tar.gz
|
2018-04-10 21:13:42 +00:00
|
|
|
9655816dc3d89f329801a74f4499c3752cbc96f7ba2e052765335a2cbd7e74cdf45064260ab27537bcd9d64673144eac6f89e31af4b4c6b4a4792ad7b398555d 0001-Make-libhybris-compile-with-musl.patch
|
|
|
|
1355a4403d1af8bdf75b9e4502cbfc093b9788224ce7c24a1f6a53dd7996d385d31a3362577a4293db6b6d0dd0ae4e88140b38c658ff0a288d9acfc2753859bb 0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch
|
2018-11-30 23:10:45 +00:00
|
|
|
865ad86b297dcd09416a9df4e366d58429f737aeaa380308fd04943451cefd8500a18857e61c8de43cb4595c59d438d3f12855e189932ab7df8a2f354086a21c 0003-Implement-X11-EGL-platform-based-on-wayland-code.patch
|
|
|
|
eda57804fefa1d586e90fb2198c310f65e6dbc7e09b5d1dd7d15df4ab152c4c8915c212230a92c35ec8a013d3ec7a7b1d289653bedb46b7eb2850a477ccebe16 0004-Build-test-hwcomposer-7-caf.patch"
|