Skip to content

Instantly share code, notes, and snippets.

@yousry
Created October 7, 2016 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yousry/cb389246ff786f8690fe4d33660d28be to your computer and use it in GitHub Desktop.
Save yousry/cb389246ff786f8690fe4d33660d28be to your computer and use it in GitHub Desktop.
Discussion: PKGBUILD forgnustep-libobjc
# Maintainer: X0rg
_svnname=gnustep-libobjc2
pkgname=$_svnname-clang-svn
epoch=1
pkgver=r38298
pkgrel=1
pkgdesc="The GNUstep Objective-C runtime is designed as a drop-in replacement for the GCC runtime, using Clang"
arch=('x86_64')
url="http://www.gnustep.org/"
license=('custom:MIT')
groups=('gnustep-clang-svn')
makedepends=('subversion' 'cmake' 'gnustep-make-clang-svn')
makedepends_x86_64=('clang')
optdepends_x86_64=('lib32-libdispatch-clang-git: enable libdispatch at compilation after installing gnustep-libobjc2-clang-svn then lib32-libdispatch-clang-git')
conflicts=('gnustep-libobjc2-git' 'gnustep-libobjc2-multilib-clang-svn')
replaces=('gnustep-libobjc2-multilib-clang-svn')
source=("https://github.com/gnustep/libobjc2.git")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$_svnname"
local ver="$(svnversion)"
printf "r%s" "${ver//[[:alpha:]]}"
}
prepare() {
msg2 "Create 'build' directory..."
mkdir -pv "$srcdir/$_svnname/build"
msg2 "Delete 'GNUmakefile' file..."
rm -v "$srcdir/$_svnname/GNUmakefile"
}
build() {
cd "$srcdir/$_svnname/build"
msg2 "Run 'cmake'..."
OBJCFLAGS="-fblocks" CC="clang" CXX="clang++" LDFLAGS="${LDFLAGS//,--as-needed}" cmake .. -DLIBOBJC_NAME=objc2
msg2 "Run 'make'..."
make
}
package() {
cd "$srcdir/$_svnname/build"
msg2 "Install..."
make DESTDIR="$pkgdir" install
msg2 "Install the license..."
install -Dvm644 "../COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment