diff options
author | Gonzalo Exequiel Pedone | 2024-01-17 17:59:27 -0300 |
---|---|---|
committer | Gonzalo Exequiel Pedone | 2024-01-17 17:59:27 -0300 |
commit | 91a42ac2b2a371532cf3f7e5e8ce14774f7b3a76 (patch) | |
tree | 1eb61838c508f4b2549c5c6c7ec5e19fb17b2dae | |
download | aur-91a42ac2b2a371532cf3f7e5e8ce14774f7b3a76.tar.gz |
Package added.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | 002-graphite2-1.2.1-pkgconfig.patch | 20 | ||||
-rw-r--r-- | 003-graphite2-1.3.8-staticbuild.patch | 62 | ||||
-rw-r--r-- | PKGBUILD | 48 |
5 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6ccba3a74265 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = android-x86-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-x86-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..37fe39b1d459 --- /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=x86 + +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 +} |