packages: dillo/dillo-ac.patch, dillo/dillo-gzip_fallback.patch, dillo/dill...
sls
sls at pld-linux.org
Wed Feb 24 01:30:11 CET 2010
Author: sls Date: Wed Feb 24 00:30:11 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- merge from DEVEL
---- Files affected:
packages/dillo:
dillo-ac.patch (1.3 -> 1.4) , dillo-gzip_fallback.patch (1.10 -> 1.11) , dillo.spec (1.61 -> 1.62)
---- Diffs:
================================================================
Index: packages/dillo/dillo-ac.patch
diff -u packages/dillo/dillo-ac.patch:1.3 packages/dillo/dillo-ac.patch:1.4
--- packages/dillo/dillo-ac.patch:1.3 Tue Mar 24 11:37:24 2009
+++ packages/dillo/dillo-ac.patch Wed Feb 24 01:30:06 2010
@@ -1,16 +1,15 @@
-diff -urN dillo-0.8.6/configure.in dillo-0.8.6.new/configure.in
---- dillo-0.8.6/configure.in 2006-04-26 18:05:29.000000000 +0200
-+++ dillo-0.8.6.new/configure.in 2008-07-10 18:35:01.000000000 +0200
-@@ -427,7 +427,11 @@
- AC_SUBST(LIBFLTK_CXXFLAGS)
+diff -burNp dillo-2.0/configure.in dillo-2.0-dud/configure.in
+--- dillo-2.0/configure.in 2008-10-10 22:37:17.000000000 +0200
++++ dillo-2.0-dud/configure.in 2009-03-24 10:43:37.021819865 +0100
+@@ -489,6 +489,11 @@ AC_SUBST(LIBFLTK_CFLAGS)
AC_SUBST(LIBFLTK_LIBS)
+ AC_SUBST(LIBICONV_LIBS)
AC_SUBST(datadir)
--AC_SUBST(src doc bin util lib)
+AC_SUBST(src)
+AC_SUBST(doc)
+AC_SUBST(bin)
+AC_SUBST(util)
+AC_SUBST(lib)
- AC_OUTPUT(Makefile dpip/Makefile dpid/Makefile dpi/Makefile doc/Makefile src/Makefile src/IO/Makefile)
+ AC_OUTPUT(Makefile dlib/Makefile dpip/Makefile dpid/Makefile dpi/Makefile doc/Makefile dw/Makefile lout/Makefile src/Makefile src/IO/Makefile test/Makefile)
================================================================
Index: packages/dillo/dillo-gzip_fallback.patch
diff -u packages/dillo/dillo-gzip_fallback.patch:1.10 packages/dillo/dillo-gzip_fallback.patch:1.11
--- packages/dillo/dillo-gzip_fallback.patch:1.10 Tue Mar 24 11:37:24 2009
+++ packages/dillo/dillo-gzip_fallback.patch Wed Feb 24 01:30:06 2010
@@ -1,6 +1,6 @@
-diff -urN dillo-0.8.6.orig/dpi/file.c dillo-0.8.6/dpi/file.c
---- dillo-0.8.6.orig/dpi/file.c 2006-04-11 19:50:23.000000000 +0200
-+++ dillo-0.8.6/dpi/file.c 2006-08-20 20:27:22.392356500 +0200
+diff -burNp dillo-2.0/dpi/file.c dillo-2.0-dud/dpi/file.c
+--- dillo-2.0/dpi/file.c 2008-09-30 17:43:43.000000000 +0200
++++ dillo-2.0-dud/dpi/file.c 2009-03-24 10:39:52.201842188 +0100
@@ -15,6 +15,7 @@
* With new HTML layout.
*/
@@ -9,70 +9,65 @@
#include <pthread.h>
#include <ctype.h> /* for tolower */
-@@ -33,6 +34,7 @@
- #include <time.h>
- #include <signal.h>
- #include <glib.h>
-+#include <zlib.h>
-
+@@ -36,6 +37,7 @@
#include "../dpip/dpip.h"
#include "dpiutil.h"
-@@ -73,7 +75,7 @@
+ #include "d_size.h"
++#include <zlib.h>
+
+ /*
+ * Debugging macros
+@@ -77,7 +79,7 @@ typedef struct {
/*
* Forward references
*/
-static const char *File_content_type(const char *filename);
+static const char *File_content_type(const char *filename, int *gzipped);
- static gint File_get_file(ClientInfo *Client,
- const gchar *filename,
- struct stat *sb,
-@@ -343,7 +345,7 @@
- } else if (finfo->mode & (S_IXUSR | S_IXGRP | S_IXOTH)) {
+ static int File_get_file(ClientInfo *Client,
+ const char *filename,
+ struct stat *sb,
+@@ -344,6 +346,7 @@ static void File_info2html(ClientInfo *C
filecont = "Executable";
} else {
-- filecont = File_content_type(finfo->full_path);
+ filecont = File_content_type(finfo->full_path);
+ filecont = File_content_type(finfo->full_path, NULL);
if (!filecont || !strcmp(filecont, "application/octet-stream"))
filecont = "unknown";
}
-@@ -468,13 +470,24 @@
+@@ -467,13 +470,21 @@ static void File_transfer_dir(ClientInfo
/*
* Return a content type based on the extension of the filename.
*/
-static const char *File_ext(const char *filename)
+static const char *File_ext(const char *filename, int *gzipped)
{
-- char *e;
+ char *e;
+ char *e, *e2;
- if ( !(e = strrchr(filename, '.')) )
+ if (!(e = strrchr(filename, '.')))
return NULL;
-+ if ((e > filename) && !strcasecmp(e+1, "gz") &&
-+ ((e2 = memrchr(filename, '.', e-filename)) != NULL)) {
++ if ((e > filename) && !strcasecmp(e+1, "gz") && ((e2 = memrchr(filename, '.', e-filename)) != NULL)) {
+ e2++;
-+ if (!strncasecmp(e2, "html.", 5) ||
-+ !strncasecmp(e2, "htm.", 4) ||
-+ !strncasecmp(e2, "shtml.", 6)) {
-+ if(gzipped != NULL)
-+ *gzipped = 1;
++ if (!strncasecmp(e2, "html.", 5) || !strncasecmp(e2, "htm.", 4) || !strncasecmp(e2, "shtml.", 6)) {
++ if(gzipped != NULL) *gzipped = 1;
+ return "text/html";
+ }
+ }
e++;
- if (!strcasecmp(e, "gif")) {
-@@ -497,7 +510,7 @@
+ if (!dStrcasecmp(e, "gif")) {
+@@ -496,7 +507,7 @@ static const char *File_ext(const char *
* Based on the extension, return the content_type for the file.
* (if there's no extension, analyze the data and try to figure it out)
*/
-static const char *File_content_type(const char *filename)
+static const char *File_content_type(const char *filename, int *gzipped)
{
- gint fd;
+ int fd;
struct stat sb;
-@@ -505,7 +518,7 @@
- gchar buf[256];
+@@ -504,7 +515,7 @@ static const char *File_content_type(con
+ char buf[256];
ssize_t buf_size;
- if (!(ct = File_ext(filename))) {
@@ -80,22 +75,23 @@
/* everything failed, let's analyze the data... */
if ((fd = open(filename, O_RDONLY | O_NONBLOCK)) != -1) {
if ((buf_size = read(fd, buf, 256)) == 256 ) {
-@@ -531,25 +544,39 @@
+@@ -530,28 +541,40 @@ static void File_get(ClientInfo *Client,
int res;
struct stat sb;
- char *msg = NULL, *d_cmd;
+ char *d_cmd;
+ char *tmp_filename = (char*)filename, *p;
+ Dstr *ds = NULL;
if (stat(filename, &sb) != 0) {
-+ char *e = strrchr(filename, '.');
-+ if ((e == NULL) || strcasecmp(e + 1, "gz")) {
-+ if ((p = malloc(strlen(filename) + 4)) != NULL) {
-+ tmp_filename = p;
-+ strcpy(tmp_filename, filename);
-+ strcat(tmp_filename, ".gz");
-+ filename = tmp_filename;
-+ }
-+ }
++ char *e = strrchr(filename, '.');
++ if ((e == NULL) || strcasecmp(e + 1, "gz")) {
++ if ((p = malloc(strlen(filename) + 4)) != NULL) {
++ tmp_filename = p;
++ strcpy(tmp_filename, filename);
++ strcat(tmp_filename, ".gz");
++ filename = tmp_filename;
++ }
++ }
+ }
+ if (stat(tmp_filename, &sb) != 0) {
/* stat failed, prepare a file-not-found error. */
@@ -111,79 +107,59 @@
}
if (res == FILE_NOT_FOUND) {
- msg = g_strdup_printf("%s Not Found: %s",
-- S_ISDIR(sb.st_mode) ? "Directory" : "File", filename);
-+ S_ISDIR(sb.st_mode) ? "Directory" : "File", tmp_filename);
+ ds = dStr_sized_new(128);
+- dStr_sprintf(ds, "%s Not Found: %s",
+- S_ISDIR(sb.st_mode) ? "Directory" : "File", filename);
++ dStr_sprintf(ds, "%s Not Found: %s", S_ISDIR(sb.st_mode) ? "Directory" : "File", tmp_filename);
} else if (res == FILE_NO_ACCESS) {
- msg = g_strdup_printf("Access denied to %s: %s",
-- S_ISDIR(sb.st_mode) ? "Directory" : "File", filename);
-+ S_ISDIR(sb.st_mode) ? "Directory" : "File", tmp_filename);
+ ds = dStr_sized_new(128);
+- dStr_sprintf(ds, "Access denied to %s: %s",
+- S_ISDIR(sb.st_mode) ? "Directory" : "File", filename);
++ dStr_sprintf(ds, "Access denied to %s: %s", S_ISDIR(sb.st_mode) ? "Directory" : "File", tmp_filename);
}
+ if(tmp_filename != filename)
-+ free(tmp_filename);
- if (msg) {
- d_cmd = a_Dpip_build_cmd("cmd=%s msg=%s", "send_status_message", msg);
- sock_handler_write_str(Client->sh, d_cmd, 1);
-@@ -596,6 +623,8 @@
- const gchar *ct;
- char buf[LBUF], *d_cmd;
- gint fd, st;
++ free(tmp_filename);
+ if (ds) {
+ d_cmd = a_Dpip_build_cmd("cmd=%s msg=%s","send_status_message",ds->str);
+ sock_handler_write_str(Client->sh, 1, d_cmd);
+@@ -599,7 +622,8 @@ static int File_get_file(ClientInfo *Cli
+ const char *unknown_type = "application/octet-stream";
+ char buf[LBUF], *d_cmd, *name;
+ int fd, st, namelen;
+- bool_t gzipped = FALSE;
+ int gzipped = 0;
+ gzFile gzdata;
- if ( (fd = open(filename, O_RDONLY | O_NONBLOCK)) < 0)
+ if ((fd = open(filename, O_RDONLY | O_NONBLOCK)) < 0)
return FILE_NO_ACCESS;
-@@ -604,7 +633,7 @@
- * known extension, then we do data sniffing. If this doesn't lead
- * to a conclusion, "application/octet-stream" is sent.
- */
-- if (!(ct = File_content_type(filename)))
-+ ct = File_content_type(filename, &gzipped);
- ct = "application/octet-stream";
-
- /* Send DPI command */
-@@ -612,6 +641,24 @@
- sock_handler_write_str(Client->sh, d_cmd, 1);
- g_free(d_cmd);
-
-+ if (gzipped) {
-+ /* Send HTTP stream */
-+ sock_handler_printf(Client->sh, 0,
-+ "Content-Type: %s\n\n", ct);
-+
-+ gzdata = gzdopen(fd, "r");
-+ do {
-+ if ((st = gzread(gzdata, buf, LBUF)) > 0) {
-+ if (sock_handler_write(Client->sh, buf, st, 0) != 0)
-+ break;
-+ } else if (st < 0) {
-+ perror("[read]");
-+ if (errno == EINTR || errno == EAGAIN)
-+ continue;
-+ }
-+ } while (st > 0);
-+ gzclose(gzdata);
-+ } else {
- /* Send HTTP stream */
- sock_handler_printf(Client->sh, 0,
- "Content-Type: %s\n"
-@@ -629,6 +676,7 @@
- continue;
- }
- } while (st > 0);
-+ }
-
- /* todo: It may be better to send an error report to dillo instead of
- * calling abort from g_error() */
-diff -urN dillo-0.8.6.orig/dpi/Makefile.am dillo-0.8.6/dpi/Makefile.am
---- dillo-0.8.6.orig/dpi/Makefile.am 2006-01-03 21:16:10.000000000 +0100
-+++ dillo-0.8.6/dpi/Makefile.am 2006-08-20 20:10:16.412236750 +0200
-@@ -27,7 +27,7 @@
- ftp_filter_dpi_LDADD = @GLIB_LIBS@ ../dpip/libDpip.a
- https_filter_dpi_LDADD = @GLIB_LIBS@ @LIBSSL_LIBS@ ../dpip/libDpip.a
- hello_filter_dpi_LDADD = @GLIB_LIBS@ ../dpip/libDpip.a
--file_dpi_LDADD = @GLIB_LIBS@ @LIBPTHREAD_LIBS@ ../dpip/libDpip.a
+@@ -628,6 +652,18 @@ static int File_get_file(ClientInfo *Cli
+ /* Send HTTP headers */
+ if (gzipped) {
+ sock_handler_write_str(Client->sh, 0, "Content-Encoding: gzip\n");
++ gzdata = gzdopen(fd, "r");
++ do {
++ if ((st = gzread(gzdata, buf, LBUF)) > 0) {
++ if (sock_handler_write(Client->sh, buf, st, 0) != 0)
++ break;
++ } else if (st < 0) {
++ perror("[read]");
++ if (errno == EINTR || errno == EAGAIN)
++ continue;
++ }
++ } while (st > 0);
++ gzclose(gzdata);
+ }
+ if (!gzipped || strcmp(ct, unknown_type)) {
+ sock_handler_printf(Client->sh, 0, "Content-Type: %s\n", ct);
+diff -burNp dillo-2.0/dpi/Makefile.am dillo-2.0-dud/dpi/Makefile.am
+--- dillo-2.0/dpi/Makefile.am 2008-04-26 23:29:10.000000000 +0200
++++ dillo-2.0-dud/dpi/Makefile.am 2009-03-24 10:40:40.881837317 +0100
+@@ -20,7 +20,7 @@ downloads_dpi_LDADD = @LIBFLTK_LIBS@ ../
+ ftp_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
+ https_filter_dpi_LDADD = @LIBSSL_LIBS@ ../dpip/libDpip.a ../dlib/libDlib.a
+ hello_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
+-file_dpi_LDADD = @LIBPTHREAD_LIBS@ ../dpip/libDpip.a ../dlib/libDlib.a
+file_dpi_LDADD = @GLIB_LIBS@ @LIBPTHREAD_LIBS@ ../dpip/libDpip.a -lz
- cookies_dpi_LDADD = @GLIB_LIBS@ ../dpip/libDpip.a
- datauri_filter_dpi_LDADD = @GLIB_LIBS@ ../dpip/libDpip.a
+ cookies_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
+ datauri_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
================================================================
Index: packages/dillo/dillo.spec
diff -u packages/dillo/dillo.spec:1.61 packages/dillo/dillo.spec:1.62
--- packages/dillo/dillo.spec:1.61 Mon Feb 22 18:46:19 2010
+++ packages/dillo/dillo.spec Wed Feb 24 01:30:06 2010
@@ -1,6 +1,6 @@
# $Revision$, $Date$
# TODO gettext support
-Summary: DILLO - The GTK+ Web Browser
+Summary: DILLO - The FLTK2 Web Browser
Summary(pl.UTF-8): DILLO - przeglądarka WWW
Name: dillo
Version: 2.2
@@ -11,38 +11,37 @@
# Source0-md5: f8bcd62093f178bed81e46cc54e73f42
Source1: %{name}.desktop
Source2: %{name}.png
+# needs a review, disabled for now
Patch0: %{name}-gzip_fallback.patch
-Patch1: %{name}-0.7.0-alt-asp-charset-encodings-sysconfdir.patch
-Patch2: %{name}-ac.patch
-Patch3: %{name}-libpng.patch
+Patch1: %{name}-ac.patch
URL: http://www.dillo.org/
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: fltk-devel
-BuildRequires: gtk+-devel >= 1.2.0
+# dillo 2.x needs fltk2 to work, be careful with it since its status is
+# experimental
+BuildRequires: fltk2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel >= 1.0.9
+BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/dillo
%description
-Dillo is a small GTK+ based (GNOME is NOT required!) web browser.
+Dillo 2.x is a small FLTK2 based (GNOME is NOT required!) web browser.
Dillo aims to be a multi-platform browser alternative that's small,
stable, developer-friendly, usable, fast, and extensible.
%description -l pl.UTF-8
-Dillo jest małą, opartą na bibliotece GTK+ (GNOME nie jest wymagany)
+Dillo 2.x jest małą, opartą na bibliotece FLTK2 (GNOME nie jest wymagany)
przeglądarką WWW. Dillo ma być wieloplatformową alternatywną
przeglądarką, która jest mała, stabilna, przyjazna dla developerów,
użyteczna, szybka i rozszerzalna.
%prep
%setup -q
-#patch0 -p1
-#patch1 -p1
-#patch2 -p1
-%patch3 -p1
+#%%patch0 -p1
+%patch1 -p1
%build
%{__aclocal}
@@ -50,8 +49,7 @@
%{__automake}
%configure \
--enable-cookies \
- --enable-ipv6 \
- --disable-dlgui
+ --enable-ipv6
%{__make}
%install
@@ -63,7 +61,6 @@
install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
-install encodings $RPM_BUILD_ROOT%{_sysconfdir}
#%%find_lang %{name}
@@ -73,7 +70,7 @@
#%%files -f %{name}.lang
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog dillorc encodings doc/{*.txt,README}
+%doc AUTHORS ChangeLog dillorc NEWS README
%attr(755,root,root) %{_bindir}/*
%{_desktopdir}/*.desktop
%{_pixmapsdir}/*
@@ -88,6 +85,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.62 2010/02/24 00:30:06 sls
+- merge from DEVEL
+
Revision 1.61 2010/02/22 17:46:19 sls
- ver. 2.2 (NFY)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dillo/dillo-ac.patch?r1=1.3&r2=1.4&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dillo/dillo-gzip_fallback.patch?r1=1.10&r2=1.11&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dillo/dillo.spec?r1=1.61&r2=1.62&f=u
More information about the pld-cvs-commit
mailing list