sys-cluster/ceph: Revision bump to 12.2.0-r1, fix references to temp python link
authorPatrick McLean <chutzpah@gentoo.org>
Thu, 7 Sep 2017 23:35:43 +0000 (16:35 -0700)
committerPatrick McLean <chutzpah@gentoo.org>
Thu, 7 Sep 2017 23:35:43 +0000 (16:35 -0700)
This also fixes some overriding of system CFLAGS.

Gentoo-Bug: 630232
Package-Manager: Portage-2.3.8, Repoman-2.3.3

sys-cluster/ceph/ceph-12.2.0-r1.ebuild [moved from sys-cluster/ceph/ceph-12.2.0.ebuild with 95% similarity]
sys-cluster/ceph/files/ceph-12.2.0-cflags.patch [new file with mode: 0644]

similarity index 95%
rename from sys-cluster/ceph/ceph-12.2.0.ebuild
rename to sys-cluster/ceph/ceph-12.2.0-r1.ebuild
index e5e89e7a1c7a553dc61d70ef08c46e57e7d4f7b6..c068ab583fc2d7e48229015ae8c1eeffcd318093 100644 (file)
@@ -117,6 +117,7 @@ UNBUNDLE_LIBS=(
 
 PATCHES=(
        "${FILESDIR}/${PN}-12.2.0-use-provided-cpu-flag-values.patch"
+       "${FILESDIR}/${PN}-12.2.0-cflags.patch"
 
        # pull in some bugfixes from upstream
        "${FILESDIR}/${PN}-12.2.0-fix_two_stray_get_health_callers.patch"
@@ -189,6 +190,11 @@ ceph_src_configure() {
 
        rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt"
        cmake-utils_src_configure
+
+       # bug #630232
+       sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+               "${BUILD_DIR:-${CMAKE_BUILD_DIR:-${S}}}"/include/acconfig.h \
+               || die "sed failed"
 }
 
 src_configure() {
@@ -260,6 +266,11 @@ src_install() {
        readme.gentoo_create_doc
 
        python_setup 'python2*'
+
+       # bug #630232
+       sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \
+               || die "sed failed"
+
        python_fix_shebang "${ED}"/usr/{,s}bin/
 
        # python_fix_shebang apparently is not idempotent
diff --git a/sys-cluster/ceph/files/ceph-12.2.0-cflags.patch b/sys-cluster/ceph/files/ceph-12.2.0-cflags.patch
new file mode 100644 (file)
index 0000000..0f02e6e
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
+index 24d1a50654..a9fac61196 100644
+--- a/cmake/modules/Distutils.cmake
++++ b/cmake/modules/Distutils.cmake
+@@ -43,7 +43,7 @@ function(distutils_add_cython_module name src)
+     CC=${PY_CC}
+     CXX=${PY_CXX}
+     LDSHARED=${PY_LDSHARED}
+-    OPT=\"-DNDEBUG -g -fwrapv -O2 -w\"
++    OPT=\"-DNDEBUG -fwrapv -w\"
+     LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+     CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
+     CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}