[82287] users/pixilla/dports/sysutils/logrotate

pixilla at macports.org pixilla at macports.org
Thu Aug 11 19:33:40 PDT 2011


Revision: 82287
          http://trac.macports.org/changeset/82287
Author:   pixilla at macports.org
Date:     2011-08-11 19:33:38 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
sysutils/logrotate:
- Fix building for different default compression engines.

Modified Paths:
--------------
    users/pixilla/dports/sysutils/logrotate/Portfile
    users/pixilla/dports/sysutils/logrotate/files/patch-config.c.diff

Added Paths:
-----------
    users/pixilla/dports/sysutils/logrotate/files/patch-Makefile.diff

Modified: users/pixilla/dports/sysutils/logrotate/Portfile
===================================================================
--- users/pixilla/dports/sysutils/logrotate/Portfile	2011-08-11 22:34:53 UTC (rev 82286)
+++ users/pixilla/dports/sysutils/logrotate/Portfile	2011-08-12 02:33:38 UTC (rev 82287)
@@ -23,7 +23,8 @@
                     rmd160  7e1e24f53db5230eee2e1db8d90fe3a33692ca01
 
 patch.pre_args      -p1
-patchfiles          patch-config.c.diff
+patchfiles          patch-config.c.diff \
+                    patch-Makefile.diff
 
 depends_run         port:popt port:gettext port:gzip
 
@@ -38,7 +39,7 @@
 
 use_configure       no
 
-build.env           CC="${configure.cc} [get_canonical_archflags]" \
+build.env-append    CC="${configure.cc} [get_canonical_archflags]" \
                     CXX="${configure.cxx} [get_canonical_archflags]" \
                     CPP="${configure.cpp} [get_canonical_archflags]" \
                     BASEDIR="${prefix}" \
@@ -46,31 +47,32 @@
                     STATEFILE="${prefix}/var/run/logrotate/logrotate.status" \
                     DEFAULT_MAIL_COMMAND="/usr/sbin/mail"
 
-destroot.env-append INSTALL="install" \
-                    BASEDIR=[string trimleft ${destroot}${prefix} /]
+destroot.args       INSTALL="install" \
+                    BASEDIR=[string trimleft ${destroot}${prefix} /] \
+                    MANDIR="${prefix}/share/man"
 destroot.keepdirs   ${destroot}${prefix}/etc/logrotate.d \
                     ${destroot}${prefix}/var/run/logrotate
 post-destroot {
     xinstall -m 755 ${worksrcpath}/examples/logrotate-default \
         ${destroot}${prefix}/etc/logrotate.conf.sample
-    move ${destroot}${prefix}/man/man5/logrotate.conf.5 \
-        ${destroot}${prefix}/share/man/man5/logrotate.conf.5
-    move ${destroot}${prefix}/man/man8/logrotate.8 \
-        ${destroot}${prefix}/share/man/man8/logrotate.8
 }
 
 variant bzip2 conflicts gzip description {Use bzip2 compression by default} {
-    build.env-append    COMPRESS_COMMAND="${prefix}/bin/bzip2" \
-                        COMPRESS_EXT=".bz2" \
-                        UNCOMPRESS_COMMAND="${prefix}/bin/bunzip2"
-    depends_run-append  port:bzip2
+    build.env-append \
+                    COMPRESS_COMMAND="${prefix}/bin/bzip2" \
+                    COMPRESS_EXT=".bz2" \
+                    UNCOMPRESS_COMMAND="${prefix}/bin/bunzip2"
+    depends_run-append \
+                    port:bzip2
 }
 
 variant gzip conflicts bzip2 description {Use gzip compression by default} {
-    build.env-append    COMPRESS_COMMAND="${prefix}/bin/gzip" \
-                        COMPRESS_EXT=".gz" \
-                        UNCOMPRESS_COMMAND="${prefix}/bin/gunzip"
-    depends_run-append  port:gzip
+    build.pre_args-append \
+                    COMPRESS_COMMAND="${prefix}/bin/gzip" \
+                    COMPRESS_EXT=".gz" \
+                    UNCOMPRESS_COMMAND="${prefix}/bin/gunzip"
+    depends_run-append \
+                    port:gzip
 }
 
 if {![variant_isset gzip]} {

Added: users/pixilla/dports/sysutils/logrotate/files/patch-Makefile.diff
===================================================================
--- users/pixilla/dports/sysutils/logrotate/files/patch-Makefile.diff	                        (rev 0)
+++ users/pixilla/dports/sysutils/logrotate/files/patch-Makefile.diff	2011-08-12 02:33:38 UTC (rev 82287)
@@ -0,0 +1,29 @@
+--- a/Makefile	2011-08-11 14:18:53.000000000 -0700
++++ b/Makefile	2011-08-11 19:22:02.000000000 -0700
+@@ -82,8 +82,24 @@
+     CFLAGS += -DSTATEFILE=\"$(STATEFILE)\"
+ endif
+ 
+-BINDIR = $(BASEDIR)/sbin
+-MANDIR = $(BASEDIR)/man
++ifneq ($(COMPRESS_COMMAND),)
++    CFLAGS += -DCOMPRESS_COMMAND=\"$(COMPRESS_COMMAND)\"
++endif
++
++ifneq ($(COMPRESS_EXT),)
++    CFLAGS += -DCOMPRESS_EXT=\"$(COMPRESS_EXT)\"
++endif
++
++ifneq ($(UNCOMPRESS_COMMAND),)
++    CFLAGS += -DUNCOMPRESS_COMMAND=\"$(UNCOMPRESS_COMMAND)\"
++endif
++
++ifneq ($(DEFAULT_MAIL_COMMAND),)
++    CFLAGS += -DDEFAULT_MAIL_COMMAND=\"$(DEFAULT_MAIL_COMMAND)\"
++endif
++
++BINDIR := $(BASEDIR)/sbin
++MANDIR := $(BASEDIR)/man
+ 
+ #--------------------------------------------------------------------------
+ 

Modified: users/pixilla/dports/sysutils/logrotate/files/patch-config.c.diff
===================================================================
--- users/pixilla/dports/sysutils/logrotate/files/patch-config.c.diff	2011-08-11 22:34:53 UTC (rev 82286)
+++ users/pixilla/dports/sysutils/logrotate/files/patch-config.c.diff	2011-08-12 02:33:38 UTC (rev 82287)
@@ -1,5 +1,5 @@
---- a/config.c	2011-08-11 13:50:02.000000000 -0700
-+++ b/config.c	2011-08-11 13:13:41.000000000 -0700
+--- a/config.c	2011-08-11 14:18:53.000000000 -0700
++++ b/config.c	2011-08-11 14:19:23.000000000 -0700
 @@ -74,6 +74,29 @@
  
  #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110811/88ce5032/attachment.html>


More information about the macports-changes mailing list