Skip to content

Commit

Permalink
aarch64: build pango
Browse files Browse the repository at this point in the history
  • Loading branch information
hadfl committed Jul 13, 2024
1 parent 7ed0414 commit f6abae0
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/cairo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pre_configure() {

! cross_arch $arch && return

CONFIGURE_CMD+=" --cross-file $SRCDIR/files/aarch64-gcc.txt"
CONFIGURE_CMD+=" --cross-file $SRCDIR/files/$arch-gcc.txt"
}

post_install() {
Expand Down
2 changes: 1 addition & 1 deletion build/dav1d/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pre_configure() {

! cross_arch $arch && return

CONFIGURE_CMD+=" --cross-file $SRCDIR/files/aarch64-gcc.txt"
CONFIGURE_CMD+=" --cross-file $SRCDIR/files/$arch-gcc.txt"
}

init
Expand Down
31 changes: 18 additions & 13 deletions build/pango/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../lib/build.sh

Expand All @@ -22,6 +22,8 @@ PKG=ooce/library/pango
SUMMARY="pango"
DESC="Pango is a library for laying out and rendering of text"

forgo_isaexec

# Dependencies
HARFBUZZVER=8.2.1
FRIBIDIVER=1.0.13
Expand Down Expand Up @@ -51,7 +53,8 @@ XFORM_ARGS="
pre_configure() {
typeset arch=$1

LDFLAGS[$arch]+=" -L$PREFIX/${LIBDIRS[$arch]} -R$PREFIX/${LIBDIRS[$arch]}"
LDFLAGS[$arch]+=" -L${SYSROOT[$arch]}$PREFIX/${LIBDIRS[$arch]}"
LDFLAGS[$arch]+=" -R$PREFIX/${LIBDIRS[$arch]}"
[ $arch = i386 ] && LDFLAGS[$arch]+=" -lssp_ns"

export MAKE
Expand All @@ -63,6 +66,12 @@ post_configure() {
done
}

# we'd have to check whether the gcc version is lower or equal to 11
# however `set_crossgcc` does not set GCCVER so we cannot check
post_build() {
[ "$1" = aarch64 ] && EXPECTED_BUILD_ERRS=0 || EXPECTED_BUILD_ERRS=2
}

init
prep_build

Expand All @@ -81,7 +90,6 @@ build_dependency -merge -noctf harfbuzz harfbuzz-$HARFBUZZVER \
export CPPFLAGS+=" -I$DEPROOT/$PREFIX/include/harfbuzz"

SKIP_BUILD_ERRCHK=
test_relver '>=' 151044 && EXPECTED_BUILD_ERRS=2

######################################################################

Expand All @@ -92,14 +100,7 @@ export CPPFLAGS+=" -I$DEPROOT/$PREFIX/include/fribidi"

######################################################################

if ((EXTRACT_MODE == 0)); then
logcmd find $DEPROOT -name \*.la -exec rm {} +
logcmd mv $DEPROOT/$PREFIX/bin/amd64/* $DEPROOT/$PREFIX/bin/ \
|| logerr "relocate dependency binaries"
logcmd rm -rf $DEPROOT/$PREFIX/bin/{i386,amd64}
fi

for arch in $DEFAULT_ARCH; do
for arch in $ARCH_LIST; do
LDFLAGS[$arch]+=" -L$DEPROOT/$PREFIX/${LIBDIRS[$arch]}"
addpath PKG_CONFIG_PATH[$arch] $DEPROOT/$PREFIX/${LIBDIRS[$arch]}/pkgconfig
done
Expand All @@ -111,8 +112,12 @@ CONFIGURE_OPTS="
-Dinstall-tests=false
-Dintrospection=disabled
"
CONFIGURE_OPTS[i386]=" --libdir=$PREFIX/lib "
CONFIGURE_OPTS[amd64]=" --libdir=$PREFIX/lib/amd64 "
CONFIGURE_OPTS[i386]=" --libdir=$PREFIX/${LIBDIRS[i386]} "
CONFIGURE_OPTS[amd64]=" --libdir=$PREFIX/${LIBDIRS[amd64]} "
CONFIGURE_OPTS[aarch64]="
--libdir=$PREFIX/${LIBDIRS[aarch64]}
--cross-file $SRCDIR/files/aarch64-gcc.txt
"

EXPECTED_OPTIONS="CAIRO CAIRO_FREETYPE CAIRO_PDF CAIRO_PS CAIRO_PNG FREETYPE"

Expand Down
12 changes: 12 additions & 0 deletions build/pango/files/aarch64-gcc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[binaries]
c = '/opt/cross/aarch64/bin/aarch64-unknown-solaris2.11-gcc'
cpp = '/opt/cross/aarch64/bin/aarch64-unknown-solaris2.11-g++'
ar = '/opt/cross/aarch64/bin/aarch64-unknown-solaris2.11-ar'
pkgconfig = 'pkg-config'

[host_machine]
system = 'sunos'
cpu_family = 'aarch64'
cpu = 'aarch64'
endian = 'little'

2 changes: 1 addition & 1 deletion build/pixman/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pre_configure() {

! cross_arch $arch && return

CONFIGURE_CMD+=" --cross-file $SRCDIR/files/aarch64-gcc.txt"
CONFIGURE_CMD+=" --cross-file $SRCDIR/files/$arch-gcc.txt"
}

init
Expand Down
1 change: 1 addition & 0 deletions doc/baseline.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extra.omnios ooce/library/mariadb-106
extra.omnios ooce/library/nettle
extra.omnios ooce/library/onig
extra.omnios ooce/library/openldap
extra.omnios ooce/library/pango
extra.omnios ooce/library/pixman
extra.omnios ooce/library/popt
extra.omnios ooce/library/postgresql-14
Expand Down
1 change: 1 addition & 0 deletions doc/pkglist.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ ooce/library/cairo
.SYSROOT
ooce/security/gnupg
ooce/multimedia/ffmpeg
ooce/library/pango
###############################################################################
.SYSROOT
ooce/multimedia/minidlna
Expand Down

0 comments on commit f6abae0

Please sign in to comment.