diff options
author | James Le Cuirot <chewi@gentoo.org> | 2016-02-10 20:36:36 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2016-02-10 20:43:21 +0000 |
commit | 8982abb1ca6014ad2114c806c584070a62c0bae3 (patch) | |
tree | 28bf8bc0ec66cd8be1372587c497ae98a48d8e27 /eclass | |
parent | dev-python/hypothesis: arm stable, bug #573084 (diff) | |
download | gentoo-8982abb1ca6014ad2114c806c584070a62c0bae3.tar.gz gentoo-8982abb1ca6014ad2114c806c584070a62c0bae3.tar.bz2 gentoo-8982abb1ca6014ad2114c806c584070a62c0bae3.zip |
java-utils-2.eclass: Write package.env unconditionally
Fixes dev-db/sqldeveloper-4.1.3.20.78-r1. This is a case where all the
jars are installed without dojar and none of the dependencies are
mandatory. Although our regular launcher scripts aren't used, gjl is
still invoked to determine the appropriate JVM so package.env is
therefore necessary. The conditions didn't make much sense anyway as
package.env is only written off the back of functions that satisfy
them anyway. sqldeveloper has to call java-pkg_do_write_ manually to
force package.env to be written.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-utils-2.eclass | 102 |
1 files changed, 47 insertions, 55 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 1a7dd7dc0171..5be7e172c7d7 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -2352,62 +2352,54 @@ java-pkg_do_write_() { java-pkg_init_paths_ # Create directory for package.env dodir "${JAVA_PKG_SHAREPATH}" - if [[ -n "${JAVA_PKG_CLASSPATH}" || -n "${JAVA_PKG_LIBRARY}" || -f \ - "${JAVA_PKG_DEPEND_FILE}" || -f \ - "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]]; then - # Create package.env - ( - echo "DESCRIPTION=\"${DESCRIPTION}\"" - echo "GENERATION=\"2\"" - echo "SLOT=\"${SLOT}\"" - echo "CATEGORY=\"${CATEGORY}\"" - echo "PVR=\"${PVR}\"" - - [[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\"" - [[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\"" - [[ -n "${JAVA_PROVIDE}" ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" - [[ -f "${JAVA_PKG_DEPEND_FILE}" ]] \ - && echo "DEPEND=\"$(sort -u "${JAVA_PKG_DEPEND_FILE}" | tr '\n' ':')\"" - [[ -f "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]] \ - && echo "OPTIONAL_DEPEND=\"$(sort -u "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" | tr '\n' ':')\"" - echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e '/virtual\/\(jre\|jdk\)/ { p;q }')\"" # TODO cleanup ! - [[ -f "${JAVA_PKG_BUILD_DEPEND_FILE}" ]] \ - && echo "BUILD_DEPEND=\"$(sort -u "${JAVA_PKG_BUILD_DEPEND_FILE}" | tr '\n' ':')\"" - ) > "${JAVA_PKG_ENV}" - - # register target/source - local target="$(java-pkg_get-target)" - local source="$(java-pkg_get-source)" - [[ -n ${target} ]] && echo "TARGET=\"${target}\"" >> "${JAVA_PKG_ENV}" - [[ -n ${source} ]] && echo "SOURCE=\"${source}\"" >> "${JAVA_PKG_ENV}" - - # register javadoc info - [[ -n ${JAVADOC_PATH} ]] && echo "JAVADOC_PATH=\"${JAVADOC_PATH}\"" \ - >> ${JAVA_PKG_ENV} - # register source archives - [[ -n ${JAVA_SOURCES} ]] && echo "JAVA_SOURCES=\"${JAVA_SOURCES}\"" \ - >> ${JAVA_PKG_ENV} - - - echo "MERGE_VM=\"${GENTOO_VM}\"" >> "${JAVA_PKG_ENV}" - [[ -n ${GENTOO_COMPILER} ]] && echo "MERGE_COMPILER=\"${GENTOO_COMPILER}\"" >> "${JAVA_PKG_ENV}" - - # extra env variables - if [[ -n "${JAVA_PKG_EXTRA_ENV_VARS}" ]]; then - cat "${JAVA_PKG_EXTRA_ENV}" >> "${JAVA_PKG_ENV}" || die - # nested echo to remove leading/trailing spaces - echo "ENV_VARS=\"$(echo ${JAVA_PKG_EXTRA_ENV_VARS})\"" \ - >> "${JAVA_PKG_ENV}" || die - fi - # Strip unnecessary leading and trailing colons - # TODO try to cleanup if possible - sed -e "s/=\":/=\"/" -e "s/:\"$/\"/" -i "${JAVA_PKG_ENV}" || die "Did you forget to call java_init ?" - else - debug-print "JAVA_PKG_CLASSPATH, JAVA_PKG_LIBRARY, JAVA_PKG_DEPEND_FILE" - debug-print "or JAVA_PKG_OPTIONAL_DEPEND_FILE not defined so can't" - debug-print "write package.env." - fi + # Create package.env + ( + echo "DESCRIPTION=\"${DESCRIPTION}\"" + echo "GENERATION=\"2\"" + echo "SLOT=\"${SLOT}\"" + echo "CATEGORY=\"${CATEGORY}\"" + echo "PVR=\"${PVR}\"" + + [[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\"" + [[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\"" + [[ -n "${JAVA_PROVIDE}" ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" + [[ -f "${JAVA_PKG_DEPEND_FILE}" ]] \ + && echo "DEPEND=\"$(sort -u "${JAVA_PKG_DEPEND_FILE}" | tr '\n' ':')\"" + [[ -f "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" ]] \ + && echo "OPTIONAL_DEPEND=\"$(sort -u "${JAVA_PKG_OPTIONAL_DEPEND_FILE}" | tr '\n' ':')\"" + echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e '/virtual\/\(jre\|jdk\)/ { p;q }')\"" # TODO cleanup ! + [[ -f "${JAVA_PKG_BUILD_DEPEND_FILE}" ]] \ + && echo "BUILD_DEPEND=\"$(sort -u "${JAVA_PKG_BUILD_DEPEND_FILE}" | tr '\n' ':')\"" + ) > "${JAVA_PKG_ENV}" + + # register target/source + local target="$(java-pkg_get-target)" + local source="$(java-pkg_get-source)" + [[ -n ${target} ]] && echo "TARGET=\"${target}\"" >> "${JAVA_PKG_ENV}" + [[ -n ${source} ]] && echo "SOURCE=\"${source}\"" >> "${JAVA_PKG_ENV}" + + # register javadoc info + [[ -n ${JAVADOC_PATH} ]] && echo "JAVADOC_PATH=\"${JAVADOC_PATH}\"" \ + >> ${JAVA_PKG_ENV} + # register source archives + [[ -n ${JAVA_SOURCES} ]] && echo "JAVA_SOURCES=\"${JAVA_SOURCES}\"" \ + >> ${JAVA_PKG_ENV} + + echo "MERGE_VM=\"${GENTOO_VM}\"" >> "${JAVA_PKG_ENV}" + [[ -n ${GENTOO_COMPILER} ]] && echo "MERGE_COMPILER=\"${GENTOO_COMPILER}\"" >> "${JAVA_PKG_ENV}" + + # extra env variables + if [[ -n "${JAVA_PKG_EXTRA_ENV_VARS}" ]]; then + cat "${JAVA_PKG_EXTRA_ENV}" >> "${JAVA_PKG_ENV}" || die + # nested echo to remove leading/trailing spaces + echo "ENV_VARS=\"$(echo ${JAVA_PKG_EXTRA_ENV_VARS})\"" \ + >> "${JAVA_PKG_ENV}" || die + fi + + # Strip unnecessary leading and trailing colons + # TODO try to cleanup if possible + sed -e "s/=\":/=\"/" -e "s/:\"$/\"/" -i "${JAVA_PKG_ENV}" || die "Did you forget to call java_init ?" } # @FUNCTION: java-pkg_record-jar_ |