* [gentoo-commits] proj/hardened-dev:musl commit in: sys-libs/readline/, sys-libs/readline/files/
@ 2013-07-06 3:22 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2013-07-06 3:22 UTC (permalink / raw
To: gentoo-commits
commit: adc735679307290cd83cc2ddad47fa7e7bb1043d
Author: layman <layman <AT> localhost>
AuthorDate: Sat Jul 6 03:16:30 2013 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Jul 6 03:23:13 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=adc73567
sys-libs/readline: use termios for sgtty
Package-Manager: portage-2.1.12.2
---
.../readline/files/readline-5.0-no_rpath.patch | 13 +++
.../readline-5.2-no-ignore-shlib-errors.patch | 24 +++++
sys-libs/readline/metadata.xml | 5 +
sys-libs/readline/readline-6.2_p4-r99.ebuild | 110 +++++++++++++++++++++
4 files changed, 152 insertions(+)
diff --git a/sys-libs/readline/files/readline-5.0-no_rpath.patch b/sys-libs/readline/files/readline-5.0-no_rpath.patch
new file mode 100644
index 0000000..624b2d7
--- /dev/null
+++ b/sys-libs/readline/files/readline-5.0-no_rpath.patch
@@ -0,0 +1,13 @@
+ripped from Fedora
+
+--- support/shobj-conf
++++ support/shobj-conf
+@@ -102,7 +102,7 @@
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
++ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
diff --git a/sys-libs/readline/files/readline-5.2-no-ignore-shlib-errors.patch b/sys-libs/readline/files/readline-5.2-no-ignore-shlib-errors.patch
new file mode 100644
index 0000000..fc63491
--- /dev/null
+++ b/sys-libs/readline/files/readline-5.2-no-ignore-shlib-errors.patch
@@ -0,0 +1,24 @@
+dont ignore errors in the shlib subdir
+
+http://bugs.gentoo.org/216952
+
+--- Makefile.in
++++ Makefile.in
+@@ -194,7 +194,7 @@
+
+ shared: force
+ -test -d shlib || mkdir shlib
+- -( cd shlib ; ${MAKE} ${MFLAGS} all )
++ ( cd shlib ; ${MAKE} ${MFLAGS} all )
+
+ documentation: force
+ -test -d doc || mkdir doc
+@@ -238,7 +238,7 @@
+ -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
+
+ install-shared: installdirs install-headers shared install-doc
+- -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
++ ( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
+
+ uninstall-shared: maybe-uninstall-headers
+ -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
diff --git a/sys-libs/readline/metadata.xml b/sys-libs/readline/metadata.xml
new file mode 100644
index 0000000..96a2d58
--- /dev/null
+++ b/sys-libs/readline/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-libs/readline/readline-6.2_p4-r99.ebuild b/sys-libs/readline/readline-6.2_p4-r99.ebuild
new file mode 100644
index 0000000..d803b3d
--- /dev/null
+++ b/sys-libs/readline/readline-6.2_p4-r99.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-6.2_p4.ebuild,v 1.2 2013/02/17 23:40:35 zmedico Exp $
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+# Official patches
+# See ftp://ftp.cwru.edu/pub/bash/readline-6.0-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+ [[ ${PLEVEL} -eq 0 ]] && return 1
+ local opt=$1
+ eval set -- {1..${PLEVEL}}
+ set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
+ if [[ ${opt} == -s ]] ; then
+ echo "${@/#/${DISTDIR}/}"
+ else
+ local u
+ for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
+ printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
+ done
+ fi
+}
+
+DESCRIPTION="Another cute console display library"
+HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
+SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+
+ cd "${S}"
+ sed -i -e 's:sgtty:termios:' examples/rlfe/os.h
+ [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
+ epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch
+ epatch "${FILESDIR}"/${PN}-5.2-no-ignore-shlib-errors.patch #216952
+
+ # force ncurses linking #71420
+ sed -i -e 's:^SHLIB_LIBS=:SHLIB_LIBS=-lncurses:' support/shobj-conf || die "sed"
+
+ # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
+ # objformat for years, so we don't want to rely on that.
+ sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
+
+ ln -s ../.. examples/rlfe/readline # for local readline headers
+}
+
+src_compile() {
+ # fix implicit decls with widechar funcs
+ append-cppflags -D_GNU_SOURCE
+ # http://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
+ append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
+
+ # This is for rlfe, but we need to make sure LDFLAGS doesn't change
+ # so we can re-use the config cache file between the two.
+ append-ldflags -L.
+ econf \
+ --cache-file="${S}"/config.cache \
+ --with-curses \
+ $(use_enable static-libs static)
+ emake || die
+
+ if ! tc-is-cross-compiler ; then
+ # code is full of AC_TRY_RUN()
+ cd examples/rlfe
+ local l
+ for l in readline history ; do
+ ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname)
+ ln -sf ../../lib${l}.a lib${l}.a
+ done
+ econf --cache-file="${S}"/config.cache
+ emake || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ gen_usr_ldscript -a readline history #4411
+
+ if ! tc-is-cross-compiler; then
+ dobin examples/rlfe/rlfe || die
+ fi
+
+ dodoc CHANGELOG CHANGES README USAGE NEWS
+ docinto ps
+ dodoc doc/*.ps
+ dohtml -r doc
+}
+
+pkg_preinst() {
+ preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5} #29865
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5}
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-libs/readline/, sys-libs/readline/files/
@ 2014-07-21 17:35 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2014-07-21 17:35 UTC (permalink / raw
To: gentoo-commits
commit: 9c1248d87af0b046b625a9bb744d2eb9fcd71c17
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 21 17:36:35 2014 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jul 21 17:36:35 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=9c1248d8
sys-libs/readline: version bump
Package-Manager: portage-2.2.8-r1
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA
---
.../readline/files/readline-6.2-rlfe-tgoto.patch | 14 ++
sys-libs/readline/readline-6.2_p5-r99.ebuild | 154 +++++++++++++++++++++
2 files changed, 168 insertions(+)
diff --git a/sys-libs/readline/files/readline-6.2-rlfe-tgoto.patch b/sys-libs/readline/files/readline-6.2-rlfe-tgoto.patch
new file mode 100644
index 0000000..b898bf0
--- /dev/null
+++ b/sys-libs/readline/files/readline-6.2-rlfe-tgoto.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/385091
+
+https://lists.gnu.org/archive/html/bug-readline/2011-10/msg00000.html
+
+--- a/examples/rlfe/configure
++++ b/examples/rlfe/configure
+@@ -4062,6 +4062,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++extern char *tgoto(char *, int, int);
+ main()
+ {
+ exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
diff --git a/sys-libs/readline/readline-6.2_p5-r99.ebuild b/sys-libs/readline/readline-6.2_p5-r99.ebuild
new file mode 100644
index 0000000..8cbb007
--- /dev/null
+++ b/sys-libs/readline/readline-6.2_p5-r99.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-6.2_p5-r1.ebuild,v 1.14 2014/07/18 10:56:45 pacho Exp $
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs flag-o-matic multilib-minimal
+
+# Official patches
+# See ftp://ftp.cwru.edu/pub/bash/readline-6.2-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+ [[ ${PLEVEL} -eq 0 ]] && return 1
+ local opt=$1
+ eval set -- {1..${PLEVEL}}
+ set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
+ if [[ ${opt} == -s ]] ; then
+ echo "${@/#/${DISTDIR}/}"
+ else
+ local u
+ for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
+ printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
+ done
+ fi
+}
+
+DESCRIPTION="Another cute console display library"
+HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
+SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips x86"
+IUSE="static-libs"
+
+RDEPEND=">=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r7
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+}
+
+src_prepare() {
+ sed -i -e 's:sgtty:termios:' examples/rlfe/os.h # For musl
+ [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
+ epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch
+ epatch "${FILESDIR}"/${PN}-5.2-no-ignore-shlib-errors.patch #216952
+ epatch "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
+
+ # Force ncurses linking. #71420
+ # Use pkg-config to get the right values. #457558
+ local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs)
+ sed -i \
+ -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
+ support/shobj-conf || die
+ sed -i \
+ -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
+ examples/rlfe/configure || die
+
+ # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
+ # objformat for years, so we don't want to rely on that.
+ sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
+
+ ln -s ../.. examples/rlfe/readline # for local readline headers
+}
+
+src_configure() {
+ # fix implicit decls with widechar funcs
+ append-cppflags -D_GNU_SOURCE
+ # http://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
+ append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
+
+ # Make sure configure picks a better ar than `ar`. #484866
+ export ac_cv_prog_AR=$(tc-getAR)
+
+ # Force the test since we used sed above to force it.
+ export bash_cv_termcap_lib=ncurses
+
+ # This is for rlfe, but we need to make sure LDFLAGS doesn't change
+ # so we can re-use the config cache file between the two.
+ append-ldflags -L.
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --cache-file="${BUILD_DIR}"/config.cache \
+ --with-curses \
+ $(use_enable static-libs static)
+
+ if multilib_is_native_abi && ! tc-is-cross-compiler ; then
+ # code is full of AC_TRY_RUN()
+ mkdir -p examples/rlfe || die
+ cd examples/rlfe || die
+ ECONF_SOURCE=${S}/examples/rlfe \
+ econf --cache-file="${BUILD_DIR}"/config.cache
+ fi
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && ! tc-is-cross-compiler ; then
+ # code is full of AC_TRY_RUN()
+ cd examples/rlfe || die
+ local l
+ for l in readline history ; do
+ ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname)
+ ln -sf ../../lib${l}.a lib${l}.a
+ done
+ emake
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi ; then
+ gen_usr_ldscript -a readline history #4411
+
+ if ! tc-is-cross-compiler; then
+ dobin examples/rlfe/rlfe
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc USAGE
+ dohtml -r doc/.
+ docinto ps
+ dodoc doc/*.ps
+}
+
+pkg_preinst() {
+ preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5} #29865
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5}
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-21 17:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-06 3:22 [gentoo-commits] proj/hardened-dev:musl commit in: sys-libs/readline/, sys-libs/readline/files/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2014-07-21 17:35 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox