From 23f4378be3691b9daf57bde6ec079c56bd1ef688 Mon Sep 17 00:00:00 2001 From: Ctibor Date: Wed, 11 Mar 2015 19:48:17 +0100 Subject: Installation paths for sci-astronomy/astrometry should now respect FHS. --- sci-astronomy/astrometry/astrometry-0.52-r1.ebuild | 93 ++++++++++++++++++++++ sci-astronomy/astrometry/astrometry-0.52.ebuild | 91 --------------------- .../files/0.52-fix_installation_paths.patch | 50 ++++++++++++ .../astrometry/files/0.52-respect-user-flags | 12 --- .../astrometry/files/0.52-respect-user-flags.patch | 12 +++ 5 files changed, 155 insertions(+), 103 deletions(-) create mode 100644 sci-astronomy/astrometry/astrometry-0.52-r1.ebuild delete mode 100644 sci-astronomy/astrometry/astrometry-0.52.ebuild create mode 100644 sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch delete mode 100644 sci-astronomy/astrometry/files/0.52-respect-user-flags create mode 100644 sci-astronomy/astrometry/files/0.52-respect-user-flags.patch (limited to 'sci-astronomy') diff --git a/sci-astronomy/astrometry/astrometry-0.52-r1.ebuild b/sci-astronomy/astrometry/astrometry-0.52-r1.ebuild new file mode 100644 index 0000000..d8e5b07 --- /dev/null +++ b/sci-astronomy/astrometry/astrometry-0.52-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils toolchain-funcs python-single-r1 + +MYP=${PN}.net-${PV} + +DESCRIPTION="Automated astrometric calibration programs and service" +HOMEPAGE="http://astrometry.net/" +SRC_URI="${HOMEPAGE}/downloads/${MYP}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="examples extra python" + +RDEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + sci-astronomy/wcslib + sci-libs/cfitsio + sci-libs/gsl + sys-libs/zlib + virtual/pyfits[${PYTHON_USEDEP}] + extra? ( + media-libs/libpng:0 + media-libs/netpbm + virtual/jpeg:0 + x11-libs/cairo )" +DEPEND="${RDEPEND} + dev-lang/swig:0 + virtual/pkgconfig" + +S="${WORKDIR}/${MYP}" + +src_prepare() { + epatch "${FILESDIR}"/0.52-as-needed.patch + epatch "${FILESDIR}"/0.52-respect-user-flags.patch + epatch "${FILESDIR}"/0.52-fix_installation_paths.patch + python_fix_shebang "${S}" + sed "s|python setup-util.py|${EPYTHON} setup-util.py|" "${S}"/util/Makefile -i || die + sed "s|python setup.py|${EPYTHON} setup.py|" "${S}"/{libkd,sdss,blind}/Makefile -i || die + sed "s|python -c|${EPYTHON} -c|" "${S}"/blind/Makefile -i || die + sed "s|python -V|${EPYTHON} -V|" "${S}"/Makefile -i || die +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + RANLIB=$(tc-getRANLIB) \ + AR=$(tc-getAR) \ + all report.txt + if use extra; then + emake \ + CC=$(tc-getCC) \ + RANLIB=$(tc-getRANLIB) \ + AR=$(tc-getAR) \ + extra + fi + + if use python; then + emake \ + CC=$(tc-getCC) \ + RANLIB=$(tc-getRANLIB) \ + AR=$(tc-getAR) \ + py + fi +} + +src_install() { + export INSTALL_DIR="${ED}"/usr + export DATA_INSTALL_DIR="${INSTALL_DIR}"/share/"${PF}"/data + export BIN_INSTALL_DIR="${INSTALL_DIR}"/bin + export INCLUDE_INSTALL_DIR="${INSTALL_DIR}"/include/"${PF}" + export LIB_INSTALL_DIR="${INSTALL_DIR}"/lib + python_export python2.7 + export PY_BASE_INSTALL_DIR="${LIB_INSTALL_DIR}"/"${EPYTHON}"/"${PF}" + export PY_BASE_LINK_DIR=../lib/"${EPYTHON}"/"${PF}" + export ETC_INSTALL_DIR="${INSTALL_DIR}"/share/"${PF}"/etc + export DOC_INSTALL_DIR="${INSTALL_DIR}"/share/doc/"${PF}" + export UPS_INSTALL_DIR="${DOC_INSTALL_DIR}"/ups + export EXAMPLES_INSTALL_DIR="${DOC_INSTALL_DIR}"/examples + + emake install-core + use extra && emake -C blind install-extra + + # remove cfitsio duplicates + rm ${INSTALL_DIR}/bin/{fitscopy,imcopy,listhead} || die +} \ No newline at end of file diff --git a/sci-astronomy/astrometry/astrometry-0.52.ebuild b/sci-astronomy/astrometry/astrometry-0.52.ebuild deleted file mode 100644 index d42bfb5..0000000 --- a/sci-astronomy/astrometry/astrometry-0.52.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -PYTHON_COMPAT=( python2_7 ) - -inherit eutils toolchain-funcs python-single-r1 - -MYP=${PN}.net-${PV} - -DESCRIPTION="Automated astrometric calibration programs and service" -HOMEPAGE="http://astrometry.net/" -SRC_URI="${HOMEPAGE}/downloads/${MYP}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="examples extra python" - -RDEPEND=" - dev-python/numpy[${PYTHON_USEDEP}] - sci-astronomy/wcslib - sci-libs/cfitsio - sci-libs/gsl - sys-libs/zlib - virtual/pyfits[${PYTHON_USEDEP}] - extra? ( - media-libs/libpng:0 - media-libs/netpbm - virtual/jpeg:0 - x11-libs/cairo )" -DEPEND="${RDEPEND} - dev-lang/swig:0 - virtual/pkgconfig" - -S="${WORKDIR}/${MYP}" - -PATCHES=( "${FILESDIR}/0.52-as-needed.patch" "${FILESDIR}/0.52-respect-user-flags.patch" ) - -src_prepare() { - python_fix_shebang "${S}" - sed "s|python setup-util.py|${EPYTHON} setup-util.py|" "${S}"/util/Makefile -i || die - sed "s|python setup.py|${EPYTHON} setup.py|" "${S}"/{libkd,sdss,blind}/Makefile -i || die - sed "s|python -c|${EPYTHON} -c|" "${S}"/blind/Makefile -i || die - sed "s|python -V|${EPYTHON} -V|" "${S}"/Makefile -i || die -} - -src_compile() { - emake \ - CC=$(tc-getCC) \ - RANLIB=$(tc-getRANLIB) \ - AR=$(tc-getAR) \ - all report.txt - if use extra; then - emake \ - CC=$(tc-getCC) \ - RANLIB=$(tc-getRANLIB) \ - AR=$(tc-getAR) \ - extra - fi - - if use python; then - emake \ - CC=$(tc-getCC) \ - RANLIB=$(tc-getRANLIB) \ - AR=$(tc-getAR) \ - py - fi -} - -src_install() { - # TODO: install in standard directories to respect FHS - export INSTALL_DIR="${ED}"/usr - emake install-core - use extra && emake -C blind install-extra - - # remove cfitsio duplicates - rm ${INSTALL_DIR}/bin/{fitscopy,imcopy,listhead} || die - - # remove license file - rm ${INSTALL_DIR}/doc/LICENSE || die - dodoc ${INSTALL_DIR}/doc/* - rm -r ${INSTALL_DIR}/doc || die - if use examples; then - mv ${INSTALL_DIR}/examples "${ED}"/usr/share/doc/${PF} || die - else - rm -r ${INSTALL_DIR}/examples || die - fi -} \ No newline at end of file diff --git a/sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch b/sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch new file mode 100644 index 0000000..088dd46 --- /dev/null +++ b/sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch @@ -0,0 +1,50 @@ +diff -wurN astrometry.net-0.52/Makefile astrometry.net-0.52.fix-paths/Makefile +--- astrometry.net-0.52/Makefile 2015-03-06 21:26:45.000000000 +0100 ++++ astrometry.net-0.52.fix-paths/Makefile 2015-03-11 19:30:45.513371808 +0100 +@@ -122,18 +122,18 @@ + install-core: + mkdir -p '$(DATA_INSTALL_DIR)' + mkdir -p '$(BIN_INSTALL_DIR)' +- mkdir -p '$(INSTALL_DIR)/doc' ++ mkdir -p '$(DOC_INSTALL_DIR)' + mkdir -p '$(INCLUDE_INSTALL_DIR)' + mkdir -p '$(LIB_INSTALL_DIR)' +- mkdir -p '$(INSTALL_DIR)/examples' ++ mkdir -p '$(EXAMPLES_INSTALL_DIR)' + mkdir -p '$(PY_BASE_INSTALL_DIR)' +- mkdir -p '$(INSTALL_DIR)/ups' +- cp ups/astrometry_net.table-dist '$(INSTALL_DIR)/ups/astrometry_net.table' +- cp ups/astrometry_net.cfg '$(INSTALL_DIR)/ups' ++ mkdir -p '$(UPS_INSTALL_DIR)' ++ cp ups/astrometry_net.table-dist '$(UPS_INSTALL_DIR)/astrometry_net.table' ++ cp ups/astrometry_net.cfg '$(UPS_INSTALL_DIR)/' + cp __init__.py '$(PY_BASE_INSTALL_DIR)' +- cp CREDITS LICENSE README.md '$(INSTALL_DIR)/doc' +- cp report.txt '$(INSTALL_DIR)/doc' +- cp demo/* '$(INSTALL_DIR)/examples' ++ cp CREDITS LICENSE README.md '$(DOC_INSTALL_DIR)/' ++ cp report.txt '$(DOC_INSTALL_DIR)/' ++ cp demo/* '$(EXAMPLES_INSTALL_DIR)/' + $(MAKE) -C util install-core + $(MAKE) -C catalogs install + $(MAKE) -C libkd install +diff -wurN astrometry.net-0.52/util/makefile.common astrometry.net-0.52.fix-paths/util/makefile.common +--- astrometry.net-0.52/util/makefile.common 2015-03-06 21:26:45.000000000 +0100 ++++ astrometry.net-0.52.fix-paths/util/makefile.common 2015-03-11 19:16:37.893728999 +0100 +@@ -22,16 +22,6 @@ + # Put INSTALL_DIR in the environment of commands run by Make. + export INSTALL_DIR + +-# Installation subdirs +- +-PY_BASE_INSTALL_DIR := $(INSTALL_DIR)/lib/python/astrometry +-INCLUDE_INSTALL_DIR := $(INSTALL_DIR)/include/astrometry +-LIB_INSTALL_DIR := $(INSTALL_DIR)/lib +-BIN_INSTALL_DIR := $(INSTALL_DIR)/bin +-DATA_INSTALL_DIR := $(INSTALL_DIR)/data +-PY_BASE_LINK_DIR := ../lib/python/astrometry +-ETC_INSTALL_DIR ?= $(INSTALL_DIR)/etc +- + # If your build system stages an install in one place (say, a temp + # dir) and then copies everything to the final install place, (eg, + # debian), set *_INSTALL_DIR to the staging place and *_FINAL_DIR to diff --git a/sci-astronomy/astrometry/files/0.52-respect-user-flags b/sci-astronomy/astrometry/files/0.52-respect-user-flags deleted file mode 100644 index 6902310..0000000 --- a/sci-astronomy/astrometry/files/0.52-respect-user-flags +++ /dev/null @@ -1,12 +0,0 @@ -diff -wurN astrometry.net-0.52/util/makefile.common astrometry.net-0.52.optimize/util/makefile.common ---- astrometry.net-0.52/util/makefile.common 2015-03-06 21:26:45.000000000 +0100 -+++ astrometry.net-0.52.optimize/util/makefile.common 2015-03-10 22:41:54.598828875 +0100 -@@ -250,8 +250,6 @@ - - ifeq ($(OPTIMIZE),yes) - # speedy! -- FLAGS_DEF += -O3 -- FLAGS_DEF += -fomit-frame-pointer - # turn off asserts: - FLAGS_DEF += $(ASSERT) - diff --git a/sci-astronomy/astrometry/files/0.52-respect-user-flags.patch b/sci-astronomy/astrometry/files/0.52-respect-user-flags.patch new file mode 100644 index 0000000..6902310 --- /dev/null +++ b/sci-astronomy/astrometry/files/0.52-respect-user-flags.patch @@ -0,0 +1,12 @@ +diff -wurN astrometry.net-0.52/util/makefile.common astrometry.net-0.52.optimize/util/makefile.common +--- astrometry.net-0.52/util/makefile.common 2015-03-06 21:26:45.000000000 +0100 ++++ astrometry.net-0.52.optimize/util/makefile.common 2015-03-10 22:41:54.598828875 +0100 +@@ -250,8 +250,6 @@ + + ifeq ($(OPTIMIZE),yes) + # speedy! +- FLAGS_DEF += -O3 +- FLAGS_DEF += -fomit-frame-pointer + # turn off asserts: + FLAGS_DEF += $(ASSERT) + -- cgit v1.2.3