Skip to content

Commit

Permalink
Merge pull request #1514 from hadfl/aarch64
Browse files Browse the repository at this point in the history
more aarch64 packages
  • Loading branch information
oetiker committed Aug 26, 2024
2 parents be615f5 + 3494163 commit aea6958
Show file tree
Hide file tree
Showing 39 changed files with 401 additions and 174 deletions.
17 changes: 14 additions & 3 deletions build/apr/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 @@ -30,6 +30,8 @@ CONFIGURE_OPTS="
apr_cv_pthreads_lib=
"

export CC_FOR_BUILD=/opt/gcc-$DEFAULT_GCC_VER/bin/gcc

CONFIGURE_OPTS[i386]+="
--with-installbuilddir=$PREFIX/share/apr/i386/build-1
"
Expand All @@ -38,9 +40,18 @@ CONFIGURE_OPTS[amd64]+="
--with-installbuilddir=$PREFIX/share/apr/amd64/build-1
"

CONFIGURE_OPTS[aarch64]+="
--with-installbuilddir=$PREFIX/share/apr/aarch64/build-1
ac_cv_file__dev_zero=yes
apr_cv_process_shared_works=yes
apr_cv_mutex_robust_shared=yes
apr_cv_tcp_nodelay_with_cork=yes
"

# Run the test-suite for the 32-bit build too
make_install32() {
make_install
post_install() {
[ $1 != i386 ] && return

run_testsuite test "" testsuite-32.log
}

Expand Down
4 changes: 2 additions & 2 deletions build/jansson/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 @@ -28,7 +28,7 @@ init
download_source $PROG $PROG $VER
prep_build
patch_source
build -ctf
build
make_package
clean_up

Expand Down
20 changes: 12 additions & 8 deletions build/ldns/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# http://www.illumos.org/license/CDDL.
# }}}

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

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

PROG=ldns
VER=1.8.3
VER=1.8.4
PKG=ooce/library/ldns
SUMMARY=$PROG
DESC="$PROG DNS programming library and drill utility"
Expand All @@ -44,17 +44,22 @@ CONFIGURE_OPTS[amd64]+="
--with-drill
--with-examples
"

# Building in parallel produces occasional bad objects that then fail the
# linking stage. This needs investigation but disabled parallelism for now.
NO_PARALLEL_MAKE=1
CONFIGURE_OPTS[aarch64]+="
--bindir=$PREFIX/bin
--with-drill
--with-examples
"

# The 'distclean' target clobbers too much including 'configure'
make_clean() {
logcmd $MAKE clean
}

make_isa_stub() {
post_install() {
typeset arch=$1

[ $arch != amd64 ] && return

pushd $DESTDIR$PREFIX/bin >/dev/null
logcmd mkdir -p amd64
logcmd mv ldns-config amd64/ || logerr "mv ldns-config"
Expand All @@ -67,7 +72,6 @@ download_source $PROG $PROG $VER
patch_source
prep_build
build
make_isa_stub
make_package
clean_up

Expand Down
12 changes: 9 additions & 3 deletions build/libvncserver/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ CONFIGURE_OPTS="
-DWITH_EXAMPLES=OFF
"
CONFIGURE_OPTS[i386]=
CONFIGURE_OPTS[amd64]="-DCMAKE_INSTALL_LIBDIR=lib/amd64"
CONFIGURE_OPTS[amd64]="-DCMAKE_INSTALL_LIBDIR=${LIBDIRS[amd64]}"
CONFIGURE_OPTS[aarch64]=

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

pre_configure() {
typeset arch=$1

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

init
download_source $PROG LibVNCServer $VER
patch_source
Expand Down
7 changes: 1 addition & 6 deletions build/libvncserver/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@
# http://www.illumos.org/license/CDDL.
# CDDL HEADER START
#
# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

license COPYING license=GPLv2

<transform path=$(PREFIX)/share/doc -> drop>

link path=$(PREFIX)/lib/libvncclient.so target=libvncclient.so.1
link path=$(PREFIX)/lib/libvncserver.so target=libvncserver.so.1
link path=$(PREFIX)/lib/amd64/libvncclient.so target=libvncclient.so.1
link path=$(PREFIX)/lib/amd64/libvncserver.so target=libvncserver.so.1

15 changes: 4 additions & 11 deletions build/libzip/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 @@ -26,10 +26,6 @@ DESC="A C library for reading, creating and modifying zip archives"
# nullability attributes to headers which cause issues when
# being used with gcc

BUILD_DEPENDS_IPS="
ooce/developer/cmake
"

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

Expand All @@ -45,17 +41,14 @@ CONFIGURE_OPTS="
-DCMAKE_INSTALL_PREFIX=$PREFIX
-DCMAKE_INSTALL_INCLUDEDIR=$OPREFIX/include
"
CONFIGURE_OPTS[i386]="-DCMAKE_INSTALL_LIBDIR=$OPREFIX/${LIBDIRS[i386]}"
CONFIGURE_OPTS[amd64]="-DCMAKE_INSTALL_LIBDIR=$OPREFIX/${LIBDIRS[amd64]}"
CONFIGURE_OPTS[aarch64]="-DCMAKE_INSTALL_LIBDIR=$OPREFIX/${LIBDIRS[aarch64]}"

pre_configure() {
typeset arch=$1

CONFIGURE_OPTS[$arch]="
-DCMAKE_INSTALL_LIBDIR=$OPREFIX/${LIBDIRS[$arch]}
"

LDFLAGS[$arch]+=" -R$OPREFIX/${LIBDIRS[$arch]}"

export CMAKE_LIBRARY_PATH=$OPREFIX/${LIBDIRS[$arch]}
}

init
Expand Down
8 changes: 8 additions & 0 deletions build/mbuffer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ XFORM_ARGS="
-DPKGROOT=$PROG
"

pre_configure() {
typeset arch=$1

! cross_arch $arch && return

export OBJDUMP="$CROSSTOOLS/$arch/bin/${TRIPLETS[$arch]}-objdump"
}

init
download_source $PROG $PROG $VER
patch_source
Expand Down
62 changes: 55 additions & 7 deletions build/postfix/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SUMMARY="Postfix MTA"
DESC="Wietse Venema's mail server alternative to sendmail"

set_arch 64
test_relver '>=' 151041 && set_clangver
set_clangver

SKIP_LICENCES=IPL

Expand Down Expand Up @@ -65,6 +65,42 @@ MAKE_INSTALL_TARGET=non-interactive-package
pre_configure() {
typeset arch=$1

if cross_arch $arch; then
save_variable BUILDARCH
set_arch $BUILD_ARCH
set_gccver $DEFAULT_GCC_VER

note -n "-- Building native tools"

pushd $TMPDIR/$BUILDDIR >/dev/null

# we don't really care about the configure options here as we just need
# a native postconf; however, postconf decides where to install
# everything, so it should know about the proper locations
logcmd $MAKE makefiles CCARGS="$CFLAGS"' \
-DDEF_COMMAND_DIR=\"'${PREFIX}/sbin'\" \
-DDEF_CONFIG_DIR=\"'${CONFPATH}'\" \
-DDEF_DAEMON_DIR=\"'${PREFIX}/libexec/postfix'\" \
-DDEF_MAILQ_PATH=\"'${PREFIX}/bin/mailq'\" \
-DDEF_NEWALIAS_PATH=\"'${PREFIX}/bin/newaliases'\" \
-DDEF_MANPAGE_DIR=\"'${PREFIX}/share/man'\" \
-DDEF_SENDMAIL_PATH=\"'${PREFIX}/sbin/sendmail'\" \
' || logerr "failed making native makefiles"

logcmd $MAKE $MAKE_JOBS || logerr "failed to make native tools"
logcmd $CP $TMPDIR/$BUILDDIR/bin/postconf $TMPDIR/ \
|| logerr "failed to copy native postconf"

popd >/dev/null

set_crossgcc $arch
restore_variable BUILDARCH

note -n "-- Building $PROG"

make_clean $arch
fi

logmsg "--- configure (make makefiles)"

ARCHLIB=${LIBDIRS[$arch]}
Expand All @@ -89,18 +125,32 @@ pre_configure() {
-I'${OPREFIX}/pgsql-${PGSQLVER}/include' \
' \
OPT='-O2' \
AUXLIBS="-L$LIBDIR -Wl,-R$LIBDIR -ldb -lsasl2 -lssl -lcrypto" \
AUXLIBS="-L${SYSROOT[$arch]}$LIBDIR -Wl,-R$LIBDIR -ldb -lsasl2 -lssl -lcrypto" \
AUXLIBS_LDAP="-lldap_r -llber" \
AUXLIBS_SQLITE="-lsqlite3" \
AUXLIBS_MYSQL="-L${OPREFIX}/mariadb-${MARIASQLVER}/$ARCHLIB -Wl,-R${OPREFIX}/mariadb-${MARIASQLVER}/$ARCHLIB -lmysqlclient" \
AUXLIBS_PGSQL="-L${OPREFIX}/pgsql-${PGSQLVER}/$ARCHLIB -Wl,-R${OPREFIX}/pgsql-${PGSQLVER}/$ARCHLIB -lpq" \
AUXLIBS_MYSQL="-L${SYSROOT[$arch]}${OPREFIX}/mariadb-${MARIASQLVER}/$ARCHLIB -Wl,-R${OPREFIX}/mariadb-${MARIASQLVER}/$ARCHLIB -lmysqlclient" \
AUXLIBS_PGSQL="-L${SYSROOT[$arch]}${OPREFIX}/pgsql-${PGSQLVER}/$ARCHLIB -Wl,-R${OPREFIX}/pgsql-${PGSQLVER}/$ARCHLIB -lpq" \
AUXLIBS_LMDB="-llmdb" \
AUXLIBS_PCRE="-lpcre2" \
|| logerr "Failed make makefiles command"

false
}

pre_install() {
typeset arch=$1

MAKE_INSTALL_ARGS="install_root=${DESTDIR}"

! cross_arch $arch && return

export POSTCONF=$TMPDIR/postconf
}

post_install() {
install_smf ooce smtp-postfix.xml
}

make_clean() {
logmsg "--- make (dist)clean"
logcmd $MAKE tidy || logcmd $MAKE -f Makefile.init makefiles \
Expand All @@ -111,9 +161,7 @@ init
download_source $PROG $PROG $VER
patch_source
prep_build
MAKE_INSTALL_ARGS="install_root=${DESTDIR}" build
strip_install
install_smf ooce smtp-postfix.xml
build
make_package
clean_up

Expand Down
19 changes: 19 additions & 0 deletions build/postfix/patches/icu4c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
since we also cross-compile postfix, we have to relax the check from
testing whether the binary can be run on the build host to just trust
the compiler whether it could build the binary or not

diff -wpruN --no-dereference '--exclude=*.orig' a~/makedefs a/makedefs
--- a~/makedefs 1970-01-01 00:00:00
+++ a/makedefs 1970-01-01 00:00:00
@@ -902,9 +902,8 @@ int main(int argc, char **argv)
&error) != 14);
}
EOF
- ${CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
- $icu_ldflags >/dev/null 2>&1
- if ./makedefs.test 2>/dev/null ; then
+ if ${CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
+ $icu_ldflags >/dev/null 2>&1; then
CCARGS="$CCARGS $icu_cppflags"
SYSLIBS="$SYSLIBS $icu_ldflags"
else
13 changes: 0 additions & 13 deletions build/postfix/patches/libicu_rpath.patch

This file was deleted.

Loading

0 comments on commit aea6958

Please sign in to comment.