Ignore:
Timestamp:
Nov 25, 2006, 10:06:01 PM (14 years ago)
Author:
markd@…
Message:

Closes #11053. Add/modify patches.

Location:
trunk/dports/palm/jpilot
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/palm/jpilot/Portfile

    r20353 r20750  
    44name                    jpilot
    55version                 0.99.9
     6revision                1
    67description             A Palm Pilot desktop for Unix
    78long_description        J-Pilot is a desktop organizer application for the palm pilot and other\
    8 Palm OS devices.  It is similar in functionality to the one that\
    9 3Com/Palm distributes.
     9                        Palm OS devices.  It is similar in functionality to the one that\
     10                        3Com/Palm distributes.
    1011categories              palm
    1112homepage                http://www.jpilot.org/
     
    1415master_sites            http://www.jpilot.org/
    1516checksums               md5 c39df29aeed57b84a674524856ebc290
    16 patchfiles              patch-plugins.c
     17patchfiles              patch-plugins.c \
     18                        patch-weekday.c
    1719configure.args          --with-libiconv-prefix=${prefix} \
    1820                        --with-pilot-prefix=${prefix} \
    19                         --mandir=${prefix}/share/man \
    20                         --disable-gtk2
    21 depends_lib             lib:libiconv:libiconv lib:libgtk.a:gtk1 lib:libpisock.a:pilot-link
     21                        --mandir=${prefix}/share/man
     22depends_lib             port:libiconv port:gtk2 port:pilot-link
    2223
    23 # adds gtk2-support
    24 variant                 gtk2 {
    25         configure.args-delete   --disable-gtk2
    26         configure.args-append   --enable-gtk2
    27         depends_lib-delete              lib:libgtk.a:gtk1
    28         depends_lib-append              lib:libgtk.2:gtk2
     24# enable gtk1 support
     25variant gtk1 {
     26        configure.args-append   --disable-gtk2
     27        depends_lib-delete      port:gtk2
     28        depends_lib-append      port:gtk1
    2929}
    3030
  • trunk/dports/palm/jpilot/files/patch-plugins.c

    r7152 r20750  
    1 diff -rauN plugins.c.orig plugins.c
    2 --- plugins.c.orig      Mon Sep  1 05:54:10 2003
    3 +++ plugins.c   Sun Mar 21 14:12:26 2004
    4 @@ -19,6 +19,7 @@
     1--- plugins.c.orig      2005-05-08 11:57:31.000000000 -0400
     2+++ plugins.c   2006-11-20 09:30:28.000000000 -0500
     3@@ -22,6 +22,7 @@
    54 
    65 #include "config.h"
     
    109 #include <stdio.h>
    1110 #include <stdlib.h>
     11@@ -81,6 +82,8 @@
     12    struct dirent *dirent;
     13    char full_name[FILENAME_MAX];
     14    struct plugin_s temp_plugin, *new_plugin;
     15+   GList *plugin_names = NULL; /* keep a list of plugins found so far */
     16+   GList *temp_list = NULL;
     17 
     18    count = 0;
     19    for (i=0; (dirent = readdir(dir)); i++) {
     20@@ -90,7 +93,8 @@
     21       }
     22       /* If the filename has either of these extensions then plug it in */
     23       if ((strcmp(&(dirent->d_name[strlen(dirent->d_name)-3]), ".so")) &&
     24-         (strcmp(&(dirent->d_name[strlen(dirent->d_name)-3]), ".sl"))) {
     25+         (strcmp(&(dirent->d_name[strlen(dirent->d_name)-3]), ".sl")) &&
     26+         (strcmp(&(dirent->d_name[strlen(dirent->d_name)-6]), ".dylib"))) {
     27         continue;
     28       } else {
     29         jp_logf(JP_LOG_DEBUG, "found plugin %s\n", dirent->d_name);
     30@@ -103,6 +107,7 @@
     31            if (temp_plugin.name) {
     32               jp_logf(JP_LOG_DEBUG, "plugin name is [%s]\n", temp_plugin.name);
     33            }
     34+           if (g_list_find_custom(plugin_names, temp_plugin.name, (GCompareFunc)strcmp) == NULL) {
     35            new_plugin = malloc(sizeof(struct plugin_s));
     36            if (!new_plugin) {
     37               jp_logf(JP_LOG_WARN, "load plugins(): %s\n", _("Out of memory"));
     38@@ -113,13 +118,21 @@
     39             * we want to avoid that slowness, prepend works for that
     40             * in this case since we have the head */
     41            plugins = g_list_prepend(plugins, new_plugin);
     42+           plugin_names = g_list_prepend(plugin_names, g_strdup(temp_plugin.name));
     43            count++;
     44            (*number)++;
     45         }
     46       }
     47+      }
     48    }
     49 
     50    plugins = g_list_sort(plugins, plugin_sort);
     51+   for (temp_list = plugin_names; temp_list; temp_list = temp_list->next) {
     52+      if (temp_list->data) {
     53+       g_free(temp_list->data);
     54+      }
     55+    }
     56+   g_list_free(plugin_names);
     57 
     58    return count;
     59 }
Note: See TracChangeset for help on using the changeset viewer.