[125101] trunk/dports/textproc/colorer

ryandesign at macports.org ryandesign at macports.org
Fri Sep 5 01:08:04 PDT 2014


Revision: 125101
          https://trac.macports.org/changeset/125101
Author:   ryandesign at macports.org
Date:     2014-09-05 01:08:03 -0700 (Fri, 05 Sep 2014)
Log Message:
-----------
colorer: move some reinplaces to patchfiles

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

Added Paths:
-----------
    trunk/dports/textproc/colorer/files/patch-src-libcolorer-makefile.gcc.diff

Modified: trunk/dports/textproc/colorer/Portfile
===================================================================
--- trunk/dports/textproc/colorer/Portfile	2014-09-05 06:08:19 UTC (rev 125100)
+++ trunk/dports/textproc/colorer/Portfile	2014-09-05 08:08:03 UTC (rev 125101)
@@ -36,7 +36,8 @@
 
 variant universal {}
 
-patchfiles      patch-Makefile.in.diff
+patchfiles      patch-Makefile.in.diff \
+                patch-src-libcolorer-makefile.gcc.diff
 
 post-patch {
     # Use makefile.macos for colorer
@@ -45,23 +46,9 @@
     # error: cast from 'int*' to 'int' loses precision
     reinplace s/int(/bool(/ ${worksrcpath}/src/shared/unicode/BitArray.cpp
 
-    # Libraries extension is ".dylib" on Darwin, not ".so"
-    reinplace {s/\.so/.dylib/} \
-        ${worksrcpath}/Makefile.in \
-        ${worksrcpath}/src/libcolorer/makefile.gcc
-
-    # The flag to build dynamic libraries on Darwin is -dynamiclib
-    # Furthermore we need to write down libcolorer install name
-    reinplace \
-        "s:-shared:-dynamiclib -install_name ${prefix}/lib/\$(TARGET):" \
-        ${worksrcpath}/src/libcolorer/makefile.gcc
-
     # Do not force installation as root
     reinplace {s/-g 0 -o 0//} ${worksrcpath}/Makefile.in
 
-    # Install documentation in an unversioned directory
-    reinplace s:doc/colorer-take5:doc/colorer: ${worksrcpath}/Makefile.in
-
     reinplace "/^CPPFLAGS/s:\$: [get_canonical_archflags cc]:" \
         ${worksrcpath}/src/shared/makefile.colorer.gcc
     reinplace -E "/^(LIB)?FLAGS/s:\$: [get_canonical_archflags ld]:" \
@@ -78,7 +65,8 @@
 build.target colorer
 # Yes, this build system uses "CPP" for the C compiler and "LINK" for the C++ compiler.
 build.args          CPP=${configure.cc} \
-                    LINK=${configure.cxx}
+                    LINK=${configure.cxx} \
+                    prefix=${prefix}
 use_parallel_build yes
 
 destroot.destdir    prefix=${destroot}${prefix}

Modified: trunk/dports/textproc/colorer/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/textproc/colorer/files/patch-Makefile.in.diff	2014-09-05 06:08:19 UTC (rev 125100)
+++ trunk/dports/textproc/colorer/files/patch-Makefile.in.diff	2014-09-05 08:08:03 UTC (rev 125101)
@@ -1,9 +1,26 @@
+Change library extension to .dylib
+Use unversioned doc dir
 Do not use GNU cp --parents flag
-
---- Makefile.in.orig	2010-01-12 05:09:19.000000000 +0100
-+++ Makefile.in	2010-01-12 05:13:13.000000000 +0100
-@@ -37,5 +37,8 @@
+--- Makefile.in.orig	2006-11-24 17:14:40.000000000 -0600
++++ Makefile.in	2014-09-04 22:28:40.000000000 -0500
+@@ -16,7 +16,7 @@
+ install:
+ 	install -g 0 -o 0 -m 755 -d $(prefix)
+ 	install -g 0 -o 0 -m 755 -d $(prefix)/lib
+-	install -g 0 -o 0 -m 755 src/libcolorer/libcolorer.so $(prefix)/lib
++	install -g 0 -o 0 -m 755 src/libcolorer/libcolorer.dylib $(prefix)/lib
  
+ 	install -g 0 -o 0 -m 755 -d $(prefix)/bin
+ 	install -g 0 -o 0 -m 755 src/colorer/colorer $(prefix)/bin
+@@ -32,10 +32,13 @@
+ 	chmod 0777 /tmp/colorer.log
+ 
+ 	install -g 0 -o 0 -m 755 -d $(prefix)/share/doc
+-	install -g 0 -o 0 -m 755 -d $(prefix)/share/doc/colorer-take5
+-	cp -r doc/* $(prefix)/share/doc/colorer-take5
++	install -g 0 -o 0 -m 755 -d $(prefix)/share/doc/colorer
++	cp -r doc/* $(prefix)/share/doc/colorer
+ 
  	install -g 0 -o 0 -m 755 -d $(prefix)/include
  	install -g 0 -o 0 -m 755 -d $(prefix)/include/colorer
 -	cd src/shared; cp --parents `find . -name '*.h'` $(prefix)/include/colorer

Added: trunk/dports/textproc/colorer/files/patch-src-libcolorer-makefile.gcc.diff
===================================================================
--- trunk/dports/textproc/colorer/files/patch-src-libcolorer-makefile.gcc.diff	                        (rev 0)
+++ trunk/dports/textproc/colorer/files/patch-src-libcolorer-makefile.gcc.diff	2014-09-05 08:08:03 UTC (rev 125101)
@@ -0,0 +1,25 @@
+Change library extension to .dylib
+Create library with -dynamiclib
+Use -install_name
+--- src/libcolorer/makefile.gcc.orig	2006-11-24 17:14:40.000000000 -0600
++++ src/libcolorer/makefile.gcc	2014-09-04 22:14:17.000000000 -0500
+@@ -1,5 +1,5 @@
+ 
+-TARGET=libcolorer.so
++TARGET=libcolorer.dylib
+ all: $(TARGET)
+ 
+ shared_path=../shared/
+@@ -8,10 +8,10 @@
+ include ../shared/makefile.colorer.gcc
+ 
+ LIBINC = -lstdc++
+-LIBFLAGS = $(coreobjects) -shared -o $(TARGET) $(LIBINC)
++LIBFLAGS = $(coreobjects) -dynamiclib -install_name $(prefix)/lib/$(TARGET) -o $(TARGET) $(LIBINC)
+ 
+ 
+-libcolorer.so: $(coreobjects)
++libcolorer.dylib: $(coreobjects)
+ 	$(CPP) $(LIBFLAGS)
+ 
+ clean:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140905/2eb25e16/attachment.html>


More information about the macports-changes mailing list