From e328b4eba2711c0c05d1e5d0143238af6c6866f0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 24 Aug 2013 16:44:52 +0200 Subject: [PATCH] New package: w3m-0.5.3 (close #149). --- srcpkgs/w3m/patches/file_handle.patch | 58 +++++++++++++++++++++++++++ srcpkgs/w3m/patches/gc72.patch | 12 ++++++ srcpkgs/w3m/patches/https.patch | 19 +++++++++ srcpkgs/w3m/template | 33 +++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 srcpkgs/w3m/patches/file_handle.patch create mode 100644 srcpkgs/w3m/patches/gc72.patch create mode 100644 srcpkgs/w3m/patches/https.patch create mode 100644 srcpkgs/w3m/template diff --git a/srcpkgs/w3m/patches/file_handle.patch b/srcpkgs/w3m/patches/file_handle.patch new file mode 100644 index 00000000000..5f81da44375 --- /dev/null +++ b/srcpkgs/w3m/patches/file_handle.patch @@ -0,0 +1,58 @@ +--- istream.c 2011-01-04 20:22:22.000000000 +1100 ++++ istream.c 2012-07-04 21:50:51.529661517 +1000 +@@ -22,8 +22,8 @@ + static void basic_close(int *handle); + static int basic_read(int *handle, char *buf, int len); + +-static void file_close(struct file_handle *handle); +-static int file_read(struct file_handle *handle, char *buf, int len); ++static void file_close(struct file_handle_rofl *handle); ++static int file_read(struct file_handle_rofl *handle, char *buf, int len); + + static int str_read(Str handle, char *buf, int len); + +@@ -114,7 +114,7 @@ + stream = New(union input_stream); + init_base_stream(&stream->base, STREAM_BUF_SIZE); + stream->file.type = IST_FILE; +- stream->file.handle = New(struct file_handle); ++ stream->file.handle = New(struct file_handle_rofl); + stream->file.handle->f = f; + if (closep) + stream->file.handle->close = closep; +@@ -658,13 +658,13 @@ + } + + static void +-file_close(struct file_handle *handle) ++file_close(struct file_handle_rofl *handle) + { + handle->close(handle->f); + } + + static int +-file_read(struct file_handle *handle, char *buf, int len) ++file_read(struct file_handle_rofl *handle, char *buf, int len) + { + return fread(buf, 1, len, handle->f); + } +--- istream.h 2003-10-21 02:41:56.000000000 +1000 ++++ istream.h 2012-07-04 21:50:51.529661517 +1000 +@@ -20,7 +20,7 @@ + + typedef struct stream_buffer *StreamBuffer; + +-struct file_handle { ++struct file_handle_rofl { + FILE *f; + void (*close) (); + }; +@@ -53,7 +53,7 @@ + + struct file_stream { + struct stream_buffer stream; +- struct file_handle *handle; ++ struct file_handle_rofl *handle; + char type; + char iseos; + int (*read) (); diff --git a/srcpkgs/w3m/patches/gc72.patch b/srcpkgs/w3m/patches/gc72.patch new file mode 100644 index 00000000000..6cfea836dce --- /dev/null +++ b/srcpkgs/w3m/patches/gc72.patch @@ -0,0 +1,12 @@ +--- main.c 2011-01-04 20:42:19.000000000 +1100 ++++ main.c 2012-07-04 21:49:10.136212236 +1000 +@@ -833,7 +833,8 @@ + mySignal(SIGPIPE, SigPipe); + #endif + +- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); ++ orig_GC_warn_proc = GC_get_warn_proc(); ++ GC_set_warn_proc(wrap_GC_warn_proc); + err_msg = Strnew(); + if (load_argc == 0) { + /* no URL specified */ diff --git a/srcpkgs/w3m/patches/https.patch b/srcpkgs/w3m/patches/https.patch new file mode 100644 index 00000000000..fd409442672 --- /dev/null +++ b/srcpkgs/w3m/patches/https.patch @@ -0,0 +1,19 @@ +Fedora patch; see https://bugzilla.redhat.com/show_bug.cgi?id=707994 + +--- url.c 2011-01-04 14:52:24.000000000 +0530 ++++ url.c 2011-09-02 18:25:43.305652690 +0530 +@@ -82,11 +82,11 @@ + {"ftp", SCM_FTP}, + {"local", SCM_LOCAL}, + {"file", SCM_LOCAL}, +- /* {"exec", SCM_EXEC}, */ ++ {"exec", SCM_EXEC}, + {"nntp", SCM_NNTP}, +- /* {"nntp", SCM_NNTP_GROUP}, */ ++ {"nntp", SCM_NNTP_GROUP}, + {"news", SCM_NEWS}, +- /* {"news", SCM_NEWS_GROUP}, */ ++ {"news", SCM_NEWS_GROUP}, + {"data", SCM_DATA}, + #ifndef USE_W3MMAILER + {"mailto", SCM_MAILTO}, diff --git a/srcpkgs/w3m/template b/srcpkgs/w3m/template new file mode 100644 index 00000000000..b35ee535aa2 --- /dev/null +++ b/srcpkgs/w3m/template @@ -0,0 +1,33 @@ +# Template file for 'w3m' +pkgname=w3m +version=0.5.3 +revision=1 +build_style=gnu-configure +configure_args="--enable-image=x11,fb --with-imagelib=imlib2 + --with-termlib=ncurses --disable-w3mmailer --disable-mouse + ac_cv_func_setpgrp_void=yes" +hostmakedepends="pkg-config gc-devel" +makedepends="zlib ncurses-devel gc-devel openssl-devel imlib2-devel libX11-devel" +short_desc="Text-based Web browser, as well as pager" +maintainer="Juan RP " +license="MIT" +homepage="http://w3m.sourceforge.net" +distfiles="${SOURCEFORGE_SITE}/w3m/w3m-${version}.tar.gz" +checksum=e994d263f2fd2c22febfbe45103526e00145a7674a0fda79c822b97c2770a9e3 + +pre_build() { + # build host mktable + if [ "$CROSS_BUILD" ]; then + make CC=cc CFLAGS=-Os LD=ld mktable + mv mktable host-mktable + chmod 755 host-mktable + make clean + sed -e 's,./mktable$(EXT),./host-mktable$(EXT),g' -i Makefile + fi +} + +w3m_package() { + pkg_install() { + vmove all + } +}