mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
parent
209ac26017
commit
a6848ff6a3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=410453
@ -2,77 +2,85 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= fityk
|
||||
PORTVERSION= 0.9.8
|
||||
PORTREVISION= 5
|
||||
PORTVERSION= 1.3.0
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= GHC SF/xylib:xylib
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:DEFAULT \
|
||||
${XYLIB_DISTNAME}${EXTRACT_SUFX}:xylib
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Free peak fitting software
|
||||
|
||||
LICENSE= GPLv2 LGPL21
|
||||
LICENSE_COMB= multi
|
||||
LICENSE= GPLv2 # (or later)
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/boost/spirit/include/classic_core.hpp:${PORTSDIR}/devel/boost-libs \
|
||||
BUILD_DEPENDS= boost-libs>=1.35:${PORTSDIR}/devel/boost-libs \
|
||||
swig2.0:${PORTSDIR}/devel/swig20 \
|
||||
gnuplot:${PORTSDIR}/math/gnuplot
|
||||
RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= wojdyr
|
||||
GH_PROJECT= fityk xylib:xylib
|
||||
GH_TAGNAME= ${DISTVERSIONFULL} v1.4:xylib
|
||||
|
||||
USES= compiler:c++11-lib desktop-file-utils gmake libtool \
|
||||
shared-mime-info tar:bzip2
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
LDFLAGS+= -lbz2 -lz
|
||||
USES= autoreconf compiler:c++11-lib desktop-file-utils gmake \
|
||||
libtool lua readline shared-mime-info
|
||||
USE_CXXSTD= c++11
|
||||
USE_GNOME= gtk20
|
||||
USE_WX= 3.0
|
||||
WX_CONF_ARGS= absolute
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --without-doc --disable-xyconvert
|
||||
USE_LDCONFIG= yes
|
||||
INSTALL_TARGET= install-strip
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
CFLAGS+= -D_GNU_SOURCE
|
||||
CPPFLAGS+= -I${WRKDIR}/xylib-1.4 \
|
||||
-I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${WRKDIR}/xylib-1.4/xylib/.libs \
|
||||
-lpthread -lbz2 -lz -L${LOCALBASE}/lib
|
||||
|
||||
PORTDOCS= *
|
||||
|
||||
CFLAGS+= -D_GNU_SOURCE
|
||||
CPPFLAGS+= -I${WRKDIR}/${XYLIB_DISTNAME} \
|
||||
-I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${WRKDIR}/${XYLIB_DISTNAME}/xylib/.libs \
|
||||
-lpthread -L${LOCALBASE}/lib
|
||||
OPTIONS_DEFINE= DOCS PYTHON
|
||||
OPTIONS_DEFAULT= PYTHON
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
XYLIB_DISTNAME= xylib-1.1
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
DOCS_BUILD_DEPENDS= sphinx-build:${PORTSDIR}/textproc/py-sphinx
|
||||
PYTHON_USES= python
|
||||
PYTHON_CONFIGURE_ENABLE= python
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '/HELP_DEF/s|pkgdatadir|docdir|g' \
|
||||
${WRKSRC}/src/wxgui/Makefile.in
|
||||
@${REINPLACE_CMD} -e '/XYLIB_USE_TR1_MEMORY/s| 1| 0|g' \
|
||||
${WRKDIR}/${XYLIB_DISTNAME}/xylib/cache.h
|
||||
@${REINPLACE_CMD} -e '/)\/html/s|^|#|' \
|
||||
${WRKSRC}/Makefile.am
|
||||
@${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|' \
|
||||
${WRKSRC}/doc/fityk.1
|
||||
@${REINPLACE_CMD} -e '/XYLIB_USE_TR1_MEMORY/s| 1| 0|' \
|
||||
${WRKDIR}/xylib-1.4/xylib/cache.h
|
||||
|
||||
pre-configure:
|
||||
@cd ${WRKDIR}/${XYLIB_DISTNAME} \
|
||||
&& ${SH} ./configure --disable-shared \
|
||||
@cd ${WRKDIR}/xylib-1.4 \
|
||||
&& ${AUTORECONF} -f -i \
|
||||
&& ${SH} ./configure --disable-shared --without-gui \
|
||||
CC="${CC}" CFLAGS="${CFLAGS} -fPIC" \
|
||||
CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -fPIC" \
|
||||
CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
pre-build:
|
||||
@cd ${WRKDIR}/${XYLIB_DISTNAME} \
|
||||
&& ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} \
|
||||
${ALL_TARGET}
|
||||
@cd ${WRKDIR}/xylib-1.4 && ${DO_MAKE_BUILD} ${ALL_TARGET}
|
||||
|
||||
post-build-DOCS-on:
|
||||
@cd ${WRKSRC}/doc && ${DO_MAKE_BUILD} html
|
||||
|
||||
post-install:
|
||||
${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
|
||||
(cd ${WRKDIR}/xylib-1.4 && ${INSTALL_PROGRAM} xyconv \
|
||||
${STAGEDIR}${PREFIX}/bin)
|
||||
(cd ${WRKDIR}/xylib-1.4 && ${INSTALL_MAN} xyconv.1 \
|
||||
${STAGEDIR}${MANPREFIX}/man/man1)
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR})
|
||||
@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html \
|
||||
${STAGEDIR}${DOCSDIR})
|
||||
@${LN} -sf ${DOCSDIR}/html ${STAGEDIR}${DATADIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
SHA256 (fityk-0.9.8.tar.bz2) = ac9c38979e06b1e848beb02c563c3307cbbd832eca951e05402f777c91bad77c
|
||||
SIZE (fityk-0.9.8.tar.bz2) = 1050468
|
||||
SHA256 (xylib-1.1.tar.bz2) = eb201ec9eca9ba84547fb590839e6e9177ca252eb8edb4b10785ff506c27bddb
|
||||
SIZE (xylib-1.1.tar.bz2) = 288366
|
||||
SHA256 (wojdyr-fityk-v1.3.0_GH0.tar.gz) = 7ac00aaafb4f51fa4515557a0d76234238ce4d8d7403d57dc70509720de59135
|
||||
SIZE (wojdyr-fityk-v1.3.0_GH0.tar.gz) = 928939
|
||||
SHA256 (wojdyr-xylib-v1.4_GH0.tar.gz) = 435b66a38dd4352c8abf9263119c83d9ec926700ef025b66045608e18095ea26
|
||||
SIZE (wojdyr-xylib-v1.4_GH0.tar.gz) = 262109
|
||||
|
@ -1,29 +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 @@
|
||||
--- fityk/eparser.cpp.orig 2015-05-25 17:42:29 UTC
|
||||
+++ fityk/eparser.cpp
|
||||
@@ -154,7 +154,7 @@ int get_function_narg(int op)
|
||||
}
|
||||
}
|
||||
|
||||
-bool is_function(int op)
|
||||
+bool my_is_function(int op)
|
||||
+bool my_is_funcion(int op)
|
||||
{
|
||||
return (bool) get_function_narg(op);
|
||||
return get_function_narg(op) != 0;
|
||||
}
|
||||
@@ -812,7 +812,7 @@
|
||||
@@ -878,7 +878,7 @@ void ExpressionParser::parse_expr(Lexer&
|
||||
// check if this is closing bracket of func()
|
||||
if (!opstack_.empty()) {
|
||||
int top = opstack_.back();
|
||||
- if (is_function(top)) {
|
||||
+ if (my_is_function(top)) {
|
||||
+ if (my_is_funcion(top)) {
|
||||
pop_onto_que();
|
||||
int n = arg_cnt_.back() + 1;
|
||||
int expected_n = get_function_narg(top);
|
||||
@@ -846,7 +846,7 @@
|
||||
int n = opstack_.back() + 1;
|
||||
opstack_.pop_back();
|
||||
@@ -911,7 +911,7 @@ void ExpressionParser::parse_expr(Lexer&
|
||||
lex.throw_syntax_error("unexpected ',' after '?'");
|
||||
// if we are here, opstack_.back() == OP_OPEN_ROUND
|
||||
else if (opstack_.size() < 2 ||
|
||||
else if (opstack_.size() < 3 ||
|
||||
- !is_function(*(opstack_.end() - 2)))
|
||||
+ !my_is_function(*(opstack_.end() - 2)))
|
||||
+ !my_is_funcion(*(opstack_.end() - 2)))
|
||||
lex.throw_syntax_error("',' outside of function");
|
||||
else
|
||||
// don't pop OP_OPEN_ROUND from the stack
|
@ -1,11 +0,0 @@
|
||||
--- ./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;
|
||||
}
|
||||
};
|
@ -1,29 +0,0 @@
|
||||
--- ./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;
|
@ -1,12 +0,0 @@
|
||||
--- src/guess.cpp.orig 2011-06-04 00:10:02 UTC
|
||||
+++ src/guess.cpp
|
||||
@@ -15,7 +15,8 @@
|
||||
#include "settings.h"
|
||||
|
||||
using namespace std;
|
||||
-using boost::array;
|
||||
+// Macro to avoid ambiguity with std::array (C++11)
|
||||
+#define array boost::array
|
||||
|
||||
const array<string, 3> Guess::linear_traits =
|
||||
{{ "slope", "intercept", "avgy" }};
|
@ -1,10 +0,0 @@
|
||||
--- ./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>
|
@ -1,10 +0,0 @@
|
||||
--- src/wxgui/ceria.h.orig 2011-06-03 17:15:42 UTC
|
||||
+++ src/wxgui/ceria.h
|
||||
@@ -4,6 +4,7 @@
|
||||
#ifndef FITYK_WX_CERIA_H_
|
||||
#define FITYK_WX_CERIA_H_
|
||||
|
||||
+#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "atomtables.h"
|
@ -1,16 +0,0 @@
|
||||
--- ./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)
|
||||
};
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- ./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) {
|
@ -1,11 +0,0 @@
|
||||
--- src/wxgui/sidebar.cpp.orig 2015-04-30 21:04:15 UTC
|
||||
+++ src/wxgui/sidebar.cpp
|
||||
@@ -897,7 +897,7 @@ void SideBar::update_func_inf()
|
||||
realt a;
|
||||
if (func->get_center(&a))
|
||||
inf->AppendText(wxT("Center: ")
|
||||
- + s2wx(format1<realt, 30>("%.10"REALT_LENGTH_MOD"g", a)));
|
||||
+ + s2wx(format1<realt, 30>("%.10" REALT_LENGTH_MOD "g", a)));
|
||||
if (func->get_area(&a))
|
||||
inf->AppendText(wxT("\nArea: ") + s2wx(S(a)));
|
||||
if (func->get_height(&a))
|
10
math/fityk/files/patch-wxgui__ceria.cpp
Normal file
10
math/fityk/files/patch-wxgui__ceria.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
--- wxgui/ceria.cpp.orig 2015-05-25 17:42:29 UTC
|
||||
+++ wxgui/ceria.cpp
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <cmath>
|
||||
+#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
@ -1,18 +1,20 @@
|
||||
Fityk is a program for nonlinear fitting of analytical functions (especially
|
||||
peak-shaped) to data (usually experimental data). There are also people using
|
||||
it only to display data or to remove baseline from data.
|
||||
Fityk is a program for nonlinear fitting of analytical functions
|
||||
(especially peak-shaped) to data (usually experimental data). There are
|
||||
also people using it only to display data or to remove baseline from
|
||||
data.
|
||||
|
||||
It is reported to be used in crystallography, chromatography,
|
||||
photoluminescence, infrared and Raman spectroscopy and other fields.
|
||||
|
||||
Fityk knows about common peak-shaped functions (Gaussian, Lorentzian, Voigt,
|
||||
Pearson VII, bifurcated Gaussian, EMG, Doniach-Sunjic, etc.) and polynomials.
|
||||
It also supports user-defined functions.
|
||||
Fityk knows about common peak-shaped functions (Gaussian, Lorentzian,
|
||||
Voigt, Pearson VII, bifurcated Gaussian, EMG, Doniach-Sunjic, etc.) and
|
||||
polynomials. It also supports user-defined functions.
|
||||
|
||||
Fityk offers intuitive graphical interface (and also command line interface),
|
||||
variouse optimization methods (standard Marquardt least-square algorithm,
|
||||
Genetic Algorithms, Nelder-Mead simplex), equality constraints, modelling
|
||||
error of x coordinate of points (eg. zero-shift of instrument), handling
|
||||
series of datasets, automation of common tasks with scripts, and more.
|
||||
Fityk offers intuitive graphical interface (and also command line
|
||||
interface), variouse optimization methods (standard Marquardt
|
||||
least-square algorithm, Genetic Algorithms, Nelder-Mead simplex),
|
||||
equality constraints, modelling error of x coordinate of points (eg.
|
||||
zero-shift of instrument), handling series of datasets, automation of
|
||||
common tasks with scripts, and more.
|
||||
|
||||
WWW: http://www.unipress.waw.pl/fityk/
|
||||
WWW: http://fityk.nieto.pl/
|
||||
|
@ -1,25 +1,35 @@
|
||||
bin/cfityk
|
||||
bin/fityk
|
||||
bin/xyconv
|
||||
include/fityk.h
|
||||
include/fityk/fityk.h
|
||||
include/fityk/ui_api.h
|
||||
lib/libfityk.so
|
||||
lib/libfityk.so.3
|
||||
lib/libfityk.so.3.0.0
|
||||
lib/libfityk.so.4
|
||||
lib/libfityk.so.4.0.0
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/_fityk.so
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/fityk.py
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/fityk.pyc
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/fityk.pyo
|
||||
man/man1/fityk.1.gz
|
||||
man/man1/xyconv.1.gz
|
||||
share/applications/fityk.desktop
|
||||
%%PORTDOCS%%%%DATADIR%%/html
|
||||
%%DATADIR%%/samples/README
|
||||
%%DATADIR%%/samples/SiC_Zn.dat
|
||||
%%DATADIR%%/samples/SiC_Zn.fit
|
||||
%%DATADIR%%/samples/cfityk.py
|
||||
%%DATADIR%%/samples/enso.dat
|
||||
%%DATADIR%%/samples/enso.fit
|
||||
%%DATADIR%%/samples/hello.c
|
||||
%%DATADIR%%/samples/hello.cc
|
||||
%%DATADIR%%/samples/hello.java
|
||||
%%DATADIR%%/samples/hello.lua
|
||||
%%DATADIR%%/samples/hello.pl
|
||||
%%DATADIR%%/samples/hello.py
|
||||
%%DATADIR%%/samples/hello.rb
|
||||
%%DATADIR%%/samples/nacl01.dat
|
||||
%%DATADIR%%/samples/nacl01.fit
|
||||
%%DATADIR%%/samples/read-shockley.fit
|
||||
share/icons/hicolor/32x32/apps/fityk.png
|
||||
share/icons/hicolor/scalable/apps/fityk.svg
|
||||
share/mime/packages/fityk.xml
|
||||
share/pixmaps/fityk.png
|
||||
share/fityk/samples/hello.lua
|
||||
share/fityk/samples/SiC_Zn.dat
|
||||
share/fityk/samples/hello.cc
|
||||
share/fityk/samples/SiC_Zn.fit
|
||||
share/fityk/samples/hello.pl
|
||||
share/fityk/samples/hello.py
|
||||
share/fityk/samples/enso.fit
|
||||
share/fityk/samples/nacl01.dat
|
||||
share/fityk/samples/enso.dat
|
||||
share/fityk/samples/nacl01.fit
|
||||
share/fityk/samples/README
|
||||
share/fityk/samples/test_syntax.fit
|
||||
share/fityk/samples/read-shockley.fit
|
||||
|
Loading…
Reference in New Issue
Block a user