]> git.pld-linux.org Git - packages/XmHTML.git/commitdiff
- new URLs, updated to 1.1.10 auto/th/XmHTML-1.1.10-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 13 May 2018 19:37:30 +0000 (21:37 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 13 May 2018 19:37:30 +0000 (21:37 +0200)
- updated and enhanced am patch (drop hacks from .spec)
- removed obsolete libpng,format-security patches
- added build patch (fix Motif build)
- added xft patch, enable Xft by default

XmHTML-am.patch
XmHTML-build.patch [new file with mode: 0644]
XmHTML-libpng.patch [deleted file]
XmHTML-macro.patch [deleted file]
XmHTML-xft.patch [new file with mode: 0644]
XmHTML.spec
format-security.patch [deleted file]

index c9bedea548c598dd4968668ee56a7de2b84a1ebb..0280a0eb37588020954fdfcf18cd673287366372 100644 (file)
@@ -40,7 +40,7 @@ diff -Nur XmHTML-1.1.7.orig/configure.in XmHTML-1.1.7/configure.in
  dnl
  
 -AC_OUTPUT(Makefile
-+AC_OUTPUT(
++AC_OUTPUT(Makefile
 -book/Makefile
 -contrib/Makefile
 -examples/Makefile
@@ -54,36 +54,50 @@ diff -Nur XmHTML-1.1.7.orig/configure.in XmHTML-1.1.7/configure.in
  )
  
  dnl
-diff -Nur XmHTML-1.1.7.orig/include/config.h.in XmHTML-1.1.7/include/config.h.in
---- XmHTML-1.1.7.orig/include/config.h.in      Wed Feb  3 17:18:32 1999
-+++ XmHTML-1.1.7/include/config.h.in   Sat Mar 17 22:56:34 2001
-@@ -66,7 +66,9 @@
- #undef TIME_WITH_SYS_TIME
- /* LessTif & automake/autoconf */
-+#if 0
- #undef VERSION
-+#endif
- #undef WITH_DMALLOC
-diff -Nur XmHTML-1.1.7.orig/lib/Makefile.am XmHTML-1.1.7/lib/Makefile.am
---- XmHTML-1.1.7.orig/lib/Makefile.am  Wed Feb  3 17:26:57 1999
-+++ XmHTML-1.1.7/lib/Makefile.am       Sat Mar 17 22:55:03 2001
-@@ -7,14 +7,14 @@
+--- XmHTML-1.1.10/lib/Makefile.am.orig 2015-10-26 11:22:55.111545877 +0100
++++ XmHTML-1.1.10/lib/Makefile.am      2018-05-13 11:22:53.264190849 +0200
+@@ -7,14 +7,29 @@
  
  lib_LTLIBRARIES=libXmHTML.la
  
 -libXmHTML_la_LDFLAGS=
-+libXmHTML_la_LDFLAGS=-L/usr/X11R6/lib -lXm -lX11 -lXext -lXt -lXpm -ljpeg -lpng -lz
- libXmHTML_la_SOURCES= \
-       XmHTML.c Balloon.c XmImage.c fonts.c callbacks.c events.c frames.c \
-       forms.c StringUtil.c parse.c format.c layout.c paint.c colors.c \
-       images.c readBitmap.c readFLG.c readGIF.c readGIFplc.c readXPM.c \
-       readJPEG.c readJPEGplc.c readPNG.c map.c XCC.c quantize.c \
-       LZWStream.c plc.c error.c strings.c textsel.c output.c motif.c \
+-libXmHTML_la_SOURCES= \
+-      XmHTML.c Balloon.c XmImage.c fonts.c callbacks.c events.c frames.c \
+-      forms.c StringUtil.c parse.c format.c layout.c paint.c colors.c \
+-      images.c readBitmap.c readFLG.c readGIF.c readGIFplc.c readXPM.c \
+-      readJPEG.c readJPEGplc.c readPNG.c map.c XCC.c quantize.c \
+-      LZWStream.c plc.c error.c strings.c textsel.c output.c motif.c \
 -      public.c warnings.c private.c stack.c
-+      public.c warnings.c private.c stack.c psoutput.c
++libXmHTML_la_LIBADD=-lXm -lX11 -lXext -lXt -lXpm -ljpeg -lpng -lz
++# COMMONSRCS from common/Makefile (with common/ prefix)
++common_srcs= \
++      common/events.c common/hash.c common/stack.c common/format.c common/fonts.c common/paint.c common/readXPM.c \
++      common/readJPEGplc.c common/quantize.c common/colors.c common/private.c common/readBitmap.c common/public.c \
++      common/readPNG.c common/readGIFplc.c common/readGIF.c common/error.c common/callbacks.c common/StringUtil.c \
++      common/images.c common/readFLG.c common/readJPEG.c common/parse.c common/map.c common/layout.c common/LZWStream.c \
++      common/psoutput.c
++# MOTIFSRCS from Motif/Makefile (with Motif/ prefix)
++motif_srcs= \
++      Motif/motif.c Motif/XmHTML.c Motif/output.c Motif/XmImage.c Motif/plc.c Motif/frames.c Motif/textsel.c \
++      Motif/forms.c Motif/XCC.c Motif/Balloon.c Motif/warnings.c Motif/strings.c
++      XmHTML.c Balloon.c XmImage.c fonts.c callbacks.c events.c frames.c
++libXmHTML_la_SOURCES= $(common_srcs) $(motif_srcs)
++common_hdrs= \
++      ../include/common/LZWStream.h
++motif_hdrs= \
++      ../include/XmHTML/Balloon.h \
++      ../include/XmHTML/HTML.h \
++      ../include/XmHTML/HTMLStrings.h \
++      ../include/XmHTML/XCC.h \
++      ../include/XmHTML/XmHTML.h
++pkginclude_HEADERS = $(common_hdrs) $(motif_hdrs)
  
  if NLIBJPEG
  JPEGINC =
+@@ -36,5 +51,5 @@
+ IMAGEINC= $(JPEGINC) $(PNGINC) $(ZLIBINC)
+-INCLUDES= -I$(top_srcdir)/include ${X_CFLAGS} -I@motif_includes@ $(IMAGEINC)
++INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/include/XmHTML -I$(top_srcdir)/include/common ${X_CFLAGS} -I@motif_includes@ $(IMAGEINC)
diff --git a/XmHTML-build.patch b/XmHTML-build.patch
new file mode 100644 (file)
index 0000000..8275000
--- /dev/null
@@ -0,0 +1,64 @@
+--- XmHTML-1.1.10/lib/Motif/XCC.c.orig 2015-10-26 11:22:55.113545877 +0100
++++ XmHTML-1.1.10/lib/Motif/XCC.c      2018-05-13 21:33:04.770439480 +0200
+@@ -124,6 +124,9 @@
+ #include <X11/Xatom.h>
+ #include <X11/Intrinsic.h>
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
+ #ifdef DMALLOC
+ #include "dmalloc.h"
+ #endif
+@@ -131,6 +134,10 @@
+ #include "toolkit.h"
+ #include XmHTMLPrivateHeader
+ #include "XCCP.h"
++#include "XmHTMLconf.h"
++#include "debug.h"
++
++#define MEMBER_CLASS class
+ /*** External Function Prototype Declarations ***/
+@@ -360,7 +367,9 @@
+ {
+       XColor color;
++#ifdef DEBUG
+       _XmHTMLWarning(__WFUNC__(NULL, "_initBW"), XMHTML_MSG_5);
++#endif
+       _xcc->mode = MODE_BW;
+@@ -731,7 +740,9 @@
+                       ((xcc->visual != DefaultVisual(_dpy, DefaultScreen(_dpy))) &&
+                       _colormap == DefaultColormap(_dpy, DefaultScreen(_dpy))))
+               {
++#ifdef DEBUG
+                       _XmHTMLWarning(__WFUNC__(w, "XCCCreate"), XMHTML_MSG_6);
++#endif
+                       xcc->colormap = XCreateColormap(_dpy, 
+                                       RootWindow(_dpy, DefaultScreen(_dpy)), xcc->visual, 
+                                       AllocNone);
+@@ -1455,7 +1466,9 @@
+       /* see if the colormap has any colors to read */
+       if(cmapsize < 1)
+       {
++#ifdef DEBUG
+               _XmHTMLWarning(__WFUNC__(NULL, "XCCGetPixels"), XMHTML_MSG_7);
++#endif
+               return;
+       }
+ #ifdef DEBUG
+@@ -1711,8 +1724,10 @@
+       if(cmapsize < 0)
+       {
++#ifdef DEBUG
+               _XmHTMLWarning(__WFUNC__(NULL, "XCCGetPixelsIncremental"),
+                       XMHTML_MSG_7);
++#endif
+               return;
+       }
+ #ifdef DEBUG
diff --git a/XmHTML-libpng.patch b/XmHTML-libpng.patch
deleted file mode 100644 (file)
index 1b7d7aa..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
---- XmHTML-1.1.7/lib/common/readPNG.c.orig     1998-11-16 23:56:19.000000000 +0100
-+++ XmHTML-1.1.7/lib/common/readPNG.c  2012-02-12 17:27:36.741501024 +0100
-@@ -132,7 +132,7 @@
-       _XmHTMLWarning(__WFUNC__(NULL, "png_error"), XMHTML_MSG_121, "png",
-               ib->file, msg);
--      longjmp(png_ptr->jmpbuf, 1);
-+      longjmp(png_jmpbuf(png_ptr), 1);
- }
- /*****
-@@ -184,9 +184,11 @@
-       int i, idx, npass;
-       int width, height, color_type;
-       int ncolors, max_colors;
--      float gamma, fg_gamma;
-+      float gamma;
-+      double fg_gamma;
-       Boolean has_alpha = False, has_cmap = False, do_gamma = True;
-       png_bytep *row_ptrs;
-+      png_colorp palette;
-       char msg[128];
-       static XmHTMLRawImageData *img_data;
-@@ -232,7 +234,7 @@
-               return((XmHTMLRawImageData*)NULL);
-       }
-       /* now set error handler */
--      if(setjmp(png_ptr->jmpbuf))
-+      if(setjmp(png_jmpbuf(png_ptr)))
-       {
-               /* 
-               * PNG signalled an error. Destroy image data, free any allocated
-@@ -265,17 +267,18 @@
-       ResetRawImage(img_data);
-       /* save width & height */
--      width  = img_data->width  = info_ptr->width;
--      height = img_data->height = info_ptr->height;
-+      width  = img_data->width  = png_get_image_width(png_ptr, info_ptr);
-+      height = img_data->height = png_get_image_height(png_ptr, info_ptr);
-       /* image depth */
--      ib->depth = info_ptr->bit_depth;
-+      ib->depth = png_get_bit_depth(png_ptr, info_ptr);
-       /* no of colors */
--      ncolors = img_data->cmapsize = info_ptr->num_palette;
-+      png_get_PLTE(png_ptr, info_ptr, &palette, &ncolors);
-+      img_data->cmapsize = ncolors;
-       /* type of image */
--      color_type = info_ptr->color_type;
-+      color_type = png_get_color_type(png_ptr, info_ptr);
-       /*
-       * The fun stuff. This is based on readPNG by Greg Roelofs as found
-@@ -306,7 +309,7 @@
-                       * Actual image creation is postponed until the image is
-                       * needed.
-                       */
--                      if(info_ptr->valid & PNG_INFO_tRNS)
-+                      if(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-                       {
-                               _XmHTMLDebug(15, ("readPNG.c: tRNS chunk present\n"));
-                               png_set_expand(png_ptr);
-@@ -319,9 +322,9 @@
-                               AllocRawImageCmap(img_data, ncolors);
-                               for(i = 0; i < ncolors; i++)
-                               {
--                                      GETR(img_data->cmap[i]) = info_ptr->palette[i].red;
--                                      GETG(img_data->cmap[i]) = info_ptr->palette[i].green;
--                                      GETB(img_data->cmap[i]) = info_ptr->palette[i].blue;
-+                                      GETR(img_data->cmap[i]) = palette[i].red;
-+                                      GETG(img_data->cmap[i]) = palette[i].green;
-+                                      GETB(img_data->cmap[i]) = palette[i].blue;
-                               }
-                               has_cmap = True;
-                               data = (Byte*)malloc(width*height*sizeof(Byte));
-@@ -355,7 +358,7 @@
-                       * grayscale with transparency is expanded to RGB with alpha
-                       * channel.
-                       */
--                      if(info_ptr->valid & PNG_INFO_tRNS)
-+                      if(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-                       {
-                               _XmHTMLDebug(15, ("readPNG.c: tRNS chunk present\n"));
-                               png_set_gray_to_rgb(png_ptr);
-@@ -434,7 +437,7 @@
-                       break;
-               default:
-                       sprintf(msg, "bad PNG image: unknown color type (%d)",
--                              info_ptr->color_type);
-+                              png_get_color_type(png_ptr, info_ptr));
-                       my_png_error(png_ptr, msg);
-                       break;
-       }
-@@ -444,15 +447,17 @@
-       * Doing that for alpha channel images would change the colortype of the
-       * current image, leading to weird results.
-       */
--      if(!has_alpha && info_ptr->valid & PNG_INFO_bKGD)
-+      if(!has_alpha && png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD))
-       {
--              png_set_background(png_ptr, &(info_ptr->background),
-+              png_color_16p background;
-+              png_get_bKGD(png_ptr, info_ptr, &background);
-+              png_set_background(png_ptr, background,
-                       PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
--              img_data->bg = info_ptr->background.index;
-+              img_data->bg = background->index;
-       }
-       /* handle gamma correction */
--      if(info_ptr->valid & PNG_INFO_gAMA)
--              fg_gamma = info_ptr->gamma;
-+      if(png_get_valid(png_ptr, info_ptr, PNG_INFO_gAMA))
-+              png_get_gAMA(png_ptr, info_ptr, &fg_gamma);
-       else
-               fg_gamma = 0.45;
-@@ -464,20 +469,20 @@
-       /* dithering gets handled by caller */
-       /* one byte per pixel */
--      if(info_ptr->bit_depth < 8)
-+      if(png_get_bit_depth(png_ptr, info_ptr) < 8)
-               png_set_packing(png_ptr);
-       /* no tRNS chunk handling, we've expanded it to an alpha channel. */
-       /* handle interlacing */
--      if(info_ptr->interlace_type)
-+      if(png_get_interlace_type(png_ptr, info_ptr))
-               npass = png_set_interlace_handling(png_ptr);
-       /* and now update everything */
-       png_read_update_info(png_ptr, info_ptr);
-       /* has possibly changed if we have promoted GrayScale or tRNS chunks */
--      color_type = info_ptr->color_type;
-+      color_type = png_get_color_type(png_ptr, info_ptr);
-       /* new color_type? */
-       if(color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-@@ -497,10 +502,10 @@
-               * will call doAlphaChannel to do the actual image creation. 
-               */
-               row_ptrs = (png_bytep*)malloc(height*sizeof(png_bytep));
--              png_data = (png_bytep)malloc(height*info_ptr->rowbytes);
-+              png_data = (png_bytep)malloc(height*png_get_rowbytes(png_ptr, info_ptr));
-               for(i = 0; i < height; i++)
--                      row_ptrs[i] = (png_bytep)png_data + i*info_ptr->rowbytes;
-+                      row_ptrs[i] = (png_bytep)png_data + i*png_get_rowbytes(png_ptr, info_ptr);
-               /* read it */
-               png_read_image(png_ptr, row_ptrs);
-@@ -529,7 +534,7 @@
-       row_ptrs = (png_bytep*)malloc(height*sizeof(png_bytep));
-       for(i = 0; i < height; ++i)
--              row_ptrs[i] = (png_bytep)data + i*info_ptr->rowbytes;
-+              row_ptrs[i] = (png_bytep)data + i*png_get_rowbytes(png_ptr, info_ptr);
-       /* read it */
-       png_read_image(png_ptr, row_ptrs);
diff --git a/XmHTML-macro.patch b/XmHTML-macro.patch
deleted file mode 100644 (file)
index cf56e6e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- XmHTML-1.1.7/include/XmHTML/resources.h.orig       Sun Dec 13 13:48:46 1998
-+++ XmHTML-1.1.7/include/XmHTML/resources.h    Sat Mar 17 23:51:28 2001
-@@ -329,7 +329,7 @@
-               XmNscreenGamma,
-               XmCScreenGamma, XmRFloat,
-               sizeof(float), Offset(screen_gamma),
--              XmRString, Stringify(XmHTML_DEFAULT_GAMMA)
-+              XmRString, "2.2"
-       },
-       {
-               XmNimageProc,
diff --git a/XmHTML-xft.patch b/XmHTML-xft.patch
new file mode 100644 (file)
index 0000000..36a9322
--- /dev/null
@@ -0,0 +1,15 @@
+--- XmHTML-1.1.10/configure.in.orig    2018-05-13 18:51:13.253883702 +0200
++++ XmHTML-1.1.10/configure.in 2018-05-13 20:49:17.563802811 +0200
+@@ -770,6 +770,12 @@
+ AC_PATH_PNG
+ AC_PATH_ZLIB
++AC_ARG_WITH(xft, [  --with-xft              enable Xft usage])
++if test "x$with_xft" = xyes; then
++      PKG_CHECK_MODULES([XFT], [xft])
++      AC_DEFINE([HAVE_XFT], [1], [Have Xft library])
++fi
++
+ AM_CONDITIONAL(NLIBJPEG, test "x$no_jpeg" = xyes)
+ AM_CONDITIONAL(NLIBPNG, test "x$no_png" = xyes)
+ AM_CONDITIONAL(NLIBZ, test "x$no_zlib" = xyes)
index 66793d0a929baa06452f8741d58dfe51d81c34a8..ac3aa9de7c16cad8d58e8bdc415454e25ab88418 100644 (file)
@@ -1,23 +1,30 @@
+# Note: upstream automake stuff is outdated, imake stuff outdated even more,
+# plain Makefiles not outdated but messy.
+# Use automake with some patches.
+#
+# Conditional build:
+%bcond_without xft     # Xft support
+
 Summary:       Motif HTML widget
 Summary(pl.UTF-8):     Widget do HTML-a oparty o Motif
 Name:          XmHTML
-Version:       1.1.7
-Release:       15
+Version:       1.1.10
+Release:       1
 License:       LGPL v2+
 Group:         X11/Libraries
-Source0:       http://www.xs4all.nl/~ripley/XmHTML/dist/%{name}-%{version}.tar.gz
-# Source0-md5: 6d079435fb954bb7878f4dd0d3f7b8d8
+Source0:       http://downloads.sourceforge.net/xmhtml/%{name}-%{version}.tgz
+# Source0-md5: fd339d59d020da2ccf6e92bf65b810e2
 Patch0:                %{name}-am.patch
-Patch1:                %{name}-macro.patch
-Patch2:                %{name}-libpng.patch
-Patch3:                format-security.patch
-URL:           http://www.xs4all.nl/~ripley/XmHTML/
+Patch1:                %{name}-build.patch
+Patch2:                %{name}-xft.patch
+URL:           https://sourceforge.net/projects/xmhtml/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
 BuildRequires: libtool
 BuildRequires: motif-devel >= 1.2
+%{?with_xft:BuildRequires:     xorg-lib-libXft-devel}
 BuildRequires: xorg-lib-libXmu-devel
 BuildRequires: xorg-lib-libXpm-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -37,6 +44,7 @@ Requires:     %{name} = %{version}-%{release}
 Requires:      libjpeg-devel
 Requires:      libpng-devel
 Requires:      motif-devel >= 1.2
+%{?with_xft:Requires:  xorg-lib-libXft-devel}
 
 %description devel
 Headers needed to compile XmHTML programs.
@@ -62,41 +70,25 @@ Statyczna wersja biblioteki XmHTML.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
-# Argh! automake stuff outdated, imake stuff outdated even more,
-# makefiles not outdated but don't support shared libraries :/
-# Use automake with some patches/workarounds/etc
-cd lib
-mv -f common/*.c .
-mv -f Motif/*.c .
-cd ..
 
 %build
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__automake}
-CFLAGS="%{rpmcflags} \
-       -I`pwd`/include/XmHTML -I`pwd`/include/common \
-       %{!?debug:-DNDEBUG -Dproduction} -DVERSION=1107"
+%{!?debug:CPPFLAGS="%{rpmcppflags} -DNDEBUG -Dproduction"}
 %configure \
-       LIBS="-lm"
+       %{?with_xft:--with-xft}
 
-cd lib
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_includedir}/XmHTML
 
-%{__make} install -C lib \
+%{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install include/XmHTML/{Balloon,HTML,HTMLStrings,XCC,XmHTML}.h \
-       include/common/LZWStream.h \
-       $RPM_BUILD_ROOT%{_includedir}/XmHTML
-
-rm -f html/man/man.{map,tmpl}
+%{__rm} html/man/man.{map,tmpl}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -106,8 +98,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc APPS BUG-REPORTING CHANGES DEBUGGING FEEDBACK FIXES
-%doc README THANKS TODO docs/{QUOTES,README.*,REASONS,progressive.txt}
+%doc APPS BUG-REPORTING CHANGES Changelog.txt DEBUGGING FEEDBACK FIXES LICENSE README THANKS TODO docs/{QUOTES,README.*,REASONS,progressive.txt}
 %attr(755,root,root) %{_libdir}/libXmHTML.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libXmHTML.so.0
 
diff --git a/format-security.patch b/format-security.patch
deleted file mode 100644 (file)
index ea269df..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- XmHTML-1.1.7/lib/common/parse.c.orig       1999-01-20 06:13:08.000000000 +0100
-+++ XmHTML-1.1.7/lib/common/parse.c    2013-11-06 22:11:19.395801941 +0100
-@@ -1935,7 +1935,7 @@
-                       sprintf(msg, XMHTML_MSG_128, html_tokens[id], html_tokens[current]);
-                       break;
-               case HTML_INTERNAL:
--                      sprintf(msg, XMHTML_MSG_129);
-+                      sprintf(msg, "%s", XMHTML_MSG_129);
-                       break;
-               case HTML_NOTIFY:       /* not reached */
-                       return;
This page took 0.077349 seconds and 4 git commands to generate.