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

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

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

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

gsell's avatar
gsell committed
30 31 32
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
33