diff -ruN pcc.orig/Makefile pcc/Makefile --- pcc.orig/Makefile 2015-08-26 02:52:58.000000000 +0400 +++ pcc/Makefile 2016-02-08 09:16:01.097814000 +0400 @@ -2,7 +2,7 @@ # $FreeBSD: head/lang/pcc/Makefile 395322 2015-08-25 22:52:58Z marino $ PORTNAME= pcc -PORTVERSION= 1.0.0 +PORTVERSION= 1.1.0 CATEGORIES= lang MASTER_SITES= ftp://pcc.ludd.ltu.se/pub/pcc-releases/ \ http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ \ @@ -11,29 +11,44 @@ MAINTAINER= joel@FreeBSD.org COMMENT= Portable C Compiler +LICENSE= BSDCOMPATIBLE BSD2CLAUSE BSD3CLAUSE +LICENSE_COMB= multi +LICENSE_NAME_BSDCOMPATIBLE= BSD-style compatible licenses +LICENSE_TEXT_BSDCOMPATIBLE= The license: BSDCOMPATIBLE (${LICENSE_NAME_BSDCOMPATIBLE}),\ + please read from the web: http://pcc.ludd.ltu.se/licenses/ +LICENSE_PERMS_BSDCOMPATIBLE= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +RUN_DEPENDS= pcc-libs>=${PORTVERSION}:${PORTSDIR}/devel/pcc-libs + ONLY_FOR_ARCHS= i386 amd64 USES= gmake tar:tgz GNU_CONFIGURE= yes CONFIGURE_ENV= YACC=${YACC} -PLIST_FILES= bin/pcc libexec/ccom libexec/cpp \ +PLIST_FILES= bin/pcc bin/pcpp \ + libexec/ccom libexec/cxxcom libexec/cpp \ man/man1/ccom.1.gz man/man1/cpp.1.gz \ man/man1/pcc.1.gz MAKE_JOBS_UNSAFE= yes -# Fix -jX builds: use -C switch instead of cd'ing and add missing dependency +OPTIONS_DEFINE= THREADS +OPTIONS_DEFAULT= THREADS +THREADS_DESC= Enable Thread-local storage (TLS) +THREADS_CONFIGURE_ENABLE= tls + +.include post-patch: - @${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -E \ - 's/cd (.+)(;| &&) (\$$[{(]MAKE[})][^$$]*)( \$$\(MFLAGS\))?/\3 -C \1/' - @${ECHO_CMD} 'builtins.o: pass1.h' >> ${WRKSRC}/cc/ccom/Makefile.in - -pre-configure: - ${MKDIR} ${WRKSRC}/os/freebsd - ${CP} ${FILESDIR}/*.h ${WRKSRC}/os/freebsd - ${REINPLACE_CMD} -e "s,%%OSVERMAJOR%%,${OSREL:R}," \ + # Don't make empty directories, which created by devel/pcc-libs port + @${REINPLACE_CMD} -e '/mkdir -p.*PCC.*DIR/d' \ + ${WRKSRC}/cc/cc/Makefile.in +.if ${OPSYS} == FreeBSD + @${REINPLACE_CMD} -e '/targmach=amd64/s/x86_64/amd64/' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's,\" MKS(TARGOSVER),${OSREL:R}\",' \ ${WRKSRC}/os/freebsd/ccconfig.h +.endif -.include +.include diff -ruN pcc.orig/distinfo pcc/distinfo --- pcc.orig/distinfo 2014-01-22 19:30:13.000000000 +0400 +++ pcc/distinfo 2015-01-09 14:56:22.000000000 +0400 @@ -1,2 +1,2 @@ -SHA256 (pcc-1.0.0.tgz) = 5802dbba46d6ea3f9badaa55b9044a0416bb410020c24a5c2a8a2eaaf41156cb -SIZE (pcc-1.0.0.tgz) = 652308 +SHA256 (pcc-1.1.0.tgz) = d9e3fed84c767dcddefb6b1f854d5da8921f3f65d8bd02997743412f41474d64 +SIZE (pcc-1.1.0.tgz) = 848427 diff -ruN pcc.orig/files/ccconfig.h pcc/files/ccconfig.h --- pcc.orig/files/ccconfig.h 2014-01-24 04:14:07.000000000 +0400 +++ pcc/files/ccconfig.h 1970-01-01 03:00:00.000000000 +0300 @@ -1,55 +0,0 @@ -/* $FreeBSD: head/lang/pcc/files/ccconfig.h 340872 2014-01-24 00:14:07Z mat $ */ -/* $Id: ccconfig.h,v 1.2 2004/12/02 21:32:25 ragge Exp $ */ - -/* - * Copyright (c) 2007 David O'Brien - * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Various settings that controls how the C compiler works. - */ - -/* common cpp predefines */ -#define CPPADD { "-D__FreeBSD__=%%OSVERMAJOR%%", "-D__ELF__", "-D__unix__=1", "-D__unix=1", "-D__STDC__=1", NULL, } -#define DYNLINKER { "-dynamic-linker", "/libexec/ld-elf.so.1", NULL } -#define CRT0FILE "/usr/lib/crt1.o" -#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL } -#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL } -#define STARTLABEL "_start" - -/* - * XXX multitargets ? - */ -#if defined(mach_i386) || defined(mach_x86) -#define CPPMDADD { "-D__i386__", "-D__i386", NULL, } -#elif defined(mach_amd64) -#define CPPMDADD { "-D__x86_64__", NULL, } -#else -#error defines for arch missing -#endif - -#define STABS diff -ruN pcc.orig/files/f77config.h pcc/files/f77config.h --- pcc.orig/files/f77config.h 2014-01-24 04:14:07.000000000 +0400 +++ pcc/files/f77config.h 1970-01-01 03:00:00.000000000 +0300 @@ -1,55 +0,0 @@ -/* $FreeBSD: head/lang/pcc/files/f77config.h 340872 2014-01-24 00:14:07Z mat $ */ -/* $Id: f77config.h,v 1.1 2005/04/17 20:22:18 ragge Exp $ */ - -/* - * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Various settings that controls how the f77 compiler works. - */ - -#if 0 -/* common cpp predefines */ -#define CPPADD { "-D__FreeBSD__", "-D__ELF__", NULL, } -#define DYNLINKER { "-dynamic-linker", "/libexec/ld-elf.so.1", NULL } -#define CRT0FILE "/usr/lib/crt0.o" -#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL } -#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL } -#endif -#define PASS1NAME "/usr/lib/f77pass1" -#define PASS2NAME "/lib/f1" -#define PASS2OPT "/lib/c2" -#define NOFLPASS2 "/lib/fc1" - -#define ASMNAME "/usr/bin/as" -#define LDNAME "/usr/bin/ld" -#define FOOTNAME "/usr/lib/crt0.o" -#define PROFFOOT "/usr/lib/mcrt0.o" -#define NOFLFOOT "/usr/lib/fcrt0.o" -#define NOFLPROFFOOT "/usr/lib/fmcrt0.o" -#define LIBLIST { "-lF77", "-lI77", "-lm", "-lc", "-l", NULL }; - diff -ruN pcc.orig/files/patch-cc_cc_cc.c pcc/files/patch-cc_cc_cc.c --- pcc.orig/files/patch-cc_cc_cc.c 1970-01-01 03:00:00.000000000 +0300 +++ pcc/files/patch-cc_cc_cc.c 2015-04-28 14:18:33.000000000 +0400 @@ -0,0 +1,11 @@ +--- cc/cc/cc.c.orig 2014-12-06 09:52:55 UTC ++++ cc/cc/cc.c +@@ -206,7 +206,7 @@ char *cppmdadd[] = CPPMDADD; + #define PCCLIBDIR NULL + #endif + #ifndef DEFLIBDIRS /* default library search paths */ +-#ifdef MULTIARCH_PATH ++#ifndef MULTIARCH_PATH + #define DEFLIBDIRS { "/usr/lib/", 0 } + #else + #define DEFLIBDIRS { "/usr/lib/", "/usr/lib/" MULTIARCH_PATH "/", 0 } diff -ruN pcc.orig/files/patch-cccc-Makefile.in pcc/files/patch-cccc-Makefile.in --- pcc.orig/files/patch-cccc-Makefile.in 2014-01-22 21:40:44.000000000 +0400 +++ pcc/files/patch-cccc-Makefile.in 1970-01-01 03:00:00.000000000 +0300 @@ -1,13 +0,0 @@ -Index: cc/cc/Makefile.in -@@ -59,8 +59,9 @@ - fi - test -z "${DESTDIR}$(mandir)/man1" || mkdir -p "${DESTDIR}$(mandir)/man1" - ${INSTALL} $(srcdir)/cc.1 ${DESTDIR}${mandir}/man1/${DEST}.1 -- test -z "${DESTDIR}$(PCCINCDIR)" || mkdir -p "${DESTDIR}$(PCCINCDIR)" -- test -z "${DESTDIR}$(PCCLIBDIR)" || mkdir -p "${DESTDIR}$(PCCLIBDIR)" -+ # Don't make unused empty directories for no reason. -+ #test -z "${DESTDIR}$(PCCINCDIR)" || mkdir -p "${DESTDIR}$(PCCINCDIR)" -+ #test -z "${DESTDIR}$(PCCLIBDIR)" || mkdir -p "${DESTDIR}$(PCCLIBDIR)" - - clean: - /bin/rm -f $(OBJS) ${DEST} diff -ruN pcc.orig/files/patch-configure pcc/files/patch-configure --- pcc.orig/files/patch-configure 2014-01-22 21:40:44.000000000 +0400 +++ pcc/files/patch-configure 1970-01-01 03:00:00.000000000 +0300 @@ -1,11 +0,0 @@ ---- configure.orig 2010-10-31 18:20:51.000000000 +0000 -+++ configure 2010-11-07 15:22:25.000000000 +0000 -@@ -1960,7 +1960,7 @@ - esac - case "$target_cpu" in - i386) targmach=i386 ;; -- x86_64) targmach=amd64 ;; -+ amd64) targmach=amd64 ;; - esac - ;; -