diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-04-08 13:05:59 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-04-08 13:05:59 +0000 |
commit | 31b0396db09affd8e5c7042f2c568aa220f78269 (patch) | |
tree | b838b6ee3091c46c4cab84ec352f7544ef645d89 /math/fityk | |
parent | b68145ef4e3a09b88d2759b54f8c8d2cc36e17a7 (diff) |
Support stage
Fix build with clang
Switch to wxGTK 3.0
Convert to USES=libtools
Notes
Notes:
svn path=/head/; revision=350607
Diffstat (limited to 'math/fityk')
-rw-r--r-- | math/fityk/Makefile | 29 | ||||
-rw-r--r-- | math/fityk/files/patch-src__GAfit.cpp | 11 | ||||
-rw-r--r-- | math/fityk/files/patch-src__data.cpp | 29 | ||||
-rw-r--r-- | math/fityk/files/patch-src__eparser.cpp | 29 | ||||
-rw-r--r-- | math/fityk/files/patch-src__wxgui__ceria.cpp | 10 | ||||
-rw-r--r-- | math/fityk/files/patch-src__wxgui__dload.cpp | 16 | ||||
-rw-r--r-- | math/fityk/files/patch-src__wxgui__frame.cpp | 11 | ||||
-rw-r--r-- | math/fityk/pkg-plist | 4 |
8 files changed, 120 insertions, 19 deletions
diff --git a/math/fityk/Makefile b/math/fityk/Makefile index 9d8126216561..6d00712c9c89 100644 --- a/math/fityk/Makefile +++ b/math/fityk/Makefile @@ -18,20 +18,20 @@ BUILD_DEPENDS= ${LOCALBASE}/include/boost/spirit/include/classic_core.hpp:${PORT gnuplot:${PORTSDIR}/math/gnuplot RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot +USES= gmake libtool tar:bzip2 desktop-file-utils shared-mime-info WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +LDFLAGS+= -lbz2 -lz USE_GITHUB= yes GH_ACCOUNT= wojdyr -USE_BZIP2= yes USE_GNOME= gtk20 -USE_WX= 2.8+ +USE_WX= 3.0 WX_CONF_ARGS= absolute -USE_GMAKE= yes -USE_AUTOTOOLS= libtool +WX_UNICODE= yes +GNU_CONFIGURE= yes CONFIGURE_ARGS= --without-doc --disable-xyconvert USE_LDCONFIG= yes -USE_GCC= any +INSTALL_TARGET= install-strip -MAN1= fityk.1 xyconv.1 PORTDOCS= * CFLAGS+= -D_GNU_SOURCE @@ -42,12 +42,8 @@ LDFLAGS+= -L${WRKDIR}/${XYLIB_DISTNAME}/xylib/.libs \ XYLIB_DISTNAME= xylib-1.1 -NO_STAGE= yes - OPTIONS_DEFINE= DOCS -.include <bsd.port.options.mk> - post-patch: @${REINPLACE_CMD} -e '/HELP_DEF/s|pkgdatadir|docdir|g' \ ${WRKSRC}/src/wxgui/Makefile.in @@ -68,13 +64,10 @@ pre-build: ${ALL_TARGET} post-install: - ${INSTALL_MAN} ${WRKSRC}/doc/fityk.1 ${MANPREFIX}/man/man1 - ${INSTALL_PROGRAM} ${WRKDIR}/${XYLIB_DISTNAME}/xyconv ${PREFIX}/bin - ${INSTALL_MAN} ${WRKDIR}/${XYLIB_DISTNAME}/xyconv.1 ${MANPREFIX}/man/man1 -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${DOCSDIR}) -.endif - @-update-mime-database ${PREFIX}/share/mime + ${INSTALL_MAN} ${WRKSRC}/doc/fityk.1 ${STAGEDIR}${MANPREFIX}/man/man1 + ${INSTALL_PROGRAM} ${WRKDIR}/${XYLIB_DISTNAME}/xyconv ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKDIR}/${XYLIB_DISTNAME}/xyconv.1 ${STAGEDIR}${MANPREFIX}/man/man1 + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR}) .include <bsd.port.mk> diff --git a/math/fityk/files/patch-src__GAfit.cpp b/math/fityk/files/patch-src__GAfit.cpp new file mode 100644 index 000000000000..b597e1db4465 --- /dev/null +++ b/math/fityk/files/patch-src__GAfit.cpp @@ -0,0 +1,11 @@ +--- ./src/GAfit.cpp.orig 2011-06-04 02:11:35.000000000 +0200 ++++ ./src/GAfit.cpp 2014-04-08 14:57:25.531599033 +0200 +@@ -346,7 +346,7 @@ + struct Remainder_and_ptr { + int ind; + realt r; +- bool operator< (const Remainder_and_ptr &b) { ++ bool operator< (const Remainder_and_ptr &b) const { + return r < b.r; + } + }; diff --git a/math/fityk/files/patch-src__data.cpp b/math/fityk/files/patch-src__data.cpp new file mode 100644 index 000000000000..4f1a58af810f --- /dev/null +++ b/math/fityk/files/patch-src__data.cpp @@ -0,0 +1,29 @@ +--- ./src/data.cpp.orig 2011-06-04 02:07:28.000000000 +0200 ++++ ./src/data.cpp 2014-04-08 14:55:51.806605797 +0200 +@@ -299,7 +299,7 @@ + int Data::count_blocks(const string& fn, + const string& format, const string& options) + { +- shared_ptr<const xylib::DataSet> xyds( ++ boost::shared_ptr<const xylib::DataSet> xyds( + xylib::cached_load_file(fn, format, tr_opt(options))); + return xyds->get_block_count(); + } +@@ -308,7 +308,7 @@ + const string& format, const string& options, + int first_block) + { +- shared_ptr<const xylib::DataSet> xyds( ++ boost::shared_ptr<const xylib::DataSet> xyds( + xylib::cached_load_file(fn, format, tr_opt(options))); + return xyds->get_block(first_block)->get_column_count(); + } +@@ -324,7 +324,7 @@ + + string block_name; + try { +- shared_ptr<const xylib::DataSet> xyds( ++ boost::shared_ptr<const xylib::DataSet> xyds( + xylib::cached_load_file(fn, format, tr_opt(options))); + clear(); //removing previous file + vector<int> bb = blocks.empty() ? vector1(0) : blocks; diff --git a/math/fityk/files/patch-src__eparser.cpp b/math/fityk/files/patch-src__eparser.cpp new file mode 100644 index 000000000000..8ba44d0b687c --- /dev/null +++ b/math/fityk/files/patch-src__eparser.cpp @@ -0,0 +1,29 @@ +--- ./src/eparser.cpp.orig 2011-06-03 19:15:42.000000000 +0200 ++++ ./src/eparser.cpp 2014-04-08 14:55:51.807605460 +0200 +@@ -139,7 +139,7 @@ + } + } + +-bool is_function(int op) ++bool my_is_function(int op) + { + return (bool) get_function_narg(op); + } +@@ -812,7 +812,7 @@ + // check if this is closing bracket of func() + if (!opstack_.empty()) { + int top = opstack_.back(); +- if (is_function(top)) { ++ if (my_is_function(top)) { + pop_onto_que(); + int n = arg_cnt_.back() + 1; + int expected_n = get_function_narg(top); +@@ -846,7 +846,7 @@ + lex.throw_syntax_error("unexpected ',' after '?'"); + // if we are here, opstack_.back() == OP_OPEN_ROUND + else if (opstack_.size() < 2 || +- !is_function(*(opstack_.end() - 2))) ++ !my_is_function(*(opstack_.end() - 2))) + lex.throw_syntax_error("',' outside of function"); + else + // don't pop OP_OPEN_ROUND from the stack diff --git a/math/fityk/files/patch-src__wxgui__ceria.cpp b/math/fityk/files/patch-src__wxgui__ceria.cpp new file mode 100644 index 000000000000..49367930a0fd --- /dev/null +++ b/math/fityk/files/patch-src__wxgui__ceria.cpp @@ -0,0 +1,10 @@ +--- ./src/wxgui/ceria.cpp.orig 2011-06-04 02:19:33.000000000 +0200 ++++ ./src/wxgui/ceria.cpp 2014-04-08 14:57:03.288600636 +0200 +@@ -9,6 +9,7 @@ + #include <stdio.h> + #include <ctype.h> + #include <math.h> ++#include <stdlib.h> + #include <assert.h> + #include <string.h> + #include <algorithm> diff --git a/math/fityk/files/patch-src__wxgui__dload.cpp b/math/fityk/files/patch-src__wxgui__dload.cpp new file mode 100644 index 000000000000..a003cbabfc14 --- /dev/null +++ b/math/fityk/files/patch-src__wxgui__dload.cpp @@ -0,0 +1,16 @@ +--- ./src/wxgui/dload.cpp.orig 2011-06-03 20:36:28.000000000 +0200 ++++ ./src/wxgui/dload.cpp 2014-04-08 14:56:41.794602545 +0200 +@@ -53,11 +53,11 @@ + virtual void draw(wxDC &dc, bool); + void load_dataset(string const& filename, string const& filetype, + string const& options); +- shared_ptr<const xylib::DataSet> get_data() const { return data_; } ++ boost::shared_ptr<const xylib::DataSet> get_data() const { return data_; } + void make_outdated() { data_updated_ = false; } + + private: +- shared_ptr<const xylib::DataSet> data_; ++ boost::shared_ptr<const xylib::DataSet> data_; + bool data_updated_; // if false, draw() doesn't do anything (plot is clear) + }; + diff --git a/math/fityk/files/patch-src__wxgui__frame.cpp b/math/fityk/files/patch-src__wxgui__frame.cpp new file mode 100644 index 000000000000..f77d5620d359 --- /dev/null +++ b/math/fityk/files/patch-src__wxgui__frame.cpp @@ -0,0 +1,11 @@ +--- ./src/wxgui/frame.cpp.orig 2011-06-08 16:26:42.000000000 +0200 ++++ ./src/wxgui/frame.cpp 2014-04-08 14:56:30.967604263 +0200 +@@ -966,7 +966,7 @@ + string cmd; + if (count == 1) { + string f = wx2s(paths[0]); +- shared_ptr<const xylib::DataSet> d = xylib::cached_load_file(f, "", ""); ++ boost::shared_ptr<const xylib::DataSet> d = xylib::cached_load_file(f, "", ""); + if (d->get_block_count() > 1) { + wxArrayString choices; + for (int i = 0; i < d->get_block_count(); ++i) { diff --git a/math/fityk/pkg-plist b/math/fityk/pkg-plist index 4701d91802cf..d2e4b7d32cc5 100644 --- a/math/fityk/pkg-plist +++ b/math/fityk/pkg-plist @@ -2,10 +2,12 @@ bin/cfityk bin/fityk bin/xyconv include/fityk.h -lib/libfityk.a lib/libfityk.la lib/libfityk.so lib/libfityk.so.3 +lib/libfityk.so.3.0.0 +man/man1/fityk.1.gz +man/man1/xyconv.1.gz share/applications/fityk.desktop share/mime/packages/fityk.xml share/pixmaps/fityk.png |