From 70d735235265c93aa8c0d11de2e2b37c08b8e1e5 Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Sat, 28 Apr 2012 07:58:26 +0000 Subject: sci-chemistry/mosflm: Unbundle licbf and libjpeg, fix parallel build, Drop stable ppc keyword due to broken deps (Portage version: 2.2.0_alpha101/cvs/Linux x86_64) --- sci-chemistry/mosflm/ChangeLog | 11 ++- sci-chemistry/mosflm/files/7.0.7-parallel.patch | 92 +++++++++++++++++++++++++ sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild | 6 +- sci-chemistry/mosflm/mosflm-7.0.7-r1.ebuild | 71 +++++++++++++++++++ 4 files changed, 175 insertions(+), 5 deletions(-) create mode 100644 sci-chemistry/mosflm/files/7.0.7-parallel.patch create mode 100644 sci-chemistry/mosflm/mosflm-7.0.7-r1.ebuild (limited to 'sci-chemistry') diff --git a/sci-chemistry/mosflm/ChangeLog b/sci-chemistry/mosflm/ChangeLog index 791e4d640c42..26d7e29e257b 100644 --- a/sci-chemistry/mosflm/ChangeLog +++ b/sci-chemistry/mosflm/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/mosflm -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/ChangeLog,v 1.14 2011/09/07 15:21:32 jlec Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/ChangeLog,v 1.15 2012/04/28 07:58:26 jlec Exp $ + +*mosflm-7.0.7-r1 (28 Apr 2012) + + 28 Apr 2012; Justin Lecher +files/7.0.7-parallel.patch, + mosflm-7.0.6-r2.ebuild, +mosflm-7.0.7-r1.ebuild: + Unbundle licbf and libjpeg, fix parallel build, Drop stable ppc keyword due + to broken deps *mosflm-7.0.7 (07 Sep 2011) diff --git a/sci-chemistry/mosflm/files/7.0.7-parallel.patch b/sci-chemistry/mosflm/files/7.0.7-parallel.patch new file mode 100644 index 000000000000..df0a8b63273a --- /dev/null +++ b/sci-chemistry/mosflm/files/7.0.7-parallel.patch @@ -0,0 +1,92 @@ + Makefile | 21 ++++++++++----------- + cbf/Makefile | 9 +++++++-- + 2 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/Makefile b/Makefile +index 37f4c7e..51d4164 100644 +--- a/Makefile ++++ b/Makefile +@@ -22,8 +22,8 @@ DPSLIBS = lib/DPSLIB.a + CBFLIBS = cbf/lib/libcbf.a + JPGLIBS = jpg/libjpeg.a + +-all: $(DPSLIBS) $(CBFLIBS) $(JPGLIBS) +- cd mosflm ; make ++all: $(DPSLIBS) ++ $(MAKE) -C mosflm + + ########################################################################## + # # +@@ -47,22 +47,21 @@ dpslibs: + + cbflibs: + rm -f `find ./cbf -name "*.a" -print` +- cd cbf ; make all ; if [ -f $(RANLIB) ]; \ +- then $(RANLIB) lib/libcbf.a; fi ++ $(MAKE) -C cbf all + + jpglibs: +- cd jpg ; if [ ! -f Makefile ]; then ./configure ; fi; make libjpeg.a ++ cd jpg ; if [ ! -f Makefile ]; then ./configure ; fi; $(MAKE) libjpeg.a + + ${DPSLIBS}: +- make dpslibs ++ $(MAKE) dpslibs + + ${CBFLIBS}: +- make cbflibs ++ $(MAKE) cbflibs + + ${JPGLIBS}: +- make jpglibs ++ $(MAKE) jpglibs + +-libs: ${DPSLIBS} ${CBFLIBS} ${JPGLIBS} ++libs: ${DPSLIBS} ${CBFLIBS} + @echo "****************************************************************" + @echo " Making libraries for system ${HOSTTYPE}" + @echo "****************************************************************" +@@ -71,11 +70,11 @@ ipmosflm: libs + @echo "****************************************************************" + @echo " Making IPMOSFLM for system ${HOSTTYPE}" + @echo "****************************************************************" +- cd mosflm ; make ipmosflm ++ $(MAKE) -C mosflm ipmosflm + + force: + rm bin/ipmosflm +- make ipmosflm ++ $(MAKE) ipmosflm + + install: + @echo "the executable is in ${MOSHOME}/bin/ipmosflm" +diff --git a/cbf/Makefile b/cbf/Makefile +index e61497c..c3c94ac 100644 +--- a/cbf/Makefile ++++ b/cbf/Makefile +@@ -362,6 +362,8 @@ HEADERS = $(INCLUDE)/cbf.h \ + $(EXAMPLES)/img.h \ + $(INCLUDE)/md5.h + ++OBJ = $(subst .c,.o,$(SOURCE)) ++ + # + # Compile the library and examples + # +@@ -379,11 +381,14 @@ $(INSTALLDIR): + $(LIB): + mkdir $(LIB) + ++ ++.c.o: $(SOURCE) $(HEADERS) ++ $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $< ++ + # + # CBF library + # +-$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) +- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) ++$(LIB)/libcbf.a: $(OBJ) $(COMMONDEP) + $(AR) cr $@ *.o + rm *.o + if [ -f $(RANLIB) ]; then $(RANLIB) $@ ; fi diff --git a/sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild b/sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild index f97143e7fce1..647fdc9a986c 100644 --- a/sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild +++ b/sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild,v 1.10 2011/07/19 19:45:36 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/mosflm-7.0.6-r2.ebuild,v 1.11 2012/04/28 07:58:26 jlec Exp $ EAPI="3" @@ -15,7 +15,7 @@ SRC_URI="${HOMEPAGE}ver${MY_PV}/build-it-yourself/${MY_P}.tgz" LICENSE="ccp4" SLOT="0" -KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux" +KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux" IUSE="" RDEPEND=" diff --git a/sci-chemistry/mosflm/mosflm-7.0.7-r1.ebuild b/sci-chemistry/mosflm/mosflm-7.0.7-r1.ebuild new file mode 100644 index 000000000000..bb6f9f3b70dc --- /dev/null +++ b/sci-chemistry/mosflm/mosflm-7.0.7-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/mosflm-7.0.7-r1.ebuild,v 1.1 2012/04/28 07:58:26 jlec Exp $ + +EAPI=4 + +inherit eutils fortran-2 toolchain-funcs versionator + +MY_PV="$(delete_all_version_separators)" +MY_P="${PN}${MY_PV}" + +DESCRIPTION="A program for integrating single crystal diffraction data from area detectors" +HOMEPAGE="http://www.mrc-lmb.cam.ac.uk/harry/mosflm/" +SRC_URI="${HOMEPAGE}ver${MY_PV}/build-it-yourself/${MY_P}.tgz" + +LICENSE="ccp4" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + virtual/fortran + app-shells/tcsh + virtual/jpeg + sci-libs/cbflib + sci-libs/ccp4-libs + sys-libs/ncurses + x11-libs/libxdl_view" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + sed \ + -e "s:../cbf/lib/libcbf.a:-lcbf -limg:g" \ + -e "s:../jpg/libjpeg.a:-ljpeg:g" \ + -i ${PN}/Makefile || die + + sed \ + -e '/jinclude.h/d' \ + -i mosflm/mosflm_jpeg.c || die + + epatch \ + "${FILESDIR}"/${PV}-parallel.patch \ + "${FILESDIR}"/7.0.6-impl-dec.patch + + rm -rf test.f {cbf,jpg}/*.{h,c} || die +} + +src_compile() { + emake \ + MOSHOME="${S}" \ + DPS="${S}" \ + FC=$(tc-getFC) \ + FLINK=$(tc-getFC) \ + CC=$(tc-getCC) \ + AR_FLAGS=vru \ + MOSLIBS='-lccp4f -lccp4c -lxdl_view -lcurses -lXt -lmmdb -lccif -lstdc++' \ + MCFLAGS="-O0 -fno-second-underscore" \ + MOSFLAGS="${FFLAGS} -fno-second-underscore" \ + FFLAGS="${FFLAGS:- -O2} -fno-second-underscore" \ + CFLAGS="${CFLAGS}" \ + MOSCFLAGS="${CFLAGS}" \ + LFLAGS="${LDFLAGS}" +} + +src_install() { + exeinto /usr/libexec/ccp4/bin/ + doexe bin/ipmosflm + dosym ../libexec/ccp4/bin/ip${PN} /usr/bin/ip${PN} +} -- cgit v1.2.3-65-gdbad