diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rwxr-xr-x | bitrock-unpacker.tcl | 122 |
3 files changed, 11 insertions, 138 deletions
@@ -1,24 +1,21 @@ pkgbase = microchip-mplabxc8-bin pkgdesc = Microchip's MPLAB XC8 C compiler toolchain for their PIC10/12/16/18 microcontroller families and their PIC14000 device - pkgver = 2.20 + pkgver = 2.31 pkgrel = 1 url = http://www.microchip.com/mplab/compilers install = microchip-mplabxc8-bin.install arch = x86_64 license = custom - makedepends = sdx - makedepends = lib32-tclkit - depends = lib32-gcc-libs + makedepends = bitrock-unpacker + depends = gcc-libs options = !strip options = docs options = libtool options = emptydirs options = !zipman options = staticlibs - source = http://ww1.microchip.com/downloads/en/DeviceDoc/xc8-v2.20-full-install-linux-installer.run - source = bitrock-unpacker.tcl - md5sums = d3b7abb755587ea4efdffb00a6a8485f - md5sums = 70dedba4c417f8c0bb07c32d19e9d197 + source = http://ww1.microchip.com/downloads/en/DeviceDoc/xc8-v2.31-full-install-linux-x64-installer.run + md5sums = 3e628d7048dddd54a9247d16a6d05baa pkgname = microchip-mplabxc8-bin @@ -3,20 +3,19 @@ _number_of_bits=8 pkgname=microchip-mplabxc${_number_of_bits}-bin -pkgver=2.20 +pkgver=2.31 pkgrel=1 pkgdesc="Microchip's MPLAB XC${_number_of_bits} C compiler toolchain for their PIC10/12/16/18 microcontroller families and their PIC14000 device" arch=(x86_64) url=http://www.microchip.com/mplab/compilers license=(custom) -depends=(lib32-gcc-libs) -makedepends=(sdx lib32-tclkit) +depends=(gcc-libs) +makedepends=(bitrock-unpacker) options=(!strip docs libtool emptydirs !zipman staticlibs ) -source=("http://ww1.microchip.com/downloads/en/DeviceDoc/xc${_number_of_bits}-v${pkgver}-full-install-linux-installer.run" "bitrock-unpacker.tcl") +source=("http://ww1.microchip.com/downloads/en/DeviceDoc/xc${_number_of_bits}-v${pkgver}-full-install-linux-x64-installer.run") -md5sums=('d3b7abb755587ea4efdffb00a6a8485f' - '70dedba4c417f8c0bb07c32d19e9d197') +md5sums=('3e628d7048dddd54a9247d16a6d05baa') install=$pkgname.install _instdir="opt/microchip/xc${_number_of_bits}/v${pkgver}" @@ -25,7 +24,7 @@ PKGEXT='.pkg.tar' build() { msg2 "Unpacking files from installer" - ./bitrock-unpacker.tcl ./xc${_number_of_bits}-v${pkgver}-full-install-linux-installer.run ./unpacked.vfs + bitrock-unpacker ./xc${_number_of_bits}-v${pkgver}-full-install-linux-x64-installer.run ./unpacked.vfs } package() { @@ -36,7 +35,6 @@ package() { sed -i "s/<xclm>/<xclm>\n\t<xclm:LicenseDirectory xclm:path=\"\/opt\/microchip\/xclm\/license\/\" \/>/" \ unpacked.vfs/licensecomponent/LinuxLMBin/etc/xclm.conf mv unpacked.vfs/licensecomponent/LinuxLMBin/etc/xclm.conf "${pkgdir}/${_instdir}/etc" - mv unpacked.vfs/licensecomponent/LinuxLMBin/docs/* "${pkgdir}/${_instdir}/docs" mv "${pkgdir}/${_instdir}"/*License.txt "${pkgdir}/${_instdir}/docs" 2>/dev/null || true mkdir -p "${pkgdir}/etc/profile.d" diff --git a/bitrock-unpacker.tcl b/bitrock-unpacker.tcl deleted file mode 100755 index 43d99e0538ab..000000000000 --- a/bitrock-unpacker.tcl +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env tclkit -# -# Bitrock unpacking script -# This script should be executed using 32-bit tclkit because -# it uses Tcllzmadec provided by the installer blob which likely only -# contains the 32 bit tcl lzma decompression shared opject, liblzmadec0.2.so -# Author : mickael9 <mickael9 at gmail dot com> - -source /usr/bin/sdx.kit - -if {$argc < 2} { - puts "Usage: $argv0 installerFile outputDirectory" - exit 1 -} - -set installerFile [lindex $argv 0] -set destDir [lindex $argv 1] - -set installerMount /installer -set dataMount /installerData - -vfs::mk4::Mount $installerFile $installerMount -readonly - -lappend auto_path $installerMount/libraries/ -package require vfs::cookfs -package require Tcllzmadec - -# progress from http://wiki.tcl.tk/16939 (sligtly modified) -# thanks to the author -proc progress {cur tot} { - # set to total width of progress bar - set total 76 - - if {$cur == $tot} { - # cleanup - set str "\r[string repeat " " [expr $total + 4]]\r" - } else { - set half [expr {$total/2}] - set percent [expr {100.*$cur/$tot}] - set val (\ [format "%6.2f%%" $percent]\ ) - set str "\r|[string repeat = [ - expr {round($percent*$total/100)}]][ - string repeat { } [expr {$total-round($percent*$total/100)}]]|" - set str "[string range $str 0 $half]$val[string range $str [expr {$half+[string length $val]-1}] end]" - } - puts -nonewline stderr $str -} - -# Read cookfs options -set optionsFile [open $installerMount/cookfsinfo.txt] -set options [read $optionsFile] -close $optionsFile - -# Read the manifest -set manifestFile [open $installerMount/manifest.txt] -set manifest [read $manifestFile] -close $manifestFile - -# Mount the files to $dataMount -vfs::cookfs::Mount {*}$options $installerFile $dataMount - -puts "Creating directories..." -foreach {fileName props} $manifest { - set type [lindex $props 0] - - if {$type == "directory"} { - set mode [lindex $props 1] - file mkdir $destDir/$fileName - } -} - -puts "Unpacking files, please wait..." - -set entryCount [expr [llength $manifest] / 2] -set entryIndex 0 - -foreach {fileName props} $manifest { - set type [lindex $props 0] - - if {$type == "file"} { - set mode [lindex $props 1] - set sizes [lindex $props 4] - set nparts [llength $sizes] - set index 1 - - file mkdir [file dirname $destDir/$fileName] - file copy -force $dataMount/$fileName $destDir/$fileName - - if {$nparts > 0} { - set fp [open $destDir/$fileName a] - fconfigure $fp -translation binary - - while {$index < $nparts} { - set chunkName $dataMount/${fileName}___bitrockBigFile$index - set fp2 [open $chunkName r] - fconfigure $fp2 -translation binary - puts -nonewline $fp [read $fp2] - close $fp2 - incr index - } - close $fp - } - - file attributes $destDir/$fileName -permissions $mode - } - - incr entryIndex - progress $entryIndex $entryCount -} - -puts "Creating links..." - -foreach {fileName props} $manifest { - set type [lindex $props 0] - - if {$type == "link"} { - set linkTarget [lindex $props 1] - file delete $destDir/$fileName - file link -symbolic $destDir/$fileName $linkTarget - } -} -puts "Done" |