Check-in [54a0979038]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update freebsd build scripts for some missing extensions and other changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 54a097903852e92241c60502db9d113bb5648cd3
User & Date: chw 2019-07-19 15:28:53
Context
2019-07-20
04:21
various tweaks to allow for mingw cross build on debian 10 check-in: af2cfb2cbc user: chw tags: trunk
2019-07-19
15:28
update freebsd build scripts for some missing extensions and other changes check-in: 54a0979038 user: chw tags: trunk
2019-07-18
21:24
revert check-in [add99d128b] check-in: 3f9cef9afb user: chw tags: trunk
Changes

Changes to undroid/build-undroidwish-freebsd.sh.

82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
...
125
126
127
128
129
130
131



132
133
134
135
136
137
138
...
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
...
262
263
264
265
266
267
268






269
270
271
272
273
274
275
....
1384
1385
1386
1387
1388
1389
1390
1391



























1392
1393
1394
1395
1396
1397
1398
1399



















































































1400
1401
1402
1403
1404
1405
1406
....
1499
1500
1501
1502
1503
1504
1505

1506

1507
1508
1509
1510
1511
1512
1513
....
1533
1534
1535
1536
1537
1538
1539






1540
1541
1542
1543
1544
1545
1546
....
1574
1575
1576
1577
1578
1579
1580



1581
1582
1583
1584
1585
1586
1587
....
1601
1602
1603
1604
1605
1606
1607


1608
1609
1610
1611
1612
1613
1614
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl freetype SDL2 sdl2tk blt jpeg-turbo"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk v4l2"
SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral"
SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler parse_args"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
      xotcl|nsf)
        rm -f ${i}/*.o ${i}/generic/stubs*/*.o
        rm -f ${i}/build-stamp
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;



      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C VecTcl/WavReader ${ACTION} || true
          MAKE=gmake gmake -C VecTcl/TkBridge ${ACTION} || true
          MAKE=gmake gmake -C VecTcl ${ACTION} || true
        ) || true
	;;
      tcl-lmdb|curl|nsf)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C nsf ${ACTION} || true
        ) || true
        ;;
      blt)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C blt ${ACTION} || true
        ) || true
................................................................................
      tdom)
        (
          exec >> build.log 2>&1
          make -C tdom ${ACTION} || true
          make -C tdom/extensions/tnc ${ACTION} || true
        ) || true
        ;;






      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail




























echo -n "build parse_args ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd parse_args
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1



















































































  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
................................................................................
  cp -rp ${AWDIR}/assets/tksqlite* assets
  cp -rp ${AWDIR}/assets/twdbgi* assets
  cp -rp ${AWDIR}/assets/upnp* assets
  cp -rp ${AWDIR}/assets/ukaz* assets
  cp -rp ${AWDIR}/assets/wibble* assets
  cp -rp ${AWDIR}/assets/stardom* assets
  cp -rp ${AWDIR}/assets/modbus* assets

  cp -rp ${AWDIR}/assets/snap7* assets

  # BLT fixups
  cp -p ${PFX_HERE}/lib/blt*/libBLT* assets/blt*
  cp -p ${PFX_HERE}/lib/blt*/pkgIndex* assets/blt*
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  if test -d assets/v4l2* ; then
................................................................................
  cp -rp ${PFX_HERE}/lib/Tkzinc* assets
  cp -rp ${PFX_HERE}/lib/Ffidl* assets
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/parse_args* assets






  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
