Skip to content

Commit

Permalink
Merge pull request #1486 from hadfl/aarch64
Browse files Browse the repository at this point in the history
more aarch64 package builds
  • Loading branch information
citrus-it authored Jul 11, 2024
2 parents c4c0a5d + dc32da9 commit 1ce9d2d
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 38 deletions.
28 changes: 18 additions & 10 deletions build/dcraw/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,44 @@ test_relver '>=' 151051 && set_clangver
set_builddir $PROG
set_standard XPG6

CFLAGS[aarch64]+=" -mtls-dialect=trad"

init
prep_build

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

save_buildenv

unset CONFIGURE_OPTS
CONFIGURE_OPTS="--prefix=/usr --disable-shared"
CONFIGURE_OPTS="--disable-shared"
build_dependency lcms2 lcms2-$LCMSVER $PROG/lcms2 lcms2 $LCMSVER

unset CONFIGURE_OPTS
CONFIGURE_OPTS+=" -DCMAKE_INSTALL_PREFIX=/usr"
CONFIGURE_OPTS+=" -DJAS_ENABLE_SHARED=false"
LDFLAGS[aarch64]+=" -L${SYSROOT[aarch64]}$PREFIX/${LIBDIRS[aarch64]}"

CONFIGURE_OPTS[amd64]="-DCMAKE_INSTALL_LIBDIR=${LIBDIRS[amd64]}"
CONFIGURE_OPTS[aarch64]="
-DJAS_CROSSCOMPILING=ON
-DJAS_STDC_VERSION=201112L
-DCMAKE_INSTALL_LIBDIR=${LIBDIRS[aarch64]}
"
CONFIGURE_OPTS="-DCMAKE_INSTALL_PREFIX=$PREFIX -DJAS_ENABLE_SHARED=false"
build_dependency -cmake jasper jasper-$JASPERVER $PROG/jasper jasper $JASPERVER

restore_buildenv

CPPFLAGS+=" -I$DEPROOT/usr/include"
LDFLAGS+=" -L$DEPROOT/usr/lib"

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

note -n "-- Building $PROG"

