build 869 Bytes
Newer Older
gsell's avatar
gsell committed
1
#!/usr/bin/env modbuild
gsell's avatar
gsell committed
2

3 4 5
pbuild::patch_sources_Darwin() {
	if [[ "${V_MAJOR}" == "4" ]]; then
		patch -p1 < "${BUILD_BLOCK_DIR}/${V_MAJOR}/non-dead-strip.patch"
gsell's avatar
gsell committed
6
		patch -p1 < "${BUILD_BLOCK_DIR}/${V_MAJOR}/configure-as.patch"
7 8 9
	fi
}

gsell's avatar
gsell committed
10
pbuild::configure() {
11
	"${MODULE_SRCDIR}"/configure \
gsell's avatar
gsell committed
12 13 14 15 16 17 18
		--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 \
gsell's avatar
gsell committed
19
		--with-build-config=bootstrap-debug \
gsell's avatar
gsell committed
20
		--with-pkgversion="PSI Environment Module" \
21
		--with-build-config=bootstrap-debug \
gsell's avatar
gsell committed
22 23 24 25 26
		|| exit 1
}

# use system gcc to compile
declare -rx CC=gcc
gsell's avatar
gsell committed
27
declare -rx CXX=g++
gsell's avatar
gsell committed
28

gsell's avatar
gsell committed
29 30 31
pbuild::add_to_group 'Programming'
pbuild::set_docfiles 'COPYING' 'COPYING.LIB' 'COPYING.RUNTIME' 'COPYING3' 'COPYING3.LIB' 'NEWS' 'README'
pbuild::make_all
gsell's avatar
gsell committed
32