PKGBUILDs/community/erlang/PKGBUILD

100 lines
3.6 KiB
Bash
Raw Normal View History

2018-07-11 13:50:46 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2021-01-11 15:00:25 +00:00
# Contributor: loqs
2018-07-11 13:50:46 +00:00
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Vesa Kaihlavirta <vesa@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Tom Burdick <thomas.burdick@wrightwoodtech.com>
# Contributor: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - configure with --disable-pgo to fix ARM FTBFS
pkgbase=erlang
2018-11-27 13:31:01 +00:00
pkgname=(erlang erlang-unixodbc)
2021-12-01 00:36:36 +00:00
pkgver=24.1.7
2021-09-25 16:06:19 +00:00
pkgrel=1
_docver=24.1
2018-11-27 13:31:01 +00:00
arch=(x86_64)
2021-05-12 20:23:49 +00:00
url='https://erlang.org'
2019-03-13 19:43:03 +00:00
license=(Apache)
2021-05-12 20:23:49 +00:00
makedepends=(fop git glu java-environment libxslt lksctp-tools mesa perl unixodbc wxgtk3)
2018-11-27 13:31:01 +00:00
options=(staticlibs)
2021-05-12 20:23:49 +00:00
source=(epmd.conf
2020-12-22 16:18:25 +00:00
epmd.service
2021-05-12 20:23:49 +00:00
epmd.socket
"$url/download/otp_doc_man_$_docver.tar.gz"
2021-12-01 00:36:36 +00:00
"git+https://github.com/erlang/otp#commit=5d0fa9d31812947479eb29f797990da6655d4fa2") # tag: OTP-24.1.7
2021-05-12 20:23:49 +00:00
b2sums=('1675ac9bf948ab19e8b63077d870ccf356fcdbce14de2777f00b3488aa1ce34a5e0a5cdc0428707f744dee5940b12653a44e0ded0554de95ebb31bce4676ff87'
'1f765318bcd322ce697a48c064ccdb1bd107b4a84e164a87f62678391cb82a9ab17a397d679cf266e037a5a2d91772b85f7a97f9cc5478c0f18118743b30045f'
'c37706f5f6e2d49100104fb442ebf15edd6ee0a1e8038d0364794cf34fd3f02a61b9ad2706228b3327b85b0cadcd11aac6087e7c98408eae2d307a09191b6553'
2021-09-25 16:06:19 +00:00
'092c7870914e108e3fe06b68be6c54cff508cd938b5b510ca9a7c946b786e5725ffa1f2c87282a36480a9c1c7d7c899e8118546102a98136f813309a7f0bd334'
2021-05-12 20:23:49 +00:00
'SKIP')
2018-07-11 13:50:46 +00:00
prepare() {
2021-09-03 13:11:42 +00:00
# use a hack so that erlang can find wx-config-gtk3 as wx-config in the $PATH
2020-12-22 16:18:25 +00:00
mkdir -p bin
2021-05-12 20:23:49 +00:00
ln -fs /usr/bin/wx-config-gtk3 bin/wx-config
2021-01-11 15:00:25 +00:00
export PATH="$srcdir/bin:$PATH"
2021-09-03 13:11:42 +00:00
2021-05-12 20:23:49 +00:00
sed -i 's/^LDFLAGS = /LDFLAGS += /g' otp/lib/megaco/src/flex/Makefile.in
sed -i 's/^LDFLAGS = /LDFLAGS += /g' otp/lib/odbc/c_src/Makefile.in
2018-07-11 13:50:46 +00:00
}
build() {
2020-12-22 16:18:25 +00:00
export PATH="$srcdir/bin:$PATH"
export WX_GKT_VER="3.0"
2021-05-12 20:23:49 +00:00
cd otp
./otp_build autoconf
2018-07-11 13:50:46 +00:00
./configure \
--enable-builtin-zlib \
--enable-smp-support \
2021-05-12 20:23:49 +00:00
--prefix=/usr \
2019-03-13 19:43:03 +00:00
--with-odbc \
2020-12-22 16:18:25 +00:00
--with-wx-config=/usr/bin/wx-config-gtk3 \
2018-07-11 13:50:46 +00:00
--disable-pgo
make
}
package_erlang() {
pkgdesc='General-purpose concurrent functional programming language developed by Ericsson'
2021-09-03 13:11:42 +00:00
depends=(glu ncurses openssl webkit2gtk wxgtk3)
2018-07-11 13:50:46 +00:00
optdepends=('erlang-unixodbc: database support'
'java-environment: for Java support'
'lksctp-tools: for SCTP support')
2019-03-13 19:43:03 +00:00
provides=(erlang-nox)
conflicts=(erlang-nox)
2018-07-11 13:50:46 +00:00
2020-12-22 16:18:25 +00:00
export PATH="$srcdir/bin:$PATH"
2018-07-11 13:50:46 +00:00
make -C otp DESTDIR="$pkgdir" install
# move files that belong to the erlang-unixodbc package
mkdir -p unixodbc
mv "$pkgdir/usr/lib/erlang/lib/odbc"* "$srcdir/unixodbc/"
# services and configuration
install -Dm644 epmd.service "$pkgdir/usr/lib/systemd/system/epmd.service"
install -Dm644 epmd.socket "$pkgdir/usr/lib/systemd/system/epmd.socket"
install -Dm644 epmd.conf "$pkgdir/etc/conf.d/epmd"
# readme and licenses
install -Dm644 otp/README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm644 otp/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2021-04-06 13:00:32 +00:00
install -Dm644 otp/CONTRIBUTING.md "$pkgdir/usr/share/doc/$pkgname/CONTRIBUTING.md"
install -Dm644 otp/AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUTHORS"
2018-07-11 13:50:46 +00:00
# man pages
cp -r man "$pkgdir/usr/lib/erlang/"
}
package_erlang-unixodbc() {
pkgdesc='Unixodbc support for Erlang'
2020-09-26 00:16:15 +00:00
depends=(erlang-nox unixodbc)
2018-07-11 13:50:46 +00:00
install -d "$pkgdir/usr/lib/erlang/lib"
mv unixodbc/* "$pkgdir/usr/lib/erlang/lib/"
install -Dm644 otp/LICENSE.txt \
"$pkgdir/usr/share/licenses/$pkgname/LICENCE.txt"
}
# getver: raw.githubusercontent.com/erlang/otp/maint/OTP_VERSION