[102329] trunk/dports/sysutils/natsort

ryandesign at macports.org ryandesign at macports.org
Thu Jan 31 03:09:04 PST 2013


Revision: 102329
          https://trac.macports.org/changeset/102329
Author:   ryandesign at macports.org
Date:     2013-01-31 03:09:04 -0800 (Thu, 31 Jan 2013)
Log Message:
-----------
natsort: rename natsort.c patch and fix it to actually use the project's getline function instead of the OS's, and therefore increase the port's revision; ensure we're UsingTheRightCompiler and -arch flags and add a universal variant

Modified Paths:
--------------
    trunk/dports/sysutils/natsort/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/natsort/files/patch-Makefile.diff
    trunk/dports/sysutils/natsort/files/patch-natsort.c.diff

Removed Paths:
-------------
    trunk/dports/sysutils/natsort/files/natsort.c.diff

Modified: trunk/dports/sysutils/natsort/Portfile
===================================================================
--- trunk/dports/sysutils/natsort/Portfile	2013-01-31 10:35:45 UTC (rev 102328)
+++ trunk/dports/sysutils/natsort/Portfile	2013-01-31 11:09:04 UTC (rev 102329)
@@ -5,6 +5,7 @@
 
 name                natsort
 version             1.0.5
+revision            1
 categories          sysutils
 maintainers         nomaintainer
 
@@ -14,10 +15,16 @@
 platforms           darwin
 master_sites        sourceforge
 
-patchfiles          natsort.c.diff
-
 checksums           md5 1bc2d32c9c95595f3b67165ee370dade \
                     sha1 3843dd1dbb0c7f1c593f99c6706907d3d363b655
 
+patchfiles          patch-Makefile.diff \
+                    patch-natsort.c.diff
+
 use_configure       no
+
+variant universal {}
+
+build.args          CC="${configure.cc} [get_canonical_archflags cc]"
+
 destroot.args       BINDIR=${destroot}${prefix}/bin

Deleted: trunk/dports/sysutils/natsort/files/natsort.c.diff
===================================================================
--- trunk/dports/sysutils/natsort/files/natsort.c.diff	2013-01-31 10:35:45 UTC (rev 102328)
+++ trunk/dports/sysutils/natsort/files/natsort.c.diff	2013-01-31 11:09:04 UTC (rev 102329)
@@ -1,20 +0,0 @@
---- natsort.c.orig	2013-01-29 17:23:19.000000000 -0800
-+++ natsort.c	2013-01-29 17:24:23.000000000 -0800
-@@ -40,7 +40,7 @@
- #endif
- 
- static int fold_case = 0, verbose = 0, reverse = 0;
--size_t getline(char **lineptr, int *n, FILE *stream);
-+size_t redundant_getline(char **lineptr, int *n, FILE *stream);
- 
- static void trace_result(char const *a, char const *b, int ret)
- {
-@@ -170,7 +170,7 @@
- }
- 
- /* This code is public domain -- Will Hartung 4/9/09 */
--size_t getline(char **lineptr, int *n, FILE *stream) {
-+size_t redundant_getline(char **lineptr, int *n, FILE *stream) {
-     char *bufptr = NULL;
-     char *p = bufptr;
-     size_t size;

Added: trunk/dports/sysutils/natsort/files/patch-Makefile.diff
===================================================================
--- trunk/dports/sysutils/natsort/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/sysutils/natsort/files/patch-Makefile.diff	2013-01-31 11:09:04 UTC (rev 102329)
@@ -0,0 +1,17 @@
+--- Makefile.orig	2009-10-02 14:44:56.000000000 -0500
++++ Makefile	2013-01-31 04:39:34.000000000 -0600
+@@ -9,11 +9,11 @@
+ 
+ all: natsort
+ natsort: bin strnatcmp.o natsort.o
+-	gcc -o $(NATSORT_DEST) strnatcmp.o natsort.o
++	$(CC) -o $(NATSORT_DEST) strnatcmp.o natsort.o
+ natsort.o: natsort.c
+-	gcc -Wall -c -o natsort.o natsort.c
++	$(CC) -Wall -c -o natsort.o natsort.c
+ strnatcmp.o: strnatcmp.c
+-	gcc -Wall -c -o strnatcmp.o strnatcmp.c
++	$(CC) -Wall -c -o strnatcmp.o strnatcmp.c
+ clean:
+ 	rm -rf $(NATSORT_DEST) *.o bin/* ./releases/*
+ releases:

Copied: trunk/dports/sysutils/natsort/files/patch-natsort.c.diff (from rev 102328, trunk/dports/sysutils/natsort/files/natsort.c.diff)
===================================================================
--- trunk/dports/sysutils/natsort/files/patch-natsort.c.diff	                        (rev 0)
+++ trunk/dports/sysutils/natsort/files/patch-natsort.c.diff	2013-01-31 11:09:04 UTC (rev 102329)
@@ -0,0 +1,29 @@
+--- natsort.c.orig	2009-10-02 14:44:56.000000000 -0500
++++ natsort.c	2013-01-31 04:59:06.000000000 -0600
+@@ -40,7 +40,7 @@
+ #endif
+ 
+ static int fold_case = 0, verbose = 0, reverse = 0;
+-size_t getline(char **lineptr, int *n, FILE *stream);
++size_t redundant_getline(char **lineptr, int *n, FILE *stream);
+ 
+ static void trace_result(char const *a, char const *b, int ret)
+ {
+@@ -135,7 +135,7 @@
+      while (1) {
+ 	  line = NULL;
+ 	  bufsize = 0;
+-	  if ((linelen = getline(&line, &bufsize, stdin)) <= 0)
++	  if ((linelen = redundant_getline(&line, &bufsize, stdin)) <= 0)
+ 	       break;
+ 	  if (line[linelen-1] == '\n')
+ 	       line[--linelen] = 0;
+@@ -170,7 +170,7 @@
+ }
+ 
+ /* This code is public domain -- Will Hartung 4/9/09 */
+-size_t getline(char **lineptr, int *n, FILE *stream) {
++size_t redundant_getline(char **lineptr, int *n, FILE *stream) {
+     char *bufptr = NULL;
+     char *p = bufptr;
+     size_t size;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130131/0f196b89/attachment.html>


More information about the macports-changes mailing list