................................................................................
      'source [file dirname [info script]]/'$(echo TkMC*)'/tkmc.tcl'
    echo > helpviewer \
      'source [file dirname [info script]]/'$(echo helpviewer*/main.tcl)
    echo > zinc-widget \
      'source [file dirname [info script]]/'$(echo Tkzinc*/demos/zinc-widget)
    echo > stardom \
      'source [file dirname [info script]]/'$(echo stardom*/stardom.tcl)



  )
  # add tkchat
  if test -d ${AWDIR}/assets/tkchat* ; then
    cp -rp ${AWDIR}/assets/tkchat* assets
    (
      cd assets
      echo > tkchat \
................................................................................
  cp -rp ${HERE}/tclkit/sdx/lib/stringfileinfo assets/stringfileinfo0.2
  echo > assets/sdx 'package require starkit ; package require app-sdx'
  if test -d ${AWDIR}/undroid/ttk-themes ; then
    cp -rp ${AWDIR}/undroid/ttk-themes assets
  fi
  # add mpksc
  cp -p ${PFX_HERE}/bin/mpksc assets


  # build ZIP to be embedded
  rm -f assets.zip
  ( cd assets ; rm -f */*.a ; zip -rq ../assets.zip * )
  # now wrap to single-file binary
  cp -p ${PFX_HERE}/bin/sdl2wish8.6 undroidwish || exit 1
  cat assets.zip >> undroidwish || exit 1
  set +x







|
>







 







>
>
>







 







|


|







 







>
>
>
>
>
>







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>

>







 







>
>
>
>
>
>







 







>
>
>







 







>
>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
....
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
....
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
....
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
....
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
....
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl freetype SDL2 sdl2tk blt jpeg-turbo"
SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk v4l2"
SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral"
SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus parse_args"
SUBDIRS="${SUBDIRS} tserialport tcl-fuse topcua tkvlc tclJBlend"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
      xotcl|nsf)
        rm -f ${i}/*.o ${i}/generic/stubs*/*.o
        rm -f ${i}/build-stamp
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;
      snap7)
        rm -f ${i}/build/unix/build-stamp
        ;;
      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C VecTcl/WavReader ${ACTION} || true
          MAKE=gmake gmake -C VecTcl/TkBridge ${ACTION} || true
          MAKE=gmake gmake -C VecTcl ${ACTION} || true
        ) || true
	;;
      tcl-lmdb|curl|nsf|libmodbus|ffidl)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C ${i} ${ACTION} || true
        ) || true
        ;;
      blt)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C blt ${ACTION} || true
        ) || true
................................................................................
      tdom)
        (
          exec >> build.log 2>&1
          make -C tdom ${ACTION} || true
          make -C tdom/extensions/tnc ${ACTION} || true
        ) || true
        ;;
      snap7)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C snap7/build/unix -f unix.mk clean || true
        ) || true
        ;;
      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build snap7 ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd snap7/build/unix
  test -e build-stamp && echo >&3 "already done" && exit 0
  MAKE=gmake gmake -f unix.mk || exit 1
  $STRIP ../bin/*.so || true
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build libmodbus ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd libmodbus
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} --disable-tests \
    --disable-static --enable-shared --without-documentation || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install DESTDIR=${HERE} || exit 1
  $STRIP ${PFX_HERE}/lib/libmodbus.so || true
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build parse_args ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd parse_args
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tserialport ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tserialport
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Tserialport_*Init; local: *; };'
  perl -pi -e "s@-shared@-shared -lusb -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake prerequisite || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  CFLAGS="-std=c99" DESTDIR=${HERE} \
    ./configure --prefix=${PFX} \
      --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tkvlc ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tkvlc
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \
    --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclJBlend ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclJBlend
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tcl-fuse ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tcl-fuse
  test -e build-stamp && echo >&3 "already done" && exit 0
  CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib DESTDIR=${HERE} \
    ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix --enable-threads \
      || exit 1
  echo > exports '{ global: Fuse_*Init; local: *; };'
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
................................................................................
  cp -rp ${AWDIR}/assets/tksqlite* assets
  cp -rp ${AWDIR}/assets/twdbgi* assets
  cp -rp ${AWDIR}/assets/upnp* assets
  cp -rp ${AWDIR}/assets/ukaz* assets
  cp -rp ${AWDIR}/assets/wibble* assets
  cp -rp ${AWDIR}/assets/stardom* assets
  cp -rp ${AWDIR}/assets/modbus* assets
  cp -p ${PFX_HERE}/lib/libmodbus.so assets/modbus*
  cp -rp ${AWDIR}/assets/snap7* assets
  cp -p snap7/build/bin/libsnap7* assets/snap7*
  # BLT fixups
  cp -p ${PFX_HERE}/lib/blt*/libBLT* assets/blt*
  cp -p ${PFX_HERE}/lib/blt*/pkgIndex* assets/blt*
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  if test -d assets/v4l2* ; then
................................................................................
  cp -rp ${PFX_HERE}/lib/Tkzinc* assets
  cp -rp ${PFX_HERE}/lib/Ffidl* assets
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/parse_args* assets
  cp -rp ${PFX_HERE}/lib/tserialport* assets
  cp -rp ${PFX_HERE}/lib/topcua* assets
  cp -rp ${PFX_HERE}/lib/tkvlc* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/fuse* assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo sdl2tk*)'/demos/widget'
    echo > tksqlite \
      'source [file dirname [info script]]/'$(echo tksqlite*)'/tksqlite.tcl'
