Advertisement
Guest User

PKGBUILD for mspds-3.12.000.004-1-x86_64.pkg.tar.xz

a guest
Apr 5th, 2018
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.97 KB | None | 0 0
  1. # Maintainer: Christopher Bero <bigbero@gmail.com>
  2. # Taken from https://aur.archlinux.org/packages/mspds
  3. # PKGBUILD copied from https://github.com/greigdp/msp430-mspds
  4. # Contributor: Alexei Colin <ac@alexeicolin.com>
  5. pkgname=mspds
  6. pkgver=3.12.000.004
  7. pkgrel=1
  8. pkgdesc="MSP430 Debug Stack. Contains a dynamic link library as well as embedded firmware that runs on the MSP-FET430UIF or the eZ430 emulators."
  9. arch=('i686' 'x86_64')
  10. url="http://www.ti.com/tool/mspds"
  11. # Licenses were found in "Manifest MSPDebugStack OS Package.pdf" from the mspds source archive.
  12. license=('custom:TI BSD' 'custom:IAR BSD' 'custom: TI TSPA')
  13. group=('msp430')
  14. depends=('hidapi' 'boost')
  15. makedepends=('unzip' 'dos2unix')
  16. optdepends=('mspdebug')
  17. _release='slac460x'
  18. _releasefile="${_release}.zip"
  19. noextract=("${_releasefile}")
  20. source=("http://www.ti.com/lit/sw/${_release}/${_releasefile}"
  21.         'hidapi.patch')
  22. sha256sums=('c6bf24338b50f6ce8f6f0127ec2673e10add251e0a89e894fd30897eaa4e0cbc'
  23.             'aa2bdb86118a84423f3df752f48d90d2ebcb1e1bbc5293bdfd7fb1c62f765a34')
  24.  
  25.  
  26. prepare() {
  27.     unzip ${_releasefile}
  28.     find ./ -type f -exec dos2unix -q '{}' \;
  29.     # This hidapi patch allows us to build mspds from the hidapi Archlinux package rather than the v0.7 source.
  30.     patch -p1 -d . < ../hidapi.patch
  31.     sed -i 's/^\/\/\(#define FPGA_UPDATE\)/\1/' $srcdir/DLL430_v3/src/TI/DLL430/UpdateManagerFet.cpp
  32.     ## resolve conflict between std::chrono and boost::chrono
  33.     grep -Rl '(chrono::' $srcdir | xargs -- sed -i 's/(chrono::/(std::chrono::/'
  34.     ## resolve conflict between std::ofstream and boost::chrono
  35.     egrep -Rl '\sofstream' $srcdir | xargs -- sed -i 's/ofstream/std::ofstream/'
  36.     ## boost::asio::io_service was renamed to boost::asio::io_context in 1.66
  37.     egrep -Rl '::io_service' $srcdir | xargs -- sed -i 's/::io_service/::io_context/'
  38. }
  39.  
  40. build() {
  41.     cd "$srcdir"
  42.     make
  43. }
  44.  
  45. package() {
  46.     install -Dm644 "$srcdir/libmsp430.so" "$pkgdir/usr/lib/libmsp430.so"
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement