Skip to content
Permalink
Browse files

Fix executables and librairies / Up to release 2

  • Loading branch information...
X0rg committed Jul 4, 2013
1 parent 44a0f36 commit 5dd2cda944ea0f579e72c697792b3508bc679012
Showing with 25 additions and 10 deletions.
  1. +25 −10 darling-git/PKGBUILD
@@ -3,14 +3,17 @@
pkgname=darling-git
_gitname=darling
pkgver=548.1cdce3f
pkgrel=1
pkgrel=2
pkgdesc="Darwin/OS X emulation layer for Linux"
arch=('any')
url="http://darling.dolezel.info/en/Darling"
license=('GPL3')
depends=('gcc-libs' 'libxml2' 'gnutls' 'icu' 'cairo' 'libjpeg-turbo' 'libpng' 'libtiff' 'libbsd' 'systemd' 'lcms' 'openssl' 'bzip2' 'util-linux' 'ncurses' 'libxrandr' 'libkqueue0' 'gnustep-make-clang-git' 'gnustep-libobjc2-clang-git' 'gnustep-base-clang-git' 'gnustep-corebase-clang-git' 'gnustep-opal-clang-git' 'gnustep-gui-clang-git')
makedepends=('git' 'cmake' 'clang>=3.1' 'nasm' 'yasm' 'gcc>=4.6')
depends=('gcc-libs' 'libxml2' 'gnutls' 'icu' 'cairo' 'libjpeg-turbo' 'libpng' 'libtiff' 'libbsd' 'systemd' 'lcms' 'openssl' 'bzip2' 'util-linux' 'ncurses' 'libxrandr'
'libkqueue0' 'gnustep-make-clang-git' 'gnustep-libobjc2-clang-git' 'gnustep-base-clang-git' 'gnustep-corebase-clang-git' 'gnustep-opal-clang-git' 'gnustep-gui-clang-git')
makedepends=('git' 'clang>=3.1' 'nasm' 'yasm')
backup=(etc/darling/dylib.conf)
install=darling.install
options=('!buildflags') #Don't remove, else 'dyld' will have a "core dumped".
source=('git://github.com/LubosD/darling.git')
#source=('git://github.com/crwulff/darling.git') #GitHub Fork, LubosD + others commits
md5sums=('SKIP')
@@ -22,19 +25,19 @@ pkgver() {

prepare() {
cd $_gitname
if [[ $(locale -a | grep french) == "french" ]];then msg2 "Créé le dossier 'build'."
if [[ $(locale -a | grep french) == "french" ]];then msg2 "Créé le dossier 'build'..."
else
msg2 "Create 'build' directory."
msg2 "Create 'build' directory..."
fi
mkdir build
mkdir -v ./build

if [[ $(locale -a | grep french) == "french" ]];then

if [[ $(cat /usr/include/unistd.h | grep block, | cut -c28-35) != "__block," ]];then msg2 "Le fichier '/usr/include/unistd.h' est correct !"
else
warning "Si vous ne modifiez pas le fichier '/usr/include/unistd.h', make va échouer !"
msg2 "Il faut remplacer '__block' par '__block_hacked' pour corriger cela."
msg2 "Voulez-vous corriger ceci automatiquement ? Le fichier de sauvegarde /usr/include/unistd.h.BAK sera créé. [O|n]"
msg2 "Voulez-vous corriger ceci automatiquement ? Le fichier de sauvegarde /usr/include/unistd.h.BAK sera créé. [O/n]"
read -n 1 edit_file

if [[ $edit_file == "n" ]];then error "Le fichier ne sera pas modifié. Make va échouer. Le paquet ne sera pas créé."
@@ -52,7 +55,7 @@ prepare() {
else
warning "If you don't edit the file '/usr/include/unistd.h', make would fail !"
msg2 "It need to replace '__block' by '__block_hacked' to fix it."
msg2 "Do you want to fix it automatically ? Backup file /usr/include/unistd.h.BAK will be created. [Y|n]"
msg2 "Do you want to fix it automatically ? Backup file /usr/include/unistd.h.BAK will be created. [Y/n]"
read -n 1 edit_file

if [[ $edit_file == "n" ]];then error "File will be not modified. Make will fail. Package will not be created."
@@ -69,12 +72,13 @@ prepare() {

build() {
cd $_gitname/build
source /etc/profile.d/GNUstep.sh

if [[ $(locale -a | grep french) == "french" ]];then msg2 "Exécute 'cmake'..."
else
msg2 "Run 'cmake'..."
fi
CC=clang CXX=clang++ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr
CC=clang CXX=clang++ LDFLAGS="-L/usr/share/GNUstep/lib" cmake -DCMAKE_INSTALL_PREFIX=/usr ..

if [[ $(locale -a | grep french) == "french" ]];then msg2 "Exécute 'make'..."
else
@@ -85,5 +89,16 @@ build() {

package() {
cd $_gitname/build
make DESTDIR="$pkgdir" install
make DESTDIR=$pkgdir install

This comment has been minimized.

Copy link
@X0rg

X0rg Jul 7, 2013

Author Owner

Thanks to FoolEcho !

if [[ $(locale -a | grep french) == "french" ]];then msg2 "Crée les nouveaux exécutables..."
else
msg2 "Create new executables..."
fi
mkdir -v -p $pkgdir/usr/share/$pkgname
mv -v $pkgdir/usr/bin/dyld $pkgdir/usr/bin/motool $pkgdir/usr/share/$pkgname
(set -x ; echo -e "#!/usr/bin/sh\n\nexport LD_LIBRARY_PATH=/usr/share/GNUstep/lib\n/usr/share/$pkgname/dyld \$1" > $pkgdir/usr/bin/dyld)
(set -x ; echo -e "#!/usr/bin/sh\n\nexport LD_LIBRARY_PATH=/usr/share/GNUstep/lib\n/usr/share/$pkgname/motool \$1" > $pkgdir/usr/bin/motool)
chmod -v --reference=$pkgdir/usr/share/$pkgname/dyld $pkgdir/usr/bin/dyld
chmod -v --reference=$pkgdir/usr/share/$pkgname/dyld $pkgdir/usr/bin/motool
}

0 comments on commit 5dd2cda

Please sign in to comment.
You can’t perform that action at this time.