Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 13:06:00 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350607 - in head/math/fityk: . files
Message-ID:  <201404081306.s38D60Ng016034@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Tue Apr  8 13:05:59 2014
New Revision: 350607
URL: http://svnweb.freebsd.org/changeset/ports/350607
QAT: https://qat.redports.org/buildarchive/r350607/

Log:
  Support stage
  Fix build with clang
  Switch to wxGTK 3.0
  Convert to USES=libtools

Added:
  head/math/fityk/files/
  head/math/fityk/files/patch-src__GAfit.cpp   (contents, props changed)
  head/math/fityk/files/patch-src__data.cpp   (contents, props changed)
  head/math/fityk/files/patch-src__eparser.cpp   (contents, props changed)
  head/math/fityk/files/patch-src__wxgui__ceria.cpp   (contents, props changed)
  head/math/fityk/files/patch-src__wxgui__dload.cpp   (contents, props changed)
  head/math/fityk/files/patch-src__wxgui__frame.cpp   (contents, props changed)
Modified:
  head/math/fityk/Makefile
  head/math/fityk/pkg-plist

Modified: head/math/fityk/Makefile
==============================================================================
--- head/math/fityk/Makefile	Tue Apr  8 12:56:36 2014	(r350606)
+++ head/math/fityk/Makefile	Tue Apr  8 13:05:59 2014	(r350607)
@@ -18,20 +18,20 @@ BUILD_DEPENDS=	${LOCALBASE}/include/boos
 		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_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>

Added: head/math/fityk/files/patch-src__GAfit.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/fityk/files/patch-src__GAfit.cpp	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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;
+     }
+ };

Added: head/math/fityk/files/patch-src__data.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/fityk/files/patch-src__data.cpp	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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;

Added: head/math/fityk/files/patch-src__eparser.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/fityk/files/patch-src__eparser.cpp	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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

Added: head/math/fityk/files/patch-src__wxgui__ceria.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/fityk/files/patch-src__wxgui__ceria.cpp	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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>

Added: head/math/fityk/files/patch-src__wxgui__dload.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/fityk/files/patch-src__wxgui__dload.cpp	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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)
+ };
+ 

Added: head/math/fityk/files/patch-src__wxgui__frame.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/fityk/files/patch-src__wxgui__frame.cpp	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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) {

Modified: head/math/fityk/pkg-plist
==============================================================================
--- head/math/fityk/pkg-plist	Tue Apr  8 12:56:36 2014	(r350606)
+++ head/math/fityk/pkg-plist	Tue Apr  8 13:05:59 2014	(r350607)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404081306.s38D60Ng016034>