summaryrefslogtreecommitdiff
path: root/libre/icu-parabola/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/icu-parabola/PKGBUILD')
-rw-r--r--libre/icu-parabola/PKGBUILD125
1 files changed, 125 insertions, 0 deletions
diff --git a/libre/icu-parabola/PKGBUILD b/libre/icu-parabola/PKGBUILD
new file mode 100644
index 000000000..02050e006
--- /dev/null
+++ b/libre/icu-parabola/PKGBUILD
@@ -0,0 +1,125 @@
+# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
+# Contributor (Arch): Art Gramlich <art@gramlich-net.com>
+# Contributor (Parabola): Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+
+# parabola changes and rationale:
+# Several Parabola packages depends on ICU, and the ICU soname changes often.
+#
+# This means that if we don't rebuild all the Parabola packages that depends
+# on ICU as soon as the new Arch Linux, Arch Linux 32 and Arch Linux ARM ICU
+# packages are synchronized into the Parabola repositories, we have an issue.
+#
+# At the time of writing, the synchronization is automatic and can happen at
+# any time.
+#
+# At first nothing was done to fix or workaround that issue. In practice,
+# once a new ICU was synchronized, many users were upgrading before the
+# Parabola packages had the time to be rebuilt. For such users, it silently
+# broke all the installed Parabola packages that were depending on the old ICU.
+# This means that users had to find a way to downgrade packages manually or wait
+# until developers would finally have rebuilt all the packages that were broken.
+#
+# Then such packages were modified to make them depend on the exact version of
+# the ICU packages they were built against. This way, once the new ICU package
+# was synchronized, users could not upgrade if they had packages that were not
+# rebuilt yet against the new ICU packages as their dependencies could not be
+# met anymore if the ICU would have been upgraded.
+# However this workaround prevents installing packages that depends on the new
+# ICU if you have packages that depends on the old ICU. It also prevent users
+# from upgrading their system when that occurs.
+#
+# The correct fix would probably be to automatically build all the Packages
+# instead of relying on Arch Linux Packages. The synchronization could then be
+# done (semi-)automatically at a source level.
+#
+# However we don't have the code, configuration and/or infrastructure to run
+# an automatic builder for all packages yet even if there is work in this
+# direction.
+#
+# In the meantime, this version of ICU is meant to enable Parabola packages to
+# link against it. This enables all the Parabola packages to depend only on this
+# ICU version while the packages coming from upstream distributions would only
+# depend on that distribution's ICU.
+#
+# The downside of this workaround is that it consumes more resources and it
+# doesn't scale: If we want to avoid all the breakages introduced by that issue
+# we would then need to have a Parabola version of all the dependencies of the
+# Parabola packages, which has many issues:
+# - It would increase the work of Parabola maintainers as we would need to
+# manually sync with upstream and build the PKGBUILDs of each dependency.
+# - Without compression or deduplication, such libraries would use twice the
+# amount of storage, or even RAM if two programs depending on two different
+# version of the library are running at the same time.
+#
+# So the idea is to only use it for libraries that often have this issue.
+#
+# Changes:
+# - Changed the configure prefix (to enable both libraries to be installed in
+# parallel)
+# - Added icu-parabola.conf and a .install to run ldconfig after installation in
+# order to take into account the path of this library version.
+
+pkgname=icu-parabola
+_pkgname=icu
+pkgver=65.1
+pkgrel=3
+pkgrel=1.parabola1
+pkgdesc="International Components for Unicode library"
+arch=('armv7h' 'i686' 'x86_64')
+url="http://site.icu-project.org/home"
+license=('custom:icu')
+depends=('gcc-libs' 'sh')
+makedepends=('python')
+#makedepends=('clang')
+# no https available
+source=(https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/${_pkgname}4c-${pkgver//./_}-src.tgz{,.asc}
+ icu-65.1-initialized-buffer-uloc_getKeywordValue.patch::https://github.com/unicode-org/icu/commit/fab4c3c719.patch
+ icu-65.1-prevent-SEGV_MAPERR-in-append.patch::https://github.com/unicode-org/icu/commit/b7d08bc04a.patch)
+install="${pkgname}.install"
+# https://github.com/unicode-org/icu/releases/download/release-65-1/SHASUM512.txt
+sha512sums=('8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139'
+ 'SKIP'
+ '8898fe0fa9805304cd2fc02c00ab1131861836f4d11887f82450c2378666cb03bce0c5038d3f0bdcdd1c1cdee2a00a61ef85602ed0e0c74ad2e58578b1940123'
+ '580283cdd95fb7b8410cb3a6c0f47a6c8e53e0fdc9c213b04cd133ba4120381533ff2aef89ddab968150754bd9ca3a536d5c592c6881e625eb8ee6de8723de1b')
+validpgpkeys=('BA90283A60D67BA0DD910A893932080F4FB419E3') # "Steven R. Loomis (filfla-signing) <srloomis@us.ibm.com>"
+validpgpkeys+=('9731166CD8E23A83BEE7C6D3ACA5DBE1FD8FABF1') # "Steven R. Loomis (ICU Project) <srl@icu-project.org>"
+validpgpkeys+=('FFA9129A180D765B7A5BEA1C9B432B27D1BA20D7') # "Fredrik Roubert <fredrik@roubert.name>"
+validpgpkeys+=('E4098B78AFC94394F3F49AA903996C7C83F12F11') # "keybase.io/srl295 <srl295@keybase.io>"
+
+prepare() {
+ cd icu
+
+ # https://unicode-org.atlassian.net/browse/ICU-20884
+ patch -Np2 -i ../icu-65.1-initialized-buffer-uloc_getKeywordValue.patch
+
+ # https://github.com/unicode-org/icu/pull/971
+ patch -Np2 -i ../icu-65.1-prevent-SEGV_MAPERR-in-append.patch
+
+ # icu-parabola.conf will go in /etc/ld.so.conf.d
+ echo "/opt/parabola/icu/lib" > icu-parabola.conf
+}
+
+build() {
+ cd icu/source
+ ./configure \
+ --prefix=/opt/parabola/icu \
+ --sbindir=/opt/parabola/icu/bin
+ make
+}
+
+check() {
+ cd icu/source
+ make -k check
+}
+
+package() {
+ cd icu/source
+ make -j1 DESTDIR="${pkgdir}" install
+
+ # Add
+ install -d ${pkgdir}/etc/ld.so.conf.d/
+ install -Dm644 "${srcdir}"/icu/icu-parabola.conf "${pkgdir}/etc/ld.so.conf.d/icu-parabola.conf"
+
+ # Install license
+ install -Dm644 "${srcdir}"/icu/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}