................................................................................
      'source [file dirname [info script]]/'$(echo TkMC*)'/tkmc.tcl'
    echo > helpviewer \
      'source [file dirname [info script]]/'$(echo helpviewer*/main.tcl)
    echo > zinc-widget \
      'source [file dirname [info script]]/'$(echo Tkzinc*/demos/zinc-widget)
    echo > stardom \
      'source [file dirname [info script]]/'$(echo stardom*/stardom.tcl)
    echo > fuse \
      'set argv0 [file dirname [info script]]/'$(echo fuse*/fusevfs.tcl)
    echo >> fuse 'source $argv0'
  )
  # add tkchat
  if test -d ${AWDIR}/assets/tkchat* ; then
    cp -rp ${AWDIR}/assets/tkchat* assets
    (
      cd assets
      echo > tkchat \
................................................................................
  cp -rp ${HERE}/tclkit/sdx/lib/stringfileinfo assets/stringfileinfo0.2
  echo > assets/sdx 'package require starkit ; package require app-sdx'
  if test -d ${AWDIR}/undroid/ttk-themes ; then
    cp -rp ${AWDIR}/undroid/ttk-themes assets
  fi
  # add mpksc
  cp -p ${PFX_HERE}/bin/mpksc assets
  # add contents of tclJBlend.jar for JVM
  ( cd assets ; unzip -q tclJBlend*/tclJBlend.jar )
  # build ZIP to be embedded
  rm -f assets.zip
  ( cd assets ; rm -f */*.a ; zip -rq ../assets.zip * )
  # now wrap to single-file binary
  cp -p ${PFX_HERE}/bin/sdl2wish8.6 undroidwish || exit 1
  cat assets.zip >> undroidwish || exit 1
  set +x

Changes to undroid/build-vanilla-freebsd.sh.

83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
127
128
129
130
131
132
133



134
135
136
137
138
139
140
...
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
267
268
269
270
271
272
273






274
275
276
277
278
279
280
....
1366
1367
1368
1369
1370
1371
1372



























1373
1374
1375
1376
1377
1378
1379
....
1380
1381
1382
1383
1384
1385
1386


































































































1387
1388
1389
1390
1391
1392
1393
....
1483
1484
1485
1486
1487
1488
1489

1490

1491
1492
1493
1494
1495
1496
1497
....
1518
1519
1520
1521
1522
1523
1524








1525
1526
1527
1528
1529
1530
1531
....
1561
1562
1563
1564
1565
1566
1567





1568
1569
1570
1571
1572
1573
1574
....
1588
1589
1590
1591
1592
1593
1594


1595
1596
1597
1598
1599
1600
1601
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl sdl2tk blt jpeg-turbo 3dcanvas"
SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral"
SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json tkdnd mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler parse_args"


ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
      xotcl|nsf)
        rm -f ${i}/*.o ${i}/generic/stubs*/*.o
        rm -f ${i}/build-stamp
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;



      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
    echo "  $i"
    case "$i" in
      tcl)
        (
          exec >> build.log 2>&1
          make -C tcl/unix ${ACTION}
        ) || true
	;;
      sdl2tk)
        (
          exec >> build.log 2>&1
          if test -d sdl2tk.static ; then
            make -C sdl2tk.static/unix ${ACTION} || true
          fi
          make -C sdl2tk/unix ${ACTION} || true
................................................................................
        ) || true
	;;
      tclkit)
        (
          exec >> build.log 2>&1
          make -C tclkit/vqtcl ${ACTION} || true
        ) || true
	;;
      libdmtx)
        (
          exec >> build.log 2>&1
          make -C libdmtx/tcl ${ACTION} || true
        ) || true
	;;
      ZBar)
        (
          exec >> build.log 2>&1
          make -C ZBar/tcl ${ACTION} || true
        ) || true
	;;
      zint)
        (
          exec >> build.log 2>&1
          make -C zint/backend_tcl ${ACTION} || true
        ) || true
	;;
      snack)
        (
          exec >> build.log 2>&1
          make -C snack/unix ${ACTION} || true
        ) || true
	;;
      VecTcl)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C VecTcl/WavReader ${ACTION} || true
          MAKE=gmake gmake -C VecTcl/TkBridge ${ACTION} || true
          MAKE=gmake gmake -C VecTcl ${ACTION} || true
        ) || true
	;;
      tcl-lmdb|curl|nsf)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C nsf ${ACTION} || true
        ) || true
        ;;
      blt)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C blt ${ACTION} || true
        ) || true
