[26593] trunk/dports/sysutils
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 29 04:56:20 PDT 2007
Revision: 26593
http://trac.macosforge.org/projects/macports/changeset/26593
Author: afb at macports.org
Date: 2007-06-29 04:56:19 -0700 (Fri, 29 Jun 2007)
Log Message:
-----------
RPM packages -> HTML pages
Added Paths:
-----------
trunk/dports/sysutils/rpm2html/
trunk/dports/sysutils/rpm2html/Portfile
trunk/dports/sysutils/rpm2html/files/
trunk/dports/sysutils/rpm2html/files/patch-config.c
trunk/dports/sysutils/rpm2html/files/patch-memory.c
trunk/dports/sysutils/rpm2html/files/patch-rpm2html.config
trunk/dports/sysutils/rpm2html/files/patch-rpmdata.c
trunk/dports/sysutils/rpm2html/files/patch-rpmopen.c
Added: trunk/dports/sysutils/rpm2html/Portfile
===================================================================
--- trunk/dports/sysutils/rpm2html/Portfile (rev 0)
+++ trunk/dports/sysutils/rpm2html/Portfile 2007-06-29 11:56:19 UTC (rev 26593)
@@ -0,0 +1,56 @@
+# $Id$
+
+PortSystem 1.0
+
+name rpm2html
+version 1.9.5
+revision 0
+platforms darwin freebsd
+categories sysutils
+maintainers afb at macports.org
+description Translates an RPM database and dependency information into HTML
+long_description \
+The rpm2html utility automatically generates web pages that describe a \
+set of RPM packages. The goals of rpm2html are to identify the \
+dependencies between various packages, and to find the package(s) that \
+will provide the resources needed to install a given package. \
+Rpm2html analyzes the provides and requires of the given set of RPMs, \
+and then shows the dependency cross-references using hypertext links.
+
+homepage http://www.nongnu.org/rpm2html/
+master_sites http://savannah.nongnu.org/download/rpm2html/
+checksums md5 b42a276217cf4e2ae8ed37332cd2e63c
+
+depends_lib lib:librpm:rpm lib:libxml2:libxml2 port:zlib port:bzip2
+depends_build bin:autoconf:autoconf bin:automake:automake
+
+patchfiles patch-rpmopen.c patch-config.c patch-memory.c patch-rpmdata.c patch-rpm2html.config
+
+pre-configure { system "cd ${worksrcpath} && ./autogen.sh --version" }
+configure.args --with-rpm-prefix=${prefix}
+
+post-destroot {
+ set config ${destroot}${prefix}/etc/rpm2html.config
+ reinplace "s|/usr/src/redhat|${prefix}/src/macports|" ${config}
+ reinplace "s|ftp://ftp.redhat.com/pub/redhat/linux/7.1/en/os/i386/RedHat/RPMS/|ftp=http://macports.org/packages/${os.platform}/${os.arch}/RPMS/|" ${config}
+ reinplace "s|ftpsrc=ftp://ftp.redhat.com/pub/redhat/linux/7.1/en/os/i386/SRPMS/|ftpsrc=http://macports.org/packages/SRPMS/|" ${config}
+}
+
+platform darwin {
+ post-destroot {
+ reinplace "s|/var/www/html|/Library/WebServer/Documents|" ${destroot}${prefix}/etc/rpm2html.config
+ }
+}
+
+platform freebsd {
+ post-destroot {
+ reinplace "s|/var/www/html|/usr/local/www|" ${destroot}${prefix}/etc/rpm2html.config
+ }
+}
+
+variant template description "Use separate template file instead of hard-coded markup" {
+depends_build-append lib:template:libtemplate
+configure.args-append --with-template
+post-configure { reinplace "s|^;html_template=rpm2html.tpl|html_template=${prefix}/etc/rpm2html.tpl|g" rpm2html.config }
+post-destroot { xinstall -m 644 ${worksrcpath}/rpm2html.tpl ${destroot}${prefix}/etc/rpm2html.tpl }
+}
Property changes on: trunk/dports/sysutils/rpm2html/Portfile
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/dports/sysutils/rpm2html/files/patch-config.c
===================================================================
--- trunk/dports/sysutils/rpm2html/files/patch-config.c (rev 0)
+++ trunk/dports/sysutils/rpm2html/files/patch-config.c 2007-06-29 11:56:19 UTC (rev 26593)
@@ -0,0 +1,13 @@
+--- config.c.orig 2007-05-16 10:18:19.000000000 +0200
++++ config.c 2007-05-16 10:19:34.000000000 +0200
+@@ -731,8 +731,10 @@
+ rpm2html_dump_rdf = 0;
+ rpm2html_dump_rdf_resources = 0;
+ rpm2html_dump_html = 1;
++#ifdef HAVE_LIBTEMPLATE
+ if (rpm2html_html_template != NULL) xmlFree(rpm2html_html_template);
+ rpm2html_html_template = "rpm2html.tpl";
++#endif
+ if (rpm2html_rdf_dir != NULL) xmlFree(rpm2html_rdf_dir);
+ rpm2html_rdf_dir = NULL;
+ if (rpm2html_rdf_resources_dir != NULL) xmlFree(rpm2html_rdf_resources_dir);
Property changes on: trunk/dports/sysutils/rpm2html/files/patch-config.c
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/dports/sysutils/rpm2html/files/patch-memory.c
===================================================================
--- trunk/dports/sysutils/rpm2html/files/patch-memory.c (rev 0)
+++ trunk/dports/sysutils/rpm2html/files/patch-memory.c 2007-06-29 11:56:19 UTC (rev 26593)
@@ -0,0 +1,19 @@
+--- memory.c.orig 2005-08-18 23:15:54.000000000 +0200
++++ memory.c 2007-06-25 14:54:48.000000000 +0200
+@@ -4,10 +4,16 @@
+ * daniel at veillard.com
+ */
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include <sys/types.h>
+ #include <string.h>
+ #include <stdio.h>
++#ifdef HAVE_MALLOC_H
+ #include <malloc.h>
++#endif
+ #include <libxml/xmlmemory.h>
+ #include "memory.h"
+
Property changes on: trunk/dports/sysutils/rpm2html/files/patch-memory.c
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/dports/sysutils/rpm2html/files/patch-rpm2html.config
===================================================================
--- trunk/dports/sysutils/rpm2html/files/patch-rpm2html.config (rev 0)
+++ trunk/dports/sysutils/rpm2html/files/patch-rpm2html.config 2007-06-29 11:56:19 UTC (rev 26593)
@@ -0,0 +1,20 @@
+--- rpm2html.config.orig 2007-04-01 17:41:43.000000000 +0200
++++ rpm2html.config 2007-06-25 15:09:47.000000000 +0200
+@@ -59,11 +59,11 @@
+ ftp://ftp.redhat.com/pub/redhat/linux/7.1/en/os/i386/RedHat/RPMS/
+ ftpsrc=ftp://ftp.redhat.com/pub/redhat/linux/7.1/en/os/i386/SRPMS/
+
+-[/mnt/cdrom]
+-name=Content of CD-ROM
+-color=#ffe0ff
+-subdir=cdrom
+-ftp=file:/mnt/cdrom
+-tree=true
++;[/mnt/cdrom]
++;name=Content of CD-ROM
++;color=#ffe0ff
++;subdir=cdrom
++;ftp=file:/mnt/cdrom
++;tree=true
+
+
Added: trunk/dports/sysutils/rpm2html/files/patch-rpmdata.c
===================================================================
--- trunk/dports/sysutils/rpm2html/files/patch-rpmdata.c (rev 0)
+++ trunk/dports/sysutils/rpm2html/files/patch-rpmdata.c 2007-06-29 11:56:19 UTC (rev 26593)
@@ -0,0 +1,42 @@
+--- rpmdata.c.orig 2005-08-18 23:15:53.000000000 +0200
++++ rpmdata.c 2007-06-25 15:43:11.000000000 +0200
+@@ -900,19 +900,19 @@
+ /*
+ * Try to protect an e-mail address from a spam bot.
+ * The "<someone at domain.tld>" is replaced
+- * with "<someone(at)domain.tld>".
++ * with "<someone(at)domain(dot)tld>".
+ */
+
+ static unsigned char *buffer = NULL;
+ static int buffer_size = 2000;
+ static char *at = "(at)";
++static char *dot = "(dot)";
+ char *protectEmail(char *string) {
+ if (rpm2html_protect_emails == 0 || string == NULL)
+ return string;
+
+ unsigned char *cur, *end;
+ unsigned char c;
+- int magick = 0;
+
+ if (buffer == NULL) {
+ buffer = (char *) xmlMalloc(buffer_size * sizeof(char));
+@@ -938,13 +938,12 @@
+ cur = &buffer[delta];
+ }
+ c = (unsigned char) *(string++);
+- if (c == '<')
+- magick = 1;
+- if (c == '>')
+- magick = 0;
+- if (c == '@' && magick) {
++ if (c == '@') {
+ strcpy(cur, at);
+ cur += strlen(at);
++ } else if (c == '.') {
++ strcpy(cur, dot);
++ cur += strlen(dot);
+ } else {
+ *(cur++) = c;
+ }
Property changes on: trunk/dports/sysutils/rpm2html/files/patch-rpmdata.c
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/dports/sysutils/rpm2html/files/patch-rpmopen.c
===================================================================
--- trunk/dports/sysutils/rpm2html/files/patch-rpmopen.c (rev 0)
+++ trunk/dports/sysutils/rpm2html/files/patch-rpmopen.c 2007-06-29 11:56:19 UTC (rev 26593)
@@ -0,0 +1,19 @@
+--- rpmopen.c.orig 2007-04-14 19:21:50.000000000 +0200
++++ rpmopen.c 2007-06-25 14:07:57.000000000 +0200
+@@ -29,6 +29,7 @@
+ #ifdef HAVE_RPM42
+ #include <rpm/rpmfi.h>
+ #endif
++#include <rpm/rpmevr.h>
+
+ int readLead(FD_t fd, /*@out@*/struct rpmlead *lead);
+ #ifdef HAVE_RPM42
+@@ -642,7 +642,7 @@
+ rpm->extra->packager = xmlStrdup(protectEmail((char *) p));
+ }
+ ENTRY_CLEANUP(p);
+- if (!headerGetEntry(h, RPMTAG_COPYRIGHT, &type, &p, &count) || !p ||
++ if (!headerGetEntry(h, RPMTAG_LICENSE, &type, &p, &count) || !p ||
+ (type != RPM_STRING_TYPE)) {
+ rpm->extra->copyright = NULL;
+ } else {
Property changes on: trunk/dports/sysutils/rpm2html/files/patch-rpmopen.c
___________________________________________________________________
Name: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070629/b7b5cb35/attachment.html
More information about the macports-changes
mailing list