build 1.12 KB
Newer Older
gsell's avatar
gsell committed
1
#!/usr/bin/env modbuild
gsell's avatar
gsell committed
2 3 4 5 6 7 8 9 10 11 12

case ${OS} in
Darwin )
	# cocoa doesn't work with GCC!?
	#config_args='--enable-cocoa --disable-x11'
	config_args='--with-finkdir=/opt/X11 --disable-cocoa'
	;;
*)
	;;
esac

gsell's avatar
gsell committed
13
pbuild::configure() {
14
	"${MODULE_SRCDIR}"/configure \
gsell's avatar
gsell committed
15
		--disable-ldap \
16 17 18
		--disable-mysql \
		--disable-opengl \
		--disable-python \
gsell's avatar
gsell committed
19 20 21 22 23 24 25 26 27
		--enable-fftw3 \
		--with-cc=${CC} \
		--with-cxx=${CXX} \
		--with-f77=${F77} \
		--with-ld=${CXX} \
		${config_args} \
		|| exit 1
}

gsell's avatar
gsell committed
28
pbuild::build() {
29 30 31
	make -j 4
}

gsell's avatar
gsell committed
32
pbuild::install() {
gsell's avatar
gsell committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
	make clean

	rm -f  Makefile
	rm -rf config.*
	rm -rf core
	rm -rf io
	rm -rf math
	rm -rf net
	rm -rf hist
	rm -rf tree
	rm -rf graf2d
	rm -rf graf3d
	rm -rf gui
	rm -rf html
	rm -rf montecarlo
	rm -rf geom
	rm -rf proof
	rm -rf sql
	rm -rf misc
	rm -rf test
	rm -rf tmva
	rm -rf tutorials
	rm -rf rootx

	mkdir -p share
	mv man share

	mkdir -p "${PREFIX}"
	cp -rv * "${PREFIX}"
	mkdir -p "${DOCDIR}"
	mv "${PREFIX}/LICENSE" "${DOCDIR}"
	mv "${PREFIX}/README"  "${DOCDIR}"
}

gsell's avatar
gsell committed
67 68 69 70
pbuild::add_to_group 'Compiler'
pbuild::set_runtime_dependencies "${COMPILER}"
pbuild::set_build_dependencies "${COMPILER}"
pbuild::make_all