[90611] trunk/dports/devel

raimue at macports.org raimue at macports.org
Fri Mar 9 16:55:46 PST 2012


Revision: 90611
          http://trac.macports.org/changeset/90611
Author:   raimue at macports.org
Date:     2012-03-09 16:55:45 -0800 (Fri, 09 Mar 2012)
Log Message:
-----------
devel/bsdmake:
New port as a replacement for /usr/bin/bsdmake, which is no longer shipped by
Apple as of Xcode 4.3.

Added Paths:
-----------
    trunk/dports/devel/bsdmake/
    trunk/dports/devel/bsdmake/Portfile
    trunk/dports/devel/bsdmake/files/
    trunk/dports/devel/bsdmake/files/patch-Makefile.diff
    trunk/dports/devel/bsdmake/files/patch-mk.diff
    trunk/dports/devel/bsdmake/files/patch-pathnames.diff

Added: trunk/dports/devel/bsdmake/Portfile
===================================================================
--- trunk/dports/devel/bsdmake/Portfile	                        (rev 0)
+++ trunk/dports/devel/bsdmake/Portfile	2012-03-10 00:55:45 UTC (rev 90611)
@@ -0,0 +1,59 @@
+# $Id$
+
+PortSystem     1.0
+
+name           bsdmake
+version        24
+categories     devel
+platforms      darwin
+license        BSD
+maintainers    raimue openmaintainer
+description    BSD make
+long_description \
+    BSD make is a build tool to create programs and libraries by rules \
+    specified in a Makefile. This port is based on the last version from Apple as \
+    provided by Xcode 4.2.
+
+homepage       http://opensource.apple.com/
+               # see also http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/make/
+master_sites   http://opensource.apple.com/tarballs/${name}
+
+checksums      rmd160  ff6d946a8b742b20948f9a48c9cdaa95e9dee2bd \
+               sha256  82a948b80c2abfc61c4aa5c1da775986418a8e8eb3dd896288cfadf2e19c4985
+
+patchfiles     patch-Makefile.diff \
+               patch-mk.diff \
+               patch-pathnames.diff
+
+post-patch {
+    reinplace "s:@PREFIX@:${prefix}:g" \
+        ${worksrcpath}/mk/bsd.README \
+        ${worksrcpath}/mk/bsd.cpu.mk \
+        ${worksrcpath}/mk/bsd.doc.mk \
+        ${worksrcpath}/mk/bsd.obj.mk \
+        ${worksrcpath}/mk/bsd.own.mk \
+        ${worksrcpath}/mk/bsd.port.mk \
+        ${worksrcpath}/mk/bsd.port.subdir.mk \
+        ${worksrcpath}/mk/sys.mk \
+        ${worksrcpath}/pathnames.h
+    reinplace "s:@INSTALL_USER@:${install.user}:g"   ${worksrcpath}/mk/bsd.own.mk
+    reinplace "s:@INSTALL_GROUP@:${install.group}:g" ${worksrcpath}/mk/bsd.own.mk
+}
+
+use_configure no
+
+build.target
+# Using some pseudo MACHINE here, this ends up as ${MACHINE} in Makefiles
+build.args -f Makefile.dist \
+           CC="${configure.cc}" \
+           CFLAGS="-D__FBSDID=__RCSID -mdynamic-no-pic \
+                   -DMACHINE=\\\\\\\"MacPorts\\\\\\\" \
+                   -DMACHINE_ARCH=\\\\\\\"${configure.build_arch}\\\\\\\"" \
+           WARNS=1
+
+destroot {
+    xinstall -m 755 ${worksrcpath}/pmake ${destroot}${prefix}/bin/bsdmake
+    xinstall -m 444 ${worksrcpath}/make.1 ${destroot}${prefix}/share/man/man1/bsdmake.1
+    xinstall -d ${destroot}${prefix}/share/mk/bsdmake
+    eval xinstall -m 644 [glob ${worksrcpath}/mk/*] ${destroot}${prefix}/share/mk/bsdmake
+}


Property changes on: trunk/dports/devel/bsdmake/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/devel/bsdmake/files/patch-Makefile.diff
===================================================================
--- trunk/dports/devel/bsdmake/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/devel/bsdmake/files/patch-Makefile.diff	2012-03-10 00:55:45 UTC (rev 90611)
@@ -0,0 +1,13 @@
+--- Makefile.dist	2012-03-09 23:24:38.000000000 +0100
++++ Makefile.dist	2012-03-09 23:25:45.000000000 +0100
+@@ -1,7 +1,8 @@
+ # $FreeBSD: src/usr.bin/make/Makefile.dist,v 1.4 2005/05/24 13:19:40 harti Exp $
+ # a very simple makefile...
++
+ pmake:
+ 	@echo 'make started.'
+-	cc -DDEFSHELLNAME=\"sh\" -I. -c *.c
+-	cc *.o -o pmake
++	${CC} ${CFLAGS} -DDEFSHELLNAME=\"sh\" -I. -c *.c
++	${CC} *.o -o pmake
+ 	@echo 'make completed.'

Added: trunk/dports/devel/bsdmake/files/patch-mk.diff
===================================================================
--- trunk/dports/devel/bsdmake/files/patch-mk.diff	                        (rev 0)
+++ trunk/dports/devel/bsdmake/files/patch-mk.diff	2012-03-10 00:55:45 UTC (rev 90611)
@@ -0,0 +1,258 @@
+diff -r -u mk/bsd.README mk/bsd.README
+--- mk/bsd.README	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.README	2012-03-09 23:50:21.000000000 +0100
+@@ -2,7 +2,7 @@
+ # $FreeBSD: src/share/mk/bsd.README,v 1.28 2004/12/21 08:46:54 ru Exp $
+ 
+ This is the README file for the "include" files for the FreeBSD
+-source tree.  The files are installed in /usr/share/mk, and are by
++source tree.  The files are installed in @PREFIX@/share/mk, and are by
+ convention, named with the suffix ".mk".  These files store several
+ build options and should be handled with caution.
+ 
+@@ -43,7 +43,7 @@
+ This file does not document bsd.port*.mk.  They are documented in ports(7).
+ 
+ See also make(1), mkdep(1), style.Makefile(5) and `PMake - A
+-Tutorial', located in /usr/share/doc/psd/12.make.
++Tutorial', located in @PREFIX@/share/doc/bsdmake/tutorial.asc.
+ 
+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ 
+diff -r -u mk/bsd.cpu.mk mk/bsd.cpu.mk
+--- mk/bsd.cpu.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.cpu.mk	2012-03-09 23:53:55.000000000 +0100
+@@ -21,7 +21,7 @@
+ . endif
+ .else
+ 
+-# Handle aliases (not documented in make.conf to avoid user confusion
++# Handle aliases (not documented in bsdmake.conf to avoid user confusion
+ # between e.g. i586 and pentium)
+ 
+ . if ${MACHINE_ARCH} == "i386"
+@@ -59,7 +59,7 @@
+ 
+ ###############################################################################
+ # Logic to set up correct gcc optimization flag.  This must be included
+-# after /etc/make.conf so it can react to the local value of CPUTYPE
++# after @PREFIX@/etc/bsdmake.conf so it can react to the local value of CPUTYPE
+ # defined therein.  Consult:
+ #	http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html
+ #	http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html
+diff -r -u mk/bsd.doc.mk mk/bsd.doc.mk
+--- mk/bsd.doc.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.doc.mk	2012-03-09 23:42:07.000000000 +0100
+@@ -149,8 +149,8 @@
+ 	(cd ${.CURDIR}; spell ${SRCS} ) | sort | \
+ 		comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell
+ 
+-BINDIR?=	/usr/share/doc
+-BINMODE=	444
++BINDIR?=	@PREFIX@/share/doc
++BINMODE=	644
+ 
+ SRCDIR?=	${.CURDIR}
+ 
+diff -r -u mk/bsd.obj.mk mk/bsd.obj.mk
+--- mk/bsd.obj.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.obj.mk	2012-03-09 23:51:14.000000000 +0100
+@@ -16,7 +16,7 @@
+ #
+ #		E.g. use `env MAKEOBJDIR=temp-obj make'
+ #
+-# MAKEOBJDIRPREFIX  Specifies somewhere other than /usr/obj to root the object
++# MAKEOBJDIRPREFIX  Specifies somewhere other than @PREFIX@/obj to root the object
+ #		tree.  Note: MAKEOBJDIRPREFIX is an *environment* variable
+ #		and works properly only if set as an environment variable,
+ #		not as a global or command line variable!
+@@ -45,7 +45,7 @@
+ .if defined(MAKEOBJDIRPREFIX)
+ CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
+ .else
+-CANONICALOBJDIR:=/usr/obj${.CURDIR}
++CANONICALOBJDIR:=@PREFIX@/obj${.CURDIR}
+ .endif
+ 
+ #
+@@ -57,7 +57,7 @@
+ # 2.  ${MAKEOBJDIR}
+ # 3.  obj.${MACHINE}
+ # 4.  obj
+-# 5.  /usr/obj/`pwd`
++# 5.  @PREFIX@/obj/`pwd`
+ # 6.  ${.CURDIR}
+ #
+ # If ${.OBJDIR} is constructed using canonical cases 1 or 5, or
+diff -r -u mk/bsd.own.mk mk/bsd.own.mk
+--- mk/bsd.own.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.own.mk	2012-03-09 23:40:51.000000000 +0100
+@@ -9,28 +9,28 @@
+ # DESTDIR	Change the tree where the file gets installed. [not set]
+ #
+ # DISTDIR	Change the tree where the file for a distribution
+-# 		gets installed (see /usr/src/release/Makefile). [not set]
++# 		gets installed. [not set]
+ #
+ # COMPRESS_CMD	Program to compress documents.
+ #		Output is to stdout. [gzip -cn]
+ #
+ # COMPRESS_EXT	File name extension of ${COMPRESS_CMD} command. [.gz]
+ #
+-# BINOWN	Binary owner. [root]
++# BINOWN	Binary owner. [@INSTALL_USER@]
+ #
+-# BINGRP	Binary group. [wheel]
++# BINGRP	Binary group. [@INSTALL_GROUP@]
+ #
+-# BINMODE	Binary mode. [555]
++# BINMODE	Binary mode. [755]
+ #
+-# NOBINMODE	Mode for non-executable files. [444]
++# NOBINMODE	Mode for non-executable files. [644]
+ #
+-# LIBDIR	Base path for libraries. [/usr/lib]
++# LIBDIR	Base path for libraries. [@PREFIX@/lib]
+ #
+-# LIBCOMPATDIR	Base path for compat libraries. [/usr/lib/compat]
++# LIBCOMPATDIR	Base path for compat libraries. [@PREFIX@/lib/compat]
+ #
+-# LIBDATADIR	Base path for misc. utility data files. [/usr/libdata]
++# LIBDATADIR	Base path for misc. utility data files. [@PREFIX@/libdata]
+ #
+-# LINTLIBDIR	Base path for lint libraries. [/usr/libdata/lint]
++# LINTLIBDIR	Base path for lint libraries. [@PREFIX@/libdata/lint]
+ #
+ # SHLIBDIR	Base path for shared libraries. [${LIBDIR}]
+ #
+@@ -42,7 +42,7 @@
+ #
+ #
+ # KMODDIR	Base path for loadable kernel modules
+-#		(see kld(4)). [/boot/kernel]
++#		(see kld(4)). [@PREFIX@/boot/kernel]
+ #
+ # KMODOWN	KLD owner. [${BINOWN}]
+ #
+@@ -52,11 +52,11 @@
+ #
+ #
+ # SHAREDIR	Base path for architecture-independent ascii
+-#		text files. [/usr/share]
++#		text files. [@PREFIX@/share]
+ #
+-# SHAREOWN	ASCII text file owner. [root]
++# SHAREOWN	ASCII text file owner. [@INSTALL_USER@]
+ #
+-# SHAREGRP	ASCII text file group. [wheel]
++# SHAREGRP	ASCII text file group. [@INSTALL_GROUP@]
+ #
+ # SHAREMODE	ASCII text file mode. [${NOBINMODE}]
+ #
+@@ -99,30 +99,30 @@
+ #
+ # NLSMODE	National Language Support files mode. [${NOBINMODE}]
+ #
+-# INCLUDEDIR	Base path for standard C include files [/usr/include]
++# INCLUDEDIR	Base path for standard C include files [@PREFIX@/include]
+ 
+ .if !target(__<bsd.own.mk>__)
+ __<bsd.own.mk>__:
+ 
+ # Binaries
+-BINOWN?=	root
+-BINGRP?=	wheel
+-BINMODE?=	555
+-NOBINMODE?=	444
++BINOWN?=	@INSTALL_USER@
++BINGRP?=	@INSTALL_GROUP@
++BINMODE?=	755
++NOBINMODE?=	644
+ 
+ .if defined(MODULES_WITH_WORLD)
+-KMODDIR?=	/boot/modules
++KMODDIR?=	@PREFIX@/boot/modules
+ .else
+-KMODDIR?=	/boot/kernel
++KMODDIR?=	@PREFIX@/boot/kernel
+ .endif
+ KMODOWN?=	${BINOWN}
+ KMODGRP?=	${BINGRP}
+ KMODMODE?=	${BINMODE}
+ 
+-LIBDIR?=	/usr/lib
+-LIBCOMPATDIR?=	/usr/lib/compat
+-LIBDATADIR?=	/usr/libdata
+-LINTLIBDIR?=	/usr/libdata/lint
++LIBDIR?=	@PREFIX@/lib
++LIBCOMPATDIR?=	@PREFIX@/lib/compat
++LIBDATADIR?=	@PREFIX@/libdata
++LINTLIBDIR?=	@PREFIX@/libdata/lint
+ SHLIBDIR?=	${LIBDIR}
+ LIBOWN?=	${BINOWN}
+ LIBGRP?=	${BINGRP}
+@@ -130,9 +130,9 @@
+ 
+ 
+ # Share files
+-SHAREDIR?=	/usr/share
+-SHAREOWN?=	root
+-SHAREGRP?=	wheel
++SHAREDIR?=	@PREFIX@/share
++SHAREOWN?=	@INSTALL_USER@
++SHAREGRP?=	@INSTALL_GROUP@
+ SHAREMODE?=	${NOBINMODE}
+ 
+ MANDIR?=	${SHAREDIR}/man/man
+@@ -155,7 +155,7 @@
+ NLSGRP?=	${SHAREGRP}
+ NLSMODE?=	${NOBINMODE}
+ 
+-INCLUDEDIR?=	/usr/include
++INCLUDEDIR?=	@PREFIX@/include
+ 
+ # Common variables
+ .if !defined(DEBUG_FLAGS)
+diff -r -u mk/bsd.port.mk mk/bsd.port.mk
+--- mk/bsd.port.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.port.mk	2012-03-09 23:52:49.000000000 +0100
+@@ -1,6 +1,6 @@
+ # $FreeBSD: src/share/mk/bsd.port.mk,v 1.307 2004/07/02 20:47:18 eik Exp $
+ 
+-PORTSDIR?=	/usr/ports
++PORTSDIR?=	@PREFIX@/ports
+ BSDPORTMK?=	${PORTSDIR}/Mk/bsd.port.mk
+ 
+ .include <bsd.own.mk>
+diff -r -u mk/bsd.port.subdir.mk mk/bsd.port.subdir.mk
+--- mk/bsd.port.subdir.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/bsd.port.subdir.mk	2012-03-09 23:53:10.000000000 +0100
+@@ -1,6 +1,6 @@
+ # $FreeBSD: src/share/mk/bsd.port.subdir.mk,v 1.31 2004/07/02 20:47:18 eik Exp $
+ 
+-PORTSDIR?=	/usr/ports
++PORTSDIR?=	@PREFIX@/ports
+ BSDPORTSUBDIRMK?=	${PORTSDIR}/Mk/bsd.port.subdir.mk
+ 
+ .include "${BSDPORTSUBDIRMK}"
+diff -r -u mk/sys.mk mk/sys.mk
+--- mk/sys.mk	2012-03-09 23:30:48.000000000 +0100
++++ mk/sys.mk	2012-03-09 23:54:07.000000000 +0100
+@@ -19,7 +19,7 @@
+ .SUFFIXES:	.out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh
+ .endif
+ 
+-X11BASE		?=	/usr/X11R6
++X11BASE		?=	@PREFIX@
+ 
+ AR		?=	ar
+ .if defined(%POSIX)
+@@ -253,7 +253,7 @@
+ 	rm -f ${.PREFIX}.tmp.c
+ 
+ # FreeBSD build pollution.  Hide it in the non-POSIX part of the ifdef.
+-__MAKE_CONF?=/etc/make.conf
++__MAKE_CONF?=@PREFIX@/etc/bsdmake.conf
+ .if exists(${__MAKE_CONF})
+ .include "${__MAKE_CONF}"
+ .endif

Added: trunk/dports/devel/bsdmake/files/patch-pathnames.diff
===================================================================
--- trunk/dports/devel/bsdmake/files/patch-pathnames.diff	                        (rev 0)
+++ trunk/dports/devel/bsdmake/files/patch-pathnames.diff	2012-03-10 00:55:45 UTC (rev 90611)
@@ -0,0 +1,117 @@
+--- pathnames.h	2012-03-10 01:01:58.000000000 +0100
++++ pathnames.h	2012-03-10 01:02:31.000000000 +0100
+@@ -38,7 +38,7 @@
+ #endif /* ! PATH_OBJDIR */
+ 
+ #ifndef PATH_OBJDIRPREFIX
+-#define	PATH_OBJDIRPREFIX	"/usr/obj"
++#define	PATH_OBJDIRPREFIX	"@PREFIX@/obj"
+ #endif /* ! PATH_OBJDIRPREFIX */
+ 
+ #ifndef PATH_DEFSHELLDIR
+@@ -50,7 +50,7 @@
+ #endif /* ! PATH_DEFSYSMK */
+ 
+ #ifndef PATH_DEFSYSPATH
+-#define	PATH_DEFSYSPATH	"/usr/share/mk"
++#define	PATH_DEFSYSPATH	"@PREFIX@/share/mk/bsdmake"
+ #endif /* ! PATH_DEFSYSPATH */
+ 
+ #endif /* pathnames_h_235b888a */
+--- dir.c	2012-03-10 01:28:22.000000000 +0100
++++ dir.c	2012-03-10 01:28:40.000000000 +0100
+@@ -944,24 +944,6 @@
+  *	read and hashed.
+  *-----------------------------------------------------------------------
+  */
+-#ifdef __APPLE__
+-struct Dir *
+-Path_AddDirPrefix(struct Path *path, const char *prefix, const char *inname)
+-{
+-	const char *name;
+-	char buf[MAXPATHLEN];
+-
+-	if (prefix && prefix[0] == '/' && prefix[1] != 0) {
+-		strlcpy(buf, prefix, sizeof(buf));
+-		strlcat(buf, inname, sizeof(buf));
+-		name = buf;
+-	} else
+-		name = inname;
+-
+-	return Path_AddDir(path, name);
+-}
+-
+-#endif /* __APPLE__ */
+ struct Dir *
+ Path_AddDir(struct Path *path, const char *name)
+ {
+--- dir.h	2012-03-10 01:28:54.000000000 +0100
++++ dir.h	2012-03-10 01:29:03.000000000 +0100
+@@ -60,9 +60,6 @@
+ void Dir_PrintDirectories(void);
+ 
+ struct Dir *Path_AddDir(struct Path *, const char *);
+-#ifdef __APPLE__
+-struct Dir *Path_AddDirPrefix(struct Path *, const char *, const char *);
+-#endif /* __APPLE__ */
+ void Path_Clear(struct Path *);
+ void Path_Concat(struct Path *, const struct Path *);
+ void Path_Duplicate(struct Path *, const struct Path *);
+--- main.c	2012-03-10 01:25:51.000000000 +0100
++++ main.c	2012-03-10 01:31:10.000000000 +0100
+@@ -958,55 +958,16 @@
+ 	 */
+ 	if (TAILQ_EMPTY(&sysIncPath)) {
+ 		char syspath[] = PATH_DEFSYSPATH;
+-#ifdef __APPLE__
+-	    char *prefixes[2] = { NULL, NULL };
+-	    char *devdir = getenv("DEVELOPER_DIR");
+-	    char **pf;
+-	    char execpath[MAXPATHLEN];
+-	    uint32_t execpathsize = sizeof(execpath);
+-	    char *rel;
+-
+-	    if (devdir && *devdir != '/')
+-		devdir = NULL;
+-	    prefixes[0] = devdir;
+-	    if (_NSGetExecutablePath(execpath, &execpathsize) != 0)
+-		strcpy(execpath, "/usr/bin/bsdmake");
+-	    /* chop off name to get path */
+-	    if ((cp = strrchr(execpath, '/')) != NULL)
+-		*cp = 0;
+-	    /* chop off 'bin' */
+-	    if ((cp = strrchr(execpath, '/')) != NULL)
+-		*cp = 0;
+-	    /* chop off 'usr' */
+-	    if ((cp = strrchr(execpath, '/')) != NULL)
+-		*cp = 0;
+-	    rel = (cp > execpath) ? execpath : NULL;
+-	    pf = prefixes;
+-	    do {
+-#endif /* __APPLE__ */
+ 		for (start = syspath; *start != '\0'; start = cp) {
+ 			for (cp = start; *cp != '\0' && *cp != ':'; cp++)
+ 				continue;
+ 			if (*cp == '\0') {
+-#ifdef __APPLE__
+-				Path_AddDirPrefix(&sysIncPath, *pf ? *pf : rel, start);
+-#else /* !__APPLE__ */
+ 				Path_AddDir(&sysIncPath, start);
+-#endif /* __APPLE__ */
+ 			} else {
+-#ifdef __APPLE__
+-				*cp = '\0';
+-				Path_AddDirPrefix(&sysIncPath, *pf ? *pf : rel, start);
+-				*cp++ = ':';
+-#else /* !__APPLE__ */
+ 				*cp++ = '\0';
+ 				Path_AddDir(&sysIncPath, start);
+-#endif /* __APPLE__ */
+ 			}
+ 		}
+-#ifdef __APPLE__
+-	    } while(*pf++);
+-#endif /* __APPLE__ */
+ 	}
+ 
+ 	/*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120309/f2fe2db9/attachment-0001.html>


More information about the macports-changes mailing list