Analitza is a library part of KAlgebra.

This commit is contained in:
zhuk 2013-04-24 11:21:42 +00:00
parent 479d46e3d2
commit 77fd2db553
8 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/04/24 11:21:42 zhuk Exp $
COMMENT = KDE math features
DISTNAME = analitza-${MODKDE4_VERSION}
SHARED_LIBS = analitza 0.0 # 4.7
SHARED_LIBS += analitzagui 0.0 # 4.7
SHARED_LIBS += analitzaplot 0.0 # 4.10
WANTLIB = c m pthread stdc++
WANTLIB += GL GLU
WANTLIB += lib/qt4/QtDBus lib/qt4/QtGui lib/qt4/QtSvg
WANTLIB += lib/qt4/QtOpenGL lib/qt4/QtXml
WANTLIB += ${KDE4LIB}/kdeui
WANTLIB += ncurses readline
CONFIGURE_ARGS= -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L${LOCALBASE}/lib"
post-extract:
cp ${FILESDIR}/FindNcurses.cmake ${WRKSRC}/cmake/
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (kde/analitza-4.10.2.tar.xz) = AdbMTdgzzf74a40dSl1c5uKA8ueLnX2FxwEBnI8FJc0=
SIZE (kde/analitza-4.10.2.tar.xz) = 178632

View File

@ -0,0 +1,12 @@
# ncurses library finder
if(NCURSES_INCLUDE_DIR AND NCURSES_LIBRARY)
set(NCURSES_FOUND TRUE)
else(NCURSES_INCLUDE_DIR AND NCURSES_LIBRARY)
FIND_PATH(NCURSES_INCLUDE_DIR ncurses.h)
FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ncurses DEFAULT_MSG NCURSES_INCLUDE_DIR NCURSES_LIBRARY )
MARK_AS_ADVANCED(NCURSES_INCLUDE_DIR NCURSES_LIBRARY)
endif(NCURSES_INCLUDE_DIR AND NCURSES_LIBRARY)

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2013/04/24 11:21:42 zhuk Exp $
--- CMakeLists.txt.orig Sat Dec 1 00:39:20 2012
+++ CMakeLists.txt Mon Dec 17 23:32:52 2012
@@ -9,8 +9,16 @@ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY
#Checking whether we can compile calgebra
include(CheckIncludeFiles)
macro_optional_find_package(Readline)
+macro_optional_find_package(Ncurses)
macro_bool_to_01(READLINE_FOUND HAVE_READLINE)
+macro_bool_to_01(NCURSES_FOUND HAVE_NCURSES)
+if(READLINE_FOUND AND NCURSES_FOUND)
+ set(CONSOLE_SUPPORTED TRUE)
+else(READLINE_FOUND AND NCURSES_FOUND)
+ set(CONSOLE_SUPPORTED FALSE)
+endif(READLINE_FOUND AND NCURSES_FOUND)
macro_log_feature(READLINE_FOUND "GNU Readline" "Allows KAlgebra to provide a console interface." "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" FALSE "" "")
+macro_log_feature(READLINE_FOUND "NCurses" "Allows KAlgebra to provide a console interface." "http://www.gnu.org/software/ncurses/" FALSE "" "")
macro_optional_find_package(OpenGL)
macro_bool_to_01(OPENGL_FOUND HAVE_OPENGL)
@@ -22,9 +30,9 @@ add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_
add_subdirectory(analitza)
add_subdirectory(analitzaplot)
add_subdirectory(analitzagui)
-if(HAVE_READLINE)
+if(CONSOLE_SUPPORTED)
add_subdirectory(calgebra)
-endif(HAVE_READLINE)
+endif(CONSOLE_SUPPORTED)
macro_display_feature_log()

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-calgebra_CMakeLists_txt,v 1.1.1.1 2013/04/24 11:21:42 zhuk Exp $
--- calgebra/CMakeLists.txt.orig Wed Oct 17 14:35:23 2012
+++ calgebra/CMakeLists.txt Wed Oct 17 14:35:54 2012
@@ -1,11 +1,11 @@
-include_directories(${READLINE_INCLUDE_DIR})
+include_directories(${READLINE_INCLUDE_DIR} ${NCURSES_INCLUDE_DIRS})
set(calgebra_SRCS
main.cpp
)
kde4_add_executable(calgebra ${calgebra_SRCS})
-target_link_libraries(calgebra ${QT_QTCORE_LIBRARY} ${READLINE_LIBRARY} analitza)
+target_link_libraries(calgebra ${QT_QTCORE_LIBRARY} ${READLINE_LIBRARY} ${NCURSES_LIBRARY} analitza)
install(TARGETS calgebra ${INSTALL_TARGETS_DEFAULT_ARGS})

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-calgebra_main_cpp,v 1.1.1.1 2013/04/24 11:21:42 zhuk Exp $
--- calgebra/main.cpp.orig Thu Nov 17 22:00:47 2011
+++ calgebra/main.cpp Fri Jun 29 16:06:51 2012
@@ -152,7 +152,13 @@ int main(int argc, char *argv[])
for(int i=0; i<history_get_history_state()->length; i++) {
HIST_ENTRY *he = remove_history(i);
// free(he->line);
+#if defined(__OpenBSD__)
+ // very old lib!
+ free(he->line);
+ free(he);
+#else
free_history_entry(he);
+#endif
}
qDebug("\nExit.");
return 0;

