[26633] trunk/dports/sysutils/rpm

source_changes at macosforge.org source_changes at macosforge.org
Sun Jul 1 01:33:33 PDT 2007


Revision: 26633
          http://trac.macosforge.org/projects/macports/changeset/26633
Author:   afb at macports.org
Date:     2007-07-01 01:33:32 -0700 (Sun, 01 Jul 2007)

Log Message:
-----------
FreeBSD support

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

Added Paths:
-----------
    trunk/dports/sysutils/rpm/files/patch-rpmdav.c
    trunk/dports/sysutils/rpm/files/patch-rpmsq.c

Modified: trunk/dports/sysutils/rpm/Portfile
===================================================================
--- trunk/dports/sysutils/rpm/Portfile	2007-07-01 08:31:20 UTC (rev 26632)
+++ trunk/dports/sysutils/rpm/Portfile	2007-07-01 08:33:32 UTC (rev 26633)
@@ -4,7 +4,7 @@
 
 name			rpm
 version			4.4.9
-platforms		darwin
+platforms		darwin freebsd
 categories		sysutils archivers
 maintainers		n3npq at mac.com
 description		The RPM package management system.
@@ -44,6 +44,8 @@
 patchfiles		patch-macros.in \
 			patch-configure \
 			patch-Makefile.PL \
+			patch-rpmdav.c \
+			patch-rpmsq.c \
 			patch-rpmevr.h \
 			patch-parseBuildInstallClean.c
 
@@ -87,6 +89,19 @@
          patchfiles-append      patch-fts.c.diff
 }
 
+platform freebsd {
+	post-configure {
+		reinplace "s;-lrt;;" ${worksrcpath}/lua/Makefile
+	}
+
+	post-destroot {
+		# FreeBSD specific changes
+		reinplace "s;/usr/bin/tar;/usr/local/bin/gtar;" ${destroot}${prefix}/lib/rpm/macros
+		reinplace "s;/usr/bin/make;/usr/local/bin/gmake;" ${destroot}${prefix}/lib/rpm/macros
+	}
+}
+
+
 variant docs {
 	depends_run-append bin:doxygen:doxygen	
 	configure.args-append --with-apidocs

Added: trunk/dports/sysutils/rpm/files/patch-rpmdav.c
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-rpmdav.c	                        (rev 0)
+++ trunk/dports/sysutils/rpm/files/patch-rpmdav.c	2007-07-01 08:33:32 UTC (rev 26633)
@@ -0,0 +1,11 @@
+--- rpmio/rpmdav.c.orig	Tue Feb 20 00:51:07 2007
++++ rpmio/rpmdav.c	Thu Jun 28 15:31:30 2007
+@@ -1679,7 +1679,7 @@
+     dp->d_reclen = 0;		/* W2DO? */
+ 
+ #if !(defined(hpux) || defined(__hpux) || defined(sun))
+-#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__)
++#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)
+     dp->d_off = 0;		/* W2DO? */
+ #endif
+ /*@-boundsread@*/


Property changes on: trunk/dports/sysutils/rpm/files/patch-rpmdav.c
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/dports/sysutils/rpm/files/patch-rpmsq.c
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-rpmsq.c	                        (rev 0)
+++ trunk/dports/sysutils/rpm/files/patch-rpmsq.c	2007-07-01 08:33:32 UTC (rev 26633)
@@ -0,0 +1,62 @@
+--- rpmio/rpmsq.c.orig	Thu Mar 29 23:30:45 2007
++++ rpmio/rpmsq.c	Thu Jun 28 15:30:35 2007
+@@ -7,6 +7,7 @@
+ #if defined(__LCLINT__)
+ #define	_BITS_SIGTHREAD_H	/* XXX avoid __sigset_t heartburn. */
+ 
++#ifndef __FreeBSD__
+ /*@-incondefs -protoparammatch@*/
+ /*@-exportheader@*/
+ /*@constant int SA_SIGINFO@*/
+@@ -20,6 +21,7 @@
+ 	/*@globals errno, systemState @*/;
+ extern void (*sigset(int sig, void (*disp)(int)))(int)
+ 	/*@globals errno, systemState @*/;
++#endif
+ 
+ struct qelem;
+ extern	void insque(struct qelem * __elem, struct qelem * __prev)
+@@ -121,6 +123,43 @@
+ #include <sys/signal.h>
+ #include <sys/wait.h>
+ #include <search.h>
++
++#ifdef __FreeBSD__
++/* backported from updated rpm5 code by rse: */
++
++/* portability fallback for sighold(3) */
++static int sighold(int sig)
++{
++    sigset_t set;
++    if (sigprocmask(SIG_SETMASK, NULL, &set) < 0)
++        return -1;
++    if (sigaddset(&set, sig) < 0)
++        return -1;
++    return sigprocmask(SIG_SETMASK, &set, NULL);
++}
++
++/* portability fallback for sigrelse(3) */
++static int sigrelse(int sig)
++{
++    sigset_t set;
++    if (sigprocmask(SIG_SETMASK, NULL, &set) < 0)
++        return -1;
++    if (sigdelset(&set, sig) < 0)
++        return -1;
++    return sigprocmask(SIG_SETMASK, &set, NULL);
++}
++
++/* portability fallback for sigpause(3) */
++static int sigpause(int sig)
++{
++    sigset_t set;
++    if (sigemptyset(&set) < 0)
++        return -1;
++    if (sigaddset(&set, sig) < 0)
++        return -1;
++    return sigsuspend(&set);
++}
++#endif
+ 
+ #if defined(HAVE_PTHREAD_H)
+ 


Property changes on: trunk/dports/sysutils/rpm/files/patch-rpmsq.c
___________________________________________________________________
Name: svn:eol-style
   + native

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070701/7bf63920/attachment.html


More information about the macports-changes mailing list