blob: a3eea1f9967eba238f9e58057a18de2ba848a9ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#!/bin/sh
set -ex
# FIXME: We have to build a native version first since the Mac OS
# version cannot be bootstrapped.
# This could be avoided if a separate job would provide FreeBSD nightly builds.
autoreconf -i
mkdir build-freebsd
cd build-freebsd
../configure --with-interface=ncurses CFLAGS="-O3" CXXFLAGS="-O3"
gmake install
cd ..
# Image is based on freebsd14-sciteco.
#git clone -b 2.0-llvm-based https://github.com/tpoechtrager/osxcross.git /opt/osxcross
#pkg install libxml2 FreeBSD-liblzma-dev FreeBSD-runtime-dev python3 bash llvm21 gsed cmake FreeBSD-openssl-lib-dev openbsm FreeBSD-clibs-dev openssl
#pkg remove FreeBSD-clang
#cd /opt/osxcross
# The SDK has been extracted from Command_Line_Tools_for_Xcode_26.dmg.
# I had to use my bhyve-ubuntu24 VM for that.
#cp /opt/tmp/* tarballs/
#export CPPFLAGS="-I/usr/local/include"
#export SDK_VERSION=26.0
#export PATH=/usr/local/llvm21/bin:/opt/osxcross/target/bin:$PATH
#UNATTENDED=1 ./build.sh
#unset CPPFLAGS
#export MACOSX_DEPLOYMENT_TARGET=10.13
# FIXME: This is not unattended. Perhaps echo https://nue.de.packages.macports.org/macports/packages >target/macports/MIRROR
# dylibbundler is available but can't be run naturally.
#osxcross-macports install --static glib2-devel gtk3-devel
#
#pkg install cmake
#git clone https://github.com/auriamg/macdylibbundler.git /opt/macdylibbundler
#cd /opt/macdylibbundler
#cmake .
#make
#cp dylibbundler /usr/local/bin/
export PATH=/usr/local/llvm21/bin:/opt/osxcross/target/bin:$PATH
export MACOSX_DEPLOYMENT_TARGET=10.13
export CFLAGS="-O3 -flto=thin"
export CXXFLAGS="-O3 -flto=thin"
export LDFLAGS="-flto=thin"
mkdir build-osx
cd build-osx
# FIXME: Perhaps SciTECO's configure.ac should use PKG_CHECK_MODULES_STATIC()
# whenever --enable-static-executables is used.
# NOTE: Make sure we pick up the SDK's ncurses instead of the one pulled in
# via MacPorts.
../configure --host=x86_64-apple-darwin25 --disable-bootstrap --with-interface=ncurses \
--enable-static-executables --with-scitecodatadir=../share/sciteco \
PKG_CONFIG="x86_64-apple-darwin25-pkg-config --static" \
CURSES_CFLAGS="-D_DARWIN_C_SOURCE -DNCURSES_WIDECHAR" CURSES_LIBS="-lncurses"
gmake install-strip DESTDIR=`pwd`/temp-install
# There are libraries we cannot link against statically.
# We ship them in /usr/local/lib/sciteco so as not to cause collisions with system
# libraries or libraries installed via Homebrew.
# System libraries are considered to have stable ABIs and
# are not currently bundled.
# FIXME: Is this really true for libc++?
# Anyway, currently it's apparently fully statically linked.
dylibbundler -b -x temp-install/usr/local/bin/sciteco \
-cd -d temp-install/usr/local/lib/sciteco -p @executable_path/../lib/sciteco \
--no-codesign
# FIXME: Perhaps create pkg using fpm (https://github.com/jordansissel/fpm)?
(cd temp-install; tar czf ../../sciteco-curses_nightly_macos_x86_64.tar.gz *)
cd ..
# FIXME: Also build -arch arm64 and package with x86_64-apple-darwin25-lipo into universal binary.
# x86_64-apple-darwin25-lipo -lipo -create -output sciteco x86_64/usr/local/bin/sciteco arm64/usr/local/bin/sciteco
# TODO: Build Gtk version as well.
mkdir -p /opt/htdocs/downloads/nightly/
cp sciteco-curses_nightly_macos_x86_64.tar.gz /opt/htdocs/downloads/nightly/
|