archrelease: copy trunk to community-any
[ArchLinux/community.git] / io / trunk / PKGBUILD
blob5a08bb93cf5fe7cffaa8ff357f38a4bab8acef9e
1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: loqs
3 # Contributor: Mark E.A.
4 # Contributor: Gergely Imreh <imrehg@gmail.com>
6 pkgname=io
7 pkgver=2017.09.06
8 pkgrel=9
9 pkgdesc='IO programming language'
10 arch=(x86_64)
11 url='https://iolanguage.org/'
12 license=(BSD)
13 depends=(freeglut freetype2 libedit libevent libjpeg-turbo libpng libsndfile libtheora libtiff libxml2 libxmu lzo mariadb-libs pcre python sqlite util-linux yajl)
14 makedepends=(cmake git)
15 options=(!makeflags)
16 source=("git+https://github.com/stevedekorte/io#commit=b8a18fc199758ed09cd2f199a9bc821f6821072a" # tag: 2017.09.06
17         'noexec.patch::https://github.com/IoLanguage/io/commit/5b88e9769c1d4629e9a4a01c78b57c0d80c7a70c.patch')
18 b2sums=('SKIP'
19         'bf7bf212349a88d707ca99fff48dfc08b0b4fbdc91a64a090e53c388e161f210d42e1dff590c5cda022c0519f2469ad9be5d4788c226632ad3d516389782912d')
21 prepare() {
22   cd $pkgname/libs/iovm/source
23   sed -ri "s,20[0-9]+,$pkgver," IoVersion.h
24   sed -i 's,sys/sysctl.h,linux/sysctl.h,g' IoSystem.c
27 build() {
28   CFLAGS+=' -ffat-lto-objects'
29   cmake \
30     -B build \
31     -D CMAKE_BUILD_TYPE=Release \
32     -D CMAKE_INSTALL_PREFIX=/usr \
33     -D CMAKE_SKIP_RPATH=1 \
34     -S $pkgname
36   # make is used instead of ninja, because ninja results in errors,
37   # even with '-w dupbuild=warn' and/or -w 'phonycycle=warn'
38   make -C build
41 package() {
42   DESTDIR="$pkgdir" make -C build install
44   # The dynamically linked io executable does not work, see FS#68674. The error is:
45   # Relink `/usr/lib/libbasekit.so' with `/usr/lib/libm.so.6' for IFUNC symbol `ceil'
46   # Use the statically linked executable instead.
47   mv -f "$pkgdir/usr/bin/io_static" "$pkgdir/usr/bin/io"
49   # In the next version of io, it's just $pkgname/LICENSE.txt
50   install -Dm644 $pkgname/license/bsd_license.txt \
51     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"