[95897] trunk/dports/textproc/mime

jmr at macports.org jmr at macports.org
Thu Jul 26 03:05:50 PDT 2012


Revision: 95897
          https://trac.macports.org/changeset/95897
Author:   jmr at macports.org
Date:     2012-07-26 03:05:48 -0700 (Thu, 26 Jul 2012)
Log Message:
-----------
mime: fix build on systems that provide memmem (#33254), Makefile fixes

Modified Paths:
--------------
    trunk/dports/textproc/mime/Portfile
    trunk/dports/textproc/mime/files/patch-Makefile.in

Added Paths:
-----------
    trunk/dports/textproc/mime/files/memmem.patch

Modified: trunk/dports/textproc/mime/Portfile
===================================================================
--- trunk/dports/textproc/mime/Portfile	2012-07-26 09:21:16 UTC (rev 95896)
+++ trunk/dports/textproc/mime/Portfile	2012-07-26 10:05:48 UTC (rev 95897)
@@ -25,11 +25,11 @@
 patchfiles          patch-Makefile.in \
                     patch-message.c
 
-variant universal {}
+if {${os.major} >= 11 && ${os.platform} == "darwin"} {
+    patchfiles-append memmem.patch
+}
 
-build.args          CC="${configure.cc} [get_canonical_archflags cc]"
+build.args          CC=${configure.cc}
 
-destroot.destdir    prefix=${destroot}${prefix}
-
 livecheck.type      regex
 livecheck.regex     >${name}</a><td>v(\[^<\]+)

Added: trunk/dports/textproc/mime/files/memmem.patch
===================================================================
--- trunk/dports/textproc/mime/files/memmem.patch	                        (rev 0)
+++ trunk/dports/textproc/mime/files/memmem.patch	2012-07-26 10:05:48 UTC (rev 95897)
@@ -0,0 +1,38 @@
+--- util.c.orig	2003-09-16 09:37:19.000000000 +1000
++++ util.c	2012-07-26 19:36:52.000000000 +1000
+@@ -59,7 +59,7 @@ powmod(int x, int y, int q)
+ 	}
+ 	return ret;
+ }
+-
++/*
+ const char *
+ memmem(const char *T, size_t n, const char *P, size_t m)
+ {
+@@ -91,5 +91,5 @@ memmem(const char *T, size_t n, const ch
+ 			t = (d * (t - T[s] * h) + T[s + m]) % q;
+ 	}
+ 	return NULL;
+-}
++}*/
+ #endif
+--- header.c.orig	2003-09-16 09:37:19.000000000 +1000
++++ header.c	2012-07-26 19:38:00.000000000 +1000
+@@ -31,7 +31,6 @@
+ #include <string.h>
+ 
+ #include <mimemisc.h>
+-#include <util.h>
+ 
+ #include <mime_priv.h>
+ 
+--- message.c.orig	2003-09-16 09:37:19.000000000 +1000
++++ message.c	2012-07-26 19:37:43.000000000 +1000
+@@ -33,7 +33,6 @@
+ 
+ #include <mime_priv.h>
+ #include <ct.h>
+-#include <util.h>
+ 
+ static struct mime_message *
+ getmminit()

Modified: trunk/dports/textproc/mime/files/patch-Makefile.in
===================================================================
--- trunk/dports/textproc/mime/files/patch-Makefile.in	2012-07-26 09:21:16 UTC (rev 95896)
+++ trunk/dports/textproc/mime/files/patch-Makefile.in	2012-07-26 10:05:48 UTC (rev 95897)
@@ -1,7 +1,16 @@
---- Makefile.in.orig	2003-09-15 18:37:19.000000000 -0500
-+++ Makefile.in	2011-06-13 04:20:04.000000000 -0500
-@@ -52,7 +52,7 @@
+--- Makefile.in.orig	2003-09-16 09:37:19.000000000 +1000
++++ Makefile.in	2012-07-26 19:54:02.000000000 +1000
+@@ -43,6 +43,8 @@
  
+ DEBUG = -g
+ #OPT = -O2
++CFLAGS=@CFLAGS@
++LDFLAGS=@LDFLAGS@
+ PROFILE = -pg
+ LIBOPTS =
+ 
+@@ -52,7 +54,7 @@
+ 
  MAJOR = 1
  ARNAME = lib$(LIB).a
 -SONAME = lib$(LIB).so.$(MAJOR)
@@ -9,20 +18,40 @@
  PANAME = lib$(LIB)_p.a
  
  prefix = @prefix@
-@@ -72,7 +72,7 @@
+@@ -72,7 +74,7 @@
  	$(AR) rc $@ $(OBJS)
  
  $(SONAME): $(SOBJS)
 -	$(CC) -shared -o $@ $(SOBJS)
-+	$(CC) -dynamiclib -compatibility_version 1.0 -current_version 1.1 -install_name ${prefix}/lib/$@ -o $@ $(SOBJS)
++	$(CC) $(LDFLAGS) -dynamiclib -compatibility_version 1.0 -current_version 1.1 -install_name ${prefix}/lib/$@ -o $@ $(SOBJS)
  
  $(PANAME): $(POBJS)
  	$(AR) rc $@ $(POBJS)
-@@ -94,6 +94,7 @@
- 		chown $(LIBOWN):$(LIBGRP) $(LIBDIR)/$$i;	\
- 		chmod $(LIBMOD) $(LIBDIR)/$$i;			\
+@@ -88,17 +90,19 @@
+ 	    $(POBJS) $(TPROG) $(TOBJS) .depend
+ 
+ install: $(ARNAME) $(SONAME) $(PANAME)
+-	mkdir -p -m 755 $(LIBDIR)
++	mkdir -p -m 755 $(DESTDIR)$(LIBDIR)
+ 	for i in $(ARNAME) $(SONAME) $(PANAME); do		\
+-		cp $$i $(LIBDIR);				\
+-		chown $(LIBOWN):$(LIBGRP) $(LIBDIR)/$$i;	\
+-		chmod $(LIBMOD) $(LIBDIR)/$$i;			\
++		cp $$i $(DESTDIR)$(LIBDIR);				\
++		chown $(LIBOWN):$(LIBGRP) $(DESTDIR)$(LIBDIR)/$$i;	\
++		chmod $(LIBMOD) $(DESTDIR)$(LIBDIR)/$$i;			\
  	done
-+	cd $(LIBDIR) && ln -s $(SONAME) libmime.1.dylib && ln -s $(SONAME) libmime.dylib
- 	mkdir -p -m 755 $(INCDIR)
+-	mkdir -p -m 755 $(INCDIR)
++	ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/libmime.1.dylib
++	ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/libmime.dylib
++	mkdir -p -m 755 $(DESTDIR)$(INCDIR)
  	for i in $(INCS); do					\
- 		cp $$i $(INCDIR);				\
+-		cp $$i $(INCDIR);				\
+-		chown $(INCOWN):$(INCGRP) $(INCDIR)/$$i;	\
+-		chmod $(INCMOD) $(INCDIR)/$$i;			\
++		cp $$i $(DESTDIR)$(INCDIR);				\
++		chown $(INCOWN):$(INCGRP) $(DESTDIR)$(INCDIR)/$$i;	\
++		chmod $(INCMOD) $(DESTDIR)$(INCDIR)/$$i;			\
+ 	done
+ 
+ depend:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120726/1363f4ff/attachment.html>


More information about the macports-changes mailing list