................................................................................
      tdom)
        (
          exec >> build.log 2>&1
          make -C tdom ${ACTION} || true
          make -C tdom/extensions/tnc ${ACTION} || true
        ) || true
        ;;






      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail




























echo -n "build parse_args ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd parse_args
  test -e build-stamp && echo >&3 "already done" && exit 0
................................................................................
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail



































































































echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \
................................................................................
  cp -rp ${AWDIR}/assets/tksqlite* assets
  cp -rp ${AWDIR}/assets/twdbgi* assets
  cp -rp ${AWDIR}/assets/upnp* assets
  cp -rp ${AWDIR}/assets/ukaz* assets
  cp -rp ${AWDIR}/assets/wibble* assets
  cp -rp ${AWDIR}/assets/stardom* assets
  cp -rp ${AWDIR}/assets/modbus* assets

  cp -rp ${AWDIR}/assets/snap7* assets

  # BLT fixups
  cp -p ${PFX_HERE}/lib/blt*/libBLT* assets/blt*
  cp -p ${PFX_HERE}/lib/blt*/pkgIndex* assets/blt*
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  if test -d assets/v4l2* ; then
................................................................................
  cp -rp ${PFX_HERE}/lib/Tkzinc* assets
  cp -rp ${PFX_HERE}/lib/Ffidl* assets
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/parse_args* assets








  # add stripped down TDK
  cp -rp ${AWDIR}/undroid/TDK assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
................................................................................
      'source [file dirname [info script]]/'$(echo TkMC*)'/tkmc.tcl'
    echo > helpviewer \
      'source [file dirname [info script]]/'$(echo helpviewer*/main.tcl)
    echo > zinc-widget \
      'source [file dirname [info script]]/'$(echo Tkzinc*/demos/zinc-widget)
    echo > stardom \
      'source [file dirname [info script]]/'$(echo stardom*/stardom.tcl)





  )
  # add tkchat
  if test -d ${AWDIR}/assets/tkchat* ; then
    cp -rp ${AWDIR}/assets/tkchat* assets
    (
      cd assets
      echo > tkchat \
................................................................................
  cp -rp ${HERE}/tclkit/sdx/lib/stringfileinfo assets/stringfileinfo0.2
  echo > assets/sdx 'package require starkit ; package require app-sdx'
  if test -d ${AWDIR}/undroid/ttk-themes ; then
    cp -rp ${AWDIR}/undroid/ttk-themes assets
  fi
  # add mpksc
  cp -p ${PFX_HERE}/bin/mpksc assets


  # now use same assets for tclsh
  rm -rf tassets
  cp -rp assets tassets
  # add libtk*.so
  cp -p ${PFX_HERE}/lib/libtk8.6.so tassets/tk8.6
  # fixup .../lib/tk8.6/pkgIndex.tcl for libtk*.so
  cat > tassets/tk8.6/pkgIndex.tcl <<'EOD'







|
>







 







>
>
>







 







|







 







|





|





|





|





|








|


|







 







>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>

>







 







>
>
>
>
>
>
>
>







 







>
>
>
>
>







 







>
>







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
...
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
....
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
....
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
....
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
....
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
....
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
....
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
SUBDIRS="tcl libressl zlib curl tcludp tdom tclvfs tclkit trofs tbcload tls"
SUBDIRS="${SUBDIRS} Memchan TclCurl sdl2tk blt jpeg-turbo 3dcanvas"
SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk v4l2 tkhtml"
SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint"
SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral"
SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json tkdnd mpexpr"
SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl"
SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus parse_args"
SUBDIRS="${SUBDIRS} tserialport tcl-fuse topcua tkvlc tclJBlend twv"

ACTION="$1"
if test -z "$ACTION" ; then
  ACTION=build
fi

clean_build_stamps() {
................................................................................
      xotcl|nsf)
        rm -f ${i}/*.o ${i}/generic/stubs*/*.o
        rm -f ${i}/build-stamp
        ;;
      mpexpr)
        rm -f ${i}/unix/build-stamp
        ;;
      snap7)
        rm -f ${i}/build/unix/build-stamp
        ;;
      *)
        rm -f ${i}/build-stamp
        ;;
     esac
  done
}

