Selaa lähdekoodia

Merge pull request #50 from aws-lumberyard-dev/Atom/garrieta/ATOM-16536/mcpp_fix_gpl_issues

Removed the original 'mcpp-2.7.2-az.2.patch' as it had unnecessary
changes to several config/* files that had GPL licenses.

The new, clean, patch 'mcpp_2.7.2_az.patch' doesn't have '.2.' as there
will always be one patch file, that may change in the future and it will
be easier to see the differences in future code reviews.

Signed-off-by: garrieta [email protected]
galibzon 4 vuotta sitten
vanhempi
commit
a5cc98a5de

+ 2 - 1
package-system/mcpp/.gitattributes

@@ -1 +1,2 @@
-mcpp-2.7.2-az.2.patch text eol=lf
+mcpp_2.7.2_az.patch text eol=lf
+

+ 1 - 1
package-system/mcpp/get_and_build_mcpp.py

@@ -22,7 +22,7 @@ import time
 
 
 SCRIPT_PATH = pathlib.Path(__file__).parent
-PATCH_FILE = SCRIPT_PATH / "mcpp-2.7.2-az.2.patch"
+PATCH_FILE = SCRIPT_PATH / "mcpp_2.7.2_az.patch"
 SOURCE_NAME = "mcpp-2.7.2"
 SOURCE_TAR_FILE = f"{SOURCE_NAME}.tar.gz"
 SOURCEFORGE_URL = "https://sourceforge.net/projects/mcpp/files/mcpp/V.2.7.2"

+ 3 - 348
package-system/mcpp/mcpp-2.7.2-az.2.patch → package-system/mcpp/mcpp_2.7.2_az.patch

@@ -1,348 +1,3 @@
-diff --git a/config/config.guess b/config/config.guess
-index 396482d..e3ef63f 100755
---- a/config/config.guess
-+++ b/config/config.guess
-@@ -1,10 +1,9 @@
- #! /bin/sh
- # Attempt to guess a canonical system name.
- #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
--#   Inc.
-+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
- 
--timestamp='2006-07-02'
-+timestamp='2005-12-13'
- 
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
-@@ -107,7 +106,7 @@ set_cc_for_build='
- trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
- trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
- : ${TMPDIR=/tmp} ;
-- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
-+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
-  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
-  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
-  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-@@ -207,11 +206,8 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-     *:ekkoBSD:*:*)
- 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- 	exit ;;
--    *:SolidBSD:*:*)
--	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
--	exit ;;
-     macppc:MirBSD:*:*)
--	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- 	exit ;;
-     *:MirBSD:*:*)
- 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-@@ -768,14 +764,7 @@ EOF
- 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- 	exit ;;
-     *:FreeBSD:*:*)
--	case ${UNAME_MACHINE} in
--	    pc98)
--		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
--	    amd64)
--		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
--	    *)
--		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
--	esac
-+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- 	exit ;;
-     i*:CYGWIN*:*)
- 	echo ${UNAME_MACHINE}-pc-cygwin
-@@ -790,11 +779,8 @@ EOF
-     i*:PW*:*)
- 	echo ${UNAME_MACHINE}-pc-pw32
- 	exit ;;
--    x86:Interix*:[3456]*)
--	echo i586-pc-interix${UNAME_RELEASE}
--	exit ;;
--    EM64T:Interix*:[3456]*)
--	echo x86_64-unknown-interix${UNAME_RELEASE}
-+    x86:Interix*:[345]*)
-+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- 	exit ;;
-     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- 	echo i${UNAME_MACHINE}-pc-mks
-@@ -831,9 +817,6 @@ EOF
-     arm*:Linux:*:*)
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
--    avr32*:Linux:*:*)
--	echo ${UNAME_MACHINE}-unknown-linux-gnu
--	exit ;;
-     cris:Linux:*:*)
- 	echo cris-axis-linux-gnu
- 	exit ;;
-@@ -868,11 +851,7 @@ EOF
- 	#endif
- 	#endif
- EOF
--	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
--	    /^CPU/{
--		s: ::g
--		p
--	    }'`"
-+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
- 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- 	;;
-     mips64:Linux:*:*)
-@@ -891,11 +870,7 @@ EOF
- 	#endif
- 	#endif
- EOF
--	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
--	    /^CPU/{
--		s: ::g
--		p
--	    }'`"
-+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
- 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- 	;;
-     or32:Linux:*:*)
-@@ -992,7 +967,7 @@ EOF
- 	LIBC=gnulibc1
- 	# endif
- 	#else
--	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-+	#if defined(__INTEL_COMPILER) || defined(__PGI)
- 	LIBC=gnu
- 	#else
- 	LIBC=gnuaout
-@@ -1002,11 +977,7 @@ EOF
- 	LIBC=dietlibc
- 	#endif
- EOF
--	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
--	    /^LIBC/{
--		s: ::g
--		p
--	    }'`"
-+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
- 	test x"${LIBC}" != x && {
- 		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- 		exit
-diff --git a/config/config.sub b/config/config.sub
-index 387c18d..2851647 100755
---- a/config/config.sub
-+++ b/config/config.sub
-@@ -1,10 +1,9 @@
- #! /bin/sh
- # Configuration validation subroutine script.
- #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
--#   Inc.
-+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
- 
--timestamp='2006-07-02'
-+timestamp='2005-12-11'
- 
- # This file is (in principle) common to ALL GNU software.
- # The presence of a machine in this file suggests that SOME GNU software
-@@ -241,7 +240,7 @@ case $basic_machine in
- 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- 	| am33_2.0 \
--	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- 	| bfin \
- 	| c4x | clipper \
- 	| d10v | d30v | dlx | dsp16xx \
-@@ -249,8 +248,7 @@ case $basic_machine in
- 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- 	| i370 | i860 | i960 | ia64 \
- 	| ip2k | iq2000 \
--	| m32c | m32r | m32rle | m68000 | m68k | m88k \
--	| maxq | mb | microblaze | mcore \
-+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
- 	| mips | mipsbe | mipseb | mipsel | mipsle \
- 	| mips16 \
- 	| mips64 | mips64el \
-@@ -270,17 +268,16 @@ case $basic_machine in
- 	| mn10200 | mn10300 \
- 	| mt \
- 	| msp430 \
--	| nios | nios2 \
- 	| ns16k | ns32k \
- 	| or32 \
- 	| pdp10 | pdp11 | pj | pjl \
- 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- 	| pyramid \
--	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
- 	| sh64 | sh64le \
--	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
--	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
--	| spu | strongarm \
-+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
-+	| sparcv8 | sparcv9 | sparcv9b \
-+	| strongarm \
- 	| tahoe | thumb | tic4x | tic80 | tron \
- 	| v850 | v850e \
- 	| we32k \
-@@ -288,6 +285,9 @@ case $basic_machine in
- 	| z8k)
- 		basic_machine=$basic_machine-unknown
- 		;;
-+	m32c)
-+		basic_machine=$basic_machine-unknown
-+		;;
- 	m6811 | m68hc11 | m6812 | m68hc12)
- 		# Motorola 68HC11/12.
- 		basic_machine=$basic_machine-unknown
-@@ -317,7 +317,7 @@ case $basic_machine in
- 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
--	| avr-* | avr32-* \
-+	| avr-* \
- 	| bfin-* | bs2000-* \
- 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- 	| clipper-* | craynv-* | cydra-* \
-@@ -328,7 +328,7 @@ case $basic_machine in
- 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- 	| i*86-* | i860-* | i960-* | ia64-* \
- 	| ip2k-* | iq2000-* \
--	| m32c-* | m32r-* | m32rle-* \
-+	| m32r-* | m32rle-* \
- 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- 	| m88110-* | m88k-* | maxq-* | mcore-* \
- 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-@@ -350,18 +350,17 @@ case $basic_machine in
- 	| mmix-* \
- 	| mt-* \
- 	| msp430-* \
--	| nios-* | nios2-* \
- 	| none-* | np1-* | ns16k-* | ns32k-* \
- 	| orion-* \
- 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- 	| pyramid-* \
- 	| romp-* | rs6000-* \
--	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
- 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
--	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-+	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
- 	| sparclite-* \
--	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- 	| tahoe-* | thumb-* \
- 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- 	| tron-* \
-@@ -372,6 +371,8 @@ case $basic_machine in
- 	| ymp-* \
- 	| z8k-*)
- 		;;
-+	m32c-*)
-+		;;
- 	# Recognize the various machine names and aliases which stand
- 	# for a CPU type and a company and sometimes even an OS.
- 	386bsd)
-@@ -817,12 +818,6 @@ case $basic_machine in
- 	pc532 | pc532-*)
- 		basic_machine=ns32k-pc532
- 		;;
--	pc98)
--		basic_machine=i386-pc
--		;;
--	pc98-*)
--		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
--		;;
- 	pentium | p5 | k5 | k6 | nexgen | viac3)
- 		basic_machine=i586-pc
- 		;;
-@@ -1125,7 +1120,7 @@ case $basic_machine in
- 	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
- 		basic_machine=sh-unknown
- 		;;
--	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-+	sparc | sparcv8 | sparcv9 | sparcv9b)
- 		basic_machine=sparc-sun
- 		;;
- 	cydra)
-@@ -1198,8 +1193,7 @@ case $os in
- 	      | -aos* \
- 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
--	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
--	      | -openbsd* | -solidbsd* \
-+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
- 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-@@ -1214,7 +1208,7 @@ case $os in
- 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
--	      | -skyos* | -haiku* | -rdos* | -toppers*)
-+	      | -skyos* | -haiku* | -rdos*)
- 	# Remember, each alternative MUST END IN *, to match a version number.
- 		;;
- 	-qnx*)
-@@ -1366,9 +1360,6 @@ else
- # system, and we'll never get to this point.
- 
- case $basic_machine in
--        spu-*)
--		os=-elf
--		;;
- 	*-acorn)
- 		os=-riscix1.2
- 		;;
-@@ -1378,9 +1369,9 @@ case $basic_machine in
- 	arm*-semi)
- 		os=-aout
- 		;;
--        c4x-* | tic4x-*)
--        	os=-coff
--		;;
-+    c4x-* | tic4x-*)
-+        os=-coff
-+        ;;
- 	# This must come before the *-dec entry.
- 	pdp10-*)
- 		os=-tops20
-diff --git a/config/ltmain.sh b/config/ltmain.sh
-index c715b59..06823e0 100644
---- a/config/ltmain.sh
-+++ b/config/ltmain.sh
-@@ -43,7 +43,7 @@ EXIT_FAILURE=1
- 
- PROGRAM=ltmain.sh
- PACKAGE=libtool
--VERSION="1.5.22 Debian 1.5.22-4"
-+VERSION=1.5.22
- TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
- 
- # See if we are running on zsh, and set the options which allow our
-@@ -2082,10 +2082,7 @@ EOF
- 	case $pass in
- 	dlopen) libs="$dlfiles" ;;
- 	dlpreopen) libs="$dlprefiles" ;;
--	link)
--	  libs="$deplibs %DEPLIBS%"
--	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
--	  ;;
-+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
- 	esac
-       fi
-       if test "$pass" = dlopen; then
-@@ -3204,11 +3201,6 @@ EOF
- 	    age="$number_minor"
- 	    revision="$number_minor"
- 	    ;;
--	  *)
--	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
--	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
--	    exit $EXIT_FAILURE
--	    ;;
- 	  esac
- 	  ;;
- 	no)
 diff --git a/src/configed.H b/src/configed.H
 index b4d1ebf..436bd54 100644
 --- a/src/configed.H
@@ -428,7 +83,7 @@ index c95f440..b3c10e9 100644
  	mcpp_get_mem_buffer
 +	mcpp_set_report_include_callback
 diff --git a/src/mcpp_lib.h b/src/mcpp_lib.h
-index 4827f0a..cc5d993 100644
+index 4827f0a..64b23ae 100644
 --- a/src/mcpp_lib.h
 +++ b/src/mcpp_lib.h
 @@ -1,3 +1,4 @@
@@ -487,7 +142,7 @@ index 4827f0a..cc5d993 100644
 +
  #endif  /* _MCPP_LIB_H  */
 diff --git a/src/mcpp_out.h b/src/mcpp_out.h
-index 02ba2aa..eb28660 100644
+index 02ba2aa..bf0b82e 100644
 --- a/src/mcpp_out.h
 +++ b/src/mcpp_out.h
 @@ -1,13 +1,23 @@
@@ -614,7 +269,7 @@ index c57eaef..909be89 100644
  {
  #if COMPILER == INDEPENDENT
 diff --git a/src/system.c b/src/system.c
-index 4759469..5cd549a 100644
+index 4759469..5bccf62 100644
 --- a/src/system.c
 +++ b/src/system.c
 @@ -303,7 +303,7 @@ static char *   mkdep_mt;               /* Argument of -MT option   */