You are not logged in.

#1 2013-03-26 00:34:11

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,664

[solved] llvm & clang - how to combine multiple svn sources

Hi,

recently i created the aur package llvm-amdgpu-svn and am now looking into adding the svn clang, clang-analyzer and llvm-ocaml code also.
Since compiling clang requires the llvm source code to be present, it makes sense to use  a split package for this, like the official llvm package.

This page has the build instructions for clang  : http://clang.llvm.org/get_started.html

In short i need to do 4 svn checkouts, and 3 of them have to be in a specific directory.
All 4 checkouts share the same revision number.

I'd like to stick with the code in the svn prototype pkgbuild, but don't know how to adapt that to do 4 checkouts.

  if [[ -d "$_svnmod/.svn" ]]; then
    (cd "$_svnmod" && svn up -r "$pkgver")
  else
    svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
  fi

The main problem i have is whether i can use the 'svn up' part for all 4 checkouts.
Or should i just wait until pacman 4.1 is released and use it's new method for VCS sources ?

Last edited by Lone_Wolf (2013-03-28 14:27:41)


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#2 2013-03-28 14:32:04

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,664

Re: [solved] llvm & clang - how to combine multiple svn sources

Turns out it was simpler then i thought, this is what i'm using now :

  cd "$srcdir"
  msg "Connecting to llvm SVN server...."

  if [[ -d "$_svnmod/.svn" ]]; then
    (cd "$_svnmod" && svn up -r "$pkgver")
  else
    svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
  fi

# clang 
  msg "downloading clang"
  if [[ -d "$_svncfemod/.svn" ]]; then
    (cd "$_svncfemod" && svn up -r "$pkgver")
  else
    svn co "$_svncfetrunk" --config-dir ./ -r "$pkgver" "$_svncfemod"
  fi

# compiler rt
  msg "downloading compiler-rt"
  if [[ -d "$_svncrtmod/.svn" ]]; then
    (cd "$_svncrtmod" && svn up -r "$pkgver")
  else
    svn co "$_svncrttrunk" --config-dir ./ -r "$pkgver" "$_svncrtmod"
  fi
  
  msg "SVN checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_svnmod-build"
  msg "copying llvm"
  svn export "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  msg "copying clang"
  svn export "$srcdir/$_svncfemod" "$srcdir/$_svnmod-build/tools/clang"
  msg "copying compiler-rt"
  svn export "$srcdir/$_svncrtmod" "$srcdir/$_svnmod-build/projects/compiler-rt"

Using the correct vars and giving them the correct value was the hardest part.

Now it's onwards to creating the rest of the PKGBUILD.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

Board footer

Powered by FluxBB