public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-mathematics/singular/files/, sci-mathematics/singular/
@ 2014-05-09 13:58 Thomas Kahle
  0 siblings, 0 replies; only message in thread
From: Thomas Kahle @ 2014-05-09 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     357e0091b086345a6fab8062cf0e1f1a58fad1cc
Author:     Thomas Kahle <thomas.kahle <AT> ovgu <DOT> de>
AuthorDate: Fri May  9 13:57:28 2014 +0000
Commit:     Thomas Kahle <tom111 <AT> gmx <DOT> de>
CommitDate: Fri May  9 13:57:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=357e0091

Experimental bump to 4.0.0

Package-Manager: portage-2.2.8-r1

---
 sci-mathematics/singular/ChangeLog                 |  10 ++
 .../singular/files/60singular-gentoo.el            |  10 ++
 .../singular-4.0.0-fix-omalloc-ar-detection.patch  |  12 ++
 .../singular/files/singular-4.0.0-gentoo.patch     |  65 +++++++++
 sci-mathematics/singular/metadata.xml              |  12 ++
 sci-mathematics/singular/singular-4.0.0_p2.ebuild  | 147 +++++++++++++++++++++
 6 files changed, 256 insertions(+)

diff --git a/sci-mathematics/singular/ChangeLog b/sci-mathematics/singular/ChangeLog
new file mode 100644
index 0000000..e275fd8
--- /dev/null
+++ b/sci-mathematics/singular/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-mathematics/singular
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*singular-4.0.0_p2 (09 May 2014)
+
+  09 May 2014; Thomas Kahle <tomka@gentoo.org> +files/60singular-gentoo.el,
+  +files/singular-4.0.0-fix-omalloc-ar-detection.patch,
+  +files/singular-4.0.0-gentoo.patch, +metadata.xml, +singular-4.0.0_p2.ebuild:
+  Experimental bump to 4.0.0

diff --git a/sci-mathematics/singular/files/60singular-gentoo.el b/sci-mathematics/singular/files/60singular-gentoo.el
new file mode 100644
index 0000000..7be8c08
--- /dev/null
+++ b/sci-mathematics/singular/files/60singular-gentoo.el
@@ -0,0 +1,10 @@
+
+;; site-file for sci-mathematics/singular
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'singular "singular"
+  "Start Singular using default values." t)
+(autoload 'singular-other "singular"
+  "Ask for arguments and start Singular." t)
+
+(add-to-list 'auto-mode-alist '("\\.sing\\'" . c++-mode))

diff --git a/sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch b/sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch
new file mode 100644
index 0000000..87b4423
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN singular-4.0.0.orig/omalloc/configure.ac singular-4.0.0/omalloc/configure.ac
+--- singular-4.0.0.orig/omalloc/configure.ac	2014-03-06 18:07:49.000000000 +0100
++++ singular-4.0.0/omalloc/configure.ac	2014-05-09 15:41:19.755097185 +0200
+@@ -117,7 +117,7 @@
+ dnl check for programs
+ dnl
+ AC_CHECK_PROG(AR, ar, ar, :)
+-if test "$ac_cv_prog_AR" != ar; then
++if test "$ac_cv_prog_AR" = no; then
+   AC_MSG_ERROR(*** ar program not found)
+ fi
+ AC_CHECK_PROGS(PERL, perl, "no")

