summaryrefslogtreecommitdiff
path: root/libre/icu-65-compat/PKGBUILD
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-06-11 11:02:26 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-06-11 16:43:01 +0200
commit8caa1ac001b4bb4f6137239c9516119e3b9206f6 (patch)
treebeb671cc68e37530fbc694d3988ff9d7cf0fa499 /libre/icu-65-compat/PKGBUILD
parent08de71b1e72e9cd59b43b2cfc607adda36298c5f (diff)
downloadabslibre-8caa1ac001b4bb4f6137239c9516119e3b9206f6.tar.gz
abslibre-8caa1ac001b4bb4f6137239c9516119e3b9206f6.tar.bz2
abslibre-8caa1ac001b4bb4f6137239c9516119e3b9206f6.zip
libre: icu: enable to provide compatibility for multiple versions
This should enable to have more than one compatibility library at the same time. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/icu-65-compat/PKGBUILD')
-rw-r--r--libre/icu-65-compat/PKGBUILD144
1 files changed, 144 insertions, 0 deletions
diff --git a/libre/icu-65-compat/PKGBUILD b/libre/icu-65-compat/PKGBUILD
new file mode 100644
index 000000000..edd52b8ef
--- /dev/null
+++ b/libre/icu-65-compat/PKGBUILD
@@ -0,0 +1,144 @@
+# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
+# Contributor (Arch): Art Gramlich <art@gramlich-net.com>
+# Contributor (Parabola): Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+# Contributor (Parabola): Eli Schwartz <eschwartz@archlinux.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 which depend
+# on ICU, as soon as the new ArchLinux, ArchLinux32, and ArchLinuxARM ICU
+# packages are synchronized into the Parabola repositories, we have a problem.
+# The repo server synchronizes with the upstream repos un-attended; so this
+# is a wonderful surprise each time; and we hustle frantucally to get the
+# system sane again. We could watch the testing and staging repos of each
+# upstream, and start re-building everything in a Parabola staging repo;
+# but that could result in discarded work, if those exact versions are not the
+# ones which are eventually released into [core].
+#
+# 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
+# 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 package. However this workaround also prevents
+# installing packages that depends on the new ICU.
+#
+# The correct fix would probably be to automatically build all the Packages
+# instead of relying on Arch Linux Packages. Still, a staging repo would be
+# required to hold the new packages, until they all can be released together sanely.
+# 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 at runtime. This enables all the Parabola packages to depend
+# only on the ICU version, which is usually the upstream distribution's ICU but
+# is occasionally this ICU if the Parabola package has not yet been rebuilt
+# after an ICU update.
+#
+# It is inspired by the admittedly awkward hack of versioned library
+# dependencies more commonly seen in e.g. the AUR as 'icu65' or somesuch which
+# proprietary binaries built against Debian's ICU will depend on, but awkward
+# is in the eyes of the beholder and this elegantly scales to Parabola's needs,
+# without consuming increasing resources, which is the best definition of "not
+# awkward".
+#
+# To use it, simply add the following dependency to any package which parabola
+# has built or rebuilt:
+#
+# depends=('libicui18n.so')
+#
+# or whichever shared library is reported by readelf -d /path/to/compiled/ELF/file
+# and, every time the upstream distribution upgrades ICU, update this package
+# as well, to ensure it always stays exactly one version behind.
+#
+# This works well for ICU, even for packages which link to both the older and
+# newer versions of libicu*.so, since ICU uses versioned symbols as reported by
+#
+# nm -D --demangle --with-symbol-versions /path/to/library
+#
+# However, caution must be taken before implementing the same idea for other
+# libraries. So the idea is to only use it for libraries that often have this
+# issue.
+#
+# Changes:
+# - remove all files other than libicu*.so.*
+# - depend on icu; this is needed because if the package is installed on its
+# own, ldconfig will create untracked symlinks which were supposed to be
+# installed by the icu package.
+
+pkgname=icu-65-compat
+_pkgname=icu
+pkgver=65.1
+pkgrel=3
+pkgrel+=.parabola2
+pkgdesc="International Components for Unicode library"
+pkgdesc+=" (compatibility libraries for the previous release)"
+arch=(x86_64)
+arch+=(armv7h i686)
+url="http://site.icu-project.org/home"
+license=('custom:icu')
+depends=('gcc-libs' 'sh')
+# require the main ICU version always be > this one
+depends+=("icu>$pkgver")
+conflicts=("icu<=$pkgver")
+makedepends=('python')
+provides=(libicu{data,i18n,io,test,tu,uc}.so)
+replaces=('icu-parabola')
+conflicts=('icu-parabola')
+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)
+# https://github.com/unicode-org/icu/releases/download/release-65-1/SHASUM512.txt - no checksum file for v67 release
+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>"
+validpgpkeys+=('4569BBC09DA846FC91CBD21CE1BBA44593CF2AE0') # "Steven R. Loomis (codesign-qormi) <srloomis@us.ibm.com>"
+
+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
+}
+
+build() {
+ cd icu/source
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --sbindir=/usr/bin
+ make
+}
+
+check() {
+ cd icu/source
+ make -k check
+}
+
+package() {
+ cd icu/source
+ make -j1 DESTDIR="${pkgdir}" install
+
+ # Install license
+ install -Dm644 "${srcdir}"/icu/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # to avoid conflicts against the preferred 'icu' package, we remove all files
+ # except the actual shared libraries
+ rm -r "${pkgdir}"/usr/{bin,include,lib/{icu,pkgconfig},share}
+ rm "${pkgdir}"/usr/lib/*.so
+}