................................................................................
    echo "  $i"
    case "$i" in
      tcl)
        (
          exec >> build.log 2>&1
          make -C tcl/unix ${ACTION}
        ) || true
        ;;
      sdl2tk)
        (
          exec >> build.log 2>&1
          if test -d sdl2tk.static ; then
            make -C sdl2tk.static/unix ${ACTION} || true
          fi
          make -C sdl2tk/unix ${ACTION} || true
................................................................................
        ) || true
	;;
      tclkit)
        (
          exec >> build.log 2>&1
          make -C tclkit/vqtcl ${ACTION} || true
        ) || true
        ;;
      libdmtx)
        (
          exec >> build.log 2>&1
          make -C libdmtx/tcl ${ACTION} || true
        ) || true
        ;;
      ZBar)
        (
          exec >> build.log 2>&1
          make -C ZBar/tcl ${ACTION} || true
        ) || true
        ;;
      zint)
        (
          exec >> build.log 2>&1
          make -C zint/backend_tcl ${ACTION} || true
        ) || true
        ;;
      snack)
        (
          exec >> build.log 2>&1
          make -C snack/unix ${ACTION} || true
        ) || true
        ;;
      VecTcl)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C VecTcl/WavReader ${ACTION} || true
          MAKE=gmake gmake -C VecTcl/TkBridge ${ACTION} || true
          MAKE=gmake gmake -C VecTcl ${ACTION} || true
        ) || true
	;;
      tcl-lmdb|curl|nsf|libmodbus|ffidl)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C ${i} ${ACTION} || true
        ) || true
        ;;
      blt)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C blt ${ACTION} || true
        ) || true
................................................................................
      tdom)
        (
          exec >> build.log 2>&1
          make -C tdom ${ACTION} || true
          make -C tdom/extensions/tnc ${ACTION} || true
        ) || true
        ;;
      snap7)
        (
          exec >> build.log 2>&1
          MAKE=gmake gmake -C snap7/build/unix -f unix.mk clean || true
        ) || true
        ;;
      *)
        (
          exec >> build.log 2>&1
          make -C $i ${ACTION} || true
        ) || true
        ;;
     esac
