aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrozin <grozin@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-02 21:33:48 +0000
committergrozin <grozin@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-02 21:33:48 +0000
commite45632ac2697bc4fec9fd0475ac72d5d9dd51554 (patch)
treec73a1b4c52f56a8bdcb557bdbbdfe18380a8478e /sci-libs
parentDon't spit out errors if people aren't using empi (diff)
downloadsci-e45632ac2697bc4fec9fd0475ac72d5d9dd51554.tar.gz
sci-e45632ac2697bc4fec9fd0475ac72d5d9dd51554.tar.bz2
sci-e45632ac2697bc4fec9fd0475ac72d5d9dd51554.zip
mathgl-1.6.2 cleanup and improvements
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1035 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/mathgl/ChangeLog3
-rw-r--r--sci-libs/mathgl/Manifest7
-rw-r--r--sci-libs/mathgl/files/mathgl-fltk.patch10
-rw-r--r--sci-libs/mathgl/files/mathgl-no-cp1251.patch12
-rw-r--r--sci-libs/mathgl/mathgl-1.6.2.ebuild29
5 files changed, 50 insertions, 11 deletions
diff --git a/sci-libs/mathgl/ChangeLog b/sci-libs/mathgl/ChangeLog
index b9e4f1359..f17df585b 100644
--- a/sci-libs/mathgl/ChangeLog
+++ b/sci-libs/mathgl/ChangeLog
@@ -4,5 +4,6 @@
*mathgl-1.6.2 (29 Apr 2008)
29 Apr 2008; Andrey Grozin <A.G.Grozin@inp.nsk.su>
- +metadata.xml, +mathgl-1.6.2.ebuild, +files/mathgl-fltk.patch:
+ +metadata.xml, +mathgl-1.6.2.ebuild,
+ +files/mathgl-fltk.patch, +files/mathgl-no-cp1251.patch:
Initial import.
diff --git a/sci-libs/mathgl/Manifest b/sci-libs/mathgl/Manifest
index 22822900c..581a4626c 100644
--- a/sci-libs/mathgl/Manifest
+++ b/sci-libs/mathgl/Manifest
@@ -1,8 +1,9 @@
-AUX mathgl-fltk.patch 1684 RMD160 474c5ba1006c3ad473bbd9ff7edcf88bd738fe83 SHA1 7db3a30234a49f23b0c45ee0ec1a4f6e4f6d0a78 SHA256 b9fbf9f80f2081363f23c88fee6802bac505e3ebfdd64e5d73ec6cb8325c6af0
+AUX mathgl-fltk.patch 1630 RMD160 fc26ea0088c1d59f49643a7bf1967f562b52aceb SHA1 1e44dbac9943819083628f0c6c9dce0f3550a3eb SHA256 2692aae830a4b580b9c2010c204fcc7df040cb7e15c966416da0e4269e4ccfc6
+AUX mathgl-no-cp1251.patch 685 RMD160 c16daa39ec5f85a888cce0a2c2028ee61ad299bb SHA1 ebfd6445c0761f15c0bf4a52f63e94b1ce57b153 SHA256 7c80e233826f1d8b9d74444fd73811f2bf6b59a90794c7d53f08e159dbba2e5b
DIST STIX_font.tgz 2450541 RMD160 7595c2b99c5982d72b1ef551ab8f9d65237e5466 SHA1 3cbc4f5090cd37d1b35d594150357550d2639f81 SHA256 6408290fd4a5267637a88507344a8f07b908ce72f46ef93d09e068fedb67e8fe
DIST mathgl-1.6-eng.pdf 5399719 RMD160 93bfbdb7b7fa6537e97947d6da901b49b1b702c9 SHA1 f1e8b02f7850fde70b72407c3c7b6225717283cf SHA256 8c0ee4be44b0d58f52d23b766dc702a8e23da5af8a310db4fbe8e633acb7b4cf
DIST mathgl-1.6-rus.pdf 5581883 RMD160 d04037c604e1444ae01cb49b95911055bdc0601d SHA1 614955ccff3e9c6c8bd23fe12f23f092760b3882 SHA256 c5b9d672fe08cbd7dab44a52b1ce217b81a2ba2ca07189394a5a4261ccba6b70
DIST mathgl-1.6.2.tgz 1564209 RMD160 6b1b3210d49b1b000c2ee5f79dfbf0c8feded5e2 SHA1 6b88610b8bb61b04d5c544beb7f0858032b520f6 SHA256 cb9d6e518fc7cdd205e3fb42031bb96427b570a77fc0acb67c02e8fe73f2966e
-EBUILD mathgl-1.6.2.ebuild 1376 RMD160 db7373dbc616e27059b4c7128b220cf9a0017b9a SHA1 433340191a57e365ece395364edc8fa8a61ae082 SHA256 41a0bff5c9e884aab831892dac1eb2ad5ffad9d6cff3b8ec657a104df5e04483
-MISC ChangeLog 255 RMD160 af7f0b4c2795377455275ee0fd53f720dd6ca937 SHA1 b3021a07711e8c5293311a19b8b1863187f82e5d SHA256 33b2f250e3e82dd62975cac5e63d320ef6a00341eaea94987da2194391c1f85a
+EBUILD mathgl-1.6.2.ebuild 2036 RMD160 80dd78b6633faf982bd82d7a78c85c457aa5ea13 SHA1 49b1f713e54c24a4793d0c0b82687cf03807beed SHA256 bfa889be9c631dfbda1e8952ab04d826a792f0a50ab1af294fdaecc8a39109d3
+MISC ChangeLog 314 RMD160 c0c67090ef6c61f5183b18a432cecbdb620e944f SHA1 381ba35e52a1894c7ffd4490fa09f9ee6ceffc48 SHA256 11248b8614b7e69c4ddfb5f4dcd1010069e44abcfccf7fbb789f6d5c1459129e
MISC metadata.xml 312 RMD160 59b6ba8447002009036b940a6f0f8ab2c5dacb67 SHA1 45b130b368c0f0ef7669dc021fbdedc253234026 SHA256 ccadbd992df485b96a2cba7aa8df04cb997c675ac02f301c0c500b1c80ebaa82
diff --git a/sci-libs/mathgl/files/mathgl-fltk.patch b/sci-libs/mathgl/files/mathgl-fltk.patch
index afd034b79..69039df00 100644
--- a/sci-libs/mathgl/files/mathgl-fltk.patch
+++ b/sci-libs/mathgl/files/mathgl-fltk.patch
@@ -1,24 +1,24 @@
diff -U2 --recursive mathgl-1.6.2.orig/configure.ac mathgl-1.6.2/configure.ac
--- mathgl-1.6.2.orig/configure.ac 2008-04-03 01:24:42.000000000 +0700
-+++ mathgl-1.6.2/configure.ac 2008-04-30 12:35:25.000000000 +0700
++++ mathgl-1.6.2/configure.ac 2008-05-03 11:36:42.000000000 +0700
@@ -144,8 +144,8 @@
*) AC_MSG_ERROR(bad value ${enableval} for --enable-fltk) ;;
esac],[fltk=false])
-AC_CHECK_HEADER(FL/Fl_Export.H,[(test x$all = xtrue || test x$fltk = xtrue) && FLTK_FLAGS=-DHAVE_FLTK AC_SUBST(FLTK_FLAGS)],
-+AC_CHECK_HEADER(fltk-1.1/FL/Fl_Export.H,[(test x$all = xtrue || test x$fltk = xtrue) && FLTK_FLAGS="-DHAVE_FLTK -I/usr/include/fltk-1.1" AC_SUBST(FLTK_FLAGS)],
++AC_CHECK_HEADER(@FLTK_H@FL/Fl_Export.H,[(test x$all = xtrue || test x$fltk = xtrue) && FLTK_FLAGS="-DHAVE_FLTK @FLTK_FLAGS@" AC_SUBST(FLTK_FLAGS)],
[(test x$all = xtrue || test x$fltk = xtrue) && echo "Please install fltk headers" && exit])
-AC_CHECK_LIB([fltk], [main], [(test x$all = xtrue || test x$fltk = xtrue) && FLTK_LIBS="-lfltk -lfltk_images" AC_SUBST(FLTK_LIBS)],
-+AC_CHECK_LIB([fltk], [main], [(test x$all = xtrue || test x$fltk = xtrue) && FLTK_LIBS="-L/usr/lib/fltk-1.1 -lfltk -lfltk_images -lXft" AC_SUBST(FLTK_LIBS)],
++AC_CHECK_LIB([fltk], [main], [(test x$all = xtrue || test x$fltk = xtrue) && FLTK_LIBS="@FLTK_LIBS@" AC_SUBST(FLTK_LIBS)],
[(test x$all = xtrue || test x$fltk = xtrue) && echo "Please install fltk library" && exit])
AM_CONDITIONAL(USE_FLTK, (test x$all = xtrue || test x$fltk = xtrue))
diff -U2 --recursive mathgl-1.6.2.orig/examples/Makefile.am mathgl-1.6.2/examples/Makefile.am
--- mathgl-1.6.2.orig/examples/Makefile.am 2008-04-03 01:24:42.000000000 +0700
-+++ mathgl-1.6.2/examples/Makefile.am 2008-04-30 13:01:09.000000000 +0700
++++ mathgl-1.6.2/examples/Makefile.am 2008-05-03 11:37:28.000000000 +0700
@@ -19,5 +19,5 @@
mgl_fltk_example_SOURCES = fltk_example.cpp
mgl_fltk_example_LDADD = $(top_builddir)/mgl/libmgl-fltk.la
-mgl_fltk_example_CFLAGS = -O2
-+mgl_fltk_example_CFLAGS = -I/usr/include/fltk-1.1
++mgl_fltk_example_CFLAGS = -O2 @FLTK_FLAGS@
mgl_fltk_example_CPPFLAGS = $(mgl_fltk_example_CFLAGS)
endif
diff --git a/sci-libs/mathgl/files/mathgl-no-cp1251.patch b/sci-libs/mathgl/files/mathgl-no-cp1251.patch
new file mode 100644
index 000000000..089d1890d
--- /dev/null
+++ b/sci-libs/mathgl/files/mathgl-no-cp1251.patch
@@ -0,0 +1,12 @@
+diff -U2 --recursive mathgl-1.6.2.orig/examples/full_test.cpp mathgl-1.6.2/examples/full_test.cpp
+--- mathgl-1.6.2.orig/examples/full_test.cpp 2008-04-04 22:21:20.000000000 +0700
++++ mathgl-1.6.2/examples/full_test.cpp 2008-05-03 10:57:37.000000000 +0700
+@@ -253,6 +253,6 @@
+ int sample_a4(mglGraph *gr, const void *) // font features
+ {
+- setlocale(LC_CTYPE, "ru_RU.cp1251");
+- gr->Puts(mglPoint(0,1),"Text can be in english и на русском");
++ //setlocale(LC_CTYPE, "ru_RU.cp1251");
++ gr->Puts(mglPoint(0,1),"Text can be in english or russian");
+ gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire} and \\big{big}");
+ gr->Puts(mglPoint(0,0.2),"One can change style in string: "
diff --git a/sci-libs/mathgl/mathgl-1.6.2.ebuild b/sci-libs/mathgl/mathgl-1.6.2.ebuild
index 9a6b5eee0..d7338c2f9 100644
--- a/sci-libs/mathgl/mathgl-1.6.2.ebuild
+++ b/sci-libs/mathgl/mathgl-1.6.2.ebuild
@@ -17,7 +17,9 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tgz
doc? ( mirror://sourceforge/${PN}/${DOC}-eng.pdf
linguas_ru? ( mirror://sourceforge/${PN}/${DOC}-rus.pdf ) )"
-DEPEND="fltk? ( x11-libs/fltk )
+DEPEND="sci-libs/gsl
+ virtual/glu
+ fltk? ( x11-libs/fltk )
glut? ( virtual/glut )
jpeg? ( media-libs/jpeg )
tiff? ( media-libs/tiff )
@@ -27,10 +29,33 @@ DEPEND="fltk? ( x11-libs/fltk )
RESTRICT=mirror
src_unpack() {
+ local FLTK_FLAGS,FLTK_LIBS,FLTK_H
+
unpack ${A}
cd "${S}"
mv ../*.vfm fonts/
- epatch "${FILESDIR}"/${PN}-fltk.patch
+
+ # Remove ru_RU.cp1251
+ epatch "${FILESDIR}"/${PN}-no-cp1251.patch
+
+ if use fltk; then
+ FLTK_FLAGS=`fltk-config --cxxflags`
+ FLTK_LIBS=`fltk-config --use-images --ldflags`
+ FLTK_H=`echo ${FLTK_FLAGS} | sed -e 's:-I/usr/include/::'`
+ [ -n "${FLTK_H}" ] && FLTK_H="${FLTK_H}"/
+
+ epatch "${FILESDIR}"/${PN}-fltk.patch
+ sed -e "s:@FLTK_H@:${FLTK_H}:g" \
+ -e "s:@FLTK_FLAGS@:${FLTK_FLAGS}:g" \
+ -e "s:@FLTK_LIBS@:${FLTK_LIBS}:g" \
+ -i configure.ac
+ sed -e "s:@FLTK_FLAGS@:${FLTK_FLAGS}:g" \
+ -i examples/Makefile.am
+ fi
+
+ sed -e "s:-O2:${CPPFLAGS}:g" -i mgl/Makefile.am
+ sed -e "s:-O2:${CPPFLAGS}:g" -i examples/Makefile.am
+
eautoreconf
}