diff --git a/sci-mathematics/singular/files/singular-4.0.0-gentoo.patch b/sci-mathematics/singular/files/singular-4.0.0-gentoo.patch
new file mode 100644
index 0000000..ba7b841
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.0-gentoo.patch
@@ -0,0 +1,65 @@
+--- resources/feResource.cc.orig	2010-04-30 10:20:14.000000000 +0000
++++ resources/feResource.cc	2010-10-11 09:19:01.431179334 +0000
+@@ -41,7 +41,7 @@
+ #define SINGULAR_DEFAULT_DIR "/usr/local/Singular/"S_VERSION1
+ #endif
+ #else // ! defined(MAKE_DISTRIBUTION)
+-#define SINGULAR_DEFAULT_DIR S_ROOT_DIR
++#define SINGULAR_DEFAULT_DIR "@GENTOO_PORTAGE_EPREFIX@/usr"
+ #endif // defined(MAKE_DISTRIBUTION)
+ 
+ /*****************************************************************
+@@ -73,33 +73,31 @@
+ {
+   {"SearchPath",    's', feResPath,  NULL,
+    "$SINGULARPATH;"
+-   "%b/LIB;"
+-   "%b/MOD;"
++   "%r/share/singular/MOD;"
+    "%r/LIB;"
+-   "%r/../LIB;"
++   "%r/share/singular/LIB;"
+    "%d/LIB;"
+-   "%d/../LIB"
+    ""},
+-  {"Singular",  'S',    feResBinary,"SINGULAR_EXECUTABLE",  "%d/"S_UNAME"/Singular",(char *)""},
+-  {"BinDir",    'b',    feResDir,   "SINGULAR_BIN_DIR",     "%d/"S_UNAME,           (char *)""},
+-  {"RootDir",   'r',    feResDir,   "SINGULAR_ROOT_DIR",    "%b/..",                (char *)""},
++  {"Singular",  'S',    feResBinary,"SINGULAR_EXECUTABLE",  "%d/bin/Singular",(char *)""},
++  {"BinDir",    'b',    feResDir,   "SINGULAR_BIN_DIR",     "%d/bin",           (char *)""},
++  {"RootDir",   'r',    feResDir,   "SINGULAR_ROOT_DIR",    "%d",                (char *)""},
+   {"DefaultDir",'d',    feResDir,   "SINGULAR_DEFAULT_DIR",  SINGULAR_DEFAULT_DIR,  (char *)""},
+-  {"InfoFile",  'i',    feResFile,  "SINGULAR_INFO_FILE",   "%r/info/singular.hlp", (char *)""},
+-  {"IdxFile",   'x',    feResFile,  "SINGULAR_IDX_FILE",    "%r/doc/singular.idx",  (char *)""},
+-  {"HtmlDir",   'h',    feResDir,   "SINGULAR_HTML_DIR",    "%r/html",              (char *)""},
++  {"InfoFile",  'i',    feResFile,  "SINGULAR_INFO_FILE",   "%r/share/info/singular.info.bz2", (char *)""},
++  {"IdxFile",   'x',    feResFile,  "SINGULAR_IDX_FILE",    "%r/share/singular/singular.idx",  (char *)""},
++  {"HtmlDir",   'h',    feResDir,   "SINGULAR_HTML_DIR",    "%r/share/doc/PFSUBST/html",              (char *)""},
+ #ifdef ix86_Win
+   {"HtmlHelpFile",'C',  feResFile,  "SINGULAR_CHM_FILE",    "%r/doc/Manual.chm",    (char *)""},
+ #endif
+   {"ManualUrl", 'u',    feResUrl,   "SINGULAR_URL",         "http://www.singular.uni-kl.de/Manual/"S_VERSION1,    (char *)""},
+-  {"ExDir",     'm',    feResDir,   "SINGULAR_EXAMPLES_DIR","%r/examples",          (char *)""},
++  {"ExDir",     'm',    feResDir,   "SINGULAR_EXAMPLES_DIR","%r/share/doc/PFSUBST/examples",          (char *)""},
+   {"Path",      'p',    feResPath,  NULL,                   "%b;$PATH",             (char *)""},
+ 
+ #ifdef ESINGULAR
+   {"emacs",     'E',    feResBinary,"ESINGULAR_EMACS",      "%b/emacs",             (char *)""},
+   {"xemacs",    'A',    feResBinary,"ESINGULAR_EMACS",      "%b/xemacs",            (char *)""},
+   {"SingularEmacs",'M', feResBinary,"ESINGULAR_SINGULAR",   "%b/Singular",          (char *)""},
+-  {"EmacsLoad", 'l',    feResFile,  "ESINGULAR_EMACS_LOAD", "%e/.emacs-singular",   (char *)""},
+-  {"EmacsDir",  'e',    feResDir,   "ESINGULAR_EMACS_DIR",  "%r/emacs",             (char *)""},
++  {"EmacsLoad", 'l',    feResFile,  "ESINGULAR_EMACS_LOAD", "%r/share/emacs/site-lisp/singular/.emacs-singular",   (char *)""},
++  {"EmacsDir",  'e',    feResDir,   "ESINGULAR_EMACS_DIR",  "%r/share/emacs/site-lisp/singular",             (char *)""},
+ #elif defined(TSINGULAR)
+   {"SingularXterm",'M', feResBinary,"TSINGULAR_SINGULAR",   "%b/Singular",          (char *)""},
+ #ifdef ix86_Win
+@@ -108,7 +106,7 @@
+   {"xterm",     'X',    feResBinary,"XTERM",                "%b/xterm",             (char *)""},
+ #endif
+ #else
+-  {"EmacsDir",  'e',    feResDir,   "SINGULAR_EMACS_DIR",   "%r/emacs",             (char *)""},
++  {"EmacsDir",  'e',    feResDir,   "SINGULAR_EMACS_DIR",   "%r/share/emacs/site-lisp/singular",             (char *)""},
+ #endif
+   {NULL, 0, feResUndef, NULL, NULL, NULL}, // must be the last record
+ };

diff --git a/sci-mathematics/singular/metadata.xml b/sci-mathematics/singular/metadata.xml
new file mode 100644
index 0000000..936baec
--- /dev/null
+++ b/sci-mathematics/singular/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+  <email>tomka@gentoo.org</email>
+  <name>Thomas Kahle</name>
+</maintainer>
+<herd>sci-mathematics</herd>
+<use>
+  <flag name='boost'>Compile against external boost headers (<pkg>dev-libs/boost</pkg>)</flag>
+</use>
+</pkgmetadata>

diff --git a/sci-mathematics/singular/singular-4.0.0_p2.ebuild b/sci-mathematics/singular/singular-4.0.0_p2.ebuild
new file mode 100644
index 0000000..1ec80b4
--- /dev/null
+++ b/sci-mathematics/singular/singular-4.0.0_p2.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-3.1.4-r1.ebuild,v 1.4 2012/06/23 10:50:20 xarthisius Exp $
+
+EAPI=5
+
+inherit autotools eutils elisp-common flag-o-matic multilib prefix versionator
+
+MY_PN=Singular
+MY_PV=$(replace_all_version_separators '.')
+# Consistency is different...
+MY_DIR2=$(get_version_component_range 1-3 ${PV})
+MY_DIR=$(replace_all_version_separators '-' ${MY_DIR2})
+
+DESCRIPTION="Computer algebra system for polynomial computations"
+HOMEPAGE="http://www.singular.uni-kl.de/"
+SRC_URI="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~x86-macos"
+IUSE="boost doc emacs examples python +readline"
+
+RDEPEND="dev-libs/gmp
+	>=dev-libs/ntl-5.5.1
+	emacs? ( >=virtual/emacs-22 )"
+
+DEPEND="${RDEPEND}
+	dev-lang/perl
+	boost? ( dev-libs/boost )
+	readline? ( sys-libs/readline )"
+
+SITEFILE=60${PN}-gentoo.el
+
+S="${WORKDIR}/${PN}-${MY_DIR2}"
+
+pkg_setup() {
+	append-flags "-fPIC"
+	append-ldflags "-fPIC"
+	tc-export AR CC CPP CXX
+
+	# Ensure that >=emacs-22 is selected
+	if use emacs; then
+		elisp-need-emacs 22 || die "Emacs version too low"
+	fi
+}
+
+src_prepare () {
+	# Need to do something about resources later...
+	# epatch "${FILESDIR}"/${PN}-4.0.0-gentoo.patch
+
+	# omalloc's old configure will fail if ar is not exactly 'ar'.
+	epatch "${FILESDIR}"/${PN}-4.0.0-fix-omalloc-ar-detection.patch
+
+	cd "${S}"/omalloc || die "failed to cd into omalloc directory"
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+#		--prefix="${S}"/build \
+#		--exec-prefix="${S}"/build \
+#		--bindir="${S}"/build/bin \
+#		--libdir="${S}"/build/lib \
+#		--libexecdir="${S}"/build/lib \
+#		--includedir="${S}"/build/include \
+		--with-gmp="${EPREFIX}"/usr \
+		--with-ntl \
+		--disable-debug \
+		--disable-doc \
+		--enable-factory \
+		--enable-libfac \
+		--enable-IntegerProgramming \
+#		--enable-Singular \
+		$(use_with python python embed) \
+		$(use_with boost Boost) \
+		$(use_enable emacs) \
+		$(use_with readline) || die "configure failed"
+}
+
+src_compile() {
+	emake || die "emake failed"
+
+	if use emacs; then
+		cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}/emacs/
+		elisp-compile *.el || die "elisp-compile failed"
+	fi
+}
+
+src_test() {
+	emake test || die "tests failed"
+}
+
+# src_install () {
+# 	dodoc README
+# 	# execs and libraries
+# 	cd "${S}"/build/bin
+# 	dobin ${MY_PN}* gen_test change_cost solve_IP toric_ideal LLL \
+# 		|| die "failed to install binaries"
+# 	insinto /usr/$(get_libdir)/${PN}
+# 	doins *.so || die "failed to install libraries"
+#
+# 	dosym ${MY_PN}-${MY_DIR} /usr/bin/${MY_PN} \
+# 		|| die "failed to create symbolic link"
+#
+# 	# stuff from the share tar ball
+# 	cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}
+# 	insinto /usr/share/${PN}
+# 	doins -r LIB  || die "failed to install lib files"
+# 	if use examples; then
+# 		insinto /usr/share/doc/${PF}
+# 		doins -r examples || die "failed to install examples"
+# 	fi
+# 	if use doc; then
+# 		dohtml -r html/* || die "failed to install html docs"
+# 		insinto /usr/share/${PN}
+# 		doins doc/singular.idx || die "failed to install idx file"
+# 		cp info/${PN}.hlp info/${PN}.info &&
+# 		doinfo info/${PN}.info \
+# 			|| die "failed to install info files"
+# 	fi
+# 	if use emacs; then
+# 		elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs* \
+# 			|| die "elisp-install failed"
+# 		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+# 	fi
+# }
+
+pkg_postinst() {
+	einfo "The authors ask you to register as a SINGULAR user."
+	einfo "Please check the license file for details."
+
+	if use emacs; then
+		echo
+		ewarn "Please note that the ESingular emacs wrapper has been"
+		ewarn "removed in favor of full fledged singular support within"
+		ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs"
+		ewarn "and you should be good to go! See bug #193411 for more info."
+		echo
+	fi
+
+	use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-09 13:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 13:58 [gentoo-commits] proj/sci:master commit in: sci-mathematics/singular/files/, sci-mathematics/singular/ Thomas Kahle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox