Skip to content

Commit

Permalink
clean some PKGBUILDs
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Dec 9, 2024
1 parent 3315599 commit 282db18
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 74 deletions.
2 changes: 0 additions & 2 deletions mingw-w64-cython/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 0 additions & 6 deletions mingw-w64-doxygen/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
5 changes: 0 additions & 5 deletions mingw-w64-fftw/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 1 addition & 2 deletions mingw-w64-libsoxr/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-luajit/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 8 additions & 16 deletions mingw-w64-msmpi/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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=(
Expand Down Expand Up @@ -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
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-netcdf-cxx/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ build() {
--prefix="${MINGW_PREFIX}"

# file VERSION (generated by configure) confuses those
# CLANG32/64 header files which #include <version>
# CLANG* header files which #include <version>
mv -f VERSION .VERSION

make libh5bzip2_la_LIBADD=-lhdf5 LIBS=-lnetcdf
Expand Down
6 changes: 0 additions & 6 deletions mingw-w64-opencascade/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 2 additions & 6 deletions mingw-w64-petsc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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?)
Expand Down
3 changes: 0 additions & 3 deletions mingw-w64-python-lxml/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
25 changes: 8 additions & 17 deletions mingw-w64-skia/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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="
Expand Down
8 changes: 2 additions & 6 deletions mingw-w64-superlu/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 \
Expand Down
3 changes: 0 additions & 3 deletions mingw-w64-vapoursynth/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 282db18

Please sign in to comment.