diff --git a/build/bdb/build.sh b/build/bdb/build.sh index 9a4d4e2e0..270111adf 100755 --- a/build/bdb/build.sh +++ b/build/bdb/build.sh @@ -13,7 +13,7 @@ # }}} # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved. -# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -28,11 +28,11 @@ SKIP_LICENCES="Sleepycat" set_builddir db-$VER/build_unix -forgo_isaexec - OPREFIX=$PREFIX PREFIX+="/$PROG-$VER" +forgo_isaexec + XFORM_ARGS=" -DPREFIX=${PREFIX#/} -DOPREFIX=${OPREFIX#/} @@ -42,28 +42,23 @@ XFORM_ARGS=" CONFIGURE_CMD="../dist/configure" CONFIGURE_OPTS=" - --prefix=$PREFIX --includedir=$OPREFIX/include --enable-compat185 --disable-static " -CONFIGURE_OPTS[i386]=" - --libdir=$OPREFIX/lib -" -CONFIGURE_OPTS[amd64]=" - --libdir=$OPREFIX/lib/amd64 -" -LDFLAGS[i386]+=" -L$OPREFIX/lib -R$OPREFIX/lib" LDFLAGS[i386]+=" -lssp_ns" -LDFLAGS[amd64]+=" -L$OPREFIX/lib/amd64 -R$OPREFIX/lib/amd64" export EXTLIBS=-lm -save_function build64 _build64 -build64() { - export DLDFLAGS=${LDFLAGS[amd64]} - _build64 +pre_configure() { + typeset arch=$1 + + CONFIGURE_OPTS[$arch]+=" --libdir=$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -L${SYSROOT[$arch]}$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -R$OPREFIX/${LIBDIRS[$arch]}" + + export DLDFLAGS=${LDFLAGS[$arch]} } init diff --git a/build/cups/build.sh b/build/cups/build.sh index 5a6d7a9bf..5994622ec 100755 --- a/build/cups/build.sh +++ b/build/cups/build.sh @@ -31,6 +31,8 @@ OPREFIX=$PREFIX PREFIX+="/$PROG" VARDIR="/var$PREFIX" +forgo_isaexec + XFORM_ARGS=" -DPREFIX=${PREFIX#/} -DOPREFIX=${OPREFIX#/} @@ -39,7 +41,6 @@ XFORM_ARGS=" " CONFIGURE_OPTS=" - --prefix=$PREFIX --sysconfdir=/etc$OPREFIX --includedir=$OPREFIX/include --localstatedir=$VARDIR @@ -67,19 +68,14 @@ CONFIGURE_OPTS=" # this currently fails in zones as it uses libdevinfo CONFIGURE_OPTS+=" --disable-libusb" -CONFIGURE_OPTS[i386]=" - --libdir=$OPREFIX/lib -" -CONFIGURE_OPTS[amd64]=" - --libdir=$OPREFIX/lib/amd64 -" - -LDFLAGS[i386]+=" -L$OPREFIX/lib -Wl,-R$OPREFIX/lib -lsocket" -LDFLAGS[amd64]+=" -L$OPREFIX/lib/amd64 -Wl,-R$OPREFIX/lib/amd64 -lsocket" - pre_configure() { typeset arch=$1 + CONFIGURE_OPTS[$arch]+=" --libdir=$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -L${SYSROOT[$arch]}/usr/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -Wl,-R$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -lsocket" + export DSOFLAGS="$LDFLAGS ${LDFLAGS[$arch]}" } @@ -89,7 +85,6 @@ patch_source prep_build run_autoconf -f build -strip_install VER=${VER//op/.} make_package clean_up diff --git a/build/dav1d/build.sh b/build/dav1d/build.sh index 755bb16a0..181b2ab95 100755 --- a/build/dav1d/build.sh +++ b/build/dav1d/build.sh @@ -33,8 +33,24 @@ TESTSUITE_SED=' /^Full log written to/d ' +CFLAGS[aarch64]+=" -mno-outline-atomics" + LDFLAGS[i386]+=" -lssp_ns" -LDFLAGS[amd64]+=" -R$PREFIX/lib/amd64" + +pre_configure() { + typeset arch=$1 + + CONFIGURE_OPTS[$arch]=" + --prefix=$PREFIX + --libdir=$PREFIX/${LIBDIRS[$arch]} + " + + LDFLAGS[$arch]+=" -R$PREFIX/${LIBDIRS[$arch]}" + + ! cross_arch $arch && return + + CONFIGURE_CMD+=" --cross-file $SRCDIR/files/aarch64-gcc.txt" +} init download_source $PROG $PROG $VER diff --git a/build/dav1d/files/aarch64-gcc.txt b/build/dav1d/files/aarch64-gcc.txt new file mode 100644 index 000000000..88a0f04dc --- /dev/null +++ b/build/dav1d/files/aarch64-gcc.txt @@ -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' + diff --git a/build/ffmpeg/build.sh b/build/ffmpeg/build.sh index 77f82cbdd..f8f8c367a 100755 --- a/build/ffmpeg/build.sh +++ b/build/ffmpeg/build.sh @@ -27,14 +27,7 @@ DESC+="convert and stream audio and video." # software may depend on it. PVERS="4.4.3 5.1.2" -if test_relver '>=' 151041; then - set_clangver - - CONFIGURE_OPTS=" - --cc=$CC - --cxx=$CXX - " -fi +test_relver '>=' 151041 && set_clangver OPREFIX=$PREFIX PREFIX+="/$PROG" @@ -49,7 +42,7 @@ XFORM_ARGS=" # ffmpeg contains BMI instructions even when built on an older CPU BMI_EXPECTED=1 -CONFIGURE_OPTS+=" +CONFIGURE_OPTS=" --prefix=$PREFIX --incdir=$OPREFIX/include --disable-static @@ -63,26 +56,53 @@ CONFIGURE_OPTS+=" --enable-libwebp --enable-gpl --enable-libx264 - --enable-libx265 --enable-gnutls " CONFIGURE_OPTS[i386]=" + --enable-libx265 --disable-librav1e --libdir=$OPREFIX/lib " CONFIGURE_OPTS[amd64]=" + --enable-libx265 --enable-librav1e --libdir=$OPREFIX/lib/amd64 " +CONFIGURE_OPTS[aarch64]=" + --enable-cross-compile + --disable-asm + --disable-libx265 + --disable-librav1e + --libdir=$OPREFIX/lib +" -# to find x264.h for builtin check -CPPFLAGS+=" -I$OPREFIX/include" -LDFLAGS[i386]+=" -Wl,-R$OPREFIX/lib" -LDFLAGS[amd64]+=" -Wl,-R$OPREFIX/lib/amd64" +pre_configure() { + typeset arch=$1 + + CONFIGURE_OPTS+=" + --cc=$CC + --cxx=$CXX + " + + # to find x264.h for builtin check + CPPFLAGS+=" -I${SYSROOT[$arch]}$OPREFIX/include" + + LDFLAGS[$arch]+=" -Wl,-R$OPREFIX/${LIBDIRS[$arch]}" + + ! cross_arch $arch && return + + CONFIGURE_OPTS[$arch]+=" + --sysroot=${SYSROOT[$arch]} + --host-cc=/opt/gcc-$DEFAULT_GCC_VER/bin/gcc + " +} init prep_build autoconf-like +# Skip previous versions for cross compilation +pre_build() { ! cross_arch $1; } + # Build previous versions for pver in $PVERS; do note -n "Building previous version: $pver" @@ -94,6 +114,7 @@ for pver in $PVERS; do build restore_variable CONFIGURE_OPTS done +unset -f pre_build note -n "Building current version: $VER" diff --git a/build/fontconfig/build.sh b/build/fontconfig/build.sh index 7cc4aa829..7fb661d39 100755 --- a/build/fontconfig/build.sh +++ b/build/fontconfig/build.sh @@ -60,25 +60,32 @@ CONFIGURE_OPTS[amd64]=" --sbindir=$PREFIX/sbin --libdir=$OPREFIX/lib/amd64 " +CONFIGURE_OPTS[aarch64]+=" + --bindir=$PREFIX/bin + --sbindir=$PREFIX/sbin + --libdir=$OPREFIX/lib +" -# The build framework expects GNU tools -export PATH="/usr/gnu/bin:$PATH" +pre_configure() { + # The build framework expects GNU tools + export PATH="$GNUBIN:$PATH" +} -rem_abs_symlinks() { +post_install() { logmsg "--- removing absolute symlinks" logcmd rm -f $DESTDIR/etc$PREFIX/fonts/conf.d/*.conf } LDFLAGS[i386]+=" -L$OPREFIX/lib -R$OPREFIX/lib" LDFLAGS[amd64]+=" -L$OPREFIX/lib/amd64 -R$OPREFIX/lib/amd64" +LDFLAGS[aarch64]+=" -L$OPREFIX/lib -R$OPREFIX/lib" init download_source $PROG $PROG $VER prep_build patch_source run_autoreconf -fi -build -ctf -rem_abs_symlinks +build make_package clean_up diff --git a/build/hunspell/build.sh b/build/hunspell/build.sh index 0ed3f1fbf..af3b874f4 100755 --- a/build/hunspell/build.sh +++ b/build/hunspell/build.sh @@ -25,12 +25,12 @@ DESC="$PROG - spell checker" # https://github.com/fin-w/LibreOffice-Geiriadur-Cymraeg-Welsh-Dictionary CYVER=1.2 -forgo_isaexec -set_clangver - OPREFIX=$PREFIX PREFIX+=/$PROG +forgo_isaexec +set_clangver + XFORM_ARGS=" -DOPREFIX=${OPREFIX#/} -DPREFIX=${PREFIX#/} @@ -49,8 +49,12 @@ CONFIGURE_OPTS[i386]=" CONFIGURE_OPTS[amd64]=" --libdir=$OPREFIX/lib/amd64 " +CONFIGURE_OPTS[aarch64]+=" + --libdir=$OPREFIX/lib +" CPPFLAGS+=" -I/usr/include/ncurses" +CXXFLAGS[aarch64]+=" -mno-outline-atomics -mtls-dialect=trad" post_install() { [ $1 = i386 ] && return diff --git a/build/liberation-fonts/build.sh b/build/liberation-fonts/build.sh index 196b1c19d..f8c3efd98 100755 --- a/build/liberation-fonts/build.sh +++ b/build/liberation-fonts/build.sh @@ -26,8 +26,12 @@ DESC+="as usage of Times New Roman, Arial, Courier New." SKIP_LICENCES=SILv1.1 set_builddir $PROG-ttf-$VER -copy_fonts() { - dst=$DESTDIR$PREFIX/share/fonts/truetype/liberation +pre_package() { + typeset arch=$1 + + dst=$DESTDIR + cross_arch $arch && dst+=".$arch" + dst+=$PREFIX/share/fonts/truetype/liberation logcmd mkdir -p $dst || logerr "--- mkdir failed" @@ -40,7 +44,6 @@ init download_source $PROG $BUILDDIR patch_source prep_build -copy_fonts make_package clean_up diff --git a/build/libexif/build.sh b/build/libexif/build.sh index fb1322b23..b88246087 100755 --- a/build/libexif/build.sh +++ b/build/libexif/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -38,7 +38,11 @@ CONFIGURE_OPTS[i386]=" CONFIGURE_OPTS[amd64]=" --libdir=$OPREFIX/lib/amd64 " -[ $RELVER -ge 151037 ] && LDFLAGS[i386]+=" -lssp_ns" +CONFIGURE_OPTS[aarch64]+=" + --libdir=$OPREFIX/lib +" + +LDFLAGS[i386]+=" -lssp_ns" init download_source $PROG $PROG $VER diff --git a/build/libid3tag/build.sh b/build/libid3tag/build.sh index 153f24080..d5a6bb7e4 100755 --- a/build/libid3tag/build.sh +++ b/build/libid3tag/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -27,7 +27,16 @@ test_relver '>=' 151041 && set_clangver CONFIGURE_OPTS=" --disable-static " -[ $RELVER -ge 151037 ] && LDFLAGS[i386]+=" -lssp_ns" + +LDFLAGS[i386]+=" -lssp_ns" + +pre_configure() { + typeset arch=$1 + + ! cross_arch $arch && return + + LDFLAGS[$arch]+=" -L${SYSROOT[$arch]}/usr/${LIBDIRS[$arch]}" +} init download_source $PROG $PROG $VER diff --git a/build/libwebp/build.sh b/build/libwebp/build.sh index 2c75b3450..7975cba56 100755 --- a/build/libwebp/build.sh +++ b/build/libwebp/build.sh @@ -51,15 +51,17 @@ CONFIGURE_OPTS=" --sbindir=$PREFIX/sbin --enable-everything " -CONFIGURE_OPTS[i386_WS]=" - --libdir=$OPREFIX/lib - LDFLAGS=\"-L$OPREFIX/lib -Wl,-R$OPREFIX/lib\" -" -CONFIGURE_OPTS[amd64_WS]=" - --libdir=$OPREFIX/lib/amd64 - LDFLAGS=\"-L$OPREFIX/lib/amd64 -Wl,-R$OPREFIX/lib/amd64\" -" -CPPFLAGS+=" -I$OPREFIX/include" + +pre_configure() { + typeset arch=$1 + + CONFIGURE_OPTS[${arch}_WS]=" + --libdir=$OPREFIX/${LIBDIRS[$arch]} + LDFLAGS=\"-L${SYSROOT[$arch]}$OPREFIX/${LIBDIRS[$arch]} -Wl,-R$OPREFIX/${LIBDIRS[$arch]}\" + " + + CPPFLAGS+=" -I${SYSROOT[$arch]}$OPREFIX/include" +} init download_source $PROG $PROG $VER diff --git a/build/lmdb/build.sh b/build/lmdb/build.sh index 130c1219e..9bf1b6c85 100755 --- a/build/lmdb/build.sh +++ b/build/lmdb/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -42,19 +42,6 @@ XFORM_ARGS=" MAKE_ARGS+=" -e" -MAKE_INSTALL_ARGS=" - prefix=$PREFIX - includedir=$OPREFIX/include -" - -MAKE_INSTALL_ARGS_32=" - libdir=$OPREFIX/lib -" - -MAKE_INSTALL_ARGS_64=" - libdir=$OPREFIX/lib/amd64 -" - pre_configure() { typeset arch=$1 @@ -70,6 +57,16 @@ pre_configure() { false } +pre_install() { + typeset arch=$1 + + MAKE_INSTALL_ARGS=" + prefix=$PREFIX + includedir=$OPREFIX/include + libdir=$OPREFIX/${LIBDIRS[$arch]} + " +} + init download_source $PROG $PROGUCVER patch_source diff --git a/build/minicom/build.sh b/build/minicom/build.sh index 15499cfee..e31274036 100755 --- a/build/minicom/build.sh +++ b/build/minicom/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -43,7 +43,6 @@ download_source $PROG $PROG v$VER patch_source prep_build autoconf -autoreconf build -strip_install make_package clean_up diff --git a/build/minidlna/build.sh b/build/minidlna/build.sh index 07cedbd69..683c63295 100755 --- a/build/minidlna/build.sh +++ b/build/minidlna/build.sh @@ -23,13 +23,13 @@ PKG=ooce/multimedia/minidlna SUMMARY="MiniDLNA" DESC="DLNA/UPnP-AV media server" +OPREFIX=$PREFIX +PREFIX+="/$PROG" + set_arch 64 set_standard XPG6 test_relver '>=' 151041 && set_clangver -OPREFIX=$PREFIX -PREFIX+="/$PROG" - BUILD_DEPENDS_IPS=" ooce/library/libjpeg-turbo ooce/library/libogg @@ -46,32 +46,43 @@ XFORM_ARGS=" -DPROG=$PROG " -CONFIGURE_OPTS[amd64]=" - --prefix=$PREFIX +CONFIGURE_OPTS[amd64]+=" --with-db-path=/var$PREFIX/cache --with-log-path=/var/log$PREFIX ac_cv_header_sys_inotify_h=no ac_cv_func_inotify_init=no " +CONFIGURE_OPTS[aarch64]+=" + --with-db-path=/var$PREFIX/cache + --with-log-path=/var/log$PREFIX + ac_cv_header_sys_inotify_h=no + ac_cv_func_inotify_init=no +" + +pre_configure() { + typeset arch=$1 -default_config() { + CPPFLAGS+=" -D__OmniOS__ -I${SYSROOT[$arch]}$OPREFIX/include" + LDFLAGS[$arch]+=" -Wl,-L${SYSROOT[$arch]}$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -Wl,-R$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -lsocket -lsendfile" +} + +post_install() { logmsg "--- Copying default config file" logcmd mkdir -p $DESTDIR/etc$PREFIX logcmd cp $TMPDIR/$BUILDDIR/${PROG}.conf $DESTDIR/etc$PREFIX \ || logerr "Failed to copy default config file" + + install_smf application $PROG.xml } -CPPFLAGS+=" -D__OmniOS__ -I$OPREFIX/include" -LDFLAGS[amd64]+=" -Wl,-L$OPREFIX/lib/amd64 -Wl,-R$OPREFIX/lib/amd64" -LDFLAGS[amd64]+=" -lsocket -lsendfile" init prep_build download_source $PROG $PROG $VER patch_source -build -ctf -default_config -install_smf application $PROG.xml +build make_package clean_up diff --git a/build/nsd/build.sh b/build/nsd/build.sh index 21d3dff8e..8fe731df0 100755 --- a/build/nsd/build.sh +++ b/build/nsd/build.sh @@ -60,16 +60,24 @@ CONFIGURE_OPTS=" # need msg_flags from struct msghdr set_standard XPG4v2 -LDFLAGS="-L$OPREFIX/lib/amd64 -R$OPREFIX/lib/amd64" export MAKE +pre_configure() { + typeset arch=$1 + + LDFLAGS[$arch]+=" -L${SYSROOT[$arch]}$OPREFIX/${LIBDIRS[$arch]}" + LDFLAGS[$arch]+=" -R$OPREFIX/${LIBDIRS[$arch]}" +} + +post_install() { + install_smf network dns-nsd.xml +} + init download_source $PROG $PROG $VER prep_build patch_source build -strip_install -install_smf network dns-nsd.xml make_package clean_up diff --git a/build/openldap/build.sh b/build/openldap/build.sh index bc1f56c65..5bb95f797 100755 --- a/build/openldap/build.sh +++ b/build/openldap/build.sh @@ -118,6 +118,8 @@ unset -f pre_build post_install() { [ $1 = i386 ] && return + xform $SRCDIR/files/$PROG.xml > $TMPDIR/$PROG.xml + install_smf -oocemethod ooce $PROG.xml manifest_start $TMPDIR/manifest.client @@ -137,7 +139,6 @@ note -n "Building current version: $VER" download_source $PROG $PROG $VER patch_source build -xform files/$PROG.xml > $TMPDIR/$PROG.xml PKG=${PKG/network/library} SUMMARY+=" - clients and libraries" \ make_package -seed $TMPDIR/manifest.client [ "$FLAVOR" != libsandheaders ] \ diff --git a/build/pbzip2/build.sh b/build/pbzip2/build.sh index 923ae6c48..d80c8b93c 100755 --- a/build/pbzip2/build.sh +++ b/build/pbzip2/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -31,6 +31,8 @@ XFORM_ARGS=" -DPROG=$PROG " +export CXX + pre_configure() { typeset arch=$1 diff --git a/build/pigz/build.sh b/build/pigz/build.sh index dd2302160..8b570a5f7 100755 --- a/build/pigz/build.sh +++ b/build/pigz/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -38,7 +38,7 @@ pre_configure() { MAKE_ARGS_WS=" -e CFLAGS=\"${CFLAGS[$arch]} $CFLAGS\" - LDFLAGS=\"${LDFLAGS[$arch]} $LDFLAGS\" + LDFLAGS=\"${LDFLAGS[$arch]} -L${SYSROOT[$arch]}/usr/${LIBDIRS[$arch]} $LDFLAGS\" LIBS=\"-lm -lz\" " diff --git a/build/postgresql/build-14.sh b/build/postgresql/build-14.sh index 568bb03b2..3059bd0f8 100755 --- a/build/postgresql/build-14.sh +++ b/build/postgresql/build-14.sh @@ -59,6 +59,7 @@ XFORM_ARGS=" " CFLAGS+=" -O3" +CFLAGS[aarch64]+=" -mno-outline-atomics" CPPFLAGS+=" -DWAIT_USE_POLL" # postgresql has large enumerations CTF_FLAGS+=" -s" @@ -82,12 +83,32 @@ CONFIGURE_OPTS[amd64_WS]+=" --with-llvm LLVM_CONFIG=\"$CLANGPATH/bin/llvm-config --link-static\" --enable-dtrace DTRACEFLAGS=-64 " +CONFIGURE_OPTS[aarch64]+=" + --disable-dtrace +" # need to build world to get e.g. man pages in MAKE_TARGET=world MAKE_INSTALL_TARGET=install-world -build_manifests() { +post_install() { + typeset arch=$1 + + [ $arch = i386 ] && return + + # Make ISA binaries for pg_config, to allow software to find the + # right settings for 32/64-bit when pkg-config is not used. + if [ $arch = amd64 ]; then + pushd $DESTDIR$PREFIX/bin >/dev/null + logcmd mkdir -p amd64 + logcmd mv pg_config amd64/ || logerr "mv pg_config" + make_isaexec_stub_arch amd64 $PREFIX/bin + popd >/dev/null + fi + + xform $SRCDIR/files/postgres.xml > $TMPDIR/$PROG-$sMAJVER.xml + install_smf ooce $PROG-$sMAJVER.xml + manifest_start $TMPDIR/manifest.client manifest_add_dir $PREFIX/include '.*' manifest_add_dir $PREFIX/lib/pkgconfig @@ -104,30 +125,17 @@ build_manifests() { manifest_finalise $TMPDIR/manifest.server $OPREFIX etc } -# Make ISA binaries for pg_config, to allow software to find the -# right settings for 32/64-bit when pkg-config is not used. -make_isa_stub() { - pushd $DESTDIR$PREFIX/bin >/dev/null - logcmd mkdir -p amd64 - logcmd mv pg_config amd64/ || logerr "mv pg_config" - make_isaexec_stub_arch amd64 $PREFIX/bin - popd >/dev/null -} - init download_source $PROG $PROG $VER patch_source prep_build build -make_isa_stub #run_testsuite check-world -xform files/postgres.xml > $TMPDIR/$PROG-$sMAJVER.xml -install_smf ooce $PROG-$sMAJVER.xml -build_manifests PKG=${PKG/database/library} SUMMARY+=" client and libraries" \ make_package -seed $TMPDIR/manifest.client -RUN_DEPENDS_IPS="ooce/database/postgresql-common" \ - make_package -seed $TMPDIR/manifest.server server.mog +[ "$FLAVOR" != libsandheaders ] \ + && RUN_DEPENDS_IPS="ooce/database/postgresql-common" \ + make_package -seed $TMPDIR/manifest.server server.mog clean_up # Vim hints diff --git a/build/postgresql/postgresql.p5m b/build/postgresql/postgresql.p5m index 00a342cd0..7c9be13c8 100644 --- a/build/postgresql/postgresql.p5m +++ b/build/postgresql/postgresql.p5m @@ -1,5 +1,5 @@ set name=pkg.fmri value=ooce/database/postgresql-common@1.0.0-$(PVER) -set name=variant.arch value=i386 +set name=variant.arch value=$(ARCH) set name=variant.opensolaris.zone value=global value=nonglobal set name=description value="Common PostgreSQL package" set name=pkg.description value="Common PostgreSQL package" diff --git a/build/x264/build.sh b/build/x264/build.sh index 2bdad1e94..302579065 100755 --- a/build/x264/build.sh +++ b/build/x264/build.sh @@ -12,7 +12,7 @@ # http://www.illumos.org/license/CDDL. # }}} -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. . ../../lib/build.sh @@ -42,11 +42,19 @@ CONFIGURE_OPTS[amd64]+=" --host=${TRIPLETS[amd64]} " +pre_configure() { + typeset arch=$1 + + ! cross_arch $arch && return + + CONFIGURE_OPTS[$arch]+=" --sysroot=${SYSROOT[$arch]}" +} + MAKE_INSTALL_ARGS="-e INSTALL=$GNUBIN/install" CFLAGS+=" -O3" -[ $RELVER -ge 151037 ] && LDFLAGS[i386]+=" -lssp_ns" +LDFLAGS[i386]+=" -lssp_ns" LDFLAGS[amd64]+=" -Wl,-R$PREFIX/lib/amd64" # we don't want x264 to have a (circular) runtime dependency on ffmpeg @@ -56,7 +64,7 @@ init download_source $PROG $PROG-stable $VER patch_source prep_build -build -ctf +build make_package clean_up diff --git a/build/x264/patches/clang-no-mimpure-text.patch b/build/x264/patches/clang-no-mimpure-text.patch index aa7c633a5..0b3f198d2 100644 --- a/build/x264/patches/clang-no-mimpure-text.patch +++ b/build/x264/patches/clang-no-mimpure-text.patch @@ -1,4 +1,4 @@ -diff -wpruN '--exclude=*.orig' a~/configure a/configure +diff -wpruN --no-dereference '--exclude=*.orig' a~/configure a/configure --- a~/configure 1970-01-01 00:00:00 +++ a/configure 1970-01-01 00:00:00 @@ -1320,7 +1320,7 @@ if [ "$pic" = "yes" ] ; then diff --git a/build/x264/patches/libs.patch b/build/x264/patches/libs.patch index b905cf6aa..6352901d1 100644 --- a/build/x264/patches/libs.patch +++ b/build/x264/patches/libs.patch @@ -1,4 +1,4 @@ -diff -wpruN '--exclude=*.orig' a~/configure a/configure +diff -wpruN --no-dereference '--exclude=*.orig' a~/configure a/configure --- a~/configure 1970-01-01 00:00:00 +++ a/configure 1970-01-01 00:00:00 @@ -1093,11 +1093,12 @@ elif [ "$thread" != "no" ] ; then diff --git a/build/x264/patches/series b/build/x264/patches/series index 96cd3dfb5..569ede96e 100644 --- a/build/x264/patches/series +++ b/build/x264/patches/series @@ -1,2 +1,3 @@ libs.patch clang-no-mimpure-text.patch +xpg6-check.patch diff --git a/build/x264/patches/xpg6-check.patch b/build/x264/patches/xpg6-check.patch new file mode 100644 index 000000000..4731bd98e --- /dev/null +++ b/build/x264/patches/xpg6-check.patch @@ -0,0 +1,27 @@ +values-xpg6.o check should be sysroot aware + +diff -wpruN --no-dereference '--exclude=*.orig' a~/configure a/configure +--- a~/configure 1970-01-01 00:00:00 ++++ a/configure 1970-01-01 00:00:00 +@@ -531,6 +531,7 @@ for opt do + --sysroot=*) + CFLAGS="$CFLAGS --sysroot=$optarg" + LDFLAGS="$LDFLAGS --sysroot=$optarg" ++ sysroot="$optarg" + ;; + --bit-depth=*) + bit_depth="$optarg" +@@ -703,10 +704,10 @@ case $host_os in + SYS="SunOS" + define HAVE_MALLOC_H + libm="-lm" +- if cc_check "" /usr/lib/64/values-xpg6.o; then +- LDFLAGS="$LDFLAGS /usr/lib/64/values-xpg6.o" ++ if cc_check "" "$sysroot/usr/lib/64/values-xpg6.o"; then ++ LDFLAGS="$LDFLAGS $sysroot/usr/lib/64/values-xpg6.o" + else +- LDFLAGS="$LDFLAGS /usr/lib/values-xpg6.o" ++ LDFLAGS="$LDFLAGS $sysroot/usr/lib/values-xpg6.o" + fi + if test -x /usr/ucb/install ; then + INSTALL=/usr/ucb/install diff --git a/doc/baseline.aarch64 b/doc/baseline.aarch64 index 5a8b85282..feac8f687 100644 --- a/doc/baseline.aarch64 +++ b/doc/baseline.aarch64 @@ -1,19 +1,40 @@ extra.omnios ooce/audio/flac +extra.omnios ooce/compress/pbzip2 +extra.omnios ooce/compress/pigz +extra.omnios ooce/database/bdb +extra.omnios ooce/database/lmdb +extra.omnios ooce/database/postgresql-14 +extra.omnios ooce/database/postgresql-common extra.omnios ooce/file/tree +extra.omnios ooce/fonts/liberation +extra.omnios ooce/library/fontconfig extra.omnios ooce/library/freetype2 extra.omnios ooce/library/gnutls extra.omnios ooce/library/libev +extra.omnios ooce/library/libexif extra.omnios ooce/library/libgif +extra.omnios ooce/library/libid3tag extra.omnios ooce/library/libjpeg-turbo extra.omnios ooce/library/libogg extra.omnios ooce/library/libpng extra.omnios ooce/library/libvorbis +extra.omnios ooce/library/libwebp extra.omnios ooce/library/nettle extra.omnios ooce/library/openldap +extra.omnios ooce/library/postgresql-14 extra.omnios ooce/library/tiff extra.omnios ooce/library/unbound +extra.omnios ooce/multimedia/dav1d +extra.omnios ooce/multimedia/ffmpeg +extra.omnios ooce/multimedia/minidlna +extra.omnios ooce/multimedia/x264 +extra.omnios ooce/network/nsd extra.omnios ooce/network/openldap extra.omnios ooce/network/unbound +extra.omnios ooce/print/cups extra.omnios ooce/security/gnupg extra.omnios ooce/system/htop +extra.omnios ooce/terminal/minicom extra.omnios ooce/text/datamash +extra.omnios ooce/text/hunspell +extra.omnios ooce/util/pass diff --git a/doc/pkglist.aarch64 b/doc/pkglist.aarch64 index a51635e71..f9b101fc6 100644 --- a/doc/pkglist.aarch64 +++ b/doc/pkglist.aarch64 @@ -21,13 +21,40 @@ ooce/file/tree ooce/library/libjpeg-turbo ooce/network/openldap -f libsandheaders ooce/library/freetype2 +ooce/fonts/liberation +ooce/multimedia/x264 +ooce/multimedia/dav1d +ooce/library/libid3tag +ooce/library/libexif +ooce/database/lmdb +ooce/database/bdb +ooce/database/postgresql-common +ooce/database/postgresql-14 -f libsandheaders +ooce/terminal/minicom +ooce/text/hunspell +ooce/compress/pbzip2 +ooce/compress/pigz +ooce/print/cups +############################################################################### .SYSROOT ooce/audio/flac ooce/library/libvorbis ooce/network/unbound -f libsandheaders ooce/network/openldap +ooce/library/fontconfig +ooce/library/libwebp +ooce/database/postgresql-14 +ooce/network/nsd +############################################################################### .SYSROOT ooce/network/unbound ooce/library/gnutls +############################################################################### .SYSROOT ooce/security/gnupg +ooce/multimedia/ffmpeg +############################################################################### +.SYSROOT +ooce/multimedia/minidlna +ooce/util/pass +###############################################################################