* [gentoo-commits] repo/proj/libressl:migration commit in: www-client/w3mmee/files/, www-client/w3mmee/
@ 2021-01-17 20:58 Quentin Retornaz
0 siblings, 0 replies; only message in thread
From: Quentin Retornaz @ 2021-01-17 20:58 UTC (permalink / raw
To: gentoo-commits
commit: a60a3cb179701faf2c1739b7ccff5914f767d06f
Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Sun Jan 17 20:57:40 2021 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sun Jan 17 20:57:40 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a60a3cb1
www-client/w3mmee: new package
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
www-client/w3mmee/Manifest | 1 +
www-client/w3mmee/files/w3mmee-boehm-gc.patch | 11 ++
www-client/w3mmee/files/w3mmee-gcc-10.patch | 17 +++
www-client/w3mmee/files/w3mmee-gcc-4.4.patch | 11 ++
www-client/w3mmee/files/w3mmee-gcc-4.5.patch | 15 +++
www-client/w3mmee/files/w3mmee-glibc-2.14.patch | 31 +++++
www-client/w3mmee/files/w3mmee-openssl-1.1.patch | 92 +++++++++++++
www-client/w3mmee/files/w3mmee-rc_name.patch | 11 ++
www-client/w3mmee/files/w3mmee-time.patch | 32 +++++
www-client/w3mmee/files/w3mmee-tinfo.patch | 11 ++
www-client/w3mmee/files/w3mmee-w3mman.patch | 21 +++
www-client/w3mmee/metadata.xml | 8 ++
www-client/w3mmee/w3mmee-0.3.2_p24-r12.ebuild | 157 +++++++++++++++++++++++
13 files changed, 418 insertions(+)
diff --git a/www-client/w3mmee/Manifest b/www-client/w3mmee/Manifest
new file mode 100644
index 0000000..494f60c
--- /dev/null
+++ b/www-client/w3mmee/Manifest
@@ -0,0 +1 @@
+DIST w3mmee-p24-23.tar.gz 697342 BLAKE2B cdfd5752a29ee486ccb4cb174ac68aa2b93c818a088e28a8938ef308030b4baac69645e5adcf86361297f79b2473de483917f523bdd0cda0f6d0d93cc0755534 SHA512 fa74b9124e0790461ea7936411f89265c8a367326bf1bba7a5ea5f4abf748197e0926847f9860ec8d35e97f0e53bcdc69821fdd9d741fc8b18b5e11211aa3271
diff --git a/www-client/w3mmee/files/w3mmee-boehm-gc.patch b/www-client/w3mmee/files/w3mmee-boehm-gc.patch
new file mode 100644
index 0000000..d9bafa0
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-boehm-gc.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -1503,7 +1503,7 @@ if [ -n "$gclib" -a -n "$gcinclude" ]; then
+ #include <gc.h>
+ main()
+ {
+- extern unsigned GC_version;
++ unsigned GC_version = GC_get_version();
+ printf("%d%02d%03d\n",(GC_version>>16)&0xff,(GC_version>>8)&0xff,GC_version&0xff);
+ }
+ EOF
diff --git a/www-client/w3mmee/files/w3mmee-gcc-10.patch b/www-client/w3mmee/files/w3mmee-gcc-10.patch
new file mode 100644
index 0000000..262be51
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-gcc-10.patch
@@ -0,0 +1,17 @@
+--- a/fm.h
++++ b/fm.h
+@@ -1191,12 +1191,12 @@
+ global TextList *mimetypes_list;
+ global char *mailcap_files init("0, " USER_MAILCAP ", 0, " SYS_MAILCAP ", 1, " GLOBAL_MAILCAP);
+ global char *mimetypes_files init(USER_MIMETYPES ", " SYS_MIMETYPES);
+-global TextList mailcap_entries;
++extern TextList mailcap_entries;
+
+ global struct mailcap **UserBrowsecap init(NULL);
+ global TextList *browsecap_list;
+ global char *browsecap_files init(USER_BROWSECAP ", " SYS_BROWSECAP);
+-global TextList browsecap_entries;
++extern TextList browsecap_entries;
+
+ global TextList *fileToDelete;
+
diff --git a/www-client/w3mmee/files/w3mmee-gcc-4.4.patch b/www-client/w3mmee/files/w3mmee-gcc-4.4.patch
new file mode 100644
index 0000000..e724244
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-gcc-4.4.patch
@@ -0,0 +1,11 @@
+--- a/indep.c
++++ b/indep.c
+@@ -14,7 +14,7 @@
+ {
+ #ifdef HAVE_STRTOLL
+ return strtoll(s, NULL, base);
+-#elif HAVE_STRTOQ
++#elif defined(HAVE_STRTOQ)
+ return strtoq(s, NULL, base);
+ #else
+ int minus, digit;
diff --git a/www-client/w3mmee/files/w3mmee-gcc-4.5.patch b/www-client/w3mmee/files/w3mmee-gcc-4.5.patch
new file mode 100644
index 0000000..3e7d1aa
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-gcc-4.5.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/317815
+
+Author: Kacper Kowalik <xarthisius.kk@gmail.com>
+
+--- a/configure
++++ b/configure
+@@ -2636,7 +2636,7 @@
+ fi
+
+ cat >do_mk_btri.sh <<END_OF_DO_MK_BTRI
+-$dcpp "\$1" | sed -n "/^[ ]*[\\"'%]/p" | $mk_btri_cmd
++$dcpp -P "\$1" | sed -n "/^[ ]*[\\"'%]/p" | $mk_btri_cmd
+ END_OF_DO_MK_BTRI
+
+ cat >TABMakefile <<END_OF_TABMAKEFILE1
diff --git a/www-client/w3mmee/files/w3mmee-glibc-2.14.patch b/www-client/w3mmee/files/w3mmee-glibc-2.14.patch
new file mode 100644
index 0000000..7a2b0d9
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-glibc-2.14.patch
@@ -0,0 +1,31 @@
+--- a/istream.c
++++ b/istream.c
+@@ -132,7 +132,7 @@ newFileStream(FILE *f, void (*closep)())
+ stream = New(struct input_stream);
+ init_base_stream(stream, STREAM_BUF_SIZE);
+ stream->type = IST_FILE;
+- stream->handle.file = New(struct file_handle);
++ stream->handle.file = New(struct afile_handle);
+ stream->handle.file->f = f;
+
+ if (closep)
+--- a/istream.h
++++ b/istream.h
+@@ -20,7 +20,7 @@ struct stream_buffer {
+
+ typedef struct stream_buffer *StreamBuffer;
+
+-struct file_handle {
++struct afile_handle {
+ FILE *f;
+ void (*close)(FILE *);
+ };
+@@ -121,7 +121,7 @@ struct tee_handle {
+ union input_handle {
+ void *gen;
+ int fd;
+- struct file_handle *file;
++ struct afile_handle *file;
+ struct delimited_handle *delimited;
+ Str str;
+ #ifdef USE_SSL
diff --git a/www-client/w3mmee/files/w3mmee-openssl-1.1.patch b/www-client/w3mmee/files/w3mmee-openssl-1.1.patch
new file mode 100644
index 0000000..8d7087c
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-openssl-1.1.patch
@@ -0,0 +1,92 @@
+--- a/configure
++++ b/configure
+@@ -1230,7 +1230,7 @@
+ def_param format_nice n
+ def_param id_ext y
+ def_param use_bufinfo y
+-def_param use_egd y
++def_param use_egd n
+ def_param enable_remove_trailingspaces n
+ def_param menu_thin_frame n
+ def_param emacs_like_lineedit $include_opt
+--- a/istream.c
++++ b/istream.c
+@@ -770,7 +770,11 @@
+ gn = sk_GENERAL_NAME_value(alt, i);
+
+ if (gn->type == GEN_DNS) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ char *sn = ASN1_STRING_data(gn->d.ia5);
++#else
++ char *sn = ASN1_STRING_get0_data(gn->d.ia5);
++#endif
+ int sl = ASN1_STRING_length(gn->d.ia5);
+
+ if (!seen_dnsname)
+--- a/url.c
++++ b/url.c
+@@ -20,8 +20,8 @@
+ #include "regex.h"
+
+ #ifdef USE_SSL
+-#ifndef SSLEAY_VERSION_NUMBER
+-#include <crypto.h> /* SSLEAY_VERSION_NUMBER may be here */
++#ifndef OPENSSL_VERSION_NUMBER
++#include <crypto.h> /* OPENSSL_VERSION_NUMBER may be here */
+ #endif
+ #include <err.h>
+ #endif
+@@ -126,7 +126,7 @@
+ ssl_accept_this_site(NULL);
+ }
+
+-#if SSLEAY_VERSION_NUMBER >= 0x00905100
++#if OPENSSL_VERSION_NUMBER >= 0x00905100
+ #include <rand.h>
+ static void
+ init_PRNG()
+@@ -154,7 +154,7 @@
+ if (file)
+ RAND_write_file(file);
+ }
+-#endif /* SSLEAY_VERSION_NUMBER >= 0x00905100 */
++#endif /* OPENSSL_VERSION_NUMBER >= 0x00905100 */
+
+ static SSL *
+ openSSLHandle(int sock, char *hostname, char **p_cert)
+@@ -188,12 +188,16 @@
+ #endif /* defined(USE_SSL_VERIFY) */
+ if (ssl_ctx == NULL) {
+ int option;
+-#if SSLEAY_VERSION_NUMBER < 0x0800
++#if OPENSSL_VERSION_NUMBER < 0x0800
+ ssl_ctx = SSL_CTX_new();
+ X509_set_default_verify_paths(ssl_ctx->cert);
+-#else /* SSLEAY_VERSION_NUMBER >= 0x0800 */
++#else /* OPENSSL_VERSION_NUMBER >= 0x0800 */
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ SSLeay_add_ssl_algorithms();
+ SSL_load_error_strings();
++#else
++ OPENSSL_init_ssl(0, NULL);
++#endif
+ if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method())))
+ goto eend;
+ option = SSL_OP_ALL;
+@@ -233,13 +237,13 @@
+ if (SSL_CTX_load_verify_locations(ssl_ctx, ssl_ca_file, ssl_ca_path))
+ #endif /* defined(USE_SSL_VERIFY) */
+ SSL_CTX_set_default_verify_paths(ssl_ctx);
+-#endif /* SSLEAY_VERSION_NUMBER >= 0x0800 */
++#endif /* OPENSSL_VERSION_NUMBER >= 0x0800 */
+ }
+ handle = SSL_new(ssl_ctx);
+ SSL_set_fd(handle, sock);
+-#if SSLEAY_VERSION_NUMBER >= 0x00905100
++#if OPENSSL_VERSION_NUMBER >= 0x00905100
+ init_PRNG();
+-#endif /* SSLEAY_VERSION_NUMBER >= 0x00905100 */
++#endif /* OPENSSL_VERSION_NUMBER >= 0x00905100 */
+ if (SSL_connect(handle) > 0) {
+ Str serv_cert = ssl_get_certificate(handle, hostname);
+ if (serv_cert) {
diff --git a/www-client/w3mmee/files/w3mmee-rc_name.patch b/www-client/w3mmee/files/w3mmee-rc_name.patch
new file mode 100644
index 0000000..a16a7b9
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-rc_name.patch
@@ -0,0 +1,11 @@
+--- a/rc_name.mk_btri.h
++++ b/rc_name.mk_btri.h
+@@ -2,7 +2,7 @@
+
+ #define STRING_LITERAL(x) # x
+ #undef def_rcsect_begin
+-#define def_rcsect_begin(n) STRING_LITERAL(* ## n), §ions[secti_ ## n]
++#define def_rcsect_begin(n) STRING_LITERAL(*n), §ions[secti_ ## n]
+
+ #undef def_rcsect_end
+ #define def_rcsect_end(n)
diff --git a/www-client/w3mmee/files/w3mmee-time.patch b/www-client/w3mmee/files/w3mmee-time.patch
new file mode 100644
index 0000000..c63d654
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-time.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/586258
+
+Author: kouyu <ckyoog@gmail.com>
+
+--- a/terms.c
++++ b/terms.c
+@@ -305,11 +305,7 @@
+ struct timeval *tout)
+ {
+ static struct timeval polltv = {
+-#if CLOCKS_PER_SEC > 1
+- 0, 1000000 / CLOCKS_PER_SEC
+-#else
+- 0, 10000
+-#endif
++ 0, CLOCKS_PER_SEC > 1 ? 1000000 / CLOCKS_PER_SEC : 10000
+ };
+ int m;
+ struct timeval tv;
+@@ -779,11 +775,7 @@
+ #endif
+
+ static struct timeval display_delta = {
+-#if CLOCKS_PER_SEC > 1
+- 0, 1000000 / CLOCKS_PER_SEC,
+-#else
+- 0, 10000
+-#endif
++ 0, CLOCKS_PER_SEC > 1 ? 1000000 / CLOCKS_PER_SEC : 10000
+ };
+
+ static int
diff --git a/www-client/w3mmee/files/w3mmee-tinfo.patch b/www-client/w3mmee/files/w3mmee-tinfo.patch
new file mode 100644
index 0000000..c29f43a
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -1354,7 +1354,7 @@ main()
+ EOF
+
+ if [ -z "$dtermlib" ]; then
+- TERM_LIBS='termcap termlib terminfo mytinfo curses ncurses'
++ TERM_LIBS='termcap termlib terminfo mytinfo curses ncurses tinfo'
+
+ for lib in $TERM_LIBS; do
+ for tlibdir in /lib /usr/lib /usr/local/lib /usr/ucblib /usr/ccslib /usr/ccs/lib $prefix/lib; do
diff --git a/www-client/w3mmee/files/w3mmee-w3mman.patch b/www-client/w3mmee/files/w3mmee-w3mman.patch
new file mode 100644
index 0000000..dd66919
--- /dev/null
+++ b/www-client/w3mmee/files/w3mmee-w3mman.patch
@@ -0,0 +1,21 @@
+--- a/scripts/w3mman/w3mman.in
++++ b/scripts/w3mman/w3mman.in
+@@ -1,7 +1,7 @@
+ #!@PERL@
+
+ @W3M = split(' ', '@W3M@');
+-$ENV{'MAN'} = '@MAN@';
++$ENV{'MAN'} = 'env LC_MESSAGES=${LC_MESSAGES:-${LC_ALL:-${LANG}}} LANG=C @MAN@';
+ $SCRIPT = 'file:///$LIB/w3mman2html.cgi';
+
+ sub usage {
+--- a/scripts/w3mman/w3mman2html.cgi.in
++++ b/scripts/w3mman/w3mman2html.cgi.in
+@@ -1,6 +1,6 @@
+ #!@PERL@
+
+-$MAN = $ENV{'MAN'} || '@MAN@';
++$MAN = $ENV{'MAN'} || 'env LC_MESSAGES=${LC_MESSAGES:-${LC_ALL:-${LANG}}} LANG=C @MAN@';
+ $QUERY = $ENV{'QUERY_STRING'} || $ARGV[0];
+ $SCRIPT_NAME = $ENV{'SCRIPT_NAME'} || $0;
+ $CGI = "file://$SCRIPT_NAME";
diff --git a/www-client/w3mmee/metadata.xml b/www-client/w3mmee/metadata.xml
new file mode 100644
index 0000000..6f2ca22
--- /dev/null
+++ b/www-client/w3mmee/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-client/w3mmee/w3mmee-0.3.2_p24-r12.ebuild b/www-client/w3mmee/w3mmee-0.3.2_p24-r12.ebuild
new file mode 100644
index 0000000..df9a5b2
--- /dev/null
+++ b/www-client/w3mmee/w3mmee-0.3.2_p24-r12.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit alternatives multilib toolchain-funcs
+
+MY_PV="${PV##*_}-23"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="A variant of w3m with support for multiple character encodings"
+HOMEPAGE="http://pub.ks-and-ks.ne.jp/prog/w3mmee/"
+SRC_URI="http://pub.ks-and-ks.ne.jp/prog/pub/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="w3m"
+KEYWORDS="amd64 ppc x86"
+IUSE="gpm libressl nls ssl"
+
+DEPEND=">=dev-libs/boehm-gc-7.2
+ dev-libs/libmoe
+ dev-lang/perl
+ sys-libs/ncurses:0=
+ sys-libs/zlib
+ gpm? ( sys-libs/gpm )
+ nls? ( sys-devel/gettext )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-boehm-gc.patch
+ "${FILESDIR}"/${PN}-gcc-4.4.patch
+ "${FILESDIR}"/${PN}-gcc-4.5.patch
+ "${FILESDIR}"/${PN}-gcc-10.patch
+ "${FILESDIR}"/${PN}-glibc-2.14.patch
+ "${FILESDIR}"/${PN}-openssl-1.1.patch
+ "${FILESDIR}"/${PN}-rc_name.patch
+ "${FILESDIR}"/${PN}-time.patch
+ "${FILESDIR}"/${PN}-tinfo.patch
+ "${FILESDIR}"/${PN}-w3mman.patch
+)
+DOCS=( ChangeLog NEWS{,.mee} README )
+HTML_DOCS=( 00INCOMPATIBLE.html )
+
+src_prepare() {
+ default
+
+ sed -i "s:/lib\([^a-z$]\):/$(get_libdir)\1:g" configure
+ sed -i "/^AR=/s:ar:$(tc-getAR):" XMakefile
+}
+
+src_configure() {
+ local myconf=(
+ -locale_dir=$(usex nls "${EPREFIX}/usr/share/locale" '(NONE)')
+ )
+ local myuse=(
+ display_code=E
+ system_code=E
+ use_ansi_color=y
+ use_cookie=y
+ use_history=y
+ use_mouse=$(usex gpm y n)
+ )
+
+ if use ssl; then
+ myconf+=(
+ --ssl-includedir="${EPREFIX}/usr/include/openssl"
+ --ssl-libdir="${EPREFIX}/usr/$(get_libdir)"
+ )
+ myuse+=(
+ use_digest_auth=y
+ use_ssl=y
+ use_ssl_verify=y
+ )
+ else
+ myuse+=( use_ssl=n )
+ fi
+ # bug #678910
+ myuse+=( use_image=n )
+
+ cat <<-EOF >> config.param
+ lang=MANY
+ accept_lang=en
+ EOF
+
+ env CC=$(tc-getCC) "${myuse[@]}" ./configure \
+ -nonstop \
+ -prefix="${EPREFIX}/usr" \
+ -suffix=mee \
+ -auxbindir="${EPREFIX}/usr/$(get_libdir)/${PN}" \
+ -libdir="${EPREFIX}/usr/$(get_libdir)/${PN}/cgi-bin" \
+ -helpdir="${EPREFIX}/usr/share/${PN}" \
+ -mandir="${EPREFIX}/usr/share/man" \
+ -sysconfdir="${EPREFIX}/etc/${PN}" \
+ -model=custom \
+ -libmoe="${EPREFIX}/usr/$(get_libdir)" \
+ -mb_h="${EPREFIX}/usr/include/moe" \
+ -mk_btri="${EPREFIX}/usr/libexec/moe" \
+ -cflags="${CFLAGS}" \
+ -ldflags="${LDFLAGS}" \
+ "${myconf[@]}" \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ einstalldocs
+
+ # w3mman and manpages conflict with those from w3m
+ mv "${ED}"/usr/share/man/man1/w3m{,mee}.1 || die
+ mv "${ED}"/usr/share/man/ja/man1/w3m{,mee}.1 || die
+
+ docinto html/en
+ dodoc doc/*.html
+ rm -f doc/*.html
+ docinto en
+ dodoc doc/{HISTORY,README,keymap,menu}*
+
+ docinto html/ja
+ dodoc doc-jp/*.html
+ rm -f doc-jp/*.html
+ docinto ja
+ dodoc doc-jp/{HISTORY,README,keymap,menu}*
+}
+
+pkg_postinst() {
+ w3m_alternatives
+ einfo
+ einfo "If you want to render multilingual text, please refer to"
+ einfo "/usr/share/doc/${PF}/en/README.mee or"
+ einfo "/usr/share/doc/${PF}/jp/README.mee"
+ einfo "and set W3MLANG variable respectively."
+ einfo
+}
+
+pkg_postrm() {
+ w3m_alternatives
+}
+
+w3m_alternatives() {
+ if [[ ! -f /usr/bin/w3m ]]; then
+ alternatives_makesym /usr/bin/w3m \
+ /usr/bin/w3m{m17n,mee}
+ alternatives_makesym /usr/bin/w3mman \
+ /usr/bin/w3m{man-m17n,meeman}
+ alternatives_makesym /usr/share/man/ja/man1/w3m.1.gz \
+ /usr/share/man/ja/man1/w3m{m17n,mee}.1.gz
+ alternatives_makesym /usr/share/man/man1/w3m.1.gz \
+ /usr/share/man/man1/w3m{m17n,mee}.1.gz
+ alternatives_makesym /usr/share/man/man1/w3mman.1.gz \
+ /usr/share/man/man1/w3m{man-m17n,meeman}.1.gz
+ fi
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-17 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17 20:58 [gentoo-commits] repo/proj/libressl:migration commit in: www-client/w3mmee/files/, www-client/w3mmee/ Quentin Retornaz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox