commit: fc741ec42845dbc5f99d6aef757fc421d8494796 Author: Michael Weber <michael <AT> xmw <DOT> de> AuthorDate: Thu Aug 27 13:53:16 2015 +0000 Commit: Michael Weber <xmw <AT> gentoo <DOT> org> CommitDate: Thu Aug 27 13:53:16 2015 +0000 URL: https://gitweb.gentoo.org/dev/xmw.git/commit/?id=fc741ec4
dev-util/eclipse-clp: Version bump Package-Manager: portage-2.2.20.1 Manifest-Sign-Key: 0x927ADD0C62EEF090 dev-util/eclipse-clp/eclipse-clp-6.1.204.ebuild | 106 ++++++++++++++------- .../files/eclipse-clp-6.1.194-Eplex-Makefile.patch | 9 ++ .../eclipse-clp-6.1.204-JavaInterface-string.patch | 10 ++ ...pse-clp-6.1.204-Visualisation-buildsystem.patch | 31 ++++++ .../files/eclipse-clp-6.1.204-cp-viz-detect.patch | 25 +++++ .../files/eclipse-clp-6.1.204-grappa-detect.patch | 29 ++++++ 6 files changed, 174 insertions(+), 36 deletions(-) diff --git a/dev-util/eclipse-clp/eclipse-clp-6.1.204.ebuild b/dev-util/eclipse-clp/eclipse-clp-6.1.204.ebuild index da389a1..9179e57 100644 --- a/dev-util/eclipse-clp/eclipse-clp-6.1.204.ebuild +++ b/dev-util/eclipse-clp/eclipse-clp-6.1.204.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit autotools eutils readme.gentoo versionator +inherit autotools eutils java-utils-2 readme.gentoo versionator DESCRIPTION="OSS system for the cost-effective development and deployment of constraint programming applications" HOMEPAGE="http://eclipseclp.org/" @@ -21,13 +21,18 @@ IUSE="doc +coin +gecode +glpk +gmp java mysql parallel tcl +threads" #[doc] brauch wohl hevea: dev-tex/hevea RDEPEND="" DEPEND="${RDEPEND} - gmp? ( dev-libs/gmp ) + gmp? ( dev-libs/gmp:3 ) doc? ( app-text/ghostscript-gpl dev-tex/hevea dev-texlive/texlive-latex ) gecode? ( dev-libs/gecode ) mysql? ( virtual/mysql ) - java? ( dev-java/batik dev-java/javahelp ) + java? ( dev-java/batik:1.7 + dev-java/grappa:1.2 + dev-java/javacup:0 + dev-java/javahelp:0 + dev-java/xml-commons-external:1.4 + ) coin? ( sci-libs/coinor-cbc[examples] sci-libs/coinor-osi[glpk?] sci-libs/coinor-symphony[glpk?] @@ -37,20 +42,15 @@ S=${WORKDIR}/Eclipse_${MY_PV} REQUIRED_USE="coin? ( gmp ) glpk? ( coin ) parallel? ( tcl )" -pkg_setup() { - use gecode && ewarn gecode does not work yet - use doc && ewarn doc does not work yet -} - -src_unpack() { - default - if use coin ; then - local my_cbc=$(best_version sci-libs/coinor-cbc) - cp "${EROOT}"usr/share/doc/${my_cbc/sci-libs\//}/examples/Cbc{Branch,Compare}User.{c,h}pp.* . || die - unpack ./Cbc{Branch,Compare}User.{c,h}pp.* - mv Cbc{Branch,Compare}User.{c,h}pp "${S}"/Eplex || die - fi -} +#src_unpack() { +# default +# if use coin ; then +# local my_cbc=$(best_version sci-libs/coinor-cbc) +# cp "${EROOT}"usr/share/doc/${my_cbc/sci-libs\//}/examples/Cbc{Branch,Compare}User.{c,h}pp.* . || die +# unpack ./Cbc{Branch,Compare}User.{c,h}pp.* +# mv Cbc{Branch,Compare}User.{c,h}pp "${S}"/Eplex || die +# fi +#} src_prepare() { epatch \ @@ -65,7 +65,11 @@ src_prepare() { "${FILESDIR}"/${PN}-6.1.194-Pds-64bit.patch \ "${FILESDIR}"/${PN}-6.1.194-Alog-64bit.patch \ "${FILESDIR}"/${PN}-6.1.194-weclipse.patch \ - "${FILESDIR}"/${PN}-6.1.194-Shm-buildsystem.patch + "${FILESDIR}"/${PN}-6.1.194-Shm-buildsystem.patch \ + "${FILESDIR}"/${PN}-6.1.204-Visualisation-buildsystem.patch \ + "${FILESDIR}"/${PN}-6.1.204-grappa-detect.patch \ + "${FILESDIR}"/${PN}-6.1.204-cp-viz-detect.patch \ + "${FILESDIR}"/${PN}-6.1.204-JavaInterface-string.patch rm ARCH RUNME || die @@ -75,8 +79,17 @@ src_prepare() { *) die "unsupported arch ${ARCH}" ;; esac export ECLIPSEDIR=${EROOT}opt/${PN} - export MYSQLDIR="${EROOT}usr/include/mysql" - #export prefix="${S}/build" + if use mysql ; then + export MYSQLDIR="${EROOT}usr/include/mysql" + fi + if use java ; then + export GRAPPA_DIR="${EROOT}usr/share/grappa-1.2/lib" + export GRAPPA_JAR="grappa.jar" + export BATIK_DIR="${EROOT}usr/share/batik-1.7" + export JHELP_DIR="${EROOT}usr/share/javahelp" + export JAVACUP_DIR="${EROOT}usr/share/javacup/lib" + export JAVACUP_JAR="javacup-runtime.jar" + fi tc-export CC AR eautoreconf @@ -97,8 +110,7 @@ src_configure() { local my_osi="--without-osi" if use coin ; then - my_osi="--with-osi=symclp" - #my_osi=" ... clpcbc" doesn't build jet + my_osi="--with-osi=symclp " if use glpk ; then my_osi="${my_osi} glpk" fi @@ -141,7 +153,7 @@ src_compile() { runme() { einfo "create wrapper $1" - local my_dest="build/bin/${ARCH}/$1" + local my_dest="${D}/opt/${PN}/bin/${ARCH}/$1" mkdir -p "$(dirname "${my_dest}")" || die cat << EOF > "${my_dest}" #!/bin/sh @@ -156,23 +168,24 @@ $2 EOF chmod +x "${my_dest}" || die } - mkdir -p "${S}/bin/${ARCH}" + mkdir -p "${S}/bin/${ARCH}" einfo "compile installation kernel (sepia)" emake -C Kernel/${ARCH} sepia einfo "compile runtime kernel (eclipse.exe)" emake -C Kernel/${ARCH} eclipse.exe + einfo "install kernel and header files" - emake -C Kernel/${ARCH} PREFIX="../../build" install + emake -C Kernel/${ARCH} PREFIX="${ED}opt/${PN}" install runme "eclipse" "exec \"\${ECLIPSEDIR}/lib/${ARCH}/eclipse.exe\" \"\$@\"" if use parallel ; then einfo "compile & install parallel Kernel" emake -C Kernel/${ARCH} weclipse - cp -v {Kernel,lib}/${ARCH}/weclipse + cp -v Kernel/${ARCH}/weclipse "${ED}opt/${PN}/bin" || die runme "weclipse" "exec \"\${ECLIPSEDIR}/lib/${ARCH}/weclipse\" \"\$@\"" emake -C Kernel/${ARCH} peclipse - cp -v {Kernel,lib}/${ARCH}/peclipse + cp -v Kernel/${ARCH}/peclipse "${ED}opt/${PN}/bin" || die runme "peclipse" "exec \"\${ECLIPSEDIR}/lib/${ARCH}/peclipse\" \"\$@\"" fi @@ -181,35 +194,56 @@ EOF runme "tktools" "exec wish \"\${ECLIPSEDIR}/lib_tcl/tktools.tcl\" -- \"\$@\"" fi - #einfo "compile & install ecrc_solvers" - #emake -C ecrc_solvers -f Makefile.${ARCH} PREFIX="${S}/build" install -j1 + eemake() { + emake -f Makefile.${ARCH} PREFIX="${ED}opt/${PN}" ECLIPSEDIR="${ED}opt/${PN}" -j1 "$@" + } + + einfo "compile & install ecrc_solvers" + eemake -C ecrc_solvers install \ + AUX_ECLIPSE="${ED}opt/${PN}/bin/${ARCH}/eclipse" einfo "compile & install Flexlm" - emake -C Flexlm -f Makefile.${ARCH} PREFIX="../build" install + eemake -C Flexlm install + + einfo "compile & install Contrib" + eemake -C Contrib install if use coin ; then einfo "compile & install Eplex" - emake -C Eplex -f Makefile.${ARCH} PREFIX="${S}" install -j1 + eemake -C Eplex install einfo "compile & install icparc_solvers" - emake -C icparc_solvers -f Makefile.${ARCH} PREFIX="${S}" install -j1 + eemake -C icparc_solvers install fi if use gecode ; then einfo "compile & install GecodeInterface" - emake -C GecodeInterface -f Makefile.${ARCH} PREFIX="${S}" install + eemake -C GecodeInterface install fi if use java ; then einfo "compile & install JavaInterface" - emake -C JavaInterface -f Makefile.${ARCH} PREFIX="${S}" install + eemake -C JavaInterface install \ + AUX_ECLIPSE="${ED}opt/${PN}/bin/${ARCH}/eclipse" runme "jeclipse" "exec \"\${JRE_HOME}/bin/java\" -Xss2m -Declipse.directory=\"\${ECLIPSEDIR}\" -classpath \"\${ECLIPSEDIR}/lib/eclipse.jar\" com.parctechnologies.eclipse.JEclipse \"\$@\"" einfo "compile & install Visualisation" - emake -C Visualisation -f Makefile.${ARCH} PREFIX="${S}" install + java-pkg_jar-from --build-only javacup javacup-runtime.jar + eemake -C Visualisation all_visualisation + + einfo "compile & install CPViz" + mkdir -p CPViz/jars/batik CPViz/jars/jhelp || die + cd "${S}"/CPViz/jars/batik || die + java-pkg_jar-from --build-only batik-1.7 + java-pkg_jar-from --build-only xml-commons-external-1.4 + cd "${S}"/CPViz/jars/jhelp || die + java-pkg_jar-from --build-only javahelp + cd "${S}" || die + eemake -C CPViz all_cpviz fi if use mysql ; then einfo "compile & install Oci" - emake -C Oci -f Makefile.${ARCH} PREFIX="${S}" install -j1 + eemake -C Oci install \ + ECLIPSE="${ED}opt/${PN}/bin/${ARCH}/eclipse" fi } diff --git a/dev-util/eclipse-clp/files/eclipse-clp-6.1.194-Eplex-Makefile.patch b/dev-util/eclipse-clp/files/eclipse-clp-6.1.194-Eplex-Makefile.patch index fcd84cd..be515e7 100644 --- a/dev-util/eclipse-clp/files/eclipse-clp-6.1.194-Eplex-Makefile.patch +++ b/dev-util/eclipse-clp/files/eclipse-clp-6.1.194-Eplex-Makefile.patch @@ -67,6 +67,15 @@ +AC_OUTPUT --- Eclipse_6.1_194/Eplex/Makefile.in +++ Eclipse_6.1_194/Eplex/Makefile.in +@@ -55,7 +55,7 @@ + GMP_LD = @GMP_LD@ + FLOAT_ROUND_FLAGS = @FLOAT_ROUND_FLAGS@ + +-CPPFLAGS = -I. -I$(ECLIPSEDIR)/include/$(ARCH) -I$(ECLIPSEDIR)/Kernel/src $(OS_INCLUDES) ++CPPFLAGS = -I. -I$(ECLIPSEDIR)/include/$(ARCH) $(OS_INCLUDES) + STDCXXLIB = @STDCXXLIB@ + ECLIBS = -L$(ECLIPSEDIR)/lib/$(ARCH) -leclipse @LIBS@ + @@ -96,34 +96,31 @@ SYMCLPDIR = @SYMCLPDIR@ OSIGLPKDIR = @OSIGLPKDIR@ diff --git a/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-JavaInterface-string.patch b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-JavaInterface-string.patch new file mode 100644 index 0000000..53936c3 --- /dev/null +++ b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-JavaInterface-string.patch @@ -0,0 +1,10 @@ +--- Eclipse_6.1_204/JavaInterface/ec_java.c ++++ Eclipse_6.1_204/JavaInterface/ec_java.c +@@ -29,6 +29,7 @@ + */ + + #include <stdlib.h> ++#include <string.h> + #include <eclipse.h> + #include "com_parctechnologies_eclipse_NativeEclipse.h" + diff --git a/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-Visualisation-buildsystem.patch b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-Visualisation-buildsystem.patch new file mode 100644 index 0000000..711b940 --- /dev/null +++ b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-Visualisation-buildsystem.patch @@ -0,0 +1,31 @@ +--- Eclipse_6.1_204/Visualisation/Makefile.in ++++ Eclipse_6.1_204/Visualisation/Makefile.in +@@ -61,7 +61,7 @@ + + ECLIPSE = $(ECLIPSEDIR)/$(BINORLIB)/$(ARCH)/eclipse + +-CLASSPATH = $(ECLIPSEDIR)/lib/eclipse.jar$(PATHSEP)$(GRAPPA_DIR)/$(GRAPPA_JAR)$(PATHSEP)$(JAVA_CLASS_DIR)$(PATHSEP)$(JRE_HOME)/lib/rt.jar ++CLASSPATH = $(ECLIPSEDIR)/lib/eclipse.jar$(PATHSEP)$(GRAPPA_DIR)/$(GRAPPA_JAR)$(PATHSEP)$(JAVACUP_DIR)/$(JAVACUP_JAR)$(PATHSEP)$(JAVA_CLASS_DIR)$(PATHSEP)$(JRE_HOME)/lib/rt.jar + + ECL_ECO_FILES = tty_vc.ecl graphviz_license.ecl vc_support.ecl viewable.ecl batch_goals.ecl java_vc.ecl mutable.ecl graphviz.ecl gnuplot.ecl + ECL_ECL_FILES = +@@ -87,7 +87,7 @@ + ECL_DEST = $(ECL_ECL_FILES:%.ecl=$(DESTDIR)/%.ecl) \ + $(ECL_ECO_FILES:%.ecl=$(DESTDIR)/%.ecl) + +-JAR_DEST = $(DESTDIR)/$(JAR_FILE) $(DESTDIR)/$(GRAPPA_JAR) ++JAR_DEST = $(DESTDIR)/$(JAR_FILE) + + DOCSDIR=./doc/$(JAVADOC_LEVEL) + +@@ -162,10 +162,6 @@ + + + +-$(DESTDIR)/$(GRAPPA_JAR): $(GRAPPA_DIR)/$(GRAPPA_JAR) +- /bin/cp $< $@ +- -@/bin/chmod $(PERM) $@ +- + $(DESTDIR)/$(JAR_FILE): $(JAVA_SRC_FILES) $(TV_JAVA_SRC_FILES) + mkdir -p $(JAVA_CLASS_DIR) + $(JAVAC) -classpath $(CLASSPATH) \ diff --git a/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-cp-viz-detect.patch b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-cp-viz-detect.patch new file mode 100644 index 0000000..862faa8 --- /dev/null +++ b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-cp-viz-detect.patch @@ -0,0 +1,25 @@ +--- Eclipse_6.1_204/configure.ac ++++ Eclipse_6.1_204/configure.ac +@@ -1931,12 +1931,16 @@ + + ALL_CPVIZ= + if test "$cpviz_requested" != "no"; then +- for f in "$ECLIPSETHIRDPARTY/batik-"* ; do +- if test -d "$f"; then BATIK_DIR="$f"; fi +- done +- for f in "$ECLIPSETHIRDPARTY/jh"[[0-9]]* ; do +- if test -d "$f"; then JHELP_DIR="$f"; fi +- done ++ if test -z "$BATIK_DIR" ; then ++ for f in "$ECLIPSETHIRDPARTY/batik-"* ; do ++ if test -d "$f"; then BATIK_DIR="$f"; fi ++ done ++ fi ++ if test -z "JHELP_DIR" ; then ++ for f in "$ECLIPSETHIRDPARTY/jh"[[0-9]]* ; do ++ if test -d "$f"; then JHELP_DIR="$f"; fi ++ done ++ fi + if test -n "$BATIK_DIR" -a -n "$JHELP_DIR" -a -n "$JAVA_HOME"; then + ALL_CPVIZ=all_cpviz + fi diff --git a/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-grappa-detect.patch b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-grappa-detect.patch new file mode 100644 index 0000000..7deff07 --- /dev/null +++ b/dev-util/eclipse-clp/files/eclipse-clp-6.1.204-grappa-detect.patch @@ -0,0 +1,29 @@ +--- Eclipse_6.1_204/configure.ac ++++ Eclipse_6.1_204/configure.ac +@@ -1818,15 +1818,17 @@ + ALL_VISUALISATION= + if test -n "$JAVA_HOME"; then + +- GRAPPA_REQUIRED="1.2" +- for version in $GRAPPA_REQUIRED; do +- GRAPPA_DIR=$ECLIPSETHIRDPARTY/grappa$version +- GRAPPA_JAR=grappa`echo $version|tr . _`.jar +- if test -r $GRAPPA_DIR/$GRAPPA_JAR; then +- break +- fi +- GRAPPA_JAR= +- done ++ if test -z "$GRAPPA_DIR" && test -z GRAPPA_JAR ; then ++ GRAPPA_REQUIRED="1.2" ++ for version in $GRAPPA_REQUIRED; do ++ GRAPPA_DIR=$ECLIPSETHIRDPARTY/grappa$version ++ GRAPPA_JAR=grappa`echo $version|tr . _`.jar ++ if test -r $GRAPPA_DIR/$GRAPPA_JAR; then ++ break ++ fi ++ GRAPPA_JAR= ++ done ++ fi + if test -z "$GRAPPA_JAR"; then + AC_MSG_WARN([Could not find Grappa ($GRAPPA_REQUIRED) in $ECLIPSETHIRDPARTY]) + else
