blob: da781eb99a8a79bb4aa0d9e401fd36809b5e346a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Maintainer: X0rg
_kernel=$(pacman -Qqo /usr/lib/modules/`uname -r` | grep linux | grep -v headers)
_gitname=darling
pkgname=$_gitname-git
pkgver=1195.2ad7ce5
pkgrel=2
pkgdesc="A Darwin/OS X emulation layer for Linux"
arch=('x86_64') # Can only be built on x86_64 systems
url="http://www.darlinghq.org"
license=('GPL3')
depends=('xz' 'fuse' 'libxml2' 'icu' 'openssl' 'lbzip2' 'zlib' 'libunwind' 'curl' 'systemd' 'libffi' 'bzip2' 'libxslt')
depends_x86_64=('lib32-systemd' 'lib32-libffi' 'lib32-bzip2' 'lib32-libxslt')
makedepends=('git' 'clang' 'bison' 'flex' "$_kernel-headers")
install=$pkgname.install
source=('git+https://github.com/darlinghq/darling.git')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$_gitname"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
prepare() {
cd "$srcdir/$_gitname"
msg2 "Initialize git submodules..."
sed -i 's|url = ../|url = https://github.com/darlinghq/|g' .gitmodules
git submodule update --init --recursive
msg2 "Make build directories..."
mkdir -pv "build/"{i386,x86-64}
sed -i 's/lib64/lib/' Toolchain-x86_64.cmake
}
build() {
# 32-bit build
cd "$srcdir/$_gitname/build/i386"
msg2 "Run 'cmake' for 32-bit build..."
LDFLAGS="${LDFLAGS//,--as-needed}" cmake ../.. -DCMAKE_TOOLCHAIN_FILE=../../Toolchain-x86.cmake -DCMAKE_INSTALL_PREFIX=/usr
msg2 "Run 'make' for 32-bit build..."
make
# 64-bit build
cd "$srcdir/$_gitname/build/x86-64"
msg2 "Run 'cmake' for 64-bit build..."
LDFLAGS="${LDFLAGS//,--as-needed}" cmake ../.. -DCMAKE_TOOLCHAIN_FILE=../../Toolchain-x86_64.cmake -DCMAKE_INSTALL_PREFIX=/usr
msg2 "Run 'make' for 64-bit build..."
make
# Kernel module build
cd "$srcdir/$_gitname/src/lkm"
msg2 "Build Linux kernel module..."
make
}
package() {
# 32-bit install
cd "$srcdir/$_gitname/build/i386"
msg2 "Install 32-bit build..."
make DESTDIR="$pkgdir" install
# 64-bit install
cd "$srcdir/$_gitname/build/x86-64"
msg2 "Install 64-bit build..."
make DESTDIR="$pkgdir" install
# Kernel module install
cd "$srcdir/$_gitname/src/lkm"
msg2 "Install Linux kernel module..."
make INSTALL_MOD_PATH="$pkgdir/usr" install
}
|