summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXorg2015-01-23 19:34:25 +0100
committerXorg2015-01-23 19:34:25 +0100
commit0fed9547236c1064e1b60ad52ad49c623d666507 (patch)
tree69fb5e45bceabeac5bd8e4581b4102e5e36e1762
downloadaur-0fed9547236c1064e1b60ad52ad49c623d666507.tar.gz
Initial commit for darling-git
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD73
-rw-r--r--dyld16
4 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3b3e08661b2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = darling-git
+ pkgdesc = A Wine-like emulation layer that enables you to run Darwin/OS X apps on Linux
+ pkgver = 689.accadce
+ pkgrel = 12
+ url = http://www.darlinghq.org
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = nasm
+ makedepends = libkqueue
+ makedepends = gnustep-gui-clang-svn
+ depends = libbsd
+ depends = libsystemd
+ depends = openssl
+ depends = gnustep-corebase-clang-svn
+ optdepends = dmg2dir-git: extract OS X application from .dmg file
+ replaces = darling-multilib-git
+ backup = etc/darling/dylib.conf
+ source = git://github.com/LubosD/darling.git
+ source = dyld
+ md5sums = SKIP
+ md5sums = 9313524c87a422c9405ece68bd4ff4f2
+ makedepends_i686 = clang
+ makedepends_i686 = libgl
+ depends_x86_64 = lib32-libbsd
+ depends_x86_64 = lib32-systemd
+ depends_x86_64 = lib32-openssl
+ makedepends_x86_64 = lib32-clang
+ makedepends_x86_64 = lib32-libgl
+
+pkgname = darling-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..69f8c955383
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!dyld
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..75aa4a40b03
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: X0rg
+
+_gitname=darling
+pkgname=$_gitname-git
+pkgver=689.accadce
+pkgrel=12
+pkgdesc="A Wine-like emulation layer that enables you to run Darwin/OS X apps on Linux"
+arch=('i686' 'x86_64')
+url="http://www.darlinghq.org"
+license=('GPL3')
+depends=('libbsd' 'libsystemd' 'openssl' 'gnustep-corebase-clang-svn')
+depends_x86_64=('lib32-libbsd' 'lib32-systemd' 'lib32-openssl')
+makedepends=('git' 'nasm' 'libkqueue' 'gnustep-gui-clang-svn')
+makedepends_i686=('clang' 'libgl')
+makedepends_x86_64=('lib32-clang' 'lib32-libgl')
+optdepends=('dmg2dir-git: extract OS X application from .dmg file')
+backup=(etc/darling/dylib.conf)
+conflitcs=('darling-multilib-git')
+replaces=('darling-multilib-git')
+source=('git://github.com/LubosD/darling.git'
+ 'dyld')
+md5sums=('SKIP'
+ '9313524c87a422c9405ece68bd4ff4f2')
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+ echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+prepare() {
+ msg2 "Make 'build' directory..."
+ mkdir -pv "$srcdir/$_gitname/build"{,32}
+}
+
+build() {
+ cd "$srcdir/$_gitname/build"
+
+ msg2 "Run 'cmake'..."
+ CC="clang" CXX="clang++" CXXFLAGS="${CXXFLAGS//-O2}" cmake .. -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
+
+ msg2 "Run 'make'..."
+ make
+
+ if [[ $CARCH == "x86_64" ]]; then
+ # 32-bit build on x86_64
+ cd "$srcdir/$_gitname/build32"
+ source "/usr/share/GNUstep32/Makefiles/GNUstep.sh"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+ msg2 "Run 'cmake' (32-bit)..."
+ CC="clang -m32" CXX="clang++ -m32" CXXFLAGS="${CXXFLAGS//-O2}" cmake .. -DSUFFIX=32 -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
+
+ msg2 "Run 'make' (32-bit)..."
+ make
+ fi
+}
+
+package() {
+ cd "$srcdir/$_gitname/build"
+ msg2 "Install..."
+ make DESTDIR="$pkgdir" install
+
+ if [[ $CARCH == "x86_64" ]]; then
+ # 32-bit install on x86_64
+ cd "$srcdir/$_gitname/build32"
+ msg2 "Install (32-bit)..."
+ make DESTDIR="$pkgdir" install
+
+ msg2 "Install script dyld (auto-choosing for dyld32 or dyld64)..."
+ mv "$pkgdir/usr/bin/dyld" "$pkgdir/usr/bin/dyld64"
+ install -Dvm755 "$srcdir/dyld" "$pkgdir/usr/bin/dyld"
+ fi
+}
diff --git a/dyld b/dyld
new file mode 100644
index 00000000000..91f702f63b4
--- /dev/null
+++ b/dyld
@@ -0,0 +1,16 @@
+#!/usr/bin/sh
+
+if [[ -f $1 ]]; then
+ file -b $1 | grep -q "Mach-O" | grep -q "executable" 2> /dev/null || binary=$1
+fi
+
+if [[ -n $binary && $(file -b $binary) == *x86_64* ]]; then
+ echo -e "\t\t\033[1;44;37mDarling 64-bit:\033[0;44;37m `basename $binary`\033[0m"
+ /usr/bin/dyld64 $@
+elif [[ -n $binary && $(file -b $binary) == *i386* ]]; then
+ echo -e "\t\t\033[1;44;37mDarling 32-bit:\033[0;44;37m `basename $binary`\033[0m"
+ /usr/bin/dyld32 $@
+else
+ echo -e "\t\t\033[1;44;37mDarling 64-bit\033[0m"
+ /usr/bin/dyld64 $@
+fi