Ticket #58117: Portfile

File Portfile, 16.8 KB (added by giansalvo (gians), 5 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2
3PortSystem          1.0
4PortGroup           github 1.0
5PortGroup           java 1.0
6
7# retrieving from Arduino master because broken dependency from OpenJFX was removed after 1.8.8 release
8github.setup        arduino Arduino 2b11e94afe85888bd5ebd507de6c6e0220a49bf3
9version             1.8.8-git
10
11java.version        1.8
12java.fallback       openjdk8
13
14revision            1
15categories          devel electronics java lang
16platforms           darwin
17maintainers         {gmail.com:giansalvo.gusinu @giansalvo} openmaintainer
18license             GPL-2
19
20# I'm not sure how to set the supported_archs keyword
21#supported_archs         noarch
22
23description         Arduino Software (IDE) makes it easy to write code and upload it to the board.
24
25long_description \
26    Arduino is an open-source electronics platform based on easy-to-use \
27    hardware and software. It's intended for anyone making interactive \
28    projects. The Arduino IDE runs on Windows, Mac OS X, and Linux. \
29    The environment is written in Java and based on Processing and other \
30    open-source software. This software can be used with any Arduino board.
31
32homepage            https://www.arduino.cc/
33
34#####
35# These files are missing from the following lists of master_sites and distfiles because filenames are duplicated.
36# They will be fetched during build phase
37#   https://github.com/arduino-libraries/TFT/archive/1.0.6.zip"
38#   https://github.com/arduino-libraries/RobotIRremote/archive/2.0.0.zip
39#   https://github.com/arduino-libraries/Esplora/archive/1.0.4.zip
40#   https://github.com/arduino-libraries/Mouse/archive/1.0.1.zip
41#   https://github.com/arduino-libraries/Servo/archive/1.1.3.zip
42#####
43master_sites-append https://downloads.arduino.cc/tools/:t1 \
44                    https://downloads.arduino.cc/:t2 \
45                    https://downloads.arduino.cc/cores/:t3 \
46                    https://github.com/arduino-libraries/Ethernet/archive/:t4 \
47                    https://github.com/arduino-libraries/GSM/archive/:t5 \
48                    https://github.com/arduino-libraries/Stepper/archive/:t6 \
49                    https://github.com/arduino-libraries/WiFi/archive/:t7 \
50                    https://github.com/firmata/arduino/archive/:t8 \
51                    https://github.com/arduino-libraries/Bridge/archive/:t9 \
52                    https://github.com/arduino-libraries/Robot_Control/archive/:t10 \
53                    https://github.com/arduino-libraries/Robot_Motor/archive/:t11 \
54                    https://github.com/arduino-libraries/SpacebrewYun/archive/:t12 \
55                    https://github.com/arduino-libraries/Temboo/archive/:t13 \
56                    https://github.com/arduino-libraries/Esplora/archive/:t14 \
57                    https://github.com/arduino-libraries/Keyboard/archive/:t15 \
58                    https://github.com/arduino-libraries/SD/archive/:t16 \
59                    https://github.com/arduino-libraries/LiquidCrystal/archive/:t17 \
60                    https://github.com/Adafruit/Adafruit_CircuitPlayground/archive/:t18 \
61                    https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v0.10.5/:t19 \
62                    https://downloads.arduino.cc/liblistSerials/:t20 \
63                   
64
65distfiles-append    arduino-builder-macosx-1.4.3.tar.bz2:t1 \
66                    avr-gcc-5.4.0-atmel3.6.1-arduino2-i386-apple-darwin11.tar.bz2:t1 \
67                    appbundler-1.0ea-arduino4.jar.zip:t2 \
68                    avrdude-6.3.0-arduino14-i386-apple-darwin11.tar.bz2:t1 \
69                    arduinoOTA-1.2.1-darwin_amd64.tar.bz2:t1 \
70                    avr-1.6.23.tar.bz2:t3 \
71                    reference-1.6.6-3.zip:t2 \
72                    Galileo_help_files-1.6.2.zip:t2 \
73                    Edison_help_files-1.6.2.zip:t2 \
74                    2.0.0.zip:t4 \
75                    1.0.6.zip:t5 \
76                    1.1.3.zip:t6 \
77                    1.2.7.zip:t7 \
78                    2.5.8.zip:t8 \
79                    1.7.0.zip:t9 \
80                    1.0.4.zip:t10 \
81                    1.0.3.zip:t11 \
82                    1.0.1.zip:t12 \
83                    1.2.1.zip:t13 \
84                    1.0.4.zip:t14 \
85                    1.0.2.zip:t15 \
86                    1.2.3.zip:t16 \
87                    1.0.7.zip:t17 \
88                    1.8.1.zip:t18 \
89                    WiFi101-Updater-ArduinoIDE-Plugin-0.10.5.zip:t19 \
90                    libastylej-2.05.1-4.zip:t2 \
91                    liblistSerials-1.4.2.zip:t20 \
92                    arduino-builder-macosx-1.4.3.tar.bz2:t1
93                   
94checksums           ${github.project}-${github.version}.tar.gz \
95                    rmd160  79434c36d66d117f775359d5b8b5033d13005200 \
96                    sha256  117da12bd853164b4ba74b6bc5b7a7289a84b973dae754513ebb61c76309e392 \
97                    size    38714163 \
98                    arduino-builder-macosx-1.4.3.tar.bz2 \
99                    rmd160  ac4f4a8ff50333a03b48f7ca7bfe1aa7241a5f6e \
100                    sha256  d9c8cb4f9135fc7c8d7b139c2f5f6a60e24962ca84f648e4c8e641d61ed3e07e \
101                    size    12495655 \
102                    avr-gcc-5.4.0-atmel3.6.1-arduino2-i386-apple-darwin11.tar.bz2 \
103                    rmd160  dd67195080be79dd1b72d53caa8922f43e74d092 \
104                    sha256  abc50137543ba73e227b4d1b8510fff50a474bacd24f2c794f852904963849f8 \
105                    size    31894498 \
106                    appbundler-1.0ea-arduino4.jar.zip \
107                    rmd160  1e6cb261a1f3f464e677eb7e288b29abd0e552b9 \
108                    sha256  1f995153a6bd506f059cb4c08fc2e56eac5f7bfea396ee8f6bd831ab507ae0ef \
109                    size    158991 \
110                    avrdude-6.3.0-arduino14-i386-apple-darwin11.tar.bz2 \
111                    rmd160  2b870ad372ca051f3014cdced4ad98a9fda2ebbe \
112                    sha256  47d03991522722ce92120c60c4118685b7861909d895f34575001137961e4a63 \
113                    size    256917 \
114                    arduinoOTA-1.2.1-darwin_amd64.tar.bz2 \
115                    rmd160  86dc1bb98a81315e903ce7c6e8266b45b02fcbba \
116                    sha256  93a6d9f9c0c765d237be1665bf7a0a8e2b0b6d2a8531eae92db807f5515088a7 \
117                    size    2244088 \
118                    avr-1.6.23.tar.bz2 \
119                    rmd160  316c71d3bbfecf7c480816da5f79a2f684b65b2e \
120                    sha256  18618d7f256f26cd77c35f4c888d5d1b2334f07925094fdc99ac3188722284aa \
121                    size    5001988 \
122                    reference-1.6.6-3.zip \
123                    rmd160  45ff96d56c55640f4aadc0a451bc47d2a0c6f4bf \
124                    sha256  c3bfb7f9b408fd99a4a1c0f3b022f0a8b10abae6dc28e35d38b4a0df62903685 \
125                    size    7004842 \
126                    Galileo_help_files-1.6.2.zip \
127                    rmd160  58467865038438adde4f21e2541765cfd01fbc0e \
128                    sha256  1c70276e4783286d59c8ac0132c3286e7dcf6825bea65e25747a94416b07aa61 \
129                    size    4352077 \
130                    Edison_help_files-1.6.2.zip \
131                    rmd160  e0ec35db2f41acae36ff05af6d9421edf2d2c0eb \
132                    sha256  56718ce5b2b090d79dae298f6ff9a09c8c1a77f74e3594a951f7035877cc45f4 \
133                    size    3321743 \
134                    2.0.0.zip \
135                    rmd160  9c3c2382ff51c93b69d47fde20cab65afb12b720 \
136                    sha256  a8a650774a613f6eaeae49e2b32f003e42b65be4adc479944b9d071b98214d41 \
137                    size    61899 \
138                    1.0.6.zip \
139                    rmd160  fbc210553b2529e79bfa3f96a62c118f52e7a432 \
140                    sha256  737187d301a6d6eade181488106d3826f6466a926f570fa1d5dfb303729fb1ce \
141                    size    148529 \
142                    1.1.3.zip \
143                    rmd160  d25e4d1e9eddac8d5741d03c96056e6a29c9049a \
144                    sha256  9bdc308d1b4a0bafde01123c80aa25458bc6bd22609fd3d13f50ae0aeb32dbcf \
145                    size    10096 \
146                    1.2.7.zip \
147                    rmd160  a3421c52a0a4eed62778bc55ef3ef3101380df60 \
148                    sha256  c61d68237742a39b7d5843496749e123c6721083bd002bcbdd118a630416b2ba \
149                    size    5277242 \
150                    2.5.8.zip \
151                    rmd160  14643ceccdbcdbc5556a10471fecd52439bb7bf3 \
152                    sha256  429cdb6f0a4c6b8cadb2d3a3ecb6a50cb083833454332827f67abac26dc6b44a \
153                    size    200166 \
154                    1.7.0.zip \
155                    rmd160  2f772bb86e460d7a1458ca80f8899776d4191745 \
156                    sha256  4823cca4e0a60311c0a5bb75a8bced780a99987ccd86f91926559e23ab58f6e2 \
157                    size    64839 \
158                    1.0.4.zip \
159                    rmd160  da524287da060f113da7df720649c48b0e986f2e \
160                    sha256  077f70f2672c75b8c9c75bf4623db4025407d7e43b9cd281a1088e0e5f5e6ade \
161                    size    119715 \
162                    1.0.3.zip \
163                    rmd160  e884fafcb0c67aa22d67cad905f3557aab15982d \
164                    sha256  7cf64dc179931da6104f136e78283310940d53f10151f27583599ef36acc7bde \
165                    size    15106 \
166                    1.0.1.zip \
167                    rmd160  6bf70922153a55fc4a1cc029be30ba457afaebdf \
168                    sha256  20e9d17b08413fc5412fa2549a112b088b92371bcd7450337dcb18fe69f546ff \
169                    size    12100 \
170                    1.2.1.zip \
171                    rmd160  00ea10babe2886e6842ef8c82309c2e34bb1b911 \
172                    sha256  1dd15dc3a0ea5eaa6f9a9ddcfc2d22f40b4a15736bd585b59257b2a56174dfbb \
173                    size    187499 \
174                    1.0.4.zip \
175                    rmd160  da524287da060f113da7df720649c48b0e986f2e \
176                    sha256  077f70f2672c75b8c9c75bf4623db4025407d7e43b9cd281a1088e0e5f5e6ade \
177                    size    119715 \
178                    1.0.2.zip \
179                    rmd160  34ec6dc1c0de022cee4523009d4d78fa0e385561 \
180                    sha256  a34c261f4746d658647e5632e4bae8641d8055ed354f820f5aeec4904b92ce9f \
181                    size    5934 \
182                    1.2.3.zip \
183                    rmd160  2822115da7b7d83fef316c9b2edd321c9b99f8db \
184                    sha256  82cbdb98835ff18d8dcc1dee61f40ee5b0995dfeff70d4fb7330eb5c6159b044 \
185                    size    61145 \
186                    1.0.7.zip \
187                    rmd160  3f600bbb77229a07b6b354a3bec9d0393a8cb351 \
188                    sha256  36f513107a565655766647657252f43407755abb6709156492d9133b3ece3df3 \
189                    size    19035 \
190                    1.8.1.zip \
191                    rmd160  2d836bda12dfa6ab03297b0633057c0c83337e4a \
192                    sha256  18057700fda112993139a220e1bd3148ded735df918e75a1364e1046fa2582ba \
193                    size    478197 \
194                    WiFi101-Updater-ArduinoIDE-Plugin-0.10.5.zip \
195                    rmd160  b60051b5edbbc4677e61b98cd5d325869170b3b2 \
196                    sha256  c19369e28ca982f59fc993b06124af0c8f3880a45a8b6e5e64f9ab069ec4a037 \
197                    size    3026473 \
198                    libastylej-2.05.1-4.zip \
199                    rmd160  193e7b0ac35823782e67222884893d6277c991f2 \
200                    sha256  3a8d98e85c344ca945790f05ff8b1b0f2a3cfcc2939001e58f47ad5ed03a6060 \
201                    size    655108 \
202                    liblistSerials-1.4.2.zip \
203                    rmd160  7957debdf77b93ffef89736c5f8e09d0af6e5dc6 \
204                    sha256  75a89f408f3ecd4796ac173eaddd3c7e55021af030aee7f85b59a4190459a8dc \
205                    size    553389 \
206                    arduino-builder-macosx-1.4.3.tar.bz2 \
207                    rmd160  ac4f4a8ff50333a03b48f7ca7bfe1aa7241a5f6e \
208                    sha256  d9c8cb4f9135fc7c8d7b139c2f5f6a60e24962ca84f648e4c8e641d61ed3e07e \
209                    size    12495655
210
211extract.only        ${github.project}-${github.version}.tar.gz
212
213depends_lib         port:apache-ant
214
215use_configure       no
216
217# Arduino builds only for macOS 10.8 or greater, but
218# I'm not sure how to check platform, the following lines don't seem to work.
219#
220#platform darwin 12 {
221#    pre-fetch {
222#        ui_error "${name} requires Mac OS X 10.8 or greater."
223#    }
224#}
225
226post-extract {
227    file copy -force ${distpath}/appbundler-1.0ea-arduino4.jar.zip                              ${worksrcpath}/build/macosx
228    file copy -force ${distpath}/avr-gcc-5.4.0-atmel3.6.1-arduino2-i386-apple-darwin11.tar.bz2  ${worksrcpath}/build/macosx
229    file copy -force ${distpath}/avrdude-6.3.0-arduino14-i386-apple-darwin11.tar.bz2            ${worksrcpath}/build/macosx
230    file copy -force ${distpath}/arduinoOTA-1.2.1-darwin_amd64.tar.bz2                          ${worksrcpath}/build/macosx
231    file copy -force ${distpath}/avr-1.6.23.tar.bz2                                             ${worksrcpath}/build/
232    file copy -force ${distpath}/reference-1.6.6-3.zip                                          ${worksrcpath}/build/shared/
233    file copy -force ${distpath}/Galileo_help_files-1.6.2.zip                                   ${worksrcpath}/build/shared/
234    file copy -force ${distpath}/Edison_help_files-1.6.2.zip                                    ${worksrcpath}/build/shared/
235    file copy -force ${distpath}/2.0.0.zip                                                      ${worksrcpath}/build/Ethernet-2.0.0.zip
236    file copy -force ${distpath}/1.0.6.zip                                                      ${worksrcpath}/build/GSM-1.0.6.zip
237    file copy -force ${distpath}/1.1.3.zip                                                      ${worksrcpath}/build/Stepper-1.1.3.zip
238    #file copy -force ${distpath}/1.0.6.zip                                                      ${worksrcpath}/build/TFT-1.0.6.zip
239    file copy -force ${distpath}/1.2.7.zip                                                      ${worksrcpath}/build/WiFi-1.2.7.zip
240    file copy -force ${distpath}/2.5.8.zip                                                      ${worksrcpath}/build/Firmata-2.5.8.zip
241    file copy -force ${distpath}/1.7.0.zip                                                      ${worksrcpath}/build/Bridge-1.7.0.zip
242    file copy -force ${distpath}/1.0.4.zip                                                      ${worksrcpath}/build/Robot_Control-1.0.4.zip
243    file copy -force ${distpath}/1.0.3.zip                                                      ${worksrcpath}/build/Robot_Motor-1.0.3.zip
244    #file copy -force ${distpath}/2.0.0.zip                                                      ${worksrcpath}/build/RobotIRremote-2.0.0.zip
245    file copy -force ${distpath}/1.0.1.zip                                                      ${worksrcpath}/build/SpacebrewYun-1.0.1.zip
246    file copy -force ${distpath}/1.2.1.zip                                                      ${worksrcpath}/build/Temboo-1.2.1.zip
247    #file copy -force ${distpath}/1.0.4.zip                                                      ${worksrcpath}/build/Esplora-1.0.4.zip
248    #file copy -force ${distpath}/1.0.1.zip                                                      ${worksrcpath}/build/Mouse-1.0.1.zip
249    file copy -force ${distpath}/1.0.2.zip                                                      ${worksrcpath}/build/Keyboard-1.0.2.zip
250    file copy -force ${distpath}/1.2.3.zip                                                      ${worksrcpath}/build/SD-1.2.3.zip
251    #file copy -force ${distpath}/1.1.3.zip                                                      ${worksrcpath}/build/Servo-1.1.3.zip
252    file copy -force ${distpath}/1.0.7.zip                                                      ${worksrcpath}/build/LiquidCrystal-1.0.7.zip
253    file copy -force ${distpath}/1.8.1.zip                                                      ${worksrcpath}/build/Adafruit_Circuit_Playground-1.8.1.zip
254    file copy -force ${distpath}/WiFi101-Updater-ArduinoIDE-Plugin-0.10.5.zip                   ${worksrcpath}/build/shared/
255    file copy -force ${distpath}/libastylej-2.05.1-4.zip                                        ${worksrcpath}/build/
256    file copy -force ${distpath}/liblistSerials-1.4.2.zip                                       ${worksrcpath}/build/
257    file copy -force ${distpath}/arduino-builder-macosx-1.4.3.tar.bz2                           ${worksrcpath}/build/
258}
259
260build {
261    puts "GIANS DEBUG BUILD BEGIN"
262    puts ${worksrcpath}
263    puts "GIANS DEBUG BUILD END"
264    set ::env(JAVA_HOME) [exec /usr/libexec/java_home -v ${java.version}]
265    system -W ${worksrcpath}/build "ant build dist -Dplatform=macosx <<<'${version}'"
266}
267
268destroot {
269    xinstall -d ${destroot}${prefix}/share/${name}
270    xinstall -m 755 -W ${worksrcpath} CONTRIBUTING.md README.md license.txt ${destroot}${prefix}/share/${name}
271
272    file copy ${worksrcpath}/build/macosx/work/${name}.app ${destroot}${applications_dir}
273}
274
275# This doesn't work for 1.8.8-git because we're not on a release snapshot
276# but it's ready for when upstream will release 1.8.9
277livecheck.type      regex
278livecheck.url       https://github.com/arduino/Arduino/releases
279livecheck.regex     "Release (\\d+(?:\\.\\d+)*)"