diff options
author | Fantix King | 2015-11-19 16:28:53 +0800 |
---|---|---|
committer | Fantix King | 2015-11-19 16:31:01 +0800 |
commit | 01ff1f4a8b1fee687aee066868eb4fd4ef04c935 (patch) | |
tree | a6f44e55c369dcb4bf91975cef4fb0ac4bebb190 | |
parent | f567893243ba107c217aa2b3292c837d1e84639a (diff) | |
download | aur-01ff1f4a8b1fee687aee066868eb4fd4ef04c935.tar.gz |
2.4.1-1.2 fix header
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | libx32-mpdecimal.install | 21 | ||||
-rw-r--r-- | mpdecimal-stub.h | 13 |
4 files changed, 50 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = libx32-mpdecimal pkgdesc = Package for correctly-rounded arbitrary precision decimal floating point arithmetic (x32 ABI) pkgver = 2.4.1 - pkgrel = 1.1 + pkgrel = 1.2 url = http://www.bytereef.org/mpdecimal/index.html arch = i686 arch = x86_64 @@ -9,7 +9,10 @@ pkgbase = libx32-mpdecimal depends = libx32-glibc depends = mpdecimal source = http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.4.1.tar.gz + source = mpdecimal-stub.h sha512sums = 60073ec82faff1ef9a5955a98f7f1320b044ff03bf8589bfe139b4721ae44c943e16bb36e1e61d9c6016529ba460d879bcbb17ea17cd875b27caa7caea211d45 + sha512sums = c2a271daf129be4b2bb538c76add6491a59ff47b3c927cafaa2ba9440a1f2dbdb9670284188c051a2c0470184a560244d458b0d46b6f8e95b65114774a06114d pkgname = libx32-mpdecimal + install = libx32-mpdecimal.install @@ -5,13 +5,14 @@ _basepkgname=mpdecimal pkgname=libx32-$_basepkgname pkgver=2.4.1 -pkgrel=1.1 +pkgrel=1.2 pkgdesc="Package for correctly-rounded arbitrary precision decimal floating point arithmetic (x32 ABI)" arch=('i686' 'x86_64') url="http://www.bytereef.org/mpdecimal/index.html" license=('custom') depends=('libx32-glibc' $_basepkgname) -source=(http://www.bytereef.org/software/${_basepkgname}/releases/${_basepkgname}-${pkgver}.tar.gz) +source=(http://www.bytereef.org/software/${_basepkgname}/releases/${_basepkgname}-${pkgver}.tar.gz + 'mpdecimal-stub.h') build() { cd ${_basepkgname}-${pkgver} @@ -25,12 +26,19 @@ build() { } package() { + install="${pkgname}.install" + cd ${_basepkgname}-${pkgver} make DESTDIR="${pkgdir}" install - rm -rf "${pkgdir}"/usr/{include,share} + mv "${pkgdir}/usr/include/mpdecimal.h" "${srcdir}/mpdecimal-x32.h" + rm -rf "${pkgdir}"/usr/share + install -Dm644 "${srcdir}/mpdecimal-x32.h" "${pkgdir}/usr/include/mpdecimal-x32.h" + install -Dm644 "${srcdir}/mpdecimal-stub.h" "${pkgdir}/usr/include/mpdecimal-stub.h" + mkdir -p "$pkgdir/usr/share/licenses" ln -s $_basepkgname "$pkgdir/usr/share/licenses/$pkgname" } -sha512sums=('60073ec82faff1ef9a5955a98f7f1320b044ff03bf8589bfe139b4721ae44c943e16bb36e1e61d9c6016529ba460d879bcbb17ea17cd875b27caa7caea211d45') +sha512sums=('60073ec82faff1ef9a5955a98f7f1320b044ff03bf8589bfe139b4721ae44c943e16bb36e1e61d9c6016529ba460d879bcbb17ea17cd875b27caa7caea211d45' + 'c2a271daf129be4b2bb538c76add6491a59ff47b3c927cafaa2ba9440a1f2dbdb9670284188c051a2c0470184a560244d458b0d46b6f8e95b65114774a06114d') diff --git a/libx32-mpdecimal.install b/libx32-mpdecimal.install new file mode 100644 index 000000000000..96e1dde78576 --- /dev/null +++ b/libx32-mpdecimal.install @@ -0,0 +1,21 @@ +post_install() { + mv /usr/include/mpdecimal.h /usr/include/mpdecimal-64.h + ln -s mpdecimal-stub.h /usr/include/mpdecimal.h +} + +post_upgrade() { + if [ ! -L /usr/include/mpdecimal.h ]; then + post_install + elif [ ${1::-2} != ${2::-2} ]; then + echo WARNING: libx32-mpdecimal is upgraded before mpdecimal, + echo WARNING: you probably need to reinstall libx32-mpdecimal. + fi +} + +post_remove() { + if [ -L /usr/include/mpdecimal.h ]; then + rm /usr/include/mpdecimal.h + mv /usr/include/mpdecimal-64.h /usr/include/mpdecimal.h + fi +} + diff --git a/mpdecimal-stub.h b/mpdecimal-stub.h new file mode 100644 index 000000000000..96ef43b94941 --- /dev/null +++ b/mpdecimal-stub.h @@ -0,0 +1,13 @@ +// This is replaced by libx32-mpdecimal. +// Old file is renamed to mpdecimal-64.h. + +#if !defined __x86_64__ +# include "mpdecimal-x32.h" // no lib32-mpdecimal yet +#endif +#if defined __x86_64__ && defined __LP64__ +# include "mpdecimal-64.h" +#endif +#if defined __x86_64__ && defined __ILP32__ +# include "mpdecimal-x32.h" +#endif + |