commit: 89d0ddab14cd59329afcc56bb941dec6df2e846a Author: Michael Weber <michael <AT> xmw <DOT> de> AuthorDate: Fri May 16 00:06:07 2014 +0000 Commit: Michael Weber <xmw <AT> gentoo <DOT> org> CommitDate: Fri May 16 00:06:07 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=89d0ddab
work in progress Package-Manager: portage-2.2.10 Manifest-Sign-Key: 62EEF090 --- dev-util/eclipse-cpl/ChangeLog | 8 ++ dev-util/eclipse-cpl/eclipse-cpl-6.1.187.ebuild | 144 +++++++++++++++------ dev-util/eclipse-cpl/files/README.gentoo | 1 + .../eclipse-cpl-6.1.187-disable-ecrc-solver.patch | 12 -- ...eclipse-cpl-6.1.187-disable-icparc-solver.patch | 10 -- .../files/eclipse-cpl-6.1.187-mysql.patch | 11 ++ .../files/eclipse-cpl-6.1.187-tcl8.6.patch | 35 +++++ dev-util/eclipse-cpl/metadata.xml | 3 + 8 files changed, 165 insertions(+), 59 deletions(-) diff --git a/dev-util/eclipse-cpl/ChangeLog b/dev-util/eclipse-cpl/ChangeLog index 8b16acd..9fc9fa6 100644 --- a/dev-util/eclipse-cpl/ChangeLog +++ b/dev-util/eclipse-cpl/ChangeLog @@ -1,3 +1,11 @@ + 16 May 2014; Michael Weber <x...@gentoo.org> +files/README.gentoo, + +files/eclipse-cpl-6.1.187-mysql.patch, + +files/eclipse-cpl-6.1.187-tcl8.6.patch, + -files/eclipse-cpl-6.1.187-disable-ecrc-solver.patch, + -files/eclipse-cpl-6.1.187-disable-icparc-solver.patch, + eclipse-cpl-6.1.187.ebuild, metadata.xml: + work in progress + 15 May 2014; Michael Weber <x...@gentoo.org> eclipse-cpl-6.1.187.ebuild: second approach generating wrappers diff --git a/dev-util/eclipse-cpl/eclipse-cpl-6.1.187.ebuild b/dev-util/eclipse-cpl/eclipse-cpl-6.1.187.ebuild index 5e4e618..f5ab7a4 100644 --- a/dev-util/eclipse-cpl/eclipse-cpl-6.1.187.ebuild +++ b/dev-util/eclipse-cpl/eclipse-cpl-6.1.187.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit autotools eutils flag-o-matic toolchain-funcs versionator +inherit autotools eutils flag-o-matic readme.gentoo toolchain-funcs versionator DESCRIPTION="OSS system for the cost-effective development and deployment of constraint programming applications" HOMEPAGE="http://eclipseclp.org/" @@ -15,71 +15,141 @@ SRC_URI="http://eclipseclp.org/Distribution/${MY_PV}/src/${PN/-cpl}_src.tgz -> $ LICENSE="${pn} LGPL-2.1" SLOT="0" KEYWORDS="~amd64" -IUSE="doc tcl threads" +IUSE="doc gecode gmp java mysql tcl threads" -RDEPEND="" -DEPEND="doc? ( - app-text/ghostscript-gpl +RDEPEND="dev-libs/gmp" +DEPEND="${RDEPEND} + doc? ( app-text/ghostscript-gpl dev-tex/hevea - dev-texlive/texlive-latex - ) " + dev-texlive/texlive-latex ) + gecode? ( dev-libs/gecode ) + mysql? ( virtual/mysql ) + java? ( dev-java/batik dev-java/javahelp )" -S="${WORKDIR}/Eclipse_${MY_PV}" +S=${WORKDIR}/Eclipse_${MY_PV} -src_prepare() { - append-cflags -DUSE_INTERP_RESULT -fPIC - tc-export AR +pkg_setup() { + use gecode && ewarn gecode does not work yet + use doc && ewarn doc does not work yet +} +src_prepare() { epatch \ "${FILESDIR}"/${P}-automagic-doc.patch \ - "${FILESDIR}"/${P}-includedir.patch \ - "${FILESDIR}"/${P}-shm-respect-ar.patch + "${FILESDIR}"/${P}-mysql.patch \ + "${FILESDIR}"/${P}-shm-respect-ar.patch \ + "${FILESDIR}"/${P}-tcl8.6.patch - eautoreconf + append-cflags -DUSE_INTERP_RESULT + rm ARCH RUNME || die - #replace arch guessing script - rm ARCH || die case "${ARCH}" in amd64) export ARCH=x86_64_linux ;; x86) export ARCH=i386_linux ;; *) die "unsupported arch ${ARCH}" ;; esac - mkdir build - echo -e '#!/bin/sh\necho $ARCH' > build/ARCH - chmod +x build/ARCH + export ECLIPSEDIR=${EROOT}opt/${PN} + + eautoreconf } src_configure() { - econf \ - --with-gmp + MYSQLDIR="${EROOT}usr/include/mysql" econf \ + $(use_with gmp) \ --without-cplex \ - --without-cpviz \ - --without-flexlm \ - --without-gfd \ + --with-osi \ + --with-flexlm \ + $(use_with gecode gfd) \ --without-graphviz \ --without-gurobi \ - --without-mysql \ - --without-osi \ + $(use_with mysql) \ --without-xpress \ + $(use_with java) \ + $(use_with java cpviz) \ $(use_with threads pthreads) \ $(use_with doc) \ $(use_with tcl) } src_compile() { - emake -f Makefile.${ARCH} PREFIX="${S}/build" -j1 + mkdir -p "${S}/build/bin/${ARCH}" + + #replace toplevel Makefile.${ARCH}, -j1 bug etc. + rm -fv Makefile.${ARCH} || die + einfo "compile & install Shm" + emake -C Shm/${ARCH} AR="$(tc-getAR) ruv" PREFIX="${S}/build" install + einfo "compile & install Kernel" + emake -C Kernel/${ARCH} sepia + emake -C Kernel/${ARCH} PREFIX="${S}/build" install + einfo "install legal files" + cp -pr legal "${S}/build" || die + + runme() { + einfo "create wrapper $1" + cat << EOF > "build/bin/${ARCH}/$1" +#!/bin/sh +export ECLIPSEDIR="\${ECLIPSEDIR:-${EROOT}opt/${PN}}" +if [ -z "\${LD_LIBRARY_PATH}" ] ; then + export LD_LIBRARY_PATH="\${ECLIPSEDIR}/lib/${ARCH}" +else + export LD_LIBRARY_PATH="\${ECLIPSEDIR}/lib/${ARCH}:\${LD_LIBRARY_PATH}" +fi +export JRE_HOME="\${JRE_HOME:-\${JAVA_HOME}}" +$2 +EOF + chmod +x "build/bin/${ARCH}/$1" + } + runme "eclipse" "exec \"\${ECLIPSEDIR}/lib/x86_64_linux/eclipse.exe\" \"\$@\"" + + if use tcl ; then + einfo "install lib_tcl" + cp -pr lib_tcl "build" || die + + runme "tkeclipse" "exec wish \"\${ECLIPSEDIR}/lib_tcl/tkeclipse.tcl\" -- \"\$@\"" + runme "tktools" "exec wish \"\${ECLIPSEDIR}/lib_tcl/tktools.tcl\" -- \"\$@\"" + fi + einfo "compile & install Flexlm" + emake -C Flexlm -f Makefile.${ARCH} PREFIX="${S}/build" install + #einfo "install Eplex" + #emake -C Eplex -f Makefile.${ARCH} PREFIX="${my_ED}" install_eplex -j1 + if use mysql ; then + einfo "compile & install Oci" + emake -C Oci -f Makefile.${ARCH} PREFIX="${S}/build" install -j1 + fi + + if use gecode ; then + einfo "compile & install GecodeInterface" + emake -C GecodeInterface -f Makefile.${ARCH} AR="$(tc-getAR)" PREFIX="${S}/build" install + fi + if use java ; then + einfo "compile & install JavaInterface" + # installs documentation and examples + emake -C JavaInterface -f Makefile.${ARCH} PREFIX="${S}/build" install + runme "jeclipse" "exec \"\${JRE_HOME}/bin/java\" -Xss2m -Declipse.directory=\"\${ECLIPSEDIR}\" -classpath \"\${ECLIPSEDIR}/lib/eclipse.jar\" com.parctechnologies.eclipse.JEclipse \"\$@\"" + + einfo "compile & install Visualisation" + # installs documentation and examples + emake -C Visualisation -f Makefile.${ARCH} PREFIX="${S}/build" install + fi } src_install() { - local my_file - for my_file in "build/bin/${ARCH}/"* ; do - sed -e "s:${S}/build:${EROOT}opt/${PN}:g" \ - -i "${my_file}" || die - make_wrapper "$(basename "${my_file}")" "${EROOT}opt/${PN}/bin/${ARCH}/$(basename "${my_file}")" - done - - rmdir build/tcltk{/x86_64_linux,} - use doc || rm -rf build/doc dodir /opt - mv build "${ED}"opt/${PN} + mv "${S}/build" "${ED}opt/${PN}" || die + + local my_file + make_wrapper eclipse "${EROOT}opt/${PN}/bin/${ARCH}/eclipse" + if use tcl ; then + make_wrapper tkeclipse "${EROOT}opt/${PN}/bin/${ARCH}/tkeclipse" + make_wrapper tktools "${EROOT}opt/${PN}/bin/${ARCH}/tktools" + fi + if use java ; then + make_wrapper jeclipse "${EROOT}opt/${PN}/bin/${ARCH}/jeclipse" + fi + + echo "ECLIPSEDIR=\"${EROOT}opt/${PN}\"" > "${TMP}"/90${PN} + doenvd "${TMP}"/90${PN} + + dodoc README_UNIX + readme.gentoo_create_doc } diff --git a/dev-util/eclipse-cpl/files/README.gentoo b/dev-util/eclipse-cpl/files/README.gentoo new file mode 100644 index 0000000..97ca535 --- /dev/null +++ b/dev-util/eclipse-cpl/files/README.gentoo @@ -0,0 +1 @@ +Please reload your environment to ensure a correct ECLIPSEDIR variable. diff --git a/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-disable-ecrc-solver.patch b/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-disable-ecrc-solver.patch deleted file mode 100644 index 41fdd4d..0000000 --- a/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-disable-ecrc-solver.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- Eclipse_6.1_187/Makefile.in -+++ Eclipse_6.1_187/Makefile.in -@@ -27,9 +27,7 @@ - # (e.g. because they try to make .eco/.eci files and need to run eclipse, - # or requires the making of such a subsystem) - install_all: install_cross \ -- make_ecrc_solvers \ - make_pt_libraries \ -- make_zincinterface \ - make_compiler \ - make_contrib \ - make_mercury diff --git a/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-disable-icparc-solver.patch b/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-disable-icparc-solver.patch deleted file mode 100644 index 5e2c5bf..0000000 --- a/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-disable-icparc-solver.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Eclipse_6.1_187/Makefile.in -+++ Eclipse_6.1_187/Makefile.in -@@ -18,7 +18,6 @@ - make_flexlm \ - make_eplex \ - make_gecodeinterface \ -- make_icparc_solvers \ - make_javainterface \ - make_visualisation \ - make_oci \ diff --git a/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-mysql.patch b/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-mysql.patch new file mode 100644 index 0000000..7aa1c17 --- /dev/null +++ b/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-mysql.patch @@ -0,0 +1,11 @@ +--- Eclipse_6.1_187/configure.ac ++++ Eclipse_6.1_187/configure.ac +@@ -1908,7 +1908,7 @@ + mysql_versions_requested="55 54 53 52 51 50" + fi + for version in $mysql_versions_requested; do +- MYSQLDIR="$ECLIPSETHIRDPARTY/mysql$version/$ARCH" ++ MYSQLDIR=${MYSQLDIR:-"$ECLIPSETHIRDPARTY/mysql$version/$ARCH"} + if test -d "$MYSQLDIR"; then + ALL_WITH_MYSQL=all_with_mysql + ALL_CROSS_WITH_MYSQL=all_cross_with_mysql diff --git a/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-tcl8.6.patch b/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-tcl8.6.patch new file mode 100644 index 0000000..6a02660 --- /dev/null +++ b/dev-util/eclipse-cpl/files/eclipse-cpl-6.1.187-tcl8.6.patch @@ -0,0 +1,35 @@ +--- Eclipse_6.1_187/RUNME ++++ Eclipse_6.1_187/RUNME +@@ -124,7 +124,7 @@ + } + + +-TCL_REQUIRED="8.5 8.4 8.3" ++TCL_REQUIRED="8.6 8.5 8.4 8.3" + + usable_tcl() { + [ -x "$TCL_WISH" -a \ +@@ -227,10 +227,10 @@ + + case $ARCH in + *_macosx) +- ask "What is the version number of your Tcl/Tk installation (8.X) \n[Note that 8.5 prior to 8.5.7 was broken for ECLiPSe]" TCL_VERSION "8.3 8.4 8.5" ++ ask "What is the version number of your Tcl/Tk installation (8.X) \n[Note that 8.5 prior to 8.5.7 was broken for ECLiPSe]" TCL_VERSION "8.3 8.4 8.5 8.6" + ;; + *) +- ask "What is the version number of your Tcl/Tk installation (8.X)" TCL_VERSION "8.3 8.4 8.5" ++ ask "What is the version number of your Tcl/Tk installation (8.X)" TCL_VERSION "8.3 8.4 8.5 8.6" + ;; + esac + +--- Eclipse_6.1_187/configure.ac ++++ Eclipse_6.1_187/configure.ac +@@ -1296,7 +1296,7 @@ + + if test "$tcl_requested" = "yes"; then + +- TCL_REQUIRED="8.5 8.4 8.3" ++ TCL_REQUIRED="8.6 8.5 8.4 8.3" + + if test "$OSCLASS" != "win" ; then + dnl find X includes and libraries diff --git a/dev-util/eclipse-cpl/metadata.xml b/dev-util/eclipse-cpl/metadata.xml index 5b80fb9..71da1de 100644 --- a/dev-util/eclipse-cpl/metadata.xml +++ b/dev-util/eclipse-cpl/metadata.xml @@ -5,4 +5,7 @@ <email>x...@gentoo.org</email> <name>Michael Weber</name> </maintainer> +<use> +<flag name="gecode">Bindings for dev-libs/gecode</flag> +</use> </pkgmetadata>