................................................................................
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build snap7 ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd snap7/build/unix
  test -e build-stamp && echo >&3 "already done" && exit 0
  MAKE=gmake gmake -f unix.mk || exit 1
  $STRIP ../bin/*.so || true
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build libmodbus ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd libmodbus
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} --disable-tests \
    --disable-static --enable-shared --without-documentation || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install DESTDIR=${HERE} || exit 1
  $STRIP ${PFX_HERE}/lib/libmodbus.so || true
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build parse_args ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd parse_args
  test -e build-stamp && echo >&3 "already done" && exit 0
................................................................................
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tserialport ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tserialport
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Tserialport_*Init; local: *; };'
  perl -pi -e "s@-shared@-shared -lusb -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake prerequisite || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  CFLAGS="-std=c99" DESTDIR=${HERE} \
    ./configure --prefix=${PFX} \
      --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tkvlc ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tkvlc
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \
    --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tclJBlend ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tclJBlend
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} ./configure --prefix=${PFX} \
    --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build tcl-fuse ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd tcl-fuse
  test -e build-stamp && echo >&3 "already done" && exit 0
  CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib DESTDIR=${HERE} \
    ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix --enable-threads \
      || exit 1
  echo > exports '{ global: Fuse_*Init; local: *; };'
  perl -pi -e "s@-shared@-shared -Wl,--version-script=$(pwd)/exports@g" \
    Makefile
  MAKE=gmake gmake || exit 1
  MAKE=gmake gmake install-binaries install-libraries DESTDIR=${HERE} || exit 1
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "build twv ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd twv
  test -e build-stamp && echo >&3 "already done" && exit 0
  MAKE=gmake gmake TCL_CFLAGS="-I${PFX_HERE}/include -DUSE_TCL_STUBS=1" \
    TCL_LDFLAGS="-L/usr/local/lib -L${PFX_HERE}/lib -ltclstub8.6" || exit 1
  install -d ${PFX_HERE}/lib/twv0.1
  install -m 755 libtwv.so ${PFX_HERE}/lib/twv0.1
  install -m 644 pkgIndex.tcl.embed ${PFX_HERE}/lib/twv0.1/pkgIndex.tcl
  touch build-stamp
  echo >&3 "done"
) || fail

echo -n "strip binaries ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  set -x
  $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \
................................................................................
  cp -rp ${AWDIR}/assets/tksqlite* assets
  cp -rp ${AWDIR}/assets/twdbgi* assets
  cp -rp ${AWDIR}/assets/upnp* assets
  cp -rp ${AWDIR}/assets/ukaz* assets
  cp -rp ${AWDIR}/assets/wibble* assets
  cp -rp ${AWDIR}/assets/stardom* assets
  cp -rp ${AWDIR}/assets/modbus* assets
  cp -p ${PFX_HERE}/lib/libmodbus.so assets/modbus*
  cp -rp ${AWDIR}/assets/snap7* assets
  cp -p snap7/build/bin/libsnap7* assets/snap7*
  # BLT fixups
  cp -p ${PFX_HERE}/lib/blt*/libBLT* assets/blt*
  cp -p ${PFX_HERE}/lib/blt*/pkgIndex* assets/blt*
  # some demos
  cp -p ${AWDIR}/assets/tkimg*/demo.tcl assets/Img*
  cp -rp ${AWDIR}/assets/Canvas3d*/demo assets/Canvas3d*
  if test -d assets/v4l2* ; then
