lang/pcc: 1.0.0 -> 1.1.0

- Add RUN_DEPENDS on devel/pcc-libs port on the same version
- Adapt PLIST_FILES
- Add THREADS option to "Enable Thread-local storage (TLS)"
- Add new patch for ${WRKSRC}/cc/cc/cc.c file, related to inverted
  MULTIARCH_PATH define check
- Replace some static patches with sed patches
- Remove unneeded patches for this version

PR:		196642
Submitted by:	Sender Ghost <lightside@gmx.com>
Approved by:	joel (maintainer)
This commit is contained in:
Kurt Jaeger 2016-06-13 19:53:48 +00:00
parent 6befa538a2
commit 697a609b23
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416864
7 changed files with 40 additions and 148 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
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 @@ MASTER_SITES= ftp://pcc.ludd.ltu.se/pub/pcc-releases/ \
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}: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 <bsd.port.pre.mk>
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 <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -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

View File

@ -1,55 +0,0 @@
/* $FreeBSD$ */
/* $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

View File

@ -1,55 +0,0 @@
/* $FreeBSD$ */
/* $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 };

View File

@ -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 }

View File

@ -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}

View File

@ -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
;;