From 63610a8d387677c711c9f0e54afb0cd1e199c485 Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Thu, 1 Mar 2012 07:41:06 +0000 Subject: Add patch to compile with latest gcc, #406277, provided by Helmut Jarausch; moved to eapi=4 and autotools-utils.eclass Package-Manager: portage-2.2.0_alpha89/cvs/Linux x86_64 --- sci-libs/mathgl/ChangeLog | 7 +- sci-libs/mathgl/Manifest | 17 +- sci-libs/mathgl/files/mathgl-1.11.2-cast.patch | 206 +++++++++++++++++++++++++ sci-libs/mathgl/mathgl-1.11.2.ebuild | 89 ++++++----- sci-libs/mathgl/metadata.xml | 2 +- 5 files changed, 276 insertions(+), 45 deletions(-) create mode 100644 sci-libs/mathgl/files/mathgl-1.11.2-cast.patch (limited to 'sci-libs') diff --git a/sci-libs/mathgl/ChangeLog b/sci-libs/mathgl/ChangeLog index 9d08a7b5c798..bf337c1f1566 100644 --- a/sci-libs/mathgl/ChangeLog +++ b/sci-libs/mathgl/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sci-libs/mathgl # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/ChangeLog,v 1.26 2012/02/28 00:56:32 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/ChangeLog,v 1.27 2012/03/01 07:41:06 jlec Exp $ + + 01 Mar 2012; Justin Lecher mathgl-1.11.2.ebuild, + +files/mathgl-1.11.2-cast.patch, metadata.xml: + Add patch to compile with latest gcc, #406277, provided by Helmut Jarausch; + moved to eapi=4 and autotools-utils.eclass 28 Feb 2012; Patrick Lauer mathgl-1.11.1.1.ebuild, mathgl-1.11.2.ebuild: diff --git a/sci-libs/mathgl/Manifest b/sci-libs/mathgl/Manifest index 1aa318eeece5..e2d54fcadf50 100644 --- a/sci-libs/mathgl/Manifest +++ b/sci-libs/mathgl/Manifest @@ -1,10 +1,21 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + AUX mathgl-1.10.2-gcc43.patch 345 RMD160 81d76baed06d779853dd96ce169f5bef620629b2 SHA1 e50c8e600cb243c809d3a6648344bbe29146666d SHA256 2165125d4677b882548530dc21a0368bf7ed27cab516ee6f78604f98b3b60ac9 +AUX mathgl-1.11.2-cast.patch 8224 RMD160 32840d56eac5828034dad3a8be1d6ac6a2fb357a SHA1 d05828a5af9aac425bbb3cfc7db7d674f2538c29 SHA256 8993235430372e9eda84eba5b5af3ac63aba386b830d13fdf249d580fcf17430 AUX mathgl-1.11.2-zlib.patch 687 RMD160 88205ba7316cc37d4ba170e9202e5faf965f2a96 SHA1 36acb0818d54d43be8a97f06613332e06a0c0f5c SHA256 417da2322b380ce538a1fc3abaa14f68130761e7a9c1221190142d55e926a007 AUX mathgl-octave-3.4.patch 396 RMD160 620581ff85c8025d25819ef23af6e4885e1d26e9 SHA1 02e61712be707e2f9e116304b41245da47b3b949 SHA256 a6262a8e67a280cc19b8a0ab501c17400d46a91e0eb8b46967c5354f120380b6 DIST STIX_font.tgz 2450541 RMD160 7595c2b99c5982d72b1ef551ab8f9d65237e5466 SHA1 3cbc4f5090cd37d1b35d594150357550d2639f81 SHA256 6408290fd4a5267637a88507344a8f07b908ce72f46ef93d09e068fedb67e8fe DIST mathgl-1.11.1.1.tar.gz 4590143 RMD160 058ee41aefa6821cd5fa45651406041cee6e0f0c SHA1 06eaad16de16c37b800b0bf538c2379af90cff39 SHA256 10f44bfdd7a03b9654088994b8bc7ebcb8b65d23d0c06327c30a8adc017389d2 DIST mathgl-1.11.2.tar.gz 4641427 RMD160 d7e59015304041b3a582e58bc3f60f51bd36e094 SHA1 16b9ab58e654c5b91374f8a35eafc33630d7f5c0 SHA256 1602244136f42bf4b47a4880cb1ff599f6cce9dfb455f8accdbca668ed680e96 EBUILD mathgl-1.11.1.1.ebuild 3529 RMD160 87e5523afa57a19a8ab7b450f4de66104217eb1d SHA1 2498327c5dc21ad7daac8a5df97d540f68896dc9 SHA256 357bbc8659879fbcf925a573d10629fc026033606b590f0632a3386c42b46d23 -EBUILD mathgl-1.11.2.ebuild 3611 RMD160 15b3bb94c89f92f29b42c31850b3b0e1b005b8d9 SHA1 5910914ac570a495a3e41d8280323a270e413cc9 SHA256 5df8f08e1ebe6ca7b08f3ca7a75ee5a3744282bc8cb0cd3c81ed1123ca96524e -MISC ChangeLog 5123 RMD160 a59cb4613d04b8cabb412766116eb6f8f2e66a5e SHA1 b6215af7421f257fe7e7602bff26b058a171cdf9 SHA256 6c6ba7ecddc4ab42265c9839ab9727ad1e13a900840f11415fe2ffc79d63bbd0 -MISC metadata.xml 403 RMD160 58842b16ab72ab3b23b8d29eaf00dd2c05da11c9 SHA1 de3dde83893663018de696e3e07010a276db0fff SHA256 2e033d0243bbbafcb9397978f74e7bf0edcb03cfb6f2d2d5ff9e22cdf5e77a42 +EBUILD mathgl-1.11.2.ebuild 3661 RMD160 6f6ff4712ac24fa86e30f14581f933e0bd71cdef SHA1 9df5890548f0b893ff56881ecbc697d85df2a39e SHA256 ed8276e8c942f5cd53ab67731053a8c4526a1d35126a883c9aa1ca9a4d1d7b84 +MISC ChangeLog 5362 RMD160 825f69dc002613216ad9370aaeca14d9b531a63e SHA1 080b91305bb88a6222f6e4fc60f0a77ba2460ad1 SHA256 d12714f5c4567c399ec36a85f87ac8b55094aad0e60d55dbf1eb25fcb3bc546f +MISC metadata.xml 403 RMD160 703fd2d7e9b93327bb56cd54cbe78ad12be303ec SHA1 69139c20fa0e59c9b2c98f7b97adc5d939fceb7a SHA256 6b9c9442b5a719e0f2ea741b877df3208c7d2388886417cd8e691446d44f007e +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.18 (GNU/Linux) + +iEUEAREKAAYFAk9PKBcACgkQgAnW8HDreRaJbACYn9t0uXZLwCIhHUSoGBCcI75V ++ACfXk3iVXiB5wUf1gjH2EJIOOUgJTY= +=rf44 +-----END PGP SIGNATURE----- diff --git a/sci-libs/mathgl/files/mathgl-1.11.2-cast.patch b/sci-libs/mathgl/files/mathgl-1.11.2-cast.patch new file mode 100644 index 000000000000..ce73c9489352 --- /dev/null +++ b/sci-libs/mathgl/files/mathgl-1.11.2-cast.patch @@ -0,0 +1,206 @@ +--- mgl/mgl_eps.cpp.ORIG 2011-05-30 13:12:29.000000000 +0200 ++++ mgl/mgl_eps.cpp 2012-02-29 11:26:55.651230100 +0100 +@@ -19,7 +19,7 @@ + ***************************************************************************/ + #include + #include +-#include ++#include + #include "mgl/mgl_eps.h" + #include "mgl/mgl_c.h" + #include "mgl/mgl_f.h" +@@ -85,7 +85,7 @@ + a.x[0]=p1[0]; a.y[0]=p1[1]; a.x[1]=p2[0]; a.y[1]=p2[1]; + a.zz[0]=p1[2]; a.zz[1]=p2[2]; + a.c[0]=(c1[0]+c2[0])/2; a.c[1]=(c1[1]+c2[1])/2; a.c[2]=(c1[2]+c2[2])/2; +-// a.c[0]=c1[0]; a.c[1]=c1[1]; a.c[2]=c1[2]; ++// a.c[0]=c1[0]; a.c[1]=c1[1]; a.c[2]=c1[2]; + a.style=all? 0xffff:PDef; a.s = pPos; + add_prim(a); + pPos = fmod(pPos+hypot(p2[0]-p1[0], p2[1]-p1[1])/pw/1.5, 16); +@@ -197,7 +197,7 @@ + { + mglPrim a(4); + a.s = fscl/PlotFactor; a.w = ftet; +- a.x[0] = (xPos - zoomx1*Width) /zoomx2; ++ a.x[0] = (xPos - zoomx1*Width) /zoomx2; + a.y[0] = (yPos - zoomy1*Height)/zoomy2; + a.x[1] = x; a.y[1] = y; + a.zz[1] = f/fnt->GetFact(s&3); +@@ -260,10 +260,10 @@ + } + //----------------------------------------------------------------------------- + void mglGraphPS::add_light(mreal *b, mreal n0,mreal n1, mreal n2) +-{ +- mreal n[3]={n0,n1,n2}; +- unsigned char r[4]; +- col2int(b,n,r); ++{ ++ mreal n[3]={n0,n1,n2}; ++ unsigned char r[4]; ++ col2int(b,n,r); + b[0]=r[0]/255.; b[1]=r[1]/255.; b[2]=r[2]/255.; b[3]=r[3]/255.; + } + //----------------------------------------------------------------------------- +@@ -303,9 +303,9 @@ + if(!Finished) Finish(); + time_t now; + time(&now); +- +- bool gz = fname[strlen(fname)-1]=='z'; +- void *fp = gz ? gzopen(fname,"wt") : fopen(fname,"wt"); ++ ++ bool gz = fname[strlen(fname)-1]=='z'; ++ void *fp = gz ? (void*)gzopen(fname,"wt") : (void*)fopen(fname,"wt"); + if(!fp) { SetWarn(mglWarnOpen,fname); return; } + mgl_printf(fp, gz, "%%!PS-Adobe-3.0 EPSF-3.0\n%%%%BoundingBox: 0 0 %d %d\n",Width,Height); + mgl_printf(fp, gz, "%%%%Creator: MathGL library\n%%%%Title: %s\n",descr ? descr : fname); +@@ -320,9 +320,9 @@ + mgl_printf(fp, gz, "/m_c {ss 0.3 mul 0 360 arc} def\n"); + mgl_printf(fp, gz, "/d0 {[] 0 setdash} def\n/sd {setdash} def\n"); + +- bool m_p=false,m_x=false,m_d=false,m_v=false,m_t=false, +- m_s=false,m_a=false,m_o=false,m_T=false, +- m_V=false,m_S=false,m_D=false,m_Y=false,m_l=false, ++ bool m_p=false,m_x=false,m_d=false,m_v=false,m_t=false, ++ m_s=false,m_a=false,m_o=false,m_T=false, ++ m_V=false,m_S=false,m_D=false,m_Y=false,m_l=false, + m_L=false,m_r=false,m_R=false,m_X=false,m_P=false; + register long i; + // add mark definition if present +@@ -336,11 +336,11 @@ + if(P[i].m=='S') m_S = true; if(P[i].m=='D') m_D = true; + if(P[i].m=='V') m_V = true; if(P[i].m=='T') m_T = true; + if(P[i].m=='<') m_l = true; if(P[i].m=='L') m_L = true; +- if(P[i].m=='>') m_r = true; if(P[i].m=='R') m_R = true; +- if(P[i].m=='Y') m_Y = true; ++ if(P[i].m=='>') m_r = true; if(P[i].m=='R') m_R = true; ++ if(P[i].m=='Y') m_Y = true; + if(P[i].m=='P') m_P = true; if(P[i].m=='X') m_X = true; +- } +- if(m_P) { m_p=true; m_s=true; } ++ } ++ if(m_P) { m_p=true; m_s=true; } + if(m_X) { m_x=true; m_s=true; } + if(m_p) mgl_printf(fp, gz, "/m_p {sm 0 rm s2 0 rl sm sm rm 0 s2 rl d0} def\n"); + if(m_x) mgl_printf(fp, gz, "/m_x {sm sm rm s2 s2 rl 0 sm 2 mul rm sm 2 mul s2 rl d0} def\n"); +@@ -453,7 +453,7 @@ + } + for(i=0;i\n"); + mgl_printf(fp, gz, "\n"); +@@ -576,10 +576,10 @@ + // const char *dash[]={"", "8 8","4 4","1 3","7 4 1 4","3 2 1 2"}; + mgl_printf(fp, gz, "1) mgl_printf(fp, gz, " stroke-width=\"%g\"", P[i].w); + memcpy(cp,P[i].c,3*sizeof(mreal)); +@@ -620,7 +620,7 @@ + + for(i=0;i"); +- if(gz) gzclose(fp); else fclose((FILE *)fp); ++ if(gz) gzclose((gzFile_s*)fp); else fclose((FILE *)fp); + } + //----------------------------------------------------------------------------- + void mglGraphPS::Finish() +@@ -643,31 +643,31 @@ + #define imax(a,b) (a)>(b) ? (a) : (b) + #define imin(a,b) (a)<(b) ? (a) : (b) + void mglPrim::Draw(mglGraphPS *gr) +-{ +- mreal pp[12]={x[0],y[0],z, x[1],y[1],z, x[2],y[2],z, x[3],y[3],z}; +- gr->draw_prim(this, pp, c); +-} ++{ ++ mreal pp[12]={x[0],y[0],z, x[1],y[1],z, x[2],y[2],z, x[3],y[3],z}; ++ gr->draw_prim(this, pp, c); ++} + //----------------------------------------------------------------------------- +-void mglGraphPS::draw_prim(mglPrim *pr, mreal *pp, mreal *c) +-{ ++void mglGraphPS::draw_prim(mglPrim *pr, mreal *pp, mreal *c) ++{ + ObjId = pr->id; memcpy(CDef,c,4*sizeof(mreal)); +- bool ul=UseLight; UseLight=false; +- int m = pr->m, s = pr->style; +- switch(pr->type) +- { +- case 0: mglGraphAB::mark_plot(pp,pr->m); break; +- case 1: PDef = pr->style; pPos = pr->s; ++ bool ul=UseLight; UseLight=false; ++ int m = pr->m, s = pr->style; ++ switch(pr->type) ++ { ++ case 0: mglGraphAB::mark_plot(pp,pr->m); break; ++ case 1: PDef = pr->style; pPos = pr->s; + mglGraphAB::line_plot(pp,pp+3,c,c); break; + case 2: mglGraphAB::trig_plot(pp,pp+3,pp+6,c,c,c); break; + case 3: mglGraphAB::quad_plot(pp,pp+3,pp+6,pp+9,c,c,c,c); break; + case 4: + mreal pf=PlotFactor; Push(); +- SetPosScale(pp[0],pp[1],pp[2],pr->s*PlotFactor); RotateN(pr->w,0,0,1); ++ SetPosScale(pp[0],pp[1],pp[2],pr->s*PlotFactor); RotateN(pr->w,0,0,1); + mglGraphAB::Glyph(pr->x[1],pr->y[1],pr->zz[1]*fnt->GetFact(s&3),s,m,0); +- Pop(); PlotFactor=pf; ++ Pop(); PlotFactor=pf; + break; + } +- UseLight=ul; ++ UseLight=ul; + } + //----------------------------------------------------------------------------- + void mglGraphPS::pnt_plot(long x,long y, mreal, unsigned char c[4]) +--- mgl/mgl_export.cpp.ORIG 2011-05-30 13:12:29.000000000 +0200 ++++ mgl/mgl_export.cpp 2012-02-29 11:52:31.496163039 +0100 +@@ -232,7 +232,7 @@ + va_start(lst,str); + vsprintf(buf,str,lst); + va_end(lst); +- if(gz) gzprintf(fp, "%s", buf); ++ if(gz) gzprintf((gzFile_s*)fp, "%s", buf); + else fprintf((FILE *)fp, "%s", buf); + } + //--------------------------------------------------------------------------- +@@ -243,7 +243,7 @@ + register long i,j; + bool gz = fname[strlen(fname)-1]=='z'; + +- void *fp = gz ? gzopen(fname,"wt") : fopen(fname,"wt"); ++ void *fp = gz ? (void*)gzopen(fname,"wt") : (void*)fopen(fname,"wt"); + mgl_printf(fp, gz, "%%!PS-Adobe-3.0 EPSF-3.0\n%%%%BoundingBox: 0 0 %d %d\n",w,h); + mgl_printf(fp, gz, "%%%%Creator: MathGL library\n%%%%Title: %s\n", fname); + mgl_printf(fp, gz, "%%%%CreationDate: %s\n",ctime(&now)); +@@ -255,7 +255,7 @@ + mgl_printf(fp, gz, "%02x%02x%02x",p[j][3*i],p[j][3*i+1],p[j][3*i+2]); + } + mgl_printf(fp, gz, "\n\nshowpage\n%%%%EOF\n"); +- if(gz) gzclose(fp); else fclose((FILE *)fp); ++ if(gz) gzclose((gzFile_s*)fp); else fclose((FILE *)fp); + return 0; + } + //----------------------------------------------------------------------------- diff --git a/sci-libs/mathgl/mathgl-1.11.2.ebuild b/sci-libs/mathgl/mathgl-1.11.2.ebuild index 790c191efc87..0db39d156084 100644 --- a/sci-libs/mathgl/mathgl-1.11.2.ebuild +++ b/sci-libs/mathgl/mathgl-1.11.2.ebuild @@ -1,15 +1,18 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/mathgl-1.11.2.ebuild,v 1.3 2012/02/28 00:56:32 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/mathgl-1.11.2.ebuild,v 1.4 2012/03/01 07:41:06 jlec Exp $ -EAPI=3 +EAPI=4 WX_GTK_VER=2.8 -PYTHON_DEPEND="2" + +PYTHON_DEPEND="python? 2" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython" -inherit autotools eutils wxwidgets python versionator toolchain-funcs +AUTOTOOLS_AUTORECONF=true + +inherit autotools-utils eutils python toolchain-funcs versionator wxwidgets DESCRIPTION="Math Graphics Library" HOMEPAGE="http://mathgl.sourceforge.net/" @@ -18,33 +21,45 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz mirror://sourceforge/${PN}/STIX_ LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="doc fltk gif glut gsl hdf5 jpeg octave python qt4 wxwidgets" +IUSE="doc fltk gif glut gsl hdf5 jpeg mpi octave python qt4 wxwidgets static-libs" -RDEPEND="media-libs/libpng +RDEPEND=" + media-libs/libpng sys-libs/zlib virtual/opengl - python? ( dev-python/numpy ) - glut? ( media-libs/freeglut ) fltk? ( x11-libs/fltk:1 ) gif? ( media-libs/giflib ) - jpeg? ( virtual/jpeg ) - hdf5? ( >=sci-libs/hdf5-1.8 ) + glut? ( media-libs/freeglut ) gsl? ( sci-libs/gsl ) + hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) + jpeg? ( virtual/jpeg ) octave? ( >=sci-mathematics/octave-3.4.0 ) + python? ( dev-python/numpy ) qt4? ( x11-libs/qt-gui:4 ) wxwidgets? ( x11-libs/wxGTK:2.8 )" DEPEND="${RDEPEND} - >=sys-devel/libtool-2.2.4 + sys-devel/libtool:2 doc? ( app-text/texi2html virtual/texi2dvi ) - python? ( dev-lang/swig ) - octave? ( dev-lang/swig )" + octave? ( dev-lang/swig ) + python? ( dev-lang/swig )" + +REQUIRED_USE="mpi? ( hdf5 ) " + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/${PN}-1.10.2-gcc43.patch + "${FILESDIR}"/${PN}-octave-3.4.patch + "${FILESDIR}"/${P}-zlib.patch + "${FILESDIR}"/${P}-cast.patch + ) pkg_setup() { if ! version_is_at_least "4.3.0" "$(gcc-version)"; then eerror "You need >=gcc-4.3.0 to compile this package" die "Wrong gcc version" fi - if use hdf5 && has_version sci-libs/hdf5[mpi]; then + if use mpi; then export CC=mpicc export CXX=mpicxx fi @@ -54,21 +69,12 @@ pkg_setup() { src_unpack() { unpack ${A} - mkdir "${S}"/fonts + [[ -d "${S}"/fonts ]] || mkdir "${S}"/fonts cd "${S}"/fonts unpack STIX_font.tgz } src_prepare() { - # bug #267061 - epatch "${FILESDIR}"/${PN}-1.10.2-gcc43.patch - - # bug #358245 - epatch "${FILESDIR}"/${PN}-octave-3.4.patch - - # bug #378255 - epatch "${FILESDIR}"/${PN}-1.11.2-zlib.patch - # correct location of numpy/arrayobject.h if use python; then sed \ @@ -78,29 +84,33 @@ src_prepare() { echo "#!${EPREFIX}/bin/sh" > config/py-compile - eautoreconf + autotools-utils_src_prepare } src_configure() { - econf --docdir="${ROOT}"usr/share/doc/${PF} \ - $(use_enable glut) \ - $(use_enable qt4 qt) \ - $(use_enable wxwidgets wx) \ - $(use_enable fltk) \ - $(use_enable gif) \ - $(use_enable jpeg) \ - $(use_enable hdf5 hdf5_18) \ - $(use_enable python) \ - $(use_enable octave) \ - $(use_enable gsl) \ + local myeconfargs=( + --docdir="${EPREFIX}/usr/share/doc/${PF}" + $(use_enable glut) + $(use_enable qt4 qt) + $(use_enable wxwidgets wx) + $(use_enable fltk) + $(use_enable gif) + $(use_enable jpeg) + $(use_enable hdf5 hdf5_18) + $(use_enable python) + $(use_enable octave) + $(use_enable gsl) $(use_enable doc docs) + ) + autotools-utils_src_configure } src_compile() { # see bug #249627 local JOBS - use doc && JOBS=-j1 - emake ${JOBS} || die "emake failed" + use doc && MAKEOPTS+=" -j1" + + autotools-utils_src_compile if use python; then python_copy_sources lang @@ -118,7 +128,7 @@ src_compile() { } src_install() { - emake DESTDIR="${D}" install || die "emake install failed" + autotools-utils_src_install if use python; then installation() { @@ -127,7 +137,6 @@ src_install() { python_execute_function -s --source-dir lang installation python_clean_installation_image fi - dodoc README AUTHORS || die "dodoc failed" } pkg_postinst() { diff --git a/sci-libs/mathgl/metadata.xml b/sci-libs/mathgl/metadata.xml index d0e39e80724a..836ded4f6d6c 100644 --- a/sci-libs/mathgl/metadata.xml +++ b/sci-libs/mathgl/metadata.xml @@ -8,6 +8,6 @@ Math Graphics Library - Add bindings for sci-mathematics/octave + Add bindings for sci-mathematics/octave -- cgit v1.2.3-65-gdbad