From 282db1890a31b758fa07db534c907ed13622267b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Mon, 9 Dec 2024 08:13:06 +0100 Subject: [PATCH] clean some PKGBUILDs --- mingw-w64-cython/PKGBUILD | 2 -- mingw-w64-doxygen/PKGBUILD | 6 ------ mingw-w64-fftw/PKGBUILD | 5 ----- mingw-w64-libsoxr/PKGBUILD | 3 +-- mingw-w64-luajit/PKGBUILD | 2 +- mingw-w64-msmpi/PKGBUILD | 24 ++++++++---------------- mingw-w64-netcdf-cxx/PKGBUILD | 2 +- mingw-w64-opencascade/PKGBUILD | 6 ------ mingw-w64-petsc/PKGBUILD | 8 ++------ mingw-w64-python-lxml/PKGBUILD | 3 --- mingw-w64-skia/PKGBUILD | 25 ++++++++----------------- mingw-w64-superlu/PKGBUILD | 8 ++------ mingw-w64-vapoursynth/PKGBUILD | 3 --- 13 files changed, 23 insertions(+), 74 deletions(-) diff --git a/mingw-w64-cython/PKGBUILD b/mingw-w64-cython/PKGBUILD index 3c77ebebfabc0..01a07d076b7e3 100644 --- a/mingw-w64-cython/PKGBUILD +++ b/mingw-w64-cython/PKGBUILD @@ -28,8 +28,6 @@ sha256sums=('7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff') build() { cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" - # avoid clang32 OOMing by reducing memory usage - [[ ${MSYSTEM} == CLANG32 ]] && CFLAGS+=" -g0" ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation } diff --git a/mingw-w64-doxygen/PKGBUILD b/mingw-w64-doxygen/PKGBUILD index 2b3a338e4871d..c36d1e8eb4878 100644 --- a/mingw-w64-doxygen/PKGBUILD +++ b/mingw-w64-doxygen/PKGBUILD @@ -75,12 +75,6 @@ build() { _extra_config+=("-Dbuild_wizard=ON") fi - if [[ "${MSYSTEM}" == "CLANG32" ]]; then - # https://github.com/msys2/MINGW-packages/issues/11787 - _extra_config+=("-DCMAKE_CXX_FLAGS_RELEASE=-O1 -DNDEBUG") - _extra_config+=("-DDCMAKE_C_FLAGS_RELEASE=-O1 -DNDEBUG") - fi - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake -Wno-dev \ -G"Ninja" \ diff --git a/mingw-w64-fftw/PKGBUILD b/mingw-w64-fftw/PKGBUILD index 5ac978b1a0d24..25da11262dbea 100644 --- a/mingw-w64-fftw/PKGBUILD +++ b/mingw-w64-fftw/PKGBUILD @@ -48,11 +48,6 @@ prepare() { } build() { - # clang complains when trying to use an sse2 intrinsic if sse2 is not enabled - if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-i686* ]]; then - CFLAGS+=" -msse2" - fi - for cur in ${precision}; do [[ -d "${srcdir}"/build-${MSYSTEM}-${cur} ]] && rm -rf "${srcdir}"/build-${MSYSTEM}-${cur} mkdir -p "${srcdir}"/build-${MSYSTEM}-${cur} && cd "${srcdir}"/build-${MSYSTEM}-${cur} diff --git a/mingw-w64-libsoxr/PKGBUILD b/mingw-w64-libsoxr/PKGBUILD index c15f0f5e4f1f9..5a15518bab636 100644 --- a/mingw-w64-libsoxr/PKGBUILD +++ b/mingw-w64-libsoxr/PKGBUILD @@ -16,8 +16,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-ninja" "git") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - $([[ ${MINGW_PACKAGE_PREFIX} != *-clang-i686-* && ${MINGW_PACKAGE_PREFIX} != *-clang-x86_64-* ]] \ - || echo "${MINGW_PACKAGE_PREFIX}-openmp")) + "${MINGW_PACKAGE_PREFIX}-omp") source=("git+https://git.code.sf.net/p/soxr/code#commit=945b592b70470e29f917f4de89b4281fbbd540c0" "0001-libsoxr-fix-pkgconfig-file.patch" "0002-libsoxr-fix-documentation-installation.patch" diff --git a/mingw-w64-luajit/PKGBUILD b/mingw-w64-luajit/PKGBUILD index 7509568ed8f9d..ec9a8e8a82952 100644 --- a/mingw-w64-luajit/PKGBUILD +++ b/mingw-w64-luajit/PKGBUILD @@ -57,7 +57,7 @@ build() { cd "${_realname}" XCFLAGS=-DLUAJIT_ENABLE_GC64 - if [[ "$MSYSTEM" == "MINGW32" || "$MSYSTEM" == "CLANG32" ]]; then + if [[ "${CARCH}" == "i686" ]]; then # https://github.com/msys2/MINGW-packages/issues/17042 XCFLAGS+=" -DLUAJIT_NO_UNWIND" fi diff --git a/mingw-w64-msmpi/PKGBUILD b/mingw-w64-msmpi/PKGBUILD index 365d26c264678..07f1d341a9069 100644 --- a/mingw-w64-msmpi/PKGBUILD +++ b/mingw-w64-msmpi/PKGBUILD @@ -12,9 +12,7 @@ url="https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi" license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-binutils" "${MINGW_PACKAGE_PREFIX}-cc") depends=("${MINGW_PACKAGE_PREFIX}-cc" - $([[ ${MINGW_PACKAGE_PREFIX} == *-clang-* && ${MSYSTEM} != CLANG64 ]] || \ - echo "${MINGW_PACKAGE_PREFIX}-fc") - ) + "${MINGW_PACKAGE_PREFIX}-fc") optdepends=("${MINGW_PACKAGE_PREFIX}-tcl: build & run test suite") options=('strip') source=( @@ -61,10 +59,8 @@ build() { # Headers mkdir -p include cp $srcdir/mpi.h include - if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* || ${MSYSTEM} == CLANG64 ]]; then - cp $srcdir/{mpif.h,mpi.f90} include - cp $srcdir/mpifptr.h.${CARCH} include/mpifptr.h - fi + cp $srcdir/{mpif.h,mpi.f90} include + cp $srcdir/mpifptr.h.${CARCH} include/mpifptr.h # C/C++ Compiler wrappers mkdir -p bin @@ -78,17 +74,13 @@ build() { cp bin/mpicxx.exe bin/mpic++.exe # Fortran Compiler wrappers - if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* || ${MSYSTEM} == CLANG64 ]]; then - $CC ${cflags} -o bin/mpifort.exe -DFC "${mpic}" - cp bin/mpifort.exe bin/mpif77.exe - cp bin/mpifort.exe bin/mpif90.exe - fi + $CC ${cflags} -o bin/mpifort.exe -DFC "${mpic}" + cp bin/mpifort.exe bin/mpif77.exe + cp bin/mpifort.exe bin/mpif90.exe # FORTRAN90 MPI modules - if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* || ${MSYSTEM} == CLANG64 ]]; then - bin/mpifort -c -Jinclude -cpp ${srcdir}/mpi.f90 - rm mpi.o - fi + bin/mpifort -c -Jinclude -cpp ${srcdir}/mpi.f90 + rm mpi.o } package() { diff --git a/mingw-w64-netcdf-cxx/PKGBUILD b/mingw-w64-netcdf-cxx/PKGBUILD index 73defe86a5cf5..fb3eabdaf57eb 100644 --- a/mingw-w64-netcdf-cxx/PKGBUILD +++ b/mingw-w64-netcdf-cxx/PKGBUILD @@ -37,7 +37,7 @@ build() { --prefix="${MINGW_PREFIX}" # file VERSION (generated by configure) confuses those - # CLANG32/64 header files which #include + # CLANG* header files which #include mv -f VERSION .VERSION make libh5bzip2_la_LIBADD=-lhdf5 LIBS=-lnetcdf diff --git a/mingw-w64-opencascade/PKGBUILD b/mingw-w64-opencascade/PKGBUILD index 3e85d971d0b86..c747631800406 100644 --- a/mingw-w64-opencascade/PKGBUILD +++ b/mingw-w64-opencascade/PKGBUILD @@ -169,12 +169,6 @@ build() { ) fi - if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-i686 ]]; then - common_config+=( - -DBUILD_DOC_Overview=Off - ) - fi - declare -a _extra_config if check_option "debug" "n"; then _extra_config+=("-DCMAKE_BUILD_TYPE=Release") diff --git a/mingw-w64-petsc/PKGBUILD b/mingw-w64-petsc/PKGBUILD index 8d8fd14fbb8ec..52fce87d8f0ad 100644 --- a/mingw-w64-petsc/PKGBUILD +++ b/mingw-w64-petsc/PKGBUILD @@ -126,14 +126,10 @@ _petsc() { libs+=" -lgfortran -lquadmath" pc_libs="$libs" else - # elif [[ ${MSYSTEM} == CLANG32 ]]; then opts+=" --with-fc=0" - # else - # opts+=" --with-fc=${MINGW_PREFIX}/bin/flang" - # libs+=" -lFortranRuntime -lFortranDecimal" - # fi - # if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then + # opts+=" --with-fc=${MINGW_PREFIX}/bin/flang" cflags+=" -Wno-incompatible-function-pointer-types" + # libs+=" -lFortranRuntime -lFortranDecimal" fi case $1 in ?m?) diff --git a/mingw-w64-python-lxml/PKGBUILD b/mingw-w64-python-lxml/PKGBUILD index bddd38115ef8f..af506558a682f 100644 --- a/mingw-w64-python-lxml/PKGBUILD +++ b/mingw-w64-python-lxml/PKGBUILD @@ -56,9 +56,6 @@ build() { rm -rf python-build-${MSYSTEM} | true cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" - # avoid clang32 OOMing by reducing memory usage - [[ ${MSYSTEM} == CLANG32 ]] && CFLAGS+=" -g0" - ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation \ -C--build-option=--with-cython -C--build-option=--with-unicode-strings } diff --git a/mingw-w64-skia/PKGBUILD b/mingw-w64-skia/PKGBUILD index d089e4beedc86..645c070478f55 100644 --- a/mingw-w64-skia/PKGBUILD +++ b/mingw-w64-skia/PKGBUILD @@ -104,14 +104,12 @@ build() { BUILDTYPE="Debug" fi - case ${CARCH} in - i686) - _arch=x86 - ;; - x86_64) + if [[ ${CARCH} == aarch64 ]]; then + _arch=arm64 + else _arch=x64 - ;; - esac + fi + case ${BUILDTYPE} in Release) _is_official=true @@ -121,20 +119,13 @@ build() { ;; esac - case ${MSYSTEM} in - CLANG64|CLANG32) - export CXX=clang++ - export CC=clang + if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then export LD=clang++ export AR=llvm-ar - ;; - *) - export CXX=g++ - export CC=gcc + else export LD=g++ export AR=ar - ;; - esac + fi cd "${srcdir}"/skia ${MINGW_PREFIX}/bin/gn gen "${PWD}/out/${BUILDTYPE}-${MSYSTEM}" --args=" diff --git a/mingw-w64-superlu/PKGBUILD b/mingw-w64-superlu/PKGBUILD index a9033f2626d9c..b2d6cbdebccd9 100644 --- a/mingw-w64-superlu/PKGBUILD +++ b/mingw-w64-superlu/PKGBUILD @@ -14,7 +14,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-openblas") makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja") - #$( [[ ${MSYSTEM} == CLANG32 ]] || echo "${MINGW_PACKAGE_PREFIX}-fc")) + #"${MINGW_PACKAGE_PREFIX}-fc") checkdepends=("${MINGW_PACKAGE_PREFIX}-tcl") source=("https://github.com/xiaoyeli/${_realname}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz" 'all.tcl' @@ -58,11 +58,7 @@ build() { mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared" - # if [[ ${MSYSTEM} == CLANG32 ]]; then - # _extra_config+=("-DXSDK_ENABLE_Fortran=OFF") - # else - # _extra_config+=("-DXSDK_ENABLE_Fortran=ON") - # fi + # _extra_config+=("-DXSDK_ENABLE_Fortran=ON") MSYS2_ARG_CONV_EXCL='-DCMAKE_INSTALL_PREFIX=' \ ${MINGW_PREFIX}/bin/cmake.exe \ diff --git a/mingw-w64-vapoursynth/PKGBUILD b/mingw-w64-vapoursynth/PKGBUILD index 4accda80c4e91..d9f7478f739c1 100644 --- a/mingw-w64-vapoursynth/PKGBUILD +++ b/mingw-w64-vapoursynth/PKGBUILD @@ -87,9 +87,6 @@ package() { export LDFLAGS="-L$(cygpath -wm $pkgdir)/${MINGW_PREFIX}/lib $LDFLAGS" cd "${srcdir}/${_realname}-R${pkgver}" - # avoid clang32 OOMing by reducing memory usage - [[ ${MSYSTEM} == CLANG32 ]] && CFLAGS+=" -g0" - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ --root="${pkgdir}" --optimize=1