[Midnightbsd-cvs] mports: mports/news: add PicMonger and knews
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat May 31 12:05:48 EDT 2008
Log Message:
-----------
add PicMonger and knews
Modified Files:
--------------
mports/news:
Makefile (r1.3 -> r1.4)
Added Files:
-----------
mports/news/PicMonger:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
pkg-plist (r1.1)
mports/news/PicMonger/files:
patch-ErrorLogger.cpp (r1.1)
patch-Exceptions.cpp (r1.1)
patch-FileTypeState.cpp (r1.1)
patch-FilenameCleaner.cpp (r1.1)
patch-GroupState.cpp (r1.1)
patch-GroupState.h (r1.1)
patch-HtmlPage.cpp (r1.1)
patch-HtmlPage.h (r1.1)
patch-InetSocket.cpp (r1.1)
patch-NewsScanner.cpp (r1.1)
patch-OptionsTab.cpp (r1.1)
patch-aa (r1.1)
patch-ab (r1.1)
patch-ac (r1.1)
patch-ad (r1.1)
patch-ae (r1.1)
patch-imlib.h (r1.1)
mports/news/knews:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
pkg-plist (r1.1)
mports/news/knews/files:
patch-aa (r1.1)
patch-ab (r1.1)
patch-ac (r1.1)
patch-child.c (r1.1)
patch-file.c (r1.1)
patch-png.c (r1.1)
patch-resource.c (r1.1)
mports/news/knews/scripts:
pre-configure (r1.1)
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/news/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -L news/Makefile -L news/Makefile -u -r1.3 -r1.4
--- news/Makefile
+++ news/Makefile
@@ -3,6 +3,8 @@
COMMENT = Network news
+ SUBDIR += PicMonger
+ SUBDIR += knews
SUBDIR += newsfetch
SUBDIR += slrn
SUBDIR += tin
--- /dev/null
+++ news/PicMonger/pkg-descr
@@ -0,0 +1,22 @@
+PicMonger is an automated NNTP (Usenet News) client. In short, you point it
+at your news server, select a group, and it scans the available (and not
+previously scanned) posts for UUencoded or MIME base64-encoded binaries
+(e.g. a JPEG image). When a binary is found, it is automatically decoded
+back to its original form. If desired, PicMonger can also create thumbnail
+preview pages, viewable in any web browser.
+
+Features:
+* Intuitive GUI design
+* Automatic customizable HTML thumbnail preview page generation
+* Thumbnails maintain same aspect ratio as the original, within a size
+ constraint specified by the user
+* Inter-session group memory (resumes scanning a newsgroup where you left off)
+* Inter-session options memory (remembers all of your customized settings)
+* GUI-based mangement of server and newsgroup lists
+* Fixes filenames to be ext2fs (Linux/Unix) friendly before they are written
+* Screens files and decodes only the file types you select
+* Easy installation (uses GNU autoconf/automake)
+* Error logging for easy troubleshooting (rarely an issue)
+* Distributed under the GNU GPL
+
+WWW: http://PicMonger.sourceforge.net/
--- /dev/null
+++ news/PicMonger/pkg-plist
@@ -0,0 +1,7 @@
+bin/picmonger
+share/PicMonger/pmlogo.xpm
+share/PicMonger/add.xpm
+share/PicMonger/del.xpm
+share/PicMonger/pmlogo_big.jpg
+share/PicMonger/db_rd.xpm
+ at dirrm share/PicMonger
--- /dev/null
+++ news/PicMonger/Makefile
@@ -0,0 +1,28 @@
+# New ports collection makefile for: PicMonger
+# Date created: 23 July 2000
+# Whom: Donald Burr <dburr at FreeBSD.org>
+#
+# $MidnightBSD: mports/news/PicMonger/Makefile,v 1.1 2008/05/31 16:05:45 laffer1 Exp $
+# $FreeBSD: ports/news/PicMonger/Makefile,v 1.21 2008/03/25 22:44:45 miwi Exp $
+#
+
+PORTNAME= PicMonger
+PORTVERSION= 0.9.6
+PORTREVISION= 0
+CATEGORIES= news graphics
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=picmonger
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= An automated USENET (NNTP) picture decoding client
+LICENSE= gpl2
+
+LIB_DEPENDS= gtkmm-1.2.2:${PORTSDIR}/x11-toolkits/gtkmm12
+RUN_DEPENDS= mpack:${PORTSDIR}/converters/mpack
+
+USE_XORG= x11
+USE_GMAKE= yes
+USE_GNOME= imlib
+GNU_CONFIGURE= yes
+
+.include <bsd.port.mk>
--- /dev/null
+++ news/PicMonger/distinfo
@@ -0,0 +1,3 @@
+MD5 (PicMonger-0.9.6.tar.gz) = e10b5d1184a557a9318079c65f8149bc
+SHA256 (PicMonger-0.9.6.tar.gz) = 5eef38359ba339f3d6f32085ef14fcdbdbb2f5af33a03a928b0d5548ba54408d
+SIZE (PicMonger-0.9.6.tar.gz) = 241237
--- /dev/null
+++ news/PicMonger/files/patch-ae
@@ -0,0 +1,12 @@
+--- HtmlOptions.cpp.old Sun Jul 23 01:54:30 2000
++++ HtmlOptions.cpp Sun Jul 23 01:54:42 2000
+@@ -18,6 +18,9 @@
+ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ #include "HtmlOptions.h"
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
+ #include "HtmlOptionState.h"
+ #include "Exceptions.h"
+
--- /dev/null
+++ news/PicMonger/files/patch-OptionsTab.cpp
@@ -0,0 +1,11 @@
+--- OptionsTab.cpp.orig Tue Apr 11 20:40:30 2000
++++ OptionsTab.cpp Fri Dec 1 22:35:20 2006
+@@ -8,6 +8,8 @@
+ #include <iostream>
+
+ using std::cerr;
++using std::string;
++using std::endl;
+
+ OptionsTab::OptionsTab()
+ : Gtk::Table( 4, 1, true )
--- /dev/null
+++ news/PicMonger/files/patch-Exceptions.cpp
@@ -0,0 +1,53 @@
+--- Exceptions.cpp.orig Tue Mar 28 02:00:12 2000
++++ Exceptions.cpp Fri Dec 1 22:24:08 2006
+@@ -29,8 +29,8 @@
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+-Basic::Basic( const string& location = "Unknown",
+- const string& condition = "Unknown" )
++Basic::Basic( const string& location,
++ const string& condition )
+ : abort(false), loc( location ), cond( condition )
+ {
+ }
+@@ -65,8 +65,8 @@
+
+ ////////////////////////////////////////////////////////////////////////////////////
+
+-Fatal::Fatal( const string& location = "Unknown",
+- const string& condition = "Fatal Error" )
++Fatal::Fatal( const string& location,
++ const string& condition )
+ : Basic( location, condition )
+ {
+ }
+@@ -81,7 +81,7 @@
+
+ ////////////////////////////////////////////////////////////////////////////////////
+
+-NullPointer::NullPointer( const string& location = "Unknown" )
++NullPointer::NullPointer( const string& location )
+ : Fatal( location, "Attempted to dereference or access a null pointer." )
+ {}
+
+@@ -94,8 +94,8 @@
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////
+-FileAccess::FileAccess( const string& location = "Unknown",
+- const string& filename = "Filename Not Specified" )
++FileAccess::FileAccess( const string& location,
++ const string& filename )
+ : Basic( location, "File Not Found or Access Denied" ), fname( filename )
+ {}
+
+@@ -160,7 +160,7 @@
+ ////////////////////////////////////////////////////////////////////////////////////
+
+ TimeOut::TimeOut( const string& location, HtmlGenerator *htmlgen,
+- const string& pending_io = "(Err During Read)" )
++ const string& pending_io )
+ : Basic( location, "Socket I/O Timed Out" ), pend_io( pending_io ),
+ p_htgen( htmlgen )
+ {}
--- /dev/null
+++ news/PicMonger/files/patch-HtmlPage.cpp
@@ -0,0 +1,11 @@
+--- HtmlPage.cpp.orig Tue Apr 4 01:59:24 2000
++++ HtmlPage.cpp Fri Dec 1 22:34:09 2006
+@@ -26,6 +26,8 @@
+ #endif
+
+ using std::string;
++using std::ios;
++using std::endl;
+
+ HtmlPage::HtmlPage( const string& path,
+ const string& _filename,
--- /dev/null
+++ news/PicMonger/files/patch-FileTypeState.cpp
@@ -0,0 +1,14 @@
+--- FileTypeState.cpp.orig Tue Apr 18 21:22:46 2000
++++ FileTypeState.cpp Fri Dec 1 22:45:01 2006
+@@ -21,6 +21,11 @@
+ #include <fstream>
+ #include <stdlib.h> // need getenv()
+
++using std::ofstream;
++using std::ifstream;
++using std::ios;
++using std::flush;
++
+ // Implemented as a Singleton to simplify access from both filetype dialog and
+ // newsscanner without having to maintain references to each other
+
--- /dev/null
+++ news/PicMonger/files/patch-GroupState.h
@@ -0,0 +1,10 @@
+--- GroupState.h.orig Tue Mar 14 23:43:08 2000
++++ GroupState.h Fri Dec 1 22:47:53 2006
+@@ -26,6 +26,7 @@
+
+ using std::string;
+ using std::map;
++using std::less;
+
+ typedef map< string, string, less<string> > GroupStateData;
+ typedef GroupStateData::value_type StatePair;
--- /dev/null
+++ news/PicMonger/files/patch-ad
@@ -0,0 +1,18 @@
+--- HtmlOptionState.cpp.orig Fri Jul 14 12:58:22 2000
++++ HtmlOptionState.cpp Fri Dec 1 22:39:45 2006
+@@ -17,11 +17,15 @@
+ // along with this program; if not, write to the Free Software
+ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
+ #include "HtmlOptionState.h"
+ #include <fstream>
+
+ using std::ifstream;
+ using std::ofstream;
++using std::ios;
+
+ HtmlOptionState* HtmlOptionState::instance = 0;
+ HtmlOptionState* HtmlOptionState::Instance()
--- /dev/null
+++ news/PicMonger/files/patch-aa
@@ -0,0 +1,12 @@
+--- InetSocket.h.old Sun Jul 23 01:16:39 2000
++++ InetSocket.h Sun Jul 23 01:16:49 2000
+@@ -24,6 +24,9 @@
+ #ifndef _INETSOCKET_H
+ #define _INETSOCKET_H
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
--- /dev/null
+++ news/PicMonger/files/patch-GroupState.cpp
@@ -0,0 +1,12 @@
+--- GroupState.cpp.orig Tue Mar 14 23:43:08 2000
++++ GroupState.cpp Fri Dec 1 22:47:05 2006
+@@ -24,6 +24,9 @@
+ #include <stdlib.h> // need getenv
+
+ using std::string;
++using std::ifstream;
++using std::ofstream;
++using std::ios;
+
+ GroupState::GroupState(const string& groupname, const string& max_msg_id)
+ : group(groupname)
--- /dev/null
+++ news/PicMonger/files/patch-NewsScanner.cpp
@@ -0,0 +1,11 @@
+--- NewsScanner.cpp.orig Fri Jul 14 12:58:22 2000
++++ NewsScanner.cpp Fri Dec 1 22:19:44 2006
+@@ -58,7 +58,7 @@
+
+
+ NewsScanner::NewsScanner(NewsScannerView *nsv, const char* saddr,
+- const char* ng, ScanOrder so=NS_FORWARD)
++ const char* ng, ScanOrder so)
+
+ : p_NSV(nsv), so_(so), htmlgen("."), p_htgen( 0 ),
+ serv_addr( saddr ), serv_port( 119 ), group( ng ),
--- /dev/null
+++ news/PicMonger/files/patch-FilenameCleaner.cpp
@@ -0,0 +1,14 @@
+--- FilenameCleaner.cpp.orig Tue Apr 11 12:01:47 2000
++++ FilenameCleaner.cpp Fri Dec 1 22:46:08 2006
+@@ -5,8 +5,11 @@
+ #include "FileTypeState.h" // need enum FileTypes
+ #include <ctype.h> // need tolower()
+ #include <strstream>
++#include <iostream>
+
+ using std::strstream;
++using std::cerr;
++using std::endl;
+
+ FilenameCleaner::FilenameCleaner()
+ {
--- /dev/null
+++ news/PicMonger/files/patch-ErrorLogger.cpp
@@ -0,0 +1,11 @@
+--- ErrorLogger.cpp.orig Tue Mar 14 23:43:02 2000
++++ ErrorLogger.cpp Fri Dec 1 22:27:20 2006
+@@ -28,6 +28,8 @@
+ using std::ofstream;
+ using std::string;
+ using std::list;
++using std::ios;
++using std::endl;
+
+ ErrorLogger* ErrorLogger::instance = 0;
+
--- /dev/null
+++ news/PicMonger/files/patch-ac
@@ -0,0 +1,12 @@
+--- PreviewPage.cpp.old Sun Jul 23 01:21:56 2000
++++ PreviewPage.cpp Sun Jul 23 01:21:58 2000
+@@ -18,6 +18,9 @@
+ // along with this program; if not, write to the Free Software
+ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
+ #include "PreviewPage.h"
+ #include "Thumbnail.h"
+ #include "HtmlOptionState.h"
--- /dev/null
+++ news/PicMonger/files/patch-imlib.h
@@ -0,0 +1,11 @@
+--- imlib.h.orig Sun Apr 23 00:11:09 2000
++++ imlib.h Fri Dec 1 22:18:13 2006
+@@ -29,7 +29,7 @@
+
+ #include <gdk--.h>
+ #include <gdk_imlib.h>
+-
++using std::string;
+ class Gdk_Imlib
+ {
+ public:
--- /dev/null
+++ news/PicMonger/files/patch-HtmlPage.h
@@ -0,0 +1,10 @@
+--- HtmlPage.h.orig Wed Mar 22 01:20:48 2000
++++ HtmlPage.h Fri Dec 1 22:33:36 2006
+@@ -27,6 +27,7 @@
+ #include "Exceptions.h"
+
+ using std::string;
++using std::ofstream;
+
+ class HtmlPage {
+
--- /dev/null
+++ news/PicMonger/files/patch-ab
@@ -0,0 +1,12 @@
+--- HtmlGenerator.h.old Sun Jul 23 01:19:44 2000
++++ HtmlGenerator.h Sun Jul 23 01:19:46 2000
+@@ -28,6 +28,9 @@
+ #include <list>
+ #include <fstream>
+ #include "Exceptions.h"
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
+ #include "PreviewPage.h"
+
+ class HtmlGenerator
--- /dev/null
+++ news/PicMonger/files/patch-InetSocket.cpp
@@ -0,0 +1,20 @@
+--- InetSocket.cpp.orig Tue Mar 14 23:43:09 2000
++++ InetSocket.cpp Fri Dec 1 22:20:58 2006
+@@ -31,7 +31,7 @@
+ #include <errno.h>
+ #include <unistd.h>
+
+-InetSocket::InetSocket(int type=SOCK_STREAM, int protocol=0)
++InetSocket::InetSocket(int type, int protocol)
+ : type_(type), protocol_(protocol)
+ {
+ local_fd = socket( PF_INET, type_, protocol_ );
+@@ -58,7 +58,7 @@
+ return result;
+ }
+
+-int InetSocket::s_bind( int port, const char *dotquad = (const char *)0)
++int InetSocket::s_bind( int port, const char *dotquad)
+ {
+ // construct local address to which we want our unnamed socket bound
+ if (!dotquad)
--- /dev/null
+++ news/knews/pkg-descr
@@ -0,0 +1,22 @@
+Knews is a threaded newsreader with an X Window interface that uses NNTP
+to get news. Threads are displayed in a graphical tree. Full support for
+reading MIME articles, except message/partial.
+ o Background threading of newsgroups
+ o Doesn't have to read the active file or group descriptions on startup
+ o A mechansim for reading the spool directory
+ o Kill file support with color blobs
+ o Regular expression searching in articles and the newsgroup list
+ o XPAT searching
+ o Can use different fonts and colors for quoted text and headers in articles
+ o Lots of action procedures that can be tied to keys.
+ o Supports multiple nntp servers
+ o Tagging of articles and saving or piping them in order
+ o Uudecode function. Not perfect, but handles most cases
+ o article text widget is able to display wide-character fonts
+ o article tree has a 'vertical' layout by popular demand
+ o experimental: Decoding of 16 bit encoded charsets
+ o Mailcap file support
+ o save thread data between sessions
+ o article prefetch cache and 'trailing' cache
+ o Less restrictive locking of the interface
+ o Message-id lookup of articles
--- /dev/null
+++ news/knews/pkg-plist
@@ -0,0 +1,2 @@
+bin/knews
+lib/X11/app-defaults/Knews
--- /dev/null
+++ news/knews/Makefile
@@ -0,0 +1,33 @@
+# New ports collection makefile for: knews
+# Date created: Sun Apr 14 09:23:59 MET DST 1996
+# Whom: Andreas Klemm <andreas at klemm.gtn.com>
+#
+# $MidnightBSD: mports/news/knews/Makefile,v 1.1 2008/05/31 16:05:46 laffer1 Exp $
+# $FreeBSD: ports/news/knews/Makefile,v 1.48 2008/03/29 12:38:04 dinoex Exp $
+#
+
+PORTNAME= knews
+PORTVERSION= 1.0b.1
+PORTREVISION= 0
+CATEGORIES= news
+MASTER_SITES= http://www.matematik.su.se/~kjj/
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= A threaded nntp newsreader for X
+LICENSE= gpl2
+
+LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
+ png.5:${PORTSDIR}/graphics/png \
+ compface:${PORTSDIR}/mail/faces
+RUN_DEPENDS= newsp:${PORTSDIR}/print/mp-letter
+
+USE_IMAKE= yes
+USE_XORG= xmu xpm xt sm ice xext x11
+MAKE_FLAGS= BINDIR=${PREFIX}/bin MANDIR=${PREFIX}/man/man1 \
+ XAPPLOADDIR=${PREFIX}/lib/X11/app-defaults -f
+.if defined(MAKE_JOBS)
+MAKE_ARGS+= -j${MAKE_JOBS}
+.endif
+MAN1= knews.1
+
+.include <bsd.port.mk>
--- /dev/null
+++ news/knews/distinfo
@@ -0,0 +1,3 @@
+MD5 (knews-1.0b.1.tar.gz) = 850ebff7772d576314060ebe6ef81b73
+SHA256 (knews-1.0b.1.tar.gz) = ee79caee70a44c23e54a2d9c9c97c58c4a26d5e947ef1a76fb3b0bed7792bfe6
+SIZE (knews-1.0b.1.tar.gz) = 392225
--- /dev/null
+++ news/knews/files/patch-resource.c
@@ -0,0 +1,11 @@
+Do not use O_WRONLY, if we plan on reading from this file again!
+
+ -mi
+
+--- src/resource.c Fri Jan 9 12:16:21 1998
++++ src/resource.c Fri Jul 13 12:21:46 2001
+@@ -556,3 +556,3 @@
+ fprintf(stderr, "Knews: creating config file %s\n", path);
+- fd = open_mkdir(path, O_WRONLY|O_TRUNC|O_EXCL|O_CREAT, True);
++ fd = open_mkdir(path, O_RDWR|O_TRUNC|O_EXCL|O_CREAT, True);
+ if (fd < 0) {
--- /dev/null
+++ news/knews/files/patch-ac
@@ -0,0 +1,17 @@
+--- knews.tmpl.orig Tue Dec 29 12:14:55 1998
++++ knews.tmpl Thu Jan 7 21:30:06 1999
+@@ -74,7 +74,7 @@
+ * be changed to -lgz.
+ */
+
+-JPEG_LIB = -ljpeg
++JPEG_LIB = -L!!LOCALBASE!!/lib -ljpeg
+ PNG_LIB = -lpng -lz -lm
+ COMPFACE_LIB = -lcompface
+
+@@ -83,4 +83,4 @@
+ * If you need to add include paths for e.g. libjpeg, libpng or libzlib
+ * include files, do it here.
+ */
+-KNEWS_INCLUDES =
++KNEWS_INCLUDES = -I!!LOCALBASE!!/include
--- /dev/null
+++ news/knews/files/patch-png.c
@@ -0,0 +1,130 @@
+--- src/png.c Sat Nov 21 09:55:13 1998
++++ src/png.c Fri Jul 13 11:29:00 2001
+@@ -78,6 +78,12 @@
+
++static Pixmap rep_fail(const char *e) {
++ ArtTextAddLine(main_widgets.text, e, ascii_font->body_font,
++ global.alert_pixel);
++ return None;
++}
++
+ Pixmap do_png(char *data, long len, long *wp, long *hp)
+ {
+- png_struct p_str;
+- png_info p_info;
++ png_structp png_ptr;
++ png_infop info_ptr;
+ Pixmap pixmap;
+@@ -94,9 +100,6 @@
+
+- if (!(vol_fp = dump_for_png(data, len))) {
+- ArtTextAddLine(main_widgets.text, "[knews: temp file error.]",
+- ascii_font->body_font, global.alert_pixel);
+- return None;
+- }
++ if (!(vol_fp = dump_for_png(data, len)))
++ return rep_fail("[knews: temp file error.]");
+
+- if (setjmp(p_str.jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ ArtTextAddLine(main_widgets.text, "[knews: png error.]",
+@@ -110,18 +113,26 @@
+
+- png_read_init(&p_str);
+- png_info_init(&p_info);
++ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
++ NULL, NULL, NULL);
++ if (!png_ptr)
++ return rep_fail("[knews: can't allocate PNG structure.]");
++ info_ptr = png_create_info_struct(png_ptr);
++ if (!info_ptr) {
++ png_destroy_read_struct(&png_ptr,
++ (png_infopp)NULL, (png_infopp)NULL);
++ return rep_fail("[knews: can't PNG info structure.]");
++ }
+
+- png_init_io(&p_str, vol_fp);
+- png_read_info(&p_str, &p_info);
++ png_init_io(png_ptr, vol_fp);
++ png_read_info(png_ptr, info_ptr);
+
+- vol_w = w = p_info.width;
+- vol_h = h = p_info.height;
++ vol_w = w = info_ptr->width;
++ vol_h = h = info_ptr->height;
+
+- if (p_info.bit_depth == 16)
+- png_set_strip_16(&p_str);
+- else if (p_info.bit_depth < 8)
+- png_set_packing(&p_str);
++ if (info_ptr->bit_depth == 16)
++ png_set_strip_16(png_ptr);
++ else if (info_ptr->bit_depth < 8)
++ png_set_packing(png_ptr);
+
+- if (p_info.valid & PNG_INFO_bKGD)
+- png_set_background(&p_str, &p_info.background,
++ if (info_ptr->valid & PNG_INFO_bKGD)
++ png_set_background(png_ptr, &info_ptr->background,
+ PNG_BACKGROUND_GAMMA_FILE, True, 1.0);
+@@ -129,3 +140,3 @@
+ static png_color_16 bg = {0, };
+- png_set_background(&p_str, &bg,
++ png_set_background(png_ptr, &bg,
+ PNG_BACKGROUND_GAMMA_SCREEN, False, 1.0);
+@@ -135,10 +146,10 @@
+
+- if (!(p_info.color_type & PNG_COLOR_MASK_COLOR)) { /* grey image */
++ if (!(info_ptr->color_type & PNG_COLOR_MASK_COLOR)) { /* grey image */
+ grey = True;
+- png_set_expand(&p_str);
++ png_set_expand(png_ptr);
+ } else if (!p_cmap) { /* true color visual */
+- if (p_info.color_type == PNG_COLOR_TYPE_PALETTE)
+- png_set_expand(&p_str);
++ if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
++ png_set_expand(png_ptr);
+ per_line *= 3;
+- } else if (p_info.color_type & PNG_COLOR_MASK_PALETTE) {
++ } else if (info_ptr->color_type & PNG_COLOR_MASK_PALETTE) {
+ CMAP_ENTRY *pal;
+@@ -146,8 +157,8 @@
+
+- pn = p_info.num_palette;
++ pn = info_ptr->num_palette;
+ pal = (CMAP_ENTRY *)XtMalloc(pn * sizeof *pal);
+ for (i = 0 ; i < pn ; i++) {
+- pal[i].r = p_info.palette[i].red;
+- pal[i].g = p_info.palette[i].green;
+- pal[i].b = p_info.palette[i].blue;
++ pal[i].r = info_ptr->palette[i].red;
++ pal[i].g = info_ptr->palette[i].green;
++ pal[i].b = info_ptr->palette[i].blue;
+ }
+@@ -156,3 +167,3 @@
+ } else {
+- png_set_dither(&p_str, p_cmap, cmap_size,
++ png_set_dither(png_ptr, p_cmap, cmap_size,
+ cmap_size, NULL, True);
+@@ -160,4 +171,4 @@
+
+- pass = png_set_interlace_handling(&p_str);
+- png_start_read_image(&p_str);
++ pass = png_set_interlace_handling(png_ptr);
++ png_start_read_image(png_ptr);
+
+@@ -169,3 +180,3 @@
+ for (j = 0 ; j < h ; j++) {
+- png_read_row(&p_str, NULL, row);
++ png_read_row(png_ptr, NULL, row);
+ if (!did)
+@@ -176,3 +187,3 @@
+
+- png_read_end(&p_str, NULL);
++ png_read_end(png_ptr, NULL);
+ }
+@@ -206,3 +217,3 @@
+
+- png_read_destroy(&p_str, &p_info, NULL);
++ png_read_destroy(png_ptr, info_ptr, NULL);
+ fclose((FILE *)vol_fp);
--- /dev/null
+++ news/knews/files/patch-ab
@@ -0,0 +1,37 @@
+--- src/Knews.ad.orig Fri Jan 9 18:16:22 1998
++++ src/Knews.ad Sat Mar 14 16:59:53 1998
+@@ -35,6 +35,7 @@
+ !Knews.editCommand: xterm -e $EDITOR +%i %s
+ !Knews.editCommand: xemacs +%i %s
+ !Knews.editCommand: xterm -e vi +%i %s
++!Knews.editCommand: xterm -fn 10x20 -cr red -bg grey90 -e vi +%i %s
+ !
+ ! You might need a few stty settings for vi:
+ !
+@@ -45,12 +46,13 @@
+ ! measure, knews will not allow quotes, parentheses, white space
+ ! or ampersands in the url.
+ !
+-!Knews.urlCommand: netscape -remote 'openUrl(%s)'
++Knews.urlCommand: netscape -remote 'openUrl(%s)'
+
+
+ ! Command for printing.
+ !
+-Knews.printCommand: /bin/false
++!Knews.printCommand: /usr/bin/lpr
++Knews.printCommand: newsp | /usr/bin/lpr
+
+
+ ! Whether knews should generate a Path header.
+@@ -224,8 +226,8 @@
+ ! Some people want double clicking on a subject to go directly into thread
+ ! mode. This will do it.
+ !
+-!*threadlist.translations: #override \
+-! <Btn1Down>(2): notify() view-thread(true)
++*threadlist.translations: #override \
++ <Btn1Down>(2): notify() view-thread(true)
+
+
+ ! The initial directory of the filechooser. Make sure it exists
--- /dev/null
+++ news/knews/files/patch-file.c
@@ -0,0 +1,39 @@
+--- src/file.c.orig Fri Jan 9 09:16:19 1998
++++ src/file.c Sat Sep 7 16:51:54 2002
+@@ -4,6 +4,7 @@
+
+ #include "global.h"
+ #include <sys/stat.h>
++#include <paths.h>
+ #include "expand.h"
+ #include "file.h"
+
+@@ -185,16 +186,18 @@
+ int create_temp_fd(char **name)
+ {
+ int fd;
+-
+- *name = tmpnam(NULL);
+- if (!*name)
+- fd = -1;
+- else {
+- unlink(*name);
+- fd = open(*name, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
+- if (fd < 0)
+- *name = NULL;
+- }
++ char filename[FILENAME_MAX];
++ char *tmpdir;
++
++ if ((tmpdir = getenv("TMPDIR")) == NULL)
++ tmpdir = _PATH_TMP;
++ strlcpy(filename, tmpdir, FILENAME_MAX);
++ strlcat(filename, "/tmp.XXXXXX", FILENAME_MAX);
++
++ if ((fd = mkstemp(filename)) == -1)
++ *name = NULL;
++ else
++ *name = filename;
+
+ return fd;
+ }
--- /dev/null
+++ news/knews/files/patch-child.c
@@ -0,0 +1,52 @@
+--- src/child.c.orig Wed Nov 6 11:55:57 2002
++++ src/child.c Wed Nov 6 11:57:43 2002
+@@ -121,7 +121,7 @@
+ flags |= SA_RESTART;
+ #endif
+
+- sig_act.sa_handler = sigchld_handler;
++ sig_act.__sigaction_u.__sa_handler = sigchld_handler;
+ sigemptyset(&sig_act.sa_mask);
+ sigaddset(&sig_act.sa_mask, SIGCHLD);
+ sig_act.sa_flags = flags;
+@@ -136,27 +136,27 @@
+ * now, thanks to leo at marco.de, but I might as well keeps this.
+ */
+
+- sig_act.sa_handler = SIG_IGN;
++ sig_act.__sigaction_u.__sa_handler = SIG_IGN;
+ sigemptyset(&sig_act.sa_mask);
+ sig_act.sa_flags = flags;
+ if (sigaction(SIGPIPE, &sig_act, NULL) < 0)
+ perror("knews: sigaction(SIGPIPE)");
+
+- sig_act.sa_handler = sigfpe_handler;
++ sig_act.__sigaction_u.__sa_handler = sigfpe_handler;
+ sigemptyset(&sig_act.sa_mask);
+ sigaddset(&sig_act.sa_mask, SIGFPE);
+ sig_act.sa_flags = flags;
+ if (sigaction(SIGFPE, &sig_act, NULL) < 0)
+ perror("knews: sigaction(SIGFPE)");
+
+- sig_act.sa_handler = sighup_handler;
++ sig_act.__sigaction_u.__sa_handler = sighup_handler;
+ sigemptyset(&sig_act.sa_mask);
+ sigaddset(&sig_act.sa_mask, SIGHUP);
+ sig_act.sa_flags = flags;
+ if (sigaction(SIGHUP, &sig_act, NULL) < 0)
+ perror("knews: sigaction(SIGHUP)");
+
+- sig_act.sa_handler = sigusr1_handler;
++ sig_act.__sigaction_u.__sa_handler = sigusr1_handler;
+ sigemptyset(&sig_act.sa_mask);
+ sigaddset(&sig_act.sa_mask, SIGUSR1);
+ sig_act.sa_flags = flags;
+@@ -168,7 +168,7 @@
+ {
+ struct sigaction sig_act;
+
+- sig_act.sa_handler = SIG_DFL;
++ sig_act.__sigaction_u.__sa_handler = SIG_DFL;
+ sigemptyset(&sig_act.sa_mask);
+ sig_act.sa_flags = 0;
+ if (sigaction(SIGPIPE, &sig_act, NULL) < 0)
--- /dev/null
+++ news/knews/files/patch-aa
@@ -0,0 +1,33 @@
+--- configure.h.orig Tue Dec 29 11:47:02 1998
++++ configure.h Sun Apr 16 18:48:00 2000
+@@ -14,7 +14,7 @@
+ *
+ * If you don't have sendmail, use /bin/false :-).
+ */
+-/* #define MAIL_COMMAND "/usr/sbin/sendmail -t" */
++#define MAIL_COMMAND "/usr/sbin/sendmail -t"
+ /* #define MAIL_COMMAND "/usr/lib/sendmail -t" */
+
+
+@@ -84,9 +84,9 @@
+ * libcompface.
+ */
+
+-#define HAVE_JPEG 0
+-#define HAVE_PNG 0
+-#define HAVE_COMPFACE 0
++#define HAVE_JPEG 1
++#define HAVE_PNG 1
++#define HAVE_COMPFACE 1
+
+
+
+@@ -138,7 +138,7 @@
+ *
+ * Knews*backgroundPixmap: ~/dir/texture.xpm
+ */
+-#define HAVE_XPM 0
++#define HAVE_XPM 1
+
+
+ /* If your system doesn't have the POSIX sigaction() function, defining
--- /dev/null
+++ news/knews/scripts/pre-configure
@@ -0,0 +1,26 @@
+#! /bin/sh
+echo "You should tell knews the name of your NNTP server"
+echo "You can do this by setting the environment variable NNTPSERVER"
+echo "csh users: in .cshrc: setenv NNTPSERVER host.domain"
+echo "sh users: in .profile: NNTPSERVER=host.domain; export NNTPSERVER"
+
+# work around a problem with bmake regarding files ending in .l
+#
+FILES_TO_PATCH="widgets.c save.c search.c"
+for file in $FILES_TO_PATCH
+do
+ ed -s ${WRKSRC}/src/${file} <<-EOF
+ g/^#include.*\.l/s/\.l/.h/
+ w
+ q
+ EOF
+done
+
+for file in ${WRKSRC}/src/layouts/*
+do
+ mv $file `echo $file | sed -e 's/\.l/.h/'`
+done
+
+perl -pi -e "s|!!LOCALBASE!!|$LOCALBASE|" ${WRKSRC}/knews.tmpl
+
+exit 0
More information about the Midnightbsd-cvs
mailing list