37 lines
1.1 KiB
Plaintext
Executable File
37 lines
1.1 KiB
Plaintext
Executable File
#!/usr/bin/env modbuild
|
|
|
|
pbuild::patch_sources_Darwin() {
|
|
if (( V_MAJOR == 4 && V_MINOR <= 8 )) || \
|
|
(( V_MAJOR == 4 && V_MINOR == 9 && V_PATCHLVL < 4)); then
|
|
patch -p1 < "${BUILD_BLOCK_DIR}/${V_MAJOR}/non-dead-strip.patch"
|
|
patch -p1 < "${BUILD_BLOCK_DIR}/${V_MAJOR}/configure-as.patch"
|
|
fi
|
|
if (( V_MAJOR == 5 )) || (( V_MAJOR == 6 )); then
|
|
patch -p1 < "${BUILD_BLOCK_DIR}/${V_MAJOR}/PR57438_avoiding_empty_function_bodies_and_trailing_labels.patch"
|
|
fi
|
|
}
|
|
|
|
pbuild::configure() {
|
|
"${MODULE_SRCDIR}"/configure \
|
|
--prefix="${PREFIX}" \
|
|
--enable-languages=c,c++,objc,obj-c++,lto,fortran \
|
|
--with-gmp="${GMP_PREFIX}" \
|
|
--with-mpfr="${MPFR_PREFIX}" \
|
|
--with-mpc="${MPC_PREFIX}" \
|
|
--enable-lto \
|
|
--disable-multilib \
|
|
--with-build-config=bootstrap-debug \
|
|
--with-pkgversion="PSI Environment Module" \
|
|
--with-build-config=bootstrap-debug \
|
|
|| exit 1
|
|
}
|
|
|
|
# use system gcc to compile
|
|
declare -rx CC=gcc
|
|
declare -rx CXX=g++
|
|
|
|
pbuild::add_to_group 'Programming'
|
|
pbuild::set_docfiles 'COPYING' 'COPYING.LIB' 'COPYING.RUNTIME' 'COPYING3' 'COPYING3.LIB' 'NEWS' 'README'
|
|
pbuild::make_all
|
|
|