summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2020-05-31 20:34:46 +0200
committerAlfredo Tupone <tupone@gentoo.org>2020-05-31 20:34:46 +0200
commit34b6d46037338456d13f1db41549b678fc32f32a (patch)
treecde57f5b787646845215e519536aebe9b26f8374 /dev-tcltk/tclpython
parentdev-python/pbr: Reenable tests on py3.9 (diff)
downloadgentoo-34b6d46037338456d13f1db41549b678fc32f32a.tar.gz
gentoo-34b6d46037338456d13f1db41549b678fc32f32a.tar.bz2
gentoo-34b6d46037338456d13f1db41549b678fc32f32a.zip
dev-tcltk/tclpython: CFLAGS/LDFLAGS/strip
Closes: https://bugs.gentoo.org/724062 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-tcltk/tclpython')
-rw-r--r--dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch14
-rw-r--r--dev-tcltk/tclpython/tclpython-5.0.ebuild32
2 files changed, 28 insertions, 18 deletions
diff --git a/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch b/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch
index 7f4aa0bf5a2e..965fe3d8d722 100644
--- a/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch
+++ b/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch
@@ -1,5 +1,19 @@
--- a/Makefile 2018-10-28 17:21:20.274137396 +0100
+++ b/Makefile 2018-10-28 17:21:47.696694473 +0100
+@@ -16,11 +16,11 @@
+ LIBRARY:= $(PKG_NAME).so.$(PKG_VERSION)
+
+ TCL_VERSION=$(shell echo 'puts $\$$tcl_version' | tclsh)
+-CFLAGS:= -O2 -Wall -fPIC -DUSE_TCL_STUBS
++CFLAGS:= @CFLAGS@ -fPIC -DUSE_TCL_STUBS
+ CFLAGS+= $(shell $(PYTHON_CONFIG) --includes)
+ CFLAGS+= -I/usr/include/tcl$(TCL_VERSION)
+ CFLAGS+= -DTCLPYTHON_VERSION=$(PKG_VERSION)
+-LDFLAGS:= -shared -s
++LDFLAGS:= @LDFLAGS@ -shared
+ LDFLAGS+= $(shell $(PYTHON_CONFIG) --libs)
+ LDFLAGS+= -ltclstub$(TCL_VERSION)
+
@@ -62,7 +62,8 @@
$(OUTPUT_DIR)/pkgIndex.tcl:pkg/pkgIndex.tcl
cp -t $(dir $@) $^
diff --git a/dev-tcltk/tclpython/tclpython-5.0.ebuild b/dev-tcltk/tclpython/tclpython-5.0.ebuild
index 92786421ee10..90df040a57ae 100644
--- a/dev-tcltk/tclpython/tclpython-5.0.ebuild
+++ b/dev-tcltk/tclpython/tclpython-5.0.ebuild
@@ -24,31 +24,27 @@ RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+src_prepare() {
+ default
+ sed -i \
+ -e "s:@CFLAGS@:${CFLAGS}:g" \
+ -e "s:@LDFLAGS@:${LDFLAGS}:g" \
+ Makefile || die
+}
+
src_compile() {
- if python_is_python3; then
- PKG_NAME=tclpython3
- else
- PKG_NAME=tclpython
- fi
- emake PKG_NAME=${PKG_NAME} CC=$(tc-getCC)
+ emake PKG_NAME=tclpython3 CC=$(tc-getCC)
}
src_test() {
- emake PKG_NAME=${PKG_NAME} CC=$(tc-getCC) test
+ emake PKG_NAME=tclpython3 CC=$(tc-getCC) test
}
src_install() {
- if python_is_python3; then
- insinto /usr/$(get_libdir)
- doins -r build/tclpython3/tclpython3
- fperms 775 /usr/$(get_libdir)/tclpython3/tclpython3.so.${PV}
- dosym tclpython3.so.${PV} /usr/$(get_libdir)/tclpython3/tclpython3.so
- else
- insinto /usr/$(get_libdir)
- doins -r build/tclpython/tclpython
- fperms 775 /usr/$(get_libdir)/tclpython/tclpython.so.${PV}
- dosym tclpython.so.${PV} /usr/$(get_libdir)/tclpython/tclpython3.so
- fi
+ insinto /usr/$(get_libdir)
+ doins -r build/tclpython3/tclpython3
+ fperms 775 /usr/$(get_libdir)/tclpython3/tclpython3.so.${PV}
+ dosym tclpython3.so.${PV} /usr/$(get_libdir)/tclpython3/tclpython3.so
dodoc README.md VERSION.md
}