Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/tclpython/files/, dev-tcltk/tclpython/
Date: Sun, 31 May 2020 18:35:11
Message-Id: 1590950086.34b6d46037338456d13f1db41549b678fc32f32a.tupone@gentoo
1 commit: 34b6d46037338456d13f1db41549b678fc32f32a
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 31 18:34:46 2020 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Sun May 31 18:34:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b6d460
7
8 dev-tcltk/tclpython: CFLAGS/LDFLAGS/strip
9
10 Closes: https://bugs.gentoo.org/724062
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
13
14 .../tclpython/files/tclpython-5.0-gentoo.patch | 14 ++++++++++
15 dev-tcltk/tclpython/tclpython-5.0.ebuild | 32 ++++++++++------------
16 2 files changed, 28 insertions(+), 18 deletions(-)
17
18 diff --git a/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch b/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch
19 index 7f4aa0bf5a2..965fe3d8d72 100644
20 --- a/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch
21 +++ b/dev-tcltk/tclpython/files/tclpython-5.0-gentoo.patch
22 @@ -1,5 +1,19 @@
23 --- a/Makefile 2018-10-28 17:21:20.274137396 +0100
24 +++ b/Makefile 2018-10-28 17:21:47.696694473 +0100
25 +@@ -16,11 +16,11 @@
26 + LIBRARY:= $(PKG_NAME).so.$(PKG_VERSION)
27 +
28 + TCL_VERSION=$(shell echo 'puts $\$$tcl_version' | tclsh)
29 +-CFLAGS:= -O2 -Wall -fPIC -DUSE_TCL_STUBS
30 ++CFLAGS:= @CFLAGS@ -fPIC -DUSE_TCL_STUBS
31 + CFLAGS+= $(shell $(PYTHON_CONFIG) --includes)
32 + CFLAGS+= -I/usr/include/tcl$(TCL_VERSION)
33 + CFLAGS+= -DTCLPYTHON_VERSION=$(PKG_VERSION)
34 +-LDFLAGS:= -shared -s
35 ++LDFLAGS:= @LDFLAGS@ -shared
36 + LDFLAGS+= $(shell $(PYTHON_CONFIG) --libs)
37 + LDFLAGS+= -ltclstub$(TCL_VERSION)
38 +
39 @@ -62,7 +62,8 @@
40 $(OUTPUT_DIR)/pkgIndex.tcl:pkg/pkgIndex.tcl
41 cp -t $(dir $@) $^
42
43 diff --git a/dev-tcltk/tclpython/tclpython-5.0.ebuild b/dev-tcltk/tclpython/tclpython-5.0.ebuild
44 index 92786421ee1..90df040a57a 100644
45 --- a/dev-tcltk/tclpython/tclpython-5.0.ebuild
46 +++ b/dev-tcltk/tclpython/tclpython-5.0.ebuild
47 @@ -24,31 +24,27 @@ RDEPEND="${DEPEND}"
48
49 PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
50
51 +src_prepare() {
52 + default
53 + sed -i \
54 + -e "s:@CFLAGS@:${CFLAGS}:g" \
55 + -e "s:@LDFLAGS@:${LDFLAGS}:g" \
56 + Makefile || die
57 +}
58 +
59 src_compile() {
60 - if python_is_python3; then
61 - PKG_NAME=tclpython3
62 - else
63 - PKG_NAME=tclpython
64 - fi
65 - emake PKG_NAME=${PKG_NAME} CC=$(tc-getCC)
66 + emake PKG_NAME=tclpython3 CC=$(tc-getCC)
67 }
68
69 src_test() {
70 - emake PKG_NAME=${PKG_NAME} CC=$(tc-getCC) test
71 + emake PKG_NAME=tclpython3 CC=$(tc-getCC) test
72 }
73
74 src_install() {
75 - if python_is_python3; then
76 - insinto /usr/$(get_libdir)
77 - doins -r build/tclpython3/tclpython3
78 - fperms 775 /usr/$(get_libdir)/tclpython3/tclpython3.so.${PV}
79 - dosym tclpython3.so.${PV} /usr/$(get_libdir)/tclpython3/tclpython3.so
80 - else
81 - insinto /usr/$(get_libdir)
82 - doins -r build/tclpython/tclpython
83 - fperms 775 /usr/$(get_libdir)/tclpython/tclpython.so.${PV}
84 - dosym tclpython.so.${PV} /usr/$(get_libdir)/tclpython/tclpython3.so
85 - fi
86 + insinto /usr/$(get_libdir)
87 + doins -r build/tclpython3/tclpython3
88 + fperms 775 /usr/$(get_libdir)/tclpython3/tclpython3.so.${PV}
89 + dosym tclpython3.so.${PV} /usr/$(get_libdir)/tclpython3/tclpython3.so
90
91 dodoc README.md VERSION.md
92 }