You are not logged in.

#26 2013-06-04 18:44:48

mthinkcpp
Member
Registered: 2013-05-11
Posts: 23

Re: [FINISHED] libc++ PKGBUILD review

@ewaller
Thanks for the explanation on as to why not to use print statements. I saw other packages on the AUR using them and assumed it was the norm. (nothing on the wiki states otherwise, msg is unmentioned).
Updated package:

# Maintainer: MThinkCpp <mtc.maintainer[at]outlook.com>
pkgname='libc++'
pkgver=3.3
pkgrel=1
pkgdesc='C++ Standard Library implementation - libc++ is a new implementation of the C++ standard library, targeting C++11.'
url='http://libcxx.llvm.org'
license=('custom: University of Illinois "BSD-Like"')
arch=('i686' 'x86_64')

depends=('glibc' 'gcc-libs>=4.8') ##gcc-libs for libsupc++ binary
makedepends=('clang>=3.2' 'subversion' 'cmake' 'gcc') #gcc provides libsupc++ headers

source=("http://llvm.org/pre-releases/3.3/rc2/libcxx-3.3rc2-source.tar.gz") #Extracts to a folder ${srcdir}/libcxx.src
md5sums=('SKIP')

build() {
#get gcc libsupc++ include directories (and save to variables)
  _gcc_include_dir=/usr/include/c++/$(gcc -dumpversion)
  _gcc_platform_include_dir=${_gcc_include_dir}/$(gcc -dumpmachine)

#Build libc++ (see http://libcxx.llvm.org for more detail on the instructions)
#Build is done with clang
  mkdir "${srcdir}/libcxx.src/build"
  cd "${srcdir}/libcxx.src/build"
  CC=clang CXX=clang++ cmake -G "Unix Makefiles" -DLIBCXX_CXX_ABI=libsupc++ -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="${_gcc_include_dir};${_gcc_platform_include_dir}"\
			     -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "${srcdir}/libcxx.src"
  make
}
package() {
#license
  install -Dm644 "${srcdir}/libcxx.src/LICENSE.TXT" "$pkgdir/usr/share/licenses/$pkgname/license.txt"
#Install libc++ to the ${pkgdir}
  cd "${srcdir}/libcxx.src/build"
  make DESTDIR="${pkgdir}" install
}

Last edited by mthinkcpp (2013-06-04 18:46:38)

Offline

#27 2013-06-15 12:15:16

mthinkcpp
Member
Registered: 2013-05-11
Posts: 23

Re: [FINISHED] libc++ PKGBUILD review

Final package
(LLVM 3.3 is not yet released (website doesn't yet reflect it, nor does the clang mailing list or llvm-announce), but the files have been placed online)

# Maintainer: MThinkCpp <mtc.maintainer[at]outlook.com>
pkgname='libc++'
pkgver=3.3
pkgrel=1
pkgdesc='C++ Standard Library implementation - libc++ is a new implementation of the C++ standard library, targeting C++11.'
url='http://libcxx.llvm.org'
license=('custom: University of Illinois "BSD-Like"')
arch=('i686' 'x86_64')

depends=('glibc' 'gcc-libs>=4.8') ##gcc-libs for libsupc++ binary
makedepends=('clang>=3.2' 'subversion' 'cmake' 'gcc') #gcc provides libsupc++ headers

source=("http://www.llvm.org/releases/${pkgver}/libcxx-${pkgver}.src.tar.gz") #Extracts to a folder ${srcdir}/libcxx.src
md5sums=('SKIP')

build() {
#get gcc libsupc++ include directories (and save to variables)
  _gcc_include_dir=/usr/include/c++/$(gcc -dumpversion)
  _gcc_platform_include_dir=${_gcc_include_dir}/$(gcc -dumpmachine)

#Build libc++ (see http://libcxx.llvm.org for more detail on the instructions)
#Build is done with clang
  mkdir "${srcdir}/libcxx-${pkgver}.src/build"
  cd "${srcdir}/libcxx-${pkgver}.src/build"
  CC=clang CXX=clang++ cmake -G "Unix Makefiles" -DLIBCXX_CXX_ABI=libsupc++ -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="${_gcc_include_dir};${_gcc_platform_include_dir}"\
			     -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "${srcdir}/libcxx-${pkgver}.src"
  make
}
package() {
#license
  install -Dm644 "${srcdir}/libcxx-${pkgver}.src/LICENSE.TXT" "$pkgdir/usr/share/licenses/$pkgname/license.txt"
#Install libc++ to the ${pkgdir}
  cd "${srcdir}/libcxx-${pkgver}.src/build"
  make DESTDIR="${pkgdir}" install
}

Thanks to everyone who helped it to get to this stage (individual thanks in previous posts)

Update LLVM 3.3 now released (as of June 17th 2013, website release date).

Last edited by mthinkcpp (2013-06-18 16:42:21)

Offline

Board footer

Powered by FluxBB