summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2024-02-11 16:52:24 -0300
committerGonzalo Exequiel Pedone2024-02-11 16:52:24 -0300
commitce5c654bda47c9b63e6b928177d561a66380d78e (patch)
tree0eb190053d57482f6d7d68024eef95cd7a3e6870
downloadaur-ce5c654bda47c9b63e6b928177d561a66380d78e.tar.gz
New package.
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore4
-rw-r--r--0001-Fix-build.patch32
-rw-r--r--PKGBUILD58
4 files changed, 114 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9e7772622a77
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = android-x86-64-pixman
+ pkgdesc = The pixel-manipulation library for X and cairo (android)
+ pkgver = 0.42.2
+ pkgrel = 1
+ url = http://xorg.freedesktop.org
+ arch = any
+ license = custom
+ makedepends = android-meson
+ makedepends = android-x86-64-libpng
+ depends = android-ndk
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = http://xorg.freedesktop.org/releases/individual/lib/pixman-0.42.2.tar.xz
+ source = 0001-Fix-build.patch
+ sha512sums = 3476e2676e66756b1af61b1e532cd80c985c191fb7956eb01702b419726cce99e79163b7f287f74f66414680e7396d13c3fee525cd663f12b6ac4877070ff4e8
+ sha512sums = b1dd14b99bb77779bc5e4b90a31dbbb19f3ae7016bbc28f9e99df0e40bbc2bf816aa6e8b556912e27a799fe49379edb3fd4de74ed6a9e1b386137b319e25b473
+
+pkgname = android-x86-64-pixman
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..79ffea0ccae6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.bz2
+*.xz
diff --git a/0001-Fix-build.patch b/0001-Fix-build.patch
new file mode 100644
index 000000000000..e6974adc87d7
--- /dev/null
+++ b/0001-Fix-build.patch
@@ -0,0 +1,32 @@
+--- a/meson.build 2024-02-11 15:24:28.360885940 -0300
++++ b/meson.build 2024-02-11 15:35:47.106338627 -0300
+@@ -394,6 +394,13 @@
+ config.set('PIXMAN_GNUPLOT', 1)
+ endif
+
++res = run_command('python3', '-c', 'import os; print(os.environ["LIBRARY_PATH"])')
++library_path = []
++
++if res.returncode() == 0
++ library_path = res.stdout().strip().split(':')
++endif
++
+ if cc.get_id() != 'msvc'
+ dep_openmp = dependency('openmp', required : get_option('openmp'))
+ if dep_openmp.found()
+@@ -417,13 +424,13 @@
+
+ dep_png = null_dep
+ if not get_option('libpng').disabled()
+- dep_png = dependency('libpng', required : false)
++ dep_png = cc.find_library('png', required: false, dirs: library_path)
+
+ # We need to look for the right library to link to for libpng,
+ # when looking for libpng manually
+ foreach png_ver : [ '16', '15', '14', '13', '12', '10' ]
+ if not dep_png.found()
+- dep_png = cc.find_library('libpng@0@'.format(png_ver), has_headers : ['png.h'], required : false)
++ dep_png = cc.find_library('libpng@0@'.format(png_ver), has_headers : ['png.h'], required: false, dirs: library_path)
+ endif
+ endforeach
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..36486186e99b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: drakkan <nicola.murino at gmail dot com>
+
+_android_arch=x86-64
+
+pkgname=android-${_android_arch}-pixman
+pkgver=0.42.2
+pkgrel=1
+pkgdesc="The pixel-manipulation library for X and cairo (android)"
+arch=('any')
+url="http://xorg.freedesktop.org"
+license=("custom")
+depends=('android-ndk')
+options=(!strip !buildflags staticlibs !emptydirs)
+makedepends=("android-meson"
+ "android-${_android_arch}-libpng")
+source=("http://xorg.freedesktop.org/releases/individual/lib/pixman-${pkgver}.tar.xz"
+ '0001-Fix-build.patch')
+sha512sums=('3476e2676e66756b1af61b1e532cd80c985c191fb7956eb01702b419726cce99e79163b7f287f74f66414680e7396d13c3fee525cd663f12b6ac4877070ff4e8'
+ 'b1dd14b99bb77779bc5e4b90a31dbbb19f3ae7016bbc28f9e99df0e40bbc2bf816aa6e8b556912e27a799fe49379edb3fd4de74ed6a9e1b386137b319e25b473')
+
+prepare() {
+ cd "${srcdir}/pixman-${pkgver}"
+ patch -Np1 -i ../0001-Fix-build.patch
+
+ find . -type f -exec sed -i 's|#include <png\.h>|#include <libpng/png.h>|g' {} \;
+}
+
+build() {
+ cd "${srcdir}/pixman-${pkgver}"
+ source android-env ${_android_arch}
+
+ export C_INCLUDE_PATH="${ANDROID_PREFIX_INCLUDE}"
+ export LIBRARY_PATH="${ANDROID_PREFIX_LIB}"
+
+ android-${_android_arch}-meson build \
+ -D loongson-mmi=disabled \
+ -D vmx=disabled \
+ -D arm-simd=disabled \
+ -D neon=disabled \
+ -D a64-neon=disabled \
+ -D iwmmxt=disabled \
+ -D mips-dspr2=disabled \
+ -D b_lto=false \
+ -D gtk=disabled \
+ -D strip=false \
+ --default-library both
+ ninja -C build
+}
+
+package() {
+ cd "${srcdir}/pixman-${pkgver}"
+ source android-env ${_android_arch}
+
+ DESTDIR="${pkgdir}" ninja -C build install
+ ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
+}