From 1c11dea36861f50bf3806cc3f08b17f98710e76e Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 18 Dec 2020 13:47:06 +0900 Subject: [PATCH] Bump to tcl 8.6.10 Change-Id: I4e2b0d730ddc8a6795214689e57e1827df1243d5 --- packaging/add_pie_compile_option.patch | 13 +++++ packaging/baselibs.conf | 3 ++ packaging/macros.tcl | 14 ++++++ packaging/tcl-rpmlintrc | 2 + packaging/tcl.manifest | 5 ++ packaging/tcl.spec | 91 ++++++++++++++++++++++++++++++++++ 6 files changed, 128 insertions(+) create mode 100644 packaging/add_pie_compile_option.patch create mode 100644 packaging/baselibs.conf create mode 100644 packaging/macros.tcl create mode 100644 packaging/tcl-rpmlintrc create mode 100644 packaging/tcl.manifest create mode 100644 packaging/tcl.spec diff --git a/packaging/add_pie_compile_option.patch b/packaging/add_pie_compile_option.patch new file mode 100644 index 0000000..91b9a08 --- /dev/null +++ b/packaging/add_pie_compile_option.patch @@ -0,0 +1,13 @@ +diff --git a/unix/Makefile.in b/unix/Makefile.in +index 99bdf05..143637c 100644 +--- a/unix/Makefile.in ++++ b/unix/Makefile.in +@@ -744,7 +744,7 @@ objs: ${OBJS} + ${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ +- ${CC_SEARCH_FLAGS} -o ${TCL_EXE} ++ ${CC_SEARCH_FLAGS} -pie -o ${TCL_EXE} + + # Must be empty so it doesn't conflict with rule for ${TCL_EXE} above + ${NATIVE_TCLSH}: diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..3d8222c --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1,3 @@ +tcl + +/usr/lib(64)?/tcl/.* + requires -tcl- diff --git a/packaging/macros.tcl b/packaging/macros.tcl new file mode 100644 index 0000000..ac787fd --- /dev/null +++ b/packaging/macros.tcl @@ -0,0 +1,14 @@ +# RPM macros for Tcl + +# The minor version of Tcl +%tcl_version %(echo 'puts [info tclversion]'|tclsh) + +# compiled packges should go here +%tcl_archdir %(echo 'puts [lindex $tcl_pkgPath 0]'|tclsh) + +# script-only packages should go here +%tcl_noarchdir %(echo 'puts [lindex $tcl_pkgPath 1]'|tclsh) + +# tclscriptdir is deprecated, please use tcl_archdir or +# tcl_noarchdir instead, depending on the type of your package +%tclscriptdir %tcl_noarchdir diff --git a/packaging/tcl-rpmlintrc b/packaging/tcl-rpmlintrc new file mode 100644 index 0000000..ddbe557 --- /dev/null +++ b/packaging/tcl-rpmlintrc @@ -0,0 +1,2 @@ +addFilter("no-soname") +addFilter("files-duplicate") diff --git a/packaging/tcl.manifest b/packaging/tcl.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/tcl.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/tcl.spec b/packaging/tcl.spec new file mode 100644 index 0000000..c573274 --- /dev/null +++ b/packaging/tcl.spec @@ -0,0 +1,91 @@ +Name: tcl +Version: 8.6.10 +Release: 0 +License: TCL +Summary: The Tcl Programming Language +Url: http://www.tcl.tk +Group: Development/Languages +Source0: %{name}%{version}-src.tar.gz +Source1: tcl-rpmlintrc +Source2: baselibs.conf +Source3: macros.tcl +Source10: add_pie_compile_option.patch +Source1001: tcl.manifest + +BuildRequires: autoconf +Requires(pre): /usr/bin/rm +Provides: tclsh +%define TCL_MINOR %(echo %{version} | cut -c1-3) +Provides: tclsh%{TCL_MINOR} + +%description +Tcl (Tool Command Language) is a very powerful but easy to learn +dynamic programming language, suitable for a very wide range of uses, +including web and desktop applications, networking, administration, +testing and many more. Open source and business-friendly, Tcl is a +mature yet evolving language that is truly cross platform, easily +deployed and highly extensible. + +For more information on Tcl see http://www.tcl.tk and +http://wiki.tcl.tk . + +%package devel +Summary: Header Files and C API Documentation for Tcl +Requires: tcl = %{version}-%{release} + +%description devel +This package contains header files and documentation needed for writing +Tcl extensions in compiled languages like C, C++, etc., or for +embedding the Tcl interpreter in programs written in such languages. + +This package is not needed for writing extensions or applications in +the Tcl language itself. + +%prep +%setup -q -n %{name}%{version} +cp %{SOURCE1001} . +%{__patch} -p1 < %{SOURCE10} + +%build + +cd unix +autoconf +%configure \ + --enable-man-symlinks \ + --enable-man-compression=gzip +%define scriptdir %{_libdir}/tcl +make %{?_smp_mflags} \ + PACKAGE_DIR=%_libdir/tcl \ + TCL_LIBRARY="%scriptdir/tcl%TCL_MINOR" \ + TCL_PACKAGE_PATH="%_libdir/tcl %_datadir/tcl" + +%install +make -C unix install install-private-headers \ + INSTALL_ROOT=%{buildroot} \ + TCL_LIBRARY="%scriptdir/tcl%TCL_MINOR" +rm -f %{buildroot}%scriptdir/tcl%TCL_MINOR/ldAix +ln -sf tclsh%TCL_MINOR %{buildroot}%{_bindir}/tclsh +mkdir -p %{buildroot}%{_datadir}/tcl +install -D %{SOURCE3} -m 644 %{buildroot}%{_sysconfdir}/rpm/macros.tcl +%remove_docs + + +%files +%manifest %{name}.manifest +%license license.terms +%{_bindir}/* +%{_libdir}/lib*.so +%{_datadir}/tcl +%scriptdir +%exclude %scriptdir/*/tclAppInit.c +%config %{_sysconfdir}/rpm/macros.tcl + +%files devel +%manifest %{name}.manifest +%{_includedir}/* +%scriptdir/*/tclAppInit.c +%{_libdir}/*.a +%{_libdir}/tclConfig.sh +%{_libdir}/pkgconfig/tcl.pc +%{_libdir}/tclooConfig.sh + -- 2.7.4