................................................................................
  cp -rp ${PFX_HERE}/lib/Tkzinc* assets
  cp -rp ${PFX_HERE}/lib/Ffidl* assets
  cp -rp ${PFX_HERE}/lib/lmdb* assets
  cp -rp ${PFX_HERE}/lib/DiffUtil* assets
  cp -rp ${PFX_HERE}/lib/parser* assets
  cp -rp ${PFX_HERE}/lib/tclcompiler* assets
  cp -rp ${PFX_HERE}/lib/parse_args* assets
  cp -rp ${PFX_HERE}/lib/tserialport* assets
  cp -rp ${PFX_HERE}/lib/topcua* assets
  cp -rp ${PFX_HERE}/lib/tkvlc* assets
  cp -rp ${PFX_HERE}/lib/tclJBlend* assets
  cp -rp ${AWDIR}/assets/tdbcjdbc* assets
  cp -rp ${PFX_HERE}/lib/fuse* assets
  cp -rp ${PFX_HERE}/lib/twv* assets
  cp -rp ${AWDIR}/undroid/tsb* assets
  # add stripped down TDK
  cp -rp ${AWDIR}/undroid/TDK assets
  # add shortcuts providing builtin:widget, builtin:tksqlite, etc.
  (
    cd assets
    echo > widget \
      'source [file dirname [info script]]/'$(echo tk8*)'/demos/widget'
................................................................................
      'source [file dirname [info script]]/'$(echo TkMC*)'/tkmc.tcl'
    echo > helpviewer \
      'source [file dirname [info script]]/'$(echo helpviewer*/main.tcl)
    echo > zinc-widget \
      'source [file dirname [info script]]/'$(echo Tkzinc*/demos/zinc-widget)
    echo > stardom \
      'source [file dirname [info script]]/'$(echo stardom*/stardom.tcl)
    echo > fuse \
      'set argv0 [file dirname [info script]]/'$(echo fuse*/fusevfs.tcl)
    echo >> fuse 'source $argv0'
    echo > TSB \
      'source [file dirname [info script]]/'$(echo tsb*/tsb.tcl)
  )
  # add tkchat
  if test -d ${AWDIR}/assets/tkchat* ; then
    cp -rp ${AWDIR}/assets/tkchat* assets
    (
      cd assets
      echo > tkchat \
................................................................................
  cp -rp ${HERE}/tclkit/sdx/lib/stringfileinfo assets/stringfileinfo0.2
  echo > assets/sdx 'package require starkit ; package require app-sdx'
  if test -d ${AWDIR}/undroid/ttk-themes ; then
    cp -rp ${AWDIR}/undroid/ttk-themes assets
  fi
  # add mpksc
  cp -p ${PFX_HERE}/bin/mpksc assets
  # add contents of tclJBlend.jar for JVM
  ( cd assets ; unzip -q tclJBlend*/tclJBlend.jar )
  # now use same assets for tclsh
  rm -rf tassets
  cp -rp assets tassets
  # add libtk*.so
  cp -p ${PFX_HERE}/lib/libtk8.6.so tassets/tk8.6
  # fixup .../lib/tk8.6/pkgIndex.tcl for libtk*.so
  cat > tassets/tk8.6/pkgIndex.tcl <<'EOD'

Changes to undroid/build-vanilla-generic.sh.

1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
    make install-binaries install-libraries DESTDIR=${HERE} || exit 1
    touch build-stamp
    echo >&3 "done"
  ) || fail
fi

if test -d tserialport ; then
  echo -n "build tserialport ..."
  (
    exec 3>&1
    exec >> build.log 2>&1
    cd tserialport
    test -e build-stamp && echo >&3 "already done" && exit 0
    DESTDIR=${HERE} ./configure --prefix=${PFX} \
      --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1







|







1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
    make install-binaries install-libraries DESTDIR=${HERE} || exit 1
    touch build-stamp
    echo >&3 "done"
  ) || fail
fi

if test -d tserialport ; then
  echo -n "build tserialport ... "
  (
    exec 3>&1
    exec >> build.log 2>&1
    cd tserialport
    test -e build-stamp && echo >&3 "already done" && exit 0
    DESTDIR=${HERE} ./configure --prefix=${PFX} \
      --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1

Changes to undroid/tcl-fuse/unix/convert.c.

22
23
24
25
26
27
28


29
30
31
32
33
34
35
...
116
117
118
119
120
121
122

123

124
125
126
127
128
129
130
131
132

133


134

135
136
137
138
139
140
141
...
148
149
150
151
152
153
154

155

156
157
158
159
160
161
162
 * convert.c
 *
 */

#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif



#include <stdio.h> // snprintf
#include <stdlib.h> // atoll
#include <string.h> // memcpy
#include <sys/types.h> // stat types
#include <sys/stat.h> // stat types
#include <unistd.h> // stat types
................................................................................
        case 35: return -EMULTIHOP;
        case 36: return -ENAMETOOLONG;
        case 37: return -ENETDOWN;
        case 38: return -ENETRESET;
        case 39: return -ENETUNREACH;
        case 40: return -ENFILE;
        case 41: return -ENOBUFS;

        case 42: return -ENODATA;

        case 43: return -ENODEV;
        case 44: return -ENOENT;
        case 45: return -ENOEXEC;
        case 46: return -ENOLCK;
        case 47: return -ENOLINK;
        case 48: return -ENOMEM;
        case 49: return -ENOMSG;
        case 50: return -ENOPROTOOPT;
        case 51: return -ENOSPC;

        case 52: return -ENOSR;


        case 53: return -ENOSTR;

        case 54: return -ENOSYS;
        case 55: return -ENOTCONN;
        case 56: return -ENOTDIR;
        case 57: return -ENOTEMPTY;
        case 58: return -ENOTSOCK;
        case 59: return -ENOTSUP;
        case 60: return -ENOTTY;
................................................................................
        case 67: return -EPROTONOSUPPORT;
        case 68: return -EPROTOTYPE;
        case 69: return -ERANGE;
        case 70: return -EROFS;
        case 71: return -ESPIPE;
        case 72: return -ESRCH;
        case 73: return -ESTALE;

        case 74: return -ETIME;

        case 75: return -ETIMEDOUT;
        case 76: return -ETXTBSY;
        case 77: return -EWOULDBLOCK;
        case 78: return -EXDEV;
    }
    return 0;
}







