summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2024-01-17 17:58:45 -0300
committerGonzalo Exequiel Pedone2024-01-17 17:58:45 -0300
commit4e84200c5f0f529537902762d90a3175feefa3d3 (patch)
tree4b5997d53828e9082f99cb0c29524629934e37a3
downloadaur-4e84200c5f0f529537902762d90a3175feefa3d3.tar.gz
Package added.
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore6
-rw-r--r--002-graphite2-1.2.1-pkgconfig.patch20
-rw-r--r--003-graphite2-1.3.8-staticbuild.patch62
-rw-r--r--PKGBUILD48
5 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cba0baeba22f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = android-armv7a-eabi-graphite
+ pkgdesc = Reimplementation of the SIL Graphite text processing engine (android)
+ pkgver = 1.3.14
+ pkgrel = 1
+ url = https://github.com/silnrsi/graphite
+ arch = any
+ license = LGPL
+ license = GPL
+ license = custom
+ makedepends = android-cmake
+ makedepends = python
+ depends = android-ndk
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = https://github.com/silnrsi/graphite/releases/download/1.3.14/graphite2-1.3.14.tgz
+ source = 002-graphite2-1.2.1-pkgconfig.patch
+ source = 003-graphite2-1.3.8-staticbuild.patch
+ sha256sums = f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d
+ sha256sums = 22bef0d90c0266b3b0eff01859c1e002f84c165d12242c2bfc153f8f98fb272a
+ sha256sums = c139e0bed6e45f333fbdc136a5013395fe22ca5381eac2294958bc85ea1b69fd
+
+pkgname = android-armv7a-eabi-graphite
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..bff248642c42
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+pkg
+src
+*.tar.xz
+*.tar.gz
+*.tar.bz2
+*.gz
diff --git a/002-graphite2-1.2.1-pkgconfig.patch b/002-graphite2-1.2.1-pkgconfig.patch
new file mode 100644
index 000000000000..27eae13a2cbf
--- /dev/null
+++ b/002-graphite2-1.2.1-pkgconfig.patch
@@ -0,0 +1,20 @@
+--- graphite2-1.2.1/graphite2.pc.in 2013-02-27 20:32:04.000000000 +0100
++++ graphite2-1.2.1/graphite2.pc.in 2013-05-09 22:52:58.990959979 +0200
+@@ -1,3 +1,7 @@
++prefix=${prefix}
++exec_prefix=${prefix}
++libdir=${prefix}/lib
++includedir=${prefix}/include
+
+ Name: Graphite2
+ Description: Font rendering engine for Complex Scripts
+--- graphite2-1.2.1/CMakeLists.txt 2013-02-27 20:32:04.000000000 +0100
++++ graphite2-1.2.1/CMakeLists.txt 2013-06-06 21:11:28.241391998 +0200
+@@ -64,6 +64,7 @@
+ endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE))
+
+ set(version 3.0.1)
++set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+ set(includedir ${CMAKE_INSTALL_PREFIX}/include)
+
diff --git a/003-graphite2-1.3.8-staticbuild.patch b/003-graphite2-1.3.8-staticbuild.patch
new file mode 100644
index 000000000000..14cbc45fb613
--- /dev/null
+++ b/003-graphite2-1.3.8-staticbuild.patch
@@ -0,0 +1,62 @@
+--- graphite2-1.3.8/src/CMakeLists.txt.orig 2016-09-17 06:30:02.570522500 -0400
++++ graphite2-1.3.8/src/CMakeLists.txt 2016-09-17 06:33:57.962672400 -0400
+@@ -106,6 +106,46 @@
+ LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
+ LT_VERSION_AGE ${GRAPHITE_API_AGE})
+
++add_library(graphite2_static STATIC
++ ${GRAPHITE2_VM_TYPE}_machine.cpp
++ gr_char_info.cpp
++ gr_features.cpp
++ gr_face.cpp
++ gr_font.cpp
++ gr_logging.cpp
++ gr_segment.cpp
++ gr_slot.cpp
++ CmapCache.cpp
++ Code.cpp
++ Collider.cpp
++ Decompressor.cpp
++ Face.cpp
++ FeatureMap.cpp
++ Font.cpp
++ GlyphFace.cpp
++ GlyphCache.cpp
++ Intervals.cpp
++ Justifier.cpp
++ NameTable.cpp
++ Pass.cpp
++ Position.cpp
++ Segment.cpp
++ Silf.cpp
++ Slot.cpp
++ Sparse.cpp
++ TtfUtil.cpp
++ UtfCodec.cpp
++ ${FILEFACE}
++ ${TRACING})
++
++set_target_properties(graphite2_static PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}"
++ SOVERSION ${GRAPHITE_SO_VERSION}
++ VERSION ${GRAPHITE_VERSION}
++ LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT}
++ LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
++ LT_VERSION_AGE ${GRAPHITE_API_AGE}
++ OUTPUT_NAME graphite2)
++
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+ set_target_properties(graphite2 PROPERTIES
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
+@@ -148,8 +188,11 @@
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+ set_target_properties(graphite2 PROPERTIES
+ COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_EXPORTING")
++ set_target_properties(graphite2_static PROPERTIES
++ COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_STATIC")
++
+ endif()
+
+
+-install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin)
++install(TARGETS graphite2 graphite2_static EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin)
+ install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_)
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..45d47573042d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: pingplug < aur at pingplug dot me >
+# Contributor: Schala Zeal < schalaalexiazeal at gmail dot com >
+
+_android_arch=armv7a-eabi
+
+pkgname=android-${_android_arch}-graphite
+pkgver=1.3.14
+pkgrel=1
+pkgdesc="Reimplementation of the SIL Graphite text processing engine (android)"
+arch=('any')
+url="https://github.com/silnrsi/graphite"
+license=('LGPL' 'GPL' 'custom')
+depends=('android-ndk')
+options=(!strip !buildflags staticlibs !emptydirs)
+makedepends=('android-cmake'
+ 'python')
+source=("https://github.com/silnrsi/graphite/releases/download/${pkgver}/graphite2-${pkgver}.tgz"
+ "002-graphite2-1.2.1-pkgconfig.patch"
+ "003-graphite2-1.3.8-staticbuild.patch")
+sha256sums=('f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d'
+ '22bef0d90c0266b3b0eff01859c1e002f84c165d12242c2bfc153f8f98fb272a'
+ 'c139e0bed6e45f333fbdc136a5013395fe22ca5381eac2294958bc85ea1b69fd')
+
+prepare() {
+ cd "${srcdir}"/graphite2-${pkgver}
+ patch -Np1 -i "../002-graphite2-1.2.1-pkgconfig.patch"
+ patch -Np1 -i "../003-graphite2-1.3.8-staticbuild.patch"
+}
+
+build() {
+ cd "${srcdir}"/graphite2-${pkgver}
+
+ android-${_android_arch}-cmake \
+ -DGRAPHITE2_COMPARE_RENDERER=OFF \
+ .
+ make $MAKEFLAGS
+}
+
+package() {
+ cd "${srcdir}"/graphite2-${pkgver}
+ source android-env ${_android_arch}
+
+ make DESTDIR="$pkgdir" install
+ rm -r "${pkgdir}"/${ANDROID_PREFIX_BIN}
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
+ ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
+}