View File

@ -0,0 +1 @@
Analitza is a library part of KAlgebra.

View File

@ -0,0 +1,53 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/04/24 11:21:42 zhuk Exp $
@bin bin/calgebra
include/kde4/analitza/
include/kde4/analitza/abstractlexer.h
include/kde4/analitza/analitzaexport.h
include/kde4/analitza/analitzautils.h
include/kde4/analitza/analyzer.h
include/kde4/analitza/builtinmethods.h
include/kde4/analitza/expression.h
include/kde4/analitza/expressionstream.h
include/kde4/analitza/expressiontype.h
include/kde4/analitza/importqobjectmetatype.h
include/kde4/analitza/object.h
include/kde4/analitza/operations.h
include/kde4/analitza/operator.h
include/kde4/analitza/value.h
include/kde4/analitza/variable.h
include/kde4/analitza/variables.h
include/kde4/analitza/vector.h
include/kde4/analitzagui/
include/kde4/analitzagui/algebrahighlighter.h
include/kde4/analitzagui/analitzaguiexport.h
include/kde4/analitzagui/expressionedit.h
include/kde4/analitzagui/operatorsmodel.h
include/kde4/analitzagui/plotsview2d.h
include/kde4/analitzagui/plotsview3d.h
include/kde4/analitzagui/variablesmodel.h
include/kde4/analitzaplot/
include/kde4/analitzaplot/analitzaplotexport.h
include/kde4/analitzaplot/functiongraph.h
include/kde4/analitzaplot/planecurve.h
include/kde4/analitzaplot/plotitem.h
include/kde4/analitzaplot/plotsdictionarymodel.h
include/kde4/analitzaplot/plotsfactory.h
include/kde4/analitzaplot/plotsmodel.h
include/kde4/analitzaplot/plotter2d.h
include/kde4/analitzaplot/plotter3d.h
include/kde4/analitzaplot/plottingenums.h
include/kde4/analitzaplot/spacecurve.h
include/kde4/analitzaplot/surface.h
lib/cmake/analitza/
lib/cmake/analitza/AnalitzaConfig.cmake
lib/cmake/analitza/AnalitzaTargets${MODKDE4_CMAKE_PREFIX}.cmake
lib/cmake/analitza/AnalitzaTargets.cmake
@lib ${KDE4LIB}/libanalitza.so.${LIBanalitza_VERSION}
@lib ${KDE4LIB}/libanalitzagui.so.${LIBanalitzagui_VERSION}
@lib ${KDE4LIB}/libanalitzaplot.so.${LIBanalitzaplot_VERSION}
@lib lib/libanalitza.so.${LIBanalitza_VERSION}
@lib lib/libanalitzagui.so.${LIBanalitzagui_VERSION}
@lib lib/libanalitzaplot.so.${LIBanalitzaplot_VERSION}
share/apps/libanalitza/
share/apps/libanalitza/plots/
share/apps/libanalitza/plots/basic_curves.plots