>
>







 







>

>









>

>
>

>







 







>

>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
 * convert.c
 *
 */

#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif

#define FUSE_USE_VERSION 26

#include <stdio.h> // snprintf
#include <stdlib.h> // atoll
#include <string.h> // memcpy
#include <sys/types.h> // stat types
#include <sys/stat.h> // stat types
#include <unistd.h> // stat types
................................................................................
        case 35: return -EMULTIHOP;
        case 36: return -ENAMETOOLONG;
        case 37: return -ENETDOWN;
        case 38: return -ENETRESET;
        case 39: return -ENETUNREACH;
        case 40: return -ENFILE;
        case 41: return -ENOBUFS;
#ifdef ENODATA
        case 42: return -ENODATA;
#endif
        case 43: return -ENODEV;
        case 44: return -ENOENT;
        case 45: return -ENOEXEC;
        case 46: return -ENOLCK;
        case 47: return -ENOLINK;
        case 48: return -ENOMEM;
        case 49: return -ENOMSG;
        case 50: return -ENOPROTOOPT;
        case 51: return -ENOSPC;
#ifdef ENOSR
        case 52: return -ENOSR;
#endif
#ifdef ENOSTR
        case 53: return -ENOSTR;
#endif
        case 54: return -ENOSYS;
        case 55: return -ENOTCONN;
        case 56: return -ENOTDIR;
        case 57: return -ENOTEMPTY;
        case 58: return -ENOTSOCK;
        case 59: return -ENOTSUP;
        case 60: return -ENOTTY;
................................................................................
        case 67: return -EPROTONOSUPPORT;
        case 68: return -EPROTOTYPE;
        case 69: return -ERANGE;
        case 70: return -EROFS;
        case 71: return -ESPIPE;
        case 72: return -ESRCH;
        case 73: return -ESTALE;
#ifdef ETIME
        case 74: return -ETIME;
#endif
        case 75: return -ETIMEDOUT;
        case 76: return -ETXTBSY;
        case 77: return -EWOULDBLOCK;
        case 78: return -EXDEV;
    }
    return 0;
}

Changes to undroid/tcl-fuse/unix/proxy.c.

25
26
27
28
29
30
31


32
33
34
35
36
37
38

// TODO: Verify that the number type conversions in this file cannot overflow.
//       Search for "Int" & "Long" strings to find all the converstions.

#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif



#include <string.h> // memset, strcpy, strlen, memcpy
#include <sys/types.h> // struct stat
#include <sys/stat.h> // struct stat
#include <unistd.h> // struct stat
#include <errno.h> // error codes








>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

// TODO: Verify that the number type conversions in this file cannot overflow.
//       Search for "Int" & "Long" strings to find all the converstions.

#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif

#define FUSE_USE_VERSION 26

#include <string.h> // memset, strcpy, strlen, memcpy
#include <sys/types.h> // struct stat
#include <sys/stat.h> // struct stat
#include <unistd.h> // struct stat
#include <errno.h> // error codes

Added undroid/twv/prebuilt/FreeBSD/i386/libtwv.so.

cannot compute difference between binary files