[128963] trunk/dports/archivers/pbzip2

ryandesign at macports.org ryandesign at macports.org
Sun Nov 30 21:09:06 PST 2014


Revision: 128963
          https://trac.macports.org/changeset/128963
Author:   ryandesign at macports.org
Date:     2014-11-30 21:09:06 -0800 (Sun, 30 Nov 2014)
Log Message:
-----------
pbzip2: build using the right compiler and -arch flags; install manpage in correct directory; install documentation in unversioned directory; take over as maintainer

Modified Paths:
--------------
    trunk/dports/archivers/pbzip2/Portfile

Added Paths:
-----------
    trunk/dports/archivers/pbzip2/files/
    trunk/dports/archivers/pbzip2/files/patch-Makefile.diff

Modified: trunk/dports/archivers/pbzip2/Portfile
===================================================================
--- trunk/dports/archivers/pbzip2/Portfile	2014-12-01 05:06:45 UTC (rev 128962)
+++ trunk/dports/archivers/pbzip2/Portfile	2014-12-01 05:09:06 UTC (rev 128963)
@@ -4,10 +4,11 @@
 
 name              pbzip2
 version           1.1.10
+revision          1
 set branch        [join [lrange [split ${version} .] 0 1] .]
 categories        archivers
 platforms         darwin
-maintainers       nomaintainer
+maintainers       ryandesign openmaintainer
 license           Permissive
 installs_libs     no
 
@@ -24,16 +25,15 @@
 checksums         rmd160 4a090d8b0ada8310400979fed75d4fe02cd20c8d \
                   sha256 9d489191edd010e4c8f7bc86de88268cdc3da5a9f7904b257fda56941615a0c2
 
-configure {
-    reinplace "s|/man|/share/man|g" ${worksrcpath}/Makefile
-}
+patchfiles        patch-Makefile.diff
 
+use_configure     no
+
 variant universal {}
 
-# yes, the Makefile actually requires $(CC) to compile C++
-build.args-append CC=${configure.cxx} \
-                  CFLAGS=\"${configure.cxxflags} [get_canonical_archflags cxx]\" \
-                  LDFLAGS=\"${configure.ldflags} -lbz2\"
+build.env-append  CXX="${configure.cxx}" \
+                  CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
+                  LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
 
 destroot.destdir  PREFIX=${destroot}${prefix}
 
@@ -42,7 +42,8 @@
   delete ${destroot}${prefix}/bin/pbzcat
   ln -s pbzip2 ${destroot}${prefix}/bin/pbunzip2
   ln -s pbzip2 ${destroot}${prefix}/bin/pbzcat
-  set docdir ${prefix}/share/doc/${name}-${version}
+
+  set docdir ${prefix}/share/doc/${subport}
   xinstall -d ${destroot}${docdir}
   xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog README \
     ${destroot}${docdir}

Added: trunk/dports/archivers/pbzip2/files/patch-Makefile.diff
===================================================================
--- trunk/dports/archivers/pbzip2/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/archivers/pbzip2/files/patch-Makefile.diff	2014-12-01 05:09:06 UTC (rev 128963)
@@ -0,0 +1,39 @@
+--- Makefile.orig	2014-11-23 05:53:54.000000000 -0600
++++ Makefile	2014-11-30 23:04:56.000000000 -0600
+@@ -16,8 +16,6 @@
+ LDLIBS_PTHREAD = -lpthread
+ 
+ 
+-# Optimization flags
+-CXXFLAGS = -O2
+ 
+ #CXXFLAGS += -g -Wall
+ #CXXFLAGS += -ansi
+@@ -49,8 +47,6 @@
+ CXXFLAGS += $(CXXFLAGS_PTHREAD)
+ 
+ 
+-# Linker flags
+-LDFLAGS =
+ 
+ 
+ # External libraries
+@@ -75,14 +71,14 @@
+ # Install the binary pbzip2 program and man page
+ install: pbzip2
+ 	if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
+-	if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
+-	if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
++	if ( test ! -d $(PREFIX)/share/man ) ; then mkdir -p $(PREFIX)/share/man ; fi
++	if ( test ! -d $(PREFIX)/share/man/man1 ) ; then mkdir -p $(PREFIX)/share/man/man1 ; fi
+ 	cp -f pbzip2 $(PREFIX)/bin/pbzip2
+ 	chmod a+x $(PREFIX)/bin/pbzip2
+ 	ln -s -f $(PREFIX)/bin/pbzip2 $(PREFIX)/bin/pbunzip2
+ 	ln -s -f $(PREFIX)/bin/pbzip2 $(PREFIX)/bin/pbzcat
+-	cp -f pbzip2.1 $(PREFIX)/man/man1
+-	chmod a+r $(PREFIX)/man/man1/pbzip2.1
++	cp -f pbzip2.1 $(PREFIX)/share/man/man1
++	chmod a+r $(PREFIX)/share/man/man1/pbzip2.1
+ 
+ clean:
+ 	rm -f *.o pbzip2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141130/a4eaa655/attachment.html>


More information about the macports-changes mailing list