configure_arch() {
typeset arch=$1

CPPFLAGS+=" -I$OOCEOPT/include"
LDFLAGS+=" -L$OOCEOPT/${LIBDIRS[$arch]} -Wl,-R$OOCEOPT/${LIBDIRS[$arch]}"

CPPFLAGS+=" -I$DEPROOT$PREFIX/include"
CPPFLAGS+=" -I${SYSROOT[$arch]}$PREFIX/include"
LDFLAGS+=" -L$DEPROOT$PREFIX/${LIBDIRS[$arch]}"
LDFLAGS+=" -L${SYSROOT[$arch]}$PREFIX/${LIBDIRS[$arch]}"
LDFLAGS+=" -Wl,-R$PREFIX/${LIBDIRS[$arch]}"

subsume_arch $arch CPPFLAGS
subsume_arch $arch CFLAGS
Expand Down
26 changes: 11 additions & 15 deletions build/libgd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ SUMMARY="libgd"
DESC="GD is an open source code library for the dynamic creation of images by "
DESC+="programmers"

# does not yet build with gcc 14
((GCCVER > 13)) && set_gccver 13

SKIP_LICENCES=libgd

forgo_isaexec

OPREFIX=$PREFIX
PREFIX+="/$PROG"

forgo_isaexec
test_relver '>=' 151051 && set_clangver
set_standard XPG6

BUILD_DEPENDS_IPS="
library/fontconfig
library/freetype2
Expand All @@ -49,20 +48,17 @@ XFORM_ARGS="
-DPKGROOT=$PROG
"

CONFIGURE_OPTS="
--prefix=$PREFIX
CONFIGURE_OPTS+="
--disable-static
--includedir=$OPREFIX/include
"
CONFIGURE_OPTS[i386]="
--libdir=$OPREFIX/lib
"
CONFIGURE_OPTS[amd64]="
--libdir=$OPREFIX/lib/amd64
"

LDFLAGS[i386]+=" -R$OPREFIX/lib"
LDFLAGS[amd64]+=" -R$OPREFIX/lib/amd64"
pre_configure() {
typeset arch=$1

CONFIGURE_OPTS[$arch]+=" --libdir=$OPREFIX/${LIBDIRS[$arch]}"
LDFLAGS[$arch]+=" -Wl,-R$OPREFIX/${LIBDIRS[$arch]}"
}

init
download_source $PROG $PROG $VER
Expand Down
28 changes: 16 additions & 12 deletions build/libheif/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ test_relver '>=' 151047 && set_clangver
RAV1EVER=`pkg_ver rav1e`
RAV1EVER=${RAV1EVER%.*}

# TODO: we don't cross build rust software, yet. but the rav1e build-time
# dependency is met on the build host
BUILD_DEPENDS_IPS="
ooce/library/libde265
ooce/multimedia/dav1d
=ooce/multimedia/rav1e@$RAV1EVER
ooce/multimedia/x265
"
RUN_DEPENDS_IPS="=ooce/multimedia/rav1e@$RAV1EVER"

XFORM_ARGS="-DPREFIX=${PREFIX#/}"

Expand All @@ -45,24 +46,27 @@ CONFIGURE_OPTS="
-DCMAKE_INSTALL_PREFIX=$PREFIX
-DWITH_EXAMPLES=OFF
"
CONFIGURE_OPTS[i386]="
-DCMAKE_INSTALL_LIBDIR=$PREFIX/lib
"
CONFIGURE_OPTS[amd64]="
-DCMAKE_INSTALL_LIBDIR=$PREFIX/lib/amd64
"

LDFLAGS[i386]+=" -Wl,-R$PREFIX/lib"
LDFLAGS[amd64]+=" -Wl,-R$PREFIX/lib/amd64"

pre_configure() {
typeset arch=$1

test_relver '>' 151038 && return
! cross_arch $arch && RUN_DEPENDS_IPS="=ooce/multimedia/rav1e@$RAV1EVER"

export CMAKE_LIBRARY_PATH=${SYSROOT[$arch]}$PREFIX/${LIBDIRS[$arch]}

export CMAKE_LIBRARY_PATH=$PREFIX/${LIBDIRS[$arch]}
CONFIGURE_OPTS[$arch]="
-DCMAKE_INSTALL_LIBDIR=$PREFIX/${LIBDIRS[$arch]}
-DZLIB_INCLUDE_DIR=${SYSROOT[$arch]}/usr/include
-DZLIB_LIBRARY_RELEASE=${SYSROOT[$arch]}/usr/${LIBDIRS[$arch]}/libz.so
"

cross_arch $arch && CONFIGURE_OPTS[$arch]+=" -DWITH_RAV1E=OFF"

LDFLAGS[$arch]+=" -Wl,-R$PREFIX/${LIBDIRS[$arch]}"
}

CXXFLAGS[aarch64]+=" -mtls-dialect=trad"

init
download_source $PROG $PROG $VER
patch_source
Expand Down
3 changes: 2 additions & 1 deletion build/x265/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 2021 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

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

Expand All @@ -39,6 +39,7 @@ CONFIGURE_OPTS="

CXXFLAGS[aarch64]+=" -mno-outline-atomics"
LDFLAGS[amd64]+=" -R$PREFIX/${LIBDIRS[amd64]}"
LDFLAGS[aarch64]+=" -R$PREFIX/${LIBDIRS[aarch64]}"

fix_version() {
pushd $TMPDIR/$BUILDDIR >/dev/null
Expand Down
4 changes: 4 additions & 0 deletions doc/baseline.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ extra.omnios ooce/library/freetype2
extra.omnios ooce/library/gnutls
extra.omnios ooce/library/json-c
extra.omnios ooce/library/libarchive
extra.omnios ooce/library/libde265
extra.omnios ooce/library/libev
extra.omnios ooce/library/libexif
extra.omnios ooce/library/libgd
extra.omnios ooce/library/libgif
extra.omnios ooce/library/libheif
extra.omnios ooce/library/libid3tag
extra.omnios ooce/library/libjpeg-turbo
extra.omnios ooce/library/libogg
Expand All @@ -40,6 +43,7 @@ extra.omnios ooce/library/tree-sitter
extra.omnios ooce/library/unbound
extra.omnios ooce/library/yaml
extra.omnios ooce/multimedia/dav1d
extra.omnios ooce/multimedia/dcraw
extra.omnios ooce/multimedia/ffmpeg
extra.omnios ooce/multimedia/minidlna
extra.omnios ooce/multimedia/x264
Expand Down
6 changes: 6 additions & 0 deletions doc/pkglist.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ooce/library/libsodium
ooce/security/oath-toolkit
ooce/editor/joe
ooce/multimedia/x265
ooce/library/libde265
###############################################################################
.SYSROOT
ooce/audio/flac
Expand Down Expand Up @@ -80,4 +81,9 @@ ooce/multimedia/ffmpeg
.SYSROOT
ooce/multimedia/minidlna
ooce/util/pass
ooce/library/libheif
###############################################################################
.SYSROOT
ooce/multimedia/dcraw
ooce/library/libgd
###############################################################################

0 comments on commit 1ce9d2d

Please sign in to comment.