<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[137432] trunk/dports/graphics/gtksee</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/137432">137432</a></dd>
<dt>Author</dt> <dd>ryandesign@macports.org</dd>
<dt>Date</dt> <dd>2015-06-10 22:51:31 -0700 (Wed, 10 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>gtksee: add dependencies; add patch to build with libpng 1.5+ (#48011); revbump for libpng update; build with the right -arch flags; update homepage and master_sites to mirrors; disable livecheck because this is ancient</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsgtkseePortfile">trunk/dports/graphics/gtksee/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/graphics/gtksee/files/</li>
<li><a href="#trunkdportsgraphicsgtkseefilespatchlibpng15diff">trunk/dports/graphics/gtksee/files/patch-libpng-1.5.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsgtkseePortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/gtksee/Portfile (137431 => 137432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gtksee/Portfile        2015-06-11 05:35:09 UTC (rev 137431)
+++ trunk/dports/graphics/gtksee/Portfile        2015-06-11 05:51:31 UTC (rev 137432)
</span><span class="lines">@@ -4,16 +4,37 @@
</span><span class="cx"> 
</span><span class="cx"> name                gtksee
</span><span class="cx"> version                0.6.0b-1
</span><ins>+revision            1
</ins><span class="cx"> description        A simple image viewer based on GTK+ 1.2.x and running on X Window System.
</span><span class="cx"> long_description        ${description}
</span><span class="cx"> maintainers        nomaintainer
</span><span class="cx"> categories        graphics x11
</span><span class="cx"> license                GPL-2+
</span><span class="cx"> platforms        darwin
</span><del>-homepage        http://gtksee.berlios.de/
-master_sites        http://download.berlios.de/gtksee/
</del><ins>+
+homepage            https://web.archive.org/web/20140406223707/http://gtksee.berlios.de/
+master_sites        sourceforge:gtksee.berlios
+
</ins><span class="cx"> checksums        md5 faf4196ea38df0da93d9f403c03883a3
</span><del>-depends_lib        lib:libgtk.1:gtk1
</del><ins>+
+depends_lib         port:gettext \
+                    port:glib1 \
+                    port:gtk1 \
+                    port:jpeg \
+                    port:libpng \
+                    port:tiff \
+                    port:xorg-libX11 \
+                    port:xorg-libXext \
+                    port:zlib \
+
+patchfiles          patch-libpng-1.5.diff
+
+variant universal {}
+
</ins><span class="cx"> configure.args        --mandir=${prefix}/share/man
</span><del>-configure.cppflags-append &quot;-L${prefix}/lib&quot;
</del><ins>+
+build.args          CC=&quot;${configure.cc} [get_canonical_archflags cc]&quot;
+
</ins><span class="cx"> destroot.destdir    prefix=${destroot}${prefix}
</span><ins>+
+livecheck.type      none
</ins></span></pre></div>
<a id="trunkdportsgraphicsgtkseefilespatchlibpng15diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gtksee/files/patch-libpng-1.5.diff (0 => 137432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gtksee/files/patch-libpng-1.5.diff                                (rev 0)
+++ trunk/dports/graphics/gtksee/files/patch-libpng-1.5.diff        2015-06-11 05:51:31 UTC (rev 137432)
</span><span class="lines">@@ -0,0 +1,145 @@
</span><ins>+Fix build with libpng 1.5+
+--- src/detect.c.orig        2004-11-02 21:13:13.000000000 -0600
++++ src/detect.c        2015-06-11 00:22:38.000000000 -0500
+@@ -123,14 +123,16 @@
+ detect_png(guchar *filename, ImageInfo *info)
+ {
+ #ifdef HAVE_LIBPNG
+-   png_info pnginfo;
++   gint width;
++   gint height;
++   png_byte color_type;

+-   if (png_get_header(filename, &amp;pnginfo))
++   if (png_get_header(filename, &amp;width, &amp;height, &amp;color_type))
+    {
+       info-&gt;type = PNG;
+-      info-&gt;width = pnginfo.width;
+-      info-&gt;height = pnginfo.height;
+-      switch (pnginfo.color_type)
++      info-&gt;width = width;
++      info-&gt;height = height;
++      switch (color_type)
+       {
+          case PNG_COLOR_TYPE_RGB :
+             info-&gt;ncolors = 24;
+--- src/im_png.c.orig        2004-02-14 09:16:33.000000000 -0600
++++ src/im_png.c        2015-06-11 00:22:38.000000000 -0500
+@@ -55,7 +55,7 @@
+  */

+ gboolean
+-png_get_header(gchar *filename, png_info *info)
++png_get_header(gchar *filename, gint *width, gint *height, png_bytep color_type)
+ {
+    png_struct  *pp;
+    png_info    *linfo;
+@@ -99,10 +99,9 @@
+    png_init_io(pp, fp);
+    png_read_info(pp, linfo);

+-   info-&gt;width       = linfo-&gt;width;
+-   info-&gt;height      = linfo-&gt;height;
+-   info-&gt;valid       = linfo-&gt;valid;
+-   info-&gt;color_type  = linfo-&gt;color_type;
++   *width       = png_get_image_width(pp, linfo);
++   *height      = png_get_image_height(pp, linfo);
++   *color_type  = png_get_color_type(pp, linfo);

+    g_free(linfo);
+    g_free(pp);
+@@ -161,26 +160,30 @@
+    png_init_io(pp, fp);
+    png_read_info(pp, info);

+-   if (info-&gt;bit_depth &lt; 8)
++   if (png_get_bit_depth(pp, info) &lt; 8)
+    {
+       png_set_packing(pp);
+       png_set_expand(pp);

+-      if (info-&gt;valid &amp; PNG_INFO_sBIT)
+-         png_set_shift(pp, &amp;(info-&gt;sig_bit));
++      if (png_get_valid(pp, info, PNG_INFO_sBIT)) {
++         png_color_8p sig_bit;
++         png_get_sBIT(pp, info, &amp;sig_bit);
++
++         png_set_shift(pp, sig_bit);
++      }
+    } else
+-   if (info-&gt;bit_depth == 16)
++   if (png_get_bit_depth(pp, info) == 16)
+       png_set_strip_16(pp);

+    /*
+     * Turn on interlace handling...
+     */
+-   if (info-&gt;interlace_type)
++   if (png_get_interlace_type(pp, info))
+       num_passes = png_set_interlace_handling(pp);
+    else
+       num_passes = 1;

+-   switch (info-&gt;color_type)
++   switch (png_get_color_type(pp, info))
+    {
+       case PNG_COLOR_TYPE_RGB :           /* RGB */
+          bpp = 3;
+@@ -195,22 +198,30 @@
+          bpp = 2;
+          break;
+       case PNG_COLOR_TYPE_PALETTE :       /* Indexed */
+-         bpp = info-&gt;num_trans ? 4:3;
++         {
++           png_bytep trans_alpha;
++           int num_trans;
++           png_color_16p trans_color;
++
++           png_get_tRNS(pp, info, &amp;trans_alpha, &amp;num_trans, &amp;trans_color);
++
++           bpp = num_trans ? 4:3;
++         }
+          break;
+    };

+-   pixel = g_malloc(sizeof(guchar) * info-&gt;width * bpp);
++   pixel = g_malloc(sizeof(guchar) * png_get_image_width(pp, info) * bpp);

+    for (pass = 0; pass &lt; num_passes; pass++)
+    {
+-      for (scanline = 0; scanline &lt; info-&gt;height; scanline++)
++      for (scanline = 0; scanline &lt; png_get_image_height(pp, info); scanline++)
+       {
+-         if (info-&gt;color_type == PNG_COLOR_TYPE_PALETTE)
++         if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE)
+             png_set_expand(pp);

+             png_read_row(pp, pixel, NULL);

+-         if ((*func) (pixel, info-&gt;width, 0, scanline, bpp, -1, 0)) goto png_read_cancelled;
++         if ((*func) (pixel, png_get_image_width(pp, info), 0, scanline, bpp, -1, 0)) goto png_read_cancelled;
+       };
+    };

+--- src/im_png.h.orig        2004-02-14 09:16:33.000000000 -0600
++++ src/im_png.h        2015-06-11 00:22:38.000000000 -0500
+@@ -31,7 +31,7 @@

+ typedef        gboolean        (*PngLoadFunc)                (guchar *buffer, gint width, gint left, gint scanline, gint components, gint pass, gint mode);

+-gboolean        png_get_header                (gchar *filename, png_info *info);
++gboolean        png_get_header                (gchar *filename, gint *, gint *, png_bytep);
+ gboolean        png_load                (gchar *filename, PngLoadFunc func);

+ #endif /* HAVE_LIBPNG */
+--- src/savefile.c.orig        2004-06-26 18:06:13.000000000 -0500
++++ src/savefile.c        2015-06-11 00:22:38.000000000 -0500
+@@ -187,7 +187,7 @@
+       return;
+    }

+-   if (setjmp(png_ptr-&gt;jmpbuf))
++   if (png_jmpbuf(png_ptr))
+    {
+       fclose(fp);
+       png_destroy_write_struct(&amp;png_ptr,  (png_infopp)NULL);
</ins></span></pre>
</div>
</div>

</body>
</html>