diff options
author | Guillaume Maudoux | 2015-12-11 15:34:31 +0100 |
---|---|---|
committer | Guillaume Maudoux | 2015-12-14 11:12:57 +0100 |
commit | c9eb5a00a133750fdd44716c204eb242340c0da4 (patch) | |
tree | c721f6b281570df1f5e12a3ffc1d8dd714abfa21 | |
download | aur-c9eb5a00a133750fdd44716c204eb242340c0da4.tar.gz |
Import from AUR3
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 111 | ||||
-rw-r--r-- | mozart2-git.install | 15 |
3 files changed, 163 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..56ca2ba2d519 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +# Generated by mksrcinfo v8 +pkgbase = mozart2-git + pkgdesc = The Mozart Programming System version 2 + pkgver = v2.0.0.alpha.0.4141.ga2413d4 + pkgrel = 1 + url = https://github.com/mozart/mozart2 + install = mozart2-git.install + arch = i686 + arch = x86_64 + license = BSD + makedepends = java-runtime-headless + makedepends = emacs + makedepends = gcc + makedepends = boost + makedepends = cmake + makedepends = gtest + makedepends = sbt-extras-git + makedepends = clang + makedepends = llvm + depends = boost-libs + depends = tk>=8.6.0 + depends = tk<8.7.0 + depends = gmp + depends = hicolor-icon-theme + depends = xdg-utils + optdepends = emacs: Interactive programming interface (recommended) + provides = mozart + conflicts = mozart + conflicts = mozart-git + conflicts = mozart2 + source = git+http://github.com/mozart/mozart2.git + source = git+http://github.com/mozart/mozart2-stdlib.git + sha256sums = SKIP + sha256sums = SKIP + +pkgname = mozart2-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1483300c7a59 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,111 @@ +# Maintainer: Guillaume Maudoux <layus DOT on @AT@ gmail DOT com> + +pkgname=mozart2-git +pkgver=v2.0.0.alpha.0.4141.ga2413d4 +pkgrel=1 +pkgdesc="The Mozart Programming System version 2" +arch=('i686' 'x86_64') +url="https://github.com/mozart/mozart2" +license=('BSD') +depends=('boost-libs' 'tk>=8.6.0' 'tk<8.7.0' 'gmp' 'hicolor-icon-theme' 'xdg-utils') +optdepends=('emacs: Interactive programming interface (recommended)') +makedepends=('java-runtime-headless' 'emacs' 'gcc' 'boost' 'cmake' 'gtest' 'sbt-extras-git' 'clang' 'llvm') +provides=('mozart') +conflicts=('mozart' 'mozart-git' 'mozart2') +install="${pkgname}.install" +source=( + 'git+http://github.com/mozart/mozart2.git' + 'git+http://github.com/mozart/mozart2-stdlib.git' +) +sha256sums=( + 'SKIP' + 'SKIP' +) + +pkgver() { + cd "mozart2" + git describe --always | sed 's|-|.|g' +} + +_patch(){ + cd "$srcdir/mozart2" + + patch -p 1 < $srcdir/231.patch + + # We use the packaged gtest, which contains only shared objects. + # Make Mozart use dynamic libgtest. + sed -i'' \ + -e '/add_library/s/STATIC/SHARED/' \ + -e '/libgtest/s/\.a/.so/' \ + $srcdir/mozart2/vm/vm/test/CMakeLists.txt + + # Add required libraries to executable. + # TODO : Explore clang build process, I have no idea why this may be needed. + # Normally ld should be able to identify required LLVM/Clang libs by itself. + libs="LLVM-3.6 clang clangTooling clangFrontendTool clangFrontend \ + clangDriver clangSerialization clangCodeGen clangParse clangSema \ + clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers \ + clangStaticAnalyzerCore clangAnalysis clangARCMigrate clangEdit \ + clangAST clangLex clangBasic" + sed -i'' \ + -e "s%(generator \"\${CLANG_LIBRARY}\"%\\0 $libs%" \ + $srcdir/mozart2/vm/generator/main/CMakeLists.txt + + # Set SBT to packaged command. + # We use the option '-no-share' from the sbt package. + # This avoids a bug when running sbt in fakeroot (trying to access /root/.{sbt,ivy2} fails) + # This is only available because of the wrapper provided in the ArchLinux 'sbt' package. + # It also avoids mingling with user ~/.sbt/* + # TODO : remove/bypass/configure sbt to allow offline compilation + sed -i'' '/set(SBT/{N; s/set(\s*SBT.*)/set(SBT sbt -offline -no-share -batch)/}' \ + $srcdir/mozart2/bootcompiler/CMakeLists.txt + + # Remove hard-coded palette settings in QTk (Avoids bug in GUI's on Linux). + sed -i'' '/tk_setPalette/s/^/%/' \ + $srcdir/mozart2/stdlib/wp/qtk/QTkBare.oz +} + +prepare() { + cd "$srcdir/mozart2" + git submodule init + git config submodule.stdlib.url "$srcdir/mozart2-stdlib" + git submodule update + + # Ultimately this should not be needed. + #_patch + + # download scala/sbt sources for later offline compilation. + pushd bootcompiler &>/dev/null + sbt -no-share -batch + popd &>/dev/null +} + +build() { + cd "$srcdir/mozart2" + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/ \ + #-DMOZART_BOOST_USE_STATIC_LIBS=OFF \ + #-DGTEST_BUILD_DIR=/usr/lib/ \ + #-DGTEST_SRC_DIR=/usr/include/gtest/ \ + #-DLLVM_BUILD_DIR=/usr/ \ + #-DLLVM_SRC_DIR=/usr/ + + make -j1 # VERBOSE=1 +} + +check() { + cd "$srcdir/mozart2" + make vmtest + ./vm/vm/test/vmtest +} + +package() { + cd "$srcdir/mozart2" + make DESTDIR="$pkgdir/" install + + install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + + +# vim:set ts=4 sw=4 et: diff --git a/mozart2-git.install b/mozart2-git.install new file mode 100644 index 000000000000..f4d378b2dbf4 --- /dev/null +++ b/mozart2-git.install @@ -0,0 +1,15 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor + update-desktop-database -q + update-mime-database usr/share/mime > /dev/null 2>&1 +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} + +# vim:set ts=4 sw=4 et: |