diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 65 |
1 files changed, 50 insertions, 15 deletions
@@ -4,7 +4,7 @@ pkgname=mongodb44 _pkgname=mongodb # #.<odd number>.# releases are unstable development/testing pkgver=4.4.18 -pkgrel=1 +pkgrel=2 pkgdesc="A high-performance, open source, schema-free document-oriented database (last version to support non-avx CPUs)" arch=("x86_64" "aarch64") url="https://www.mongodb.com/" @@ -25,7 +25,8 @@ source=(https://fastdl.mongodb.org/src/mongodb-src-r$pkgver.tar.gz mongodb-4.4.1-gcc11.patch mongodb-4.4.10-boost-1.79.patch mongodb-4.4.10-no-force-lld.patch - mongodb-4.4.15-adjust-cache-alignment-assumptions.patch) + mongodb-4.4.15-adjust-cache-alignment-assumptions.patch.arm64 + mongodb-4.4.10-boost-1.81.patch) sha256sums=('03723468a175ea77c67ede4b941f1c27e45d0b086c697a8201d12581a09d1713' '3757d548cfb0e697f59b9104f39a344bb3d15f802608085f838cb2495c065795' 'b7d18726225cd447e353007f896ff7e4cbedb2f641077bce70ab9d292e8f8d39' @@ -35,22 +36,53 @@ sha256sums=('03723468a175ea77c67ede4b941f1c27e45d0b086c697a8201d12581a09d1713' 'f7e6d87b68f7703cdbd45e255962ed5a4f6d583aa76d6fcf4fdc7005211fbf06' '4202e039944fde80daa1bd3a5f332c522d8db96b4c3cf7c764355c5fc9089137' '76e61d1d4f5b4e7c8cd760b1fc0dc86978a8e180d184cdfc7f61fba7d5543a95' - 'e748b669bca526a08c06e5d8ec2bd371b938e57f83a2339d62e38a4527810e47') - + 'e748b669bca526a08c06e5d8ec2bd371b938e57f83a2339d62e38a4527810e47' + '7bfeadf2fb7e13bd93c4515faada070410ddd8e276cc947b5b2b2292539051b7') + _scons_args=( - --use-system-pcre # wait for pcre 8.44+ https://jira.mongodb.org/browse/SERVER-40836 and https://jira.mongodb.org/browse/SERVER-42990 + CC="${CC:-gcc}" + CXX="${CXX:-g++}" + AR="${AR:-ar}" + + --use-system-pcre --use-system-snappy - --use-system-yaml # https://jira.mongodb.org/browse/SERVER-43980 + --use-system-yaml --use-system-zlib --use-system-stemmer --use-sasl-client --ssl --disable-warnings-as-errors - --use-system-boost # Doesn't compile + --use-system-boost --use-system-zstd --runtime-hardening=off ) +all-flag-vars() { + echo {C,CXX}FLAGS +} + +_filter-var() { + local f x var=$1 new=() + shift + + for f in ${!var} ; do + for x in "$@" ; do + # Note this should work with globs like -O* + [[ ${f} == ${x} ]] && continue 2 + done + new+=( "${f}" ) + done + export ${var}="${new[*]}" +} + +filter-flags() { + local v + for v in $(all-flag-vars) ; do + _filter-var ${v} "$@" + done + return 0 +} + prepare() { cd "${srcdir}/${_pkgname}-src-r${pkgver}" @@ -75,7 +107,7 @@ prepare() { if [[ $CARCH == "aarch64" ]]; then _scons_args+=(--use-hardware-crc32=off) - patch -Np1 -i ../mongodb-4.4.15-adjust-cache-alignment-assumptions.patch + patch -Np1 -i ../mongodb-4.4.15-adjust-cache-alignment-assumptions.patch.arm64 fi if check_option debug y; then @@ -87,19 +119,22 @@ prepare() { fi # apply gentoo patches - patch -Np1 -i ../mongodb-4.4.1-fix-scons.patch - patch -Np1 -i ../mongodb-4.4.8-no-compass.patch - patch -Np1 -i ../mongodb-4.4.1-boost.patch - patch -Np1 -i ../mongodb-4.4.1-gcc11.patch - patch -Np1 -i ../mongodb-4.4.10-boost-1.79.patch - patch -Np1 -i ../mongodb-4.4.10-no-force-lld.patch + for file in $srcdir/*.patch; do + echo "Applying patch $file..." + patch -Np1 -i $file + done } build() { cd "${srcdir}/${_pkgname}-src-r${pkgver}" + if check_option debug n; then + filter-flags '-m*' + filter-flags '-O?' + fi + export SCONSFLAGS="$MAKEFLAGS" - ./buildscripts/scons.py install-devcore "${_scons_args[@]}" + ./buildscripts/scons.py "${_scons_args[@]}" install-devcore } package() { |