diff options
author | asau <asau@pkgsrc.org> | 2011-07-15 08:47:22 +0000 |
---|---|---|
committer | asau <asau@pkgsrc.org> | 2011-07-15 08:47:22 +0000 |
commit | c8f1ae8168197a2a7b498aa46de4f04f30b51dcf (patch) | |
tree | 71c69df3116b53ece1c81d3f16177998fd6e4fe9 /lang | |
parent | f83c1358f427bcd5a9a087dfc68ba178b4a4f3ea (diff) | |
download | pkgsrc-c8f1ae8168197a2a7b498aa46de4f04f30b51dcf.tar.gz |
Staged installation support. (Also converts to static packaging list.)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gcc/Makefile | 21 | ||||
-rw-r--r-- | lang/gcc/PLIST | 198 | ||||
-rw-r--r-- | lang/gcc/distinfo | 16 | ||||
-rw-r--r-- | lang/gcc/patches/patch-Makefile.in | 15 | ||||
-rw-r--r-- | lang/gcc/patches/patch-ab | 56 | ||||
-rw-r--r-- | lang/gcc/patches/patch-ac | 21 | ||||
-rw-r--r-- | lang/gcc/patches/patch-gcc_Makefile.in | 356 | ||||
-rw-r--r-- | lang/gcc/patches/patch-gcc_ch_Make-lang.in | 36 | ||||
-rw-r--r-- | lang/gcc/patches/patch-gcc_cp_Make-lang.in | 68 | ||||
-rw-r--r-- | lang/gcc/patches/patch-gcc_f_Make-lang.in | 105 | ||||
-rw-r--r-- | lang/gcc/patches/patch-gcc_intl_Makefile.in | 39 | ||||
-rw-r--r-- | lang/gcc/patches/patch-gcc_java_Make-lang.in | 34 | ||||
-rw-r--r-- | lang/gcc/patches/patch-libchill_Makefile.in | 19 | ||||
-rw-r--r-- | lang/gcc/patches/patch-libf2c_Makefile.in | 19 | ||||
-rw-r--r-- | lang/gcc/patches/patch-libio_Makefile.in | 31 |
15 files changed, 1009 insertions, 25 deletions
diff --git a/lang/gcc/Makefile b/lang/gcc/Makefile index 194f0967301..84d17baa64b 100644 --- a/lang/gcc/Makefile +++ b/lang/gcc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.94 2010/10/12 22:57:55 joerg Exp $ +# $NetBSD: Makefile,v 1.95 2011/07/15 08:47:22 asau Exp $ DISTNAME= gcc-2.95.3 PKGREVISION= 7 @@ -17,6 +17,8 @@ COMMENT= GNU Compiler Collection, version 2 NOT_FOR_PLATFORM= Darwin-*-* Interix-*-* *-*-x86_64 DragonFly-*-* +PKG_DESTDIR_SUPPORT= user-destdir + USE_TOOLS+= gmake bison MAKEFLAGS+= GMAKE_LOCALE=no @@ -68,7 +70,6 @@ BUILD_TARGET= bootstrap GCC_PREFIX= ${PREFIX}/${DISTNAME} GCC_VERSION= ${PKGVERSION:C|nb.*||} GCC_ARCHDIR= ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION} -PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC post-extract: ${MKDIR} ${WRKSRC} @@ -99,22 +100,18 @@ post-build: # make install; make deinstall; make install # post-install: - -cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9 + -cd ${DESTDIR}${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9 .else post-install: . if exists(/usr/include/g++/FlexLexer.h) ${LN} -fs /usr/include/g++/FlexLexer.h \ - ${GCC_PREFIX}/include/g++-3/FlexLexer.h + ${DESTDIR}${GCC_PREFIX}/include/g++-3/FlexLexer.h . endif - ${RM} -f ${GCC_ARCHDIR}/include/curses.h ${GCC_PREFIX}/bin/cc + ${RM} -f ${DESTDIR}${GCC_ARCHDIR}/include/curses.h ${DESTDIR}${GCC_PREFIX}/bin/cc .endif - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${DISTNAME} - ${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/share/examples/${DISTNAME}/mk.conf - ${LN} -s gcc ${GCC_PREFIX}/bin/cc - ${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC} - ${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \ - | ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \ - >> ${PLIST_SRC} + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/${DISTNAME} + ${INSTALL_DATA} ${WRKDIR}/gcc.mk ${DESTDIR}${PREFIX}/share/examples/${DISTNAME}/mk.conf + ${LN} -s gcc ${DESTDIR}${GCC_PREFIX}/bin/cc .include "../../mk/bsd.pkg.mk" diff --git a/lang/gcc/PLIST b/lang/gcc/PLIST index 7baef6e7d44..281aeda6a23 100644 --- a/lang/gcc/PLIST +++ b/lang/gcc/PLIST @@ -1,6 +1,200 @@ -@comment $NetBSD: PLIST,v 1.14 2009/06/14 18:03:32 joerg Exp $ +@comment $NetBSD: PLIST,v 1.15 2011/07/15 08:47:22 asau Exp $ +${GCC_PREFIX}/bin/c++ +${GCC_PREFIX}/bin/c++filt +${GCC_PREFIX}/bin/cc +${GCC_PREFIX}/bin/chill +${GCC_PREFIX}/bin/cpp +${GCC_PREFIX}/bin/g++ +${GCC_PREFIX}/bin/g77 +${GCC_PREFIX}/bin/gcc +${GCC_PREFIX}/bin/gcj +${GCC_PREFIX}/bin/gcjh +${GCC_PREFIX}/bin/gcov +${GCC_PREFIX}/bin/${MACHINE_GNU_PLATFORM}-gcc +${GCC_PREFIX}/bin/jcf-dump +${GCC_PREFIX}/bin/jv-scan +${GCC_PREFIX}/${MACHINE_GNU_PLATFORM}/include/_G_config.h +${GCC_PREFIX}/include/g++-3/FlexLexer.h +${GCC_PREFIX}/include/g++-3/PlotFile.h +${GCC_PREFIX}/include/g++-3/SFile.h +${GCC_PREFIX}/include/g++-3/algo.h +${GCC_PREFIX}/include/g++-3/algobase.h +${GCC_PREFIX}/include/g++-3/algorithm +${GCC_PREFIX}/include/g++-3/alloc.h +${GCC_PREFIX}/include/g++-3/bitset +${GCC_PREFIX}/include/g++-3/builtinbuf.h +${GCC_PREFIX}/include/g++-3/bvector.h +${GCC_PREFIX}/include/g++-3/cassert +${GCC_PREFIX}/include/g++-3/cctype +${GCC_PREFIX}/include/g++-3/cerrno +${GCC_PREFIX}/include/g++-3/cfloat +${GCC_PREFIX}/include/g++-3/ciso646 +${GCC_PREFIX}/include/g++-3/climits +${GCC_PREFIX}/include/g++-3/clocale +${GCC_PREFIX}/include/g++-3/cmath +${GCC_PREFIX}/include/g++-3/complex +${GCC_PREFIX}/include/g++-3/complex.h +${GCC_PREFIX}/include/g++-3/csetjmp +${GCC_PREFIX}/include/g++-3/csignal +${GCC_PREFIX}/include/g++-3/cstdarg +${GCC_PREFIX}/include/g++-3/cstddef +${GCC_PREFIX}/include/g++-3/cstdio +${GCC_PREFIX}/include/g++-3/cstdlib +${GCC_PREFIX}/include/g++-3/cstring +${GCC_PREFIX}/include/g++-3/ctime +${GCC_PREFIX}/include/g++-3/cwchar +${GCC_PREFIX}/include/g++-3/cwctype +${GCC_PREFIX}/include/g++-3/defalloc.h +${GCC_PREFIX}/include/g++-3/deque +${GCC_PREFIX}/include/g++-3/deque.h +${GCC_PREFIX}/include/g++-3/editbuf.h +${GCC_PREFIX}/include/g++-3/floatio.h +${GCC_PREFIX}/include/g++-3/fstream +${GCC_PREFIX}/include/g++-3/fstream.h +${GCC_PREFIX}/include/g++-3/function.h +${GCC_PREFIX}/include/g++-3/functional +${GCC_PREFIX}/include/g++-3/hash_map +${GCC_PREFIX}/include/g++-3/hash_map.h +${GCC_PREFIX}/include/g++-3/hash_set +${GCC_PREFIX}/include/g++-3/hash_set.h +${GCC_PREFIX}/include/g++-3/hashtable.h +${GCC_PREFIX}/include/g++-3/heap.h +${GCC_PREFIX}/include/g++-3/indstream.h +${GCC_PREFIX}/include/g++-3/iolibio.h +${GCC_PREFIX}/include/g++-3/iomanip +${GCC_PREFIX}/include/g++-3/iomanip.h +${GCC_PREFIX}/include/g++-3/iosfwd +${GCC_PREFIX}/include/g++-3/iostdio.h +${GCC_PREFIX}/include/g++-3/iostream +${GCC_PREFIX}/include/g++-3/iostream.h +${GCC_PREFIX}/include/g++-3/iostreamP.h +${GCC_PREFIX}/include/g++-3/istream.h +${GCC_PREFIX}/include/g++-3/iterator +${GCC_PREFIX}/include/g++-3/iterator.h +${GCC_PREFIX}/include/g++-3/libio.h +${GCC_PREFIX}/include/g++-3/libioP.h +${GCC_PREFIX}/include/g++-3/list +${GCC_PREFIX}/include/g++-3/list.h +${GCC_PREFIX}/include/g++-3/map +${GCC_PREFIX}/include/g++-3/map.h +${GCC_PREFIX}/include/g++-3/memory +${GCC_PREFIX}/include/g++-3/multimap.h +${GCC_PREFIX}/include/g++-3/multiset.h +${GCC_PREFIX}/include/g++-3/numeric +${GCC_PREFIX}/include/g++-3/ostream.h +${GCC_PREFIX}/include/g++-3/pair.h +${GCC_PREFIX}/include/g++-3/parsestream.h +${GCC_PREFIX}/include/g++-3/pfstream.h +${GCC_PREFIX}/include/g++-3/procbuf.h +${GCC_PREFIX}/include/g++-3/pthread_alloc +${GCC_PREFIX}/include/g++-3/pthread_alloc.h +${GCC_PREFIX}/include/g++-3/queue +${GCC_PREFIX}/include/g++-3/rope +${GCC_PREFIX}/include/g++-3/rope.h +${GCC_PREFIX}/include/g++-3/ropeimpl.h +${GCC_PREFIX}/include/g++-3/set +${GCC_PREFIX}/include/g++-3/set.h +${GCC_PREFIX}/include/g++-3/slist +${GCC_PREFIX}/include/g++-3/slist.h +${GCC_PREFIX}/include/g++-3/sstream +${GCC_PREFIX}/include/g++-3/stack +${GCC_PREFIX}/include/g++-3/stack.h +${GCC_PREFIX}/include/g++-3/std/bastring.cc +${GCC_PREFIX}/include/g++-3/std/bastring.h +${GCC_PREFIX}/include/g++-3/std/complext.cc +${GCC_PREFIX}/include/g++-3/std/complext.h +${GCC_PREFIX}/include/g++-3/std/dcomplex.h +${GCC_PREFIX}/include/g++-3/std/fcomplex.h +${GCC_PREFIX}/include/g++-3/std/gslice.h +${GCC_PREFIX}/include/g++-3/std/gslice_array.h +${GCC_PREFIX}/include/g++-3/std/indirect_array.h +${GCC_PREFIX}/include/g++-3/std/ldcomplex.h +${GCC_PREFIX}/include/g++-3/std/mask_array.h +${GCC_PREFIX}/include/g++-3/std/slice.h +${GCC_PREFIX}/include/g++-3/std/slice_array.h +${GCC_PREFIX}/include/g++-3/std/std_valarray.h +${GCC_PREFIX}/include/g++-3/std/straits.h +${GCC_PREFIX}/include/g++-3/std/valarray_array.h +${GCC_PREFIX}/include/g++-3/std/valarray_array.tcc +${GCC_PREFIX}/include/g++-3/std/valarray_meta.h +${GCC_PREFIX}/include/g++-3/stdexcept +${GCC_PREFIX}/include/g++-3/stdiostream.h +${GCC_PREFIX}/include/g++-3/stl.h +${GCC_PREFIX}/include/g++-3/stl_algo.h +${GCC_PREFIX}/include/g++-3/stl_algobase.h +${GCC_PREFIX}/include/g++-3/stl_alloc.h +${GCC_PREFIX}/include/g++-3/stl_bvector.h +${GCC_PREFIX}/include/g++-3/stl_config.h +${GCC_PREFIX}/include/g++-3/stl_construct.h +${GCC_PREFIX}/include/g++-3/stl_deque.h +${GCC_PREFIX}/include/g++-3/stl_function.h +${GCC_PREFIX}/include/g++-3/stl_hash_fun.h +${GCC_PREFIX}/include/g++-3/stl_hash_map.h +${GCC_PREFIX}/include/g++-3/stl_hash_set.h +${GCC_PREFIX}/include/g++-3/stl_hashtable.h +${GCC_PREFIX}/include/g++-3/stl_heap.h +${GCC_PREFIX}/include/g++-3/stl_iterator.h +${GCC_PREFIX}/include/g++-3/stl_list.h +${GCC_PREFIX}/include/g++-3/stl_map.h +${GCC_PREFIX}/include/g++-3/stl_multimap.h +${GCC_PREFIX}/include/g++-3/stl_multiset.h +${GCC_PREFIX}/include/g++-3/stl_numeric.h +${GCC_PREFIX}/include/g++-3/stl_pair.h +${GCC_PREFIX}/include/g++-3/stl_queue.h +${GCC_PREFIX}/include/g++-3/stl_raw_storage_iter.h +${GCC_PREFIX}/include/g++-3/stl_relops.h +${GCC_PREFIX}/include/g++-3/stl_rope.h +${GCC_PREFIX}/include/g++-3/stl_set.h +${GCC_PREFIX}/include/g++-3/stl_slist.h +${GCC_PREFIX}/include/g++-3/stl_stack.h +${GCC_PREFIX}/include/g++-3/stl_tempbuf.h +${GCC_PREFIX}/include/g++-3/stl_tree.h +${GCC_PREFIX}/include/g++-3/stl_uninitialized.h +${GCC_PREFIX}/include/g++-3/stl_vector.h +${GCC_PREFIX}/include/g++-3/stream.h +${GCC_PREFIX}/include/g++-3/streambuf.h +${GCC_PREFIX}/include/g++-3/strfile.h +${GCC_PREFIX}/include/g++-3/string +${GCC_PREFIX}/include/g++-3/strstream +${GCC_PREFIX}/include/g++-3/strstream.h +${GCC_PREFIX}/include/g++-3/tempbuf.h +${GCC_PREFIX}/include/g++-3/tree.h +${GCC_PREFIX}/include/g++-3/type_traits.h +${GCC_PREFIX}/include/g++-3/utility +${GCC_PREFIX}/include/g++-3/valarray +${GCC_PREFIX}/include/g++-3/vector +${GCC_PREFIX}/include/g++-3/vector.h ${GCC_PREFIX}/info/chill.info ${GCC_PREFIX}/info/cpp.info ${GCC_PREFIX}/info/g77.info ${GCC_PREFIX}/info/gcc.info -share/examples/${DISTNAME}/mk.conf +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/cc1 +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/cc1chill +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/cc1obj +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/cc1plus +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/collect2 +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/cpp0 +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/f771 +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/README +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/exception +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/float.h +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/limits.h +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/math.h +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/new +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/new.h +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/syslimits.h +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/typeinfo +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/jc1 +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/jvgenmain +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/libgcc.a +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/libstdc++.a +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/libstdc++.so +${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/specs +${GCC_PREFIX}/lib/libiberty.a +${GCC_PREFIX}/lib/libstdc++.a.4.0 +${GCC_PREFIX}/lib/libstdc++.so.4.0 +${GCC_PREFIX}/man/man1/cccp.1 +${GCC_PREFIX}/man/man1/g++.1 +${GCC_PREFIX}/man/man1/g77.1 +${GCC_PREFIX}/man/man1/gcc.1 +share/examples/${PKGNAME}/mk.conf diff --git a/lang/gcc/distinfo b/lang/gcc/distinfo index 8793019b2ec..3d84b059d85 100644 --- a/lang/gcc/distinfo +++ b/lang/gcc/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.24 2010/10/12 22:57:55 joerg Exp $ +$NetBSD: distinfo,v 1.25 2011/07/15 08:47:22 asau Exp $ SHA1 (gcc-2.95.3.tar.gz) = 535d27038d161c0e7c2662702e11a48aa97ef622 RMD160 (gcc-2.95.3.tar.gz) = 2c506b7e80cb2b4d9953f4f9753d581cb885f610 @@ -6,9 +6,10 @@ Size (gcc-2.95.3.tar.gz) = 12911721 bytes SHA1 (gcc-2.95.3-diff-2002-08-29.gz) = 9e54a31e78070cba3f6840275350bd0cbf20fe84 RMD160 (gcc-2.95.3-diff-2002-08-29.gz) = cdfa97ed33ad01b5b33f745bdfacf26ec2568b53 Size (gcc-2.95.3-diff-2002-08-29.gz) = 564720 bytes +SHA1 (patch-Makefile.in) = 1d13564b97e2bf97f0bf807e7bd42647e918bc84 SHA1 (patch-aa) = 1d9db3e2fecfd3070abcc930dbe4b37669efb3a7 -SHA1 (patch-ab) = 0a9df2c9abb9a3965c085769eb09a6912f894388 -SHA1 (patch-ac) = f42b5ab389c3a51991e61cdb7533875003308001 +SHA1 (patch-ab) = 527cc1593adb1d3e56546fc9791b430921137621 +SHA1 (patch-ac) = 1f95d19e3ee2ea61d366745a330df085c530fd50 SHA1 (patch-ad) = 2fb8cda55220bd202a4b7948277d00f293718caf SHA1 (patch-ae) = b9721d3e89a93736b926e1efcfb9d0fb4904277f SHA1 (patch-af) = 72d27bfecb2633a1f184cfe9cc8b1194c0d57dfe @@ -19,3 +20,12 @@ SHA1 (patch-aj) = 9c957c4e61b67efdb92796fe04e22931cb103b5d SHA1 (patch-ak) = cf546c843a3370220360c01b7c7b09365ac1b506 SHA1 (patch-al) = 4ac1f94d5f12d4419fe7d92f5e3c9aa3b3158a33 SHA1 (patch-am) = bc18d2055d5af97d648a04af8c89be2627db700b +SHA1 (patch-gcc_Makefile.in) = 145c9069fd0214c6728f49dc3ee7e8ab5192e828 +SHA1 (patch-gcc_ch_Make-lang.in) = b1d623bd160a68ec5bbb06d7e35420a4d4d4a691 +SHA1 (patch-gcc_cp_Make-lang.in) = 139f754fb020974956d803f6ff920d473b538a90 +SHA1 (patch-gcc_f_Make-lang.in) = 377e02b3a5e2db5dbdc6a0cd27afaba21b9ef1b9 +SHA1 (patch-gcc_intl_Makefile.in) = ee25ce37bb5cd14486e00f40c306a56cd8904d9c +SHA1 (patch-gcc_java_Make-lang.in) = cd26e7b2dfd5e836eec1078c814ab0dbdd534106 +SHA1 (patch-libchill_Makefile.in) = af050b445fced4f1d54bd88b782c8321975c782d +SHA1 (patch-libf2c_Makefile.in) = 655592a4107c6f67d4edfd364633dc2f3bd7bba7 +SHA1 (patch-libio_Makefile.in) = fbced91c499898f49ff06913b51a7528be0ea4ee diff --git a/lang/gcc/patches/patch-Makefile.in b/lang/gcc/patches/patch-Makefile.in new file mode 100644 index 00000000000..d461e4b94e6 --- /dev/null +++ b/lang/gcc/patches/patch-Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-Makefile.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- Makefile.in.orig 1999-06-22 22:44:42.000000000 +0000 ++++ Makefile.in +@@ -1670,8 +1670,8 @@ install-target: $(INSTALL_TARGET_MODULES + ### other supporting targets + + MAKEDIRS= \ +- $(prefix) \ +- $(exec_prefix) ++ $(DESTDIR)$(prefix) \ ++ $(DESTDIR)$(exec_prefix) + .PHONY: installdirs + installdirs: mkinstalldirs + $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) diff --git a/lang/gcc/patches/patch-ab b/lang/gcc/patches/patch-ab index 279466f60a9..922ade39a51 100644 --- a/lang/gcc/patches/patch-ab +++ b/lang/gcc/patches/patch-ab @@ -1,12 +1,12 @@ -$NetBSD: patch-ab,v 1.7 2002/10/05 20:54:53 dmcmahill Exp $ +$NetBSD: patch-ab,v 1.8 2011/07/15 08:47:22 asau Exp $ Enable building the shared libstdc++ also make the sersion number the same as the one we ship with netbsd-1.6 as we use the same sources. ---- ../gcc-2.95.3/libstdc++/Makefile.in.orig Mon Sep 9 08:16:06 2002 -+++ ../gcc-2.95.3/libstdc++/Makefile.in +--- libstdc++/Makefile.in.orig 2011-07-12 16:44:41.000000000 +0400 ++++ libstdc++/Makefile.in 2011-07-12 16:56:07.000000000 +0400 @@ -14,7 +14,7 @@ # along with this library; see the file COPYING. If not, write to the Free # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -16,7 +16,7 @@ we use the same sources. INTERFACE = 3 gxx_include_dir=${includedir}/g++ -@@ -43,7 +43,7 @@ SHDEPS = +@@ -43,7 +43,7 @@ STAMP = bigstmp @@ -25,3 +25,51 @@ we use the same sources. #### package, host, target, and site dependent Makefile fragments come in here. ## +@@ -263,34 +263,34 @@ + if [ -z "$(MULTISUBDIR)" ]; then \ + cd $(srcdir); \ + for FILE in $(HEADERS); do \ +- rm -f $(gxx_include_dir)/$$FILE ; \ ++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + if [ -f stl/$$FILE ]; then \ +- $(INSTALL_DATA) stl/$$FILE $(gxx_include_dir)/$$FILE ; \ ++ $(INSTALL_DATA) stl/$$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + else \ +- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \ ++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + fi ; \ +- chmod a-x $(gxx_include_dir)/$$FILE ; \ ++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + done ; \ + for FILE in *.h std/*.h std/*.cc std/*.tcc; do \ +- rm -f $(gxx_include_dir)/$$FILE ; \ +- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \ +- chmod a-x $(gxx_include_dir)/$$FILE ; \ ++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ ++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ ++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + done ; \ + cd stl; \ + for FILE in *.h; do \ +- rm -f $(gxx_include_dir)/$$FILE ; \ +- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \ +- chmod a-x $(gxx_include_dir)/$$FILE ; \ ++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ ++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ ++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + done ; \ + else true ; \ + fi + rootme=`pwd`/ ; export rootme ; \ + if [ x$(enable_version_specific_runtime_libs) != xyes ]; then \ +- INSTALLDIR=$(libdir); \ ++ INSTALLDIR=$(DESTDIR)$(libdir); \ + else \ +- INSTALLDIR=$(libsubdir); \ ++ INSTALLDIR=$(DESTDIR)$(libsubdir); \ + fi; \ +- INSTALLLINKDIR=$(libsubdir); \ ++ INSTALLLINKDIR=$(DESTDIR)$(libsubdir); \ + if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR}$(MULTISUBDIR) ]; then \ + RELINSTALLDIR=; \ + elif [ x$(MULTISUBDIR) = x ]; then \ diff --git a/lang/gcc/patches/patch-ac b/lang/gcc/patches/patch-ac index 4fa07f77d20..a3705c338c2 100644 --- a/lang/gcc/patches/patch-ac +++ b/lang/gcc/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.5 2002/09/09 03:23:07 dmcmahill Exp $ +$NetBSD: patch-ac,v 1.6 2011/07/15 08:47:22 asau Exp $ ---- ../gcc-2.95.3/libiberty/Makefile.in.orig Thu Aug 29 20:05:50 2002 -+++ ../gcc-2.95.3/libiberty/Makefile.in -@@ -57,7 +57,7 @@ CFLAGS = @CFLAGS@ +--- libiberty/Makefile.in.orig 2011-07-12 16:13:20.000000000 +0400 ++++ libiberty/Makefile.in 2011-07-12 16:41:39.000000000 +0400 +@@ -57,7 +57,7 @@ LIBCFLAGS = $(CFLAGS) RANLIB = @RANLIB@ @@ -11,3 +11,16 @@ $NetBSD: patch-ac,v 1.5 2002/09/09 03:23:07 dmcmahill Exp $ MAKEOVERRIDES = +@@ -155,9 +155,9 @@ + install: install_to_$(INSTALL_DEST) install-subdir + + install_to_libdir: all +- $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n +- ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) +- mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB) ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n ++ ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) ++ mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB) + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + + install_to_tooldir: all diff --git a/lang/gcc/patches/patch-gcc_Makefile.in b/lang/gcc/patches/patch-gcc_Makefile.in new file mode 100644 index 00000000000..f498a69144e --- /dev/null +++ b/lang/gcc/patches/patch-gcc_Makefile.in @@ -0,0 +1,356 @@ +$NetBSD: patch-gcc_Makefile.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- gcc/Makefile.in.orig 2011-07-15 08:28:24.000000000 +0000 ++++ gcc/Makefile.in +@@ -2159,10 +2159,10 @@ stmp-fixinc: fixinc.sh gsyslimits.h + # won't work because libsubdir doesn't exist yet. + if [ "$(SYSTEM_HEADER_DIR)" = "$(tooldir)/sys-include" ] \ + && [ -d $(tooldir)/sys-include ]; then \ +- if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \ +- if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \ +- if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \ +- if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \ ++ if [ -d $(DESTDIR)$(libdir) ] ; then true ; else mkdir $(DESTDIR)$(libdir) ; fi; \ ++ if [ -d $(DESTDIR)$(libdir)/gcc-lib ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib; fi; \ ++ if [ -d $(DESTDIR)$(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib/$(target_alias) ; fi; \ ++ if [ -d $(DESTDIR)$(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \ + else true; fi + + touch stmp-fixinc +@@ -2429,11 +2429,11 @@ install-cross-rest: install-float-h-cros + + # Handle cpp installation. + install-cpp: cpp$(exeext) +- -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext) +- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext) ++ -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) ++ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) + if [ x$(cpp_install_dir) != x ]; then \ +- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + else true; fi + + uninstall-cpp: +@@ -2449,163 +2449,163 @@ install-float-h-cross: installdirs + # if [ -f enquire ] ; then true; else false; fi + # Note: don't use -. We should fail right away if enquire was not made. + ./enquire -f > $(tmpdir)/float.h +- -rm -f $(libsubdir)/include/float.h +- $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h ++ -rm -f $(DESTDIR)$(libsubdir)/include/float.h ++ $(INSTALL_DATA) $(tmpdir)/float.h $(DESTDIR)$(libsubdir)/include/float.h + -rm -f $(tmpdir)/float.h +- chmod a-x $(libsubdir)/include/float.h ++ chmod a-x $(DESTDIR)$(libsubdir)/include/float.h + + # Create the installation directories. + installdirs: +- -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi +- -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi +- -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi +- -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi ++ -if [ -d $(DESTDIR)$(prefix) ] ; then true ; else mkdir $(DESTDIR)$(prefix) ; chmod a+rx $(DESTDIR)$(prefix) ; fi ++ -if [ -d $(DESTDIR)$(exec_prefix) ] ; then true ; else mkdir $(DESTDIR)$(exec_prefix) ; chmod a+rx $(DESTDIR)$(exec_prefix) ; fi ++ -if [ -d $(DESTDIR)$(libdir) ] ; then true ; else mkdir $(DESTDIR)$(libdir) ; chmod a+rx $(DESTDIR)$(libdir) ; fi ++ -if [ -d $(DESTDIR)$(libdir)/gcc-lib ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib ; chmod a+rx $(DESTDIR)$(libdir)/gcc-lib ; fi + # This dir isn't currently searched by cpp. + # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi + -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \ + fdir=$${fdir}/$${dir}; \ +- if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \ ++ if [ -d $(DESTDIR)$${fdir} ] ; then true ; else mkdir $(DESTDIR)$${fdir}; chmod a+rx $(DESTDIR)$${fdir}; fi ; \ + done +- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi +- -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi +- -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi +- -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi +- -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi ++ -if [ -d $(DESTDIR)$(bindir) ] ; then true ; else mkdir $(DESTDIR)$(bindir) ; chmod a+rx $(DESTDIR)$(bindir) ; fi ++ -if [ -d $(DESTDIR)$(includedir) ] ; then true ; else mkdir $(DESTDIR)$(includedir) ; chmod a+rx $(DESTDIR)$(includedir) ; fi ++ -if [ -d $(DESTDIR)$(gcc_tooldir) ] ; then true ; else mkdir $(DESTDIR)$(gcc_tooldir) ; chmod a+rx $(DESTDIR)$(gcc_tooldir) ; fi ++ -if [ -d $(DESTDIR)$(assertdir) ] ; then true ; else mkdir $(DESTDIR)$(assertdir) ; chmod a+rx $(DESTDIR)$(assertdir) ; fi ++ -if [ -d $(DESTDIR)$(infodir) ] ; then true ; else mkdir $(DESTDIR)$(infodir) ; chmod a+rx $(DESTDIR)$(infodir) ; fi + # We don't use mkdir -p to create the parents of man1dir, + # because some systems don't support it. + # Instead, we use this technique to create the immediate parent of man1dir. + -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ +- if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi +- -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi ++ if [ -d $(DESTDIR)$$parent ] ; then true ; else mkdir $(DESTDIR)$$parent ; chmod a+rx $(DESTDIR)$$parent ; fi ++ -if [ -d $(DESTDIR)$(man1dir) ] ; then true ; else mkdir $(DESTDIR)$(man1dir) ; chmod a+rx $(DESTDIR)$(man1dir) ; fi + + # Install the compiler executables built during cross compilation. + install-common: native installdirs $(EXTRA_PARTS) lang.install-common + for file in $(COMPILERS); do \ + if [ -f $$file ] ; then \ +- rm -f $(libsubdir)/$$file; \ +- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ ++ rm -f $(DESTDIR)$(libsubdir)/$$file; \ ++ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \ + else true; \ + fi; \ + done + for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \ + if [ x"$$file" != x.. ]; then \ +- rm -f $(libsubdir)/$$file; \ +- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ ++ rm -f $(DESTDIR)$(libsubdir)/$$file; \ ++ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \ + else true; fi; \ + done + for file in $(EXTRA_PARTS) ..; do \ + if [ x"$$file" != x.. ]; then \ +- rm -f $(libsubdir)/$$file; \ +- $(INSTALL_DATA) $$file $(libsubdir)/$$file; \ +- chmod a-x $(libsubdir)/$$file; \ ++ rm -f $(DESTDIR)$(libsubdir)/$$file; \ ++ $(INSTALL_DATA) $$file $(DESTDIR)$(libsubdir)/$$file; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/$$file; \ + else true; fi; \ + done + # Don't mess with specs if it doesn't exist yet. + -if [ -f specs ] ; then \ +- rm -f $(libsubdir)/specs; \ +- $(INSTALL_DATA) specs $(libsubdir)/specs; \ +- chmod a-x $(libsubdir)/specs; \ ++ rm -f $(DESTDIR)$(libsubdir)/specs; \ ++ $(INSTALL_DATA) specs $(DESTDIR)$(libsubdir)/specs; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/specs; \ + fi + # Install protoize if it was compiled. + -if [ -f protoize$(exeext) ]; \ + then \ + if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ +- rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ + fi ; \ +- rm -f $(libsubdir)/SYSCALLS.c.X; \ +- $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ +- chmod a-x $(libsubdir)/SYSCALLS.c.X; \ ++ rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ ++ $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ + fi +- -rm -f $(libsubdir)/cpp0$(exeext) +- $(INSTALL_PROGRAM) cpp0$(exeext) $(libsubdir)/cpp0$(exeext) ++ -rm -f $(DESTDIR)$(libsubdir)/cpp0$(exeext) ++ $(INSTALL_PROGRAM) cpp0$(exeext) $(DESTDIR)$(libsubdir)/cpp0$(exeext) + # Install gcov if it was compiled. + -if [ -f gcov$(exeext) ]; \ + then \ +- rm -f $(bindir)/gcov$(exeext); \ +- $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/gcov$(exeext); \ ++ $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ + fi + + # Install the driver program as $(target_alias)-gcc + # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc. + install-driver: xgcc$(exeext) + -if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \ + if [ -d $(gcc_tooldir)/bin/. ] ; then \ + rm -f $(gcc_tooldir)/bin/gcc$(exeext); \ + $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \ + else true; fi; \ + else \ +- rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \ +- $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \ +- mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \ ++ mv $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext) $(DESTDIR)$(bindir)/$(target_alias)-gcc$(exeext); \ + fi + + # Install the info files. + # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir + # to do the install. + install-info: doc installdirs lang.install-info +- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* ++ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* + for f in cpp.info* gcc.info*; do \ +- $(INSTALL_DATA) $$f $(infodir)/$$f; \ ++ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$f; \ + done + -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ +- if [ -f $(infodir)/dir ] ; then \ ++ if [ -f $(DESTDIR)$(infodir)/dir ] ; then \ + for f in cpp.info gcc.info; do \ +- install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \ ++ install-info --dir-file=$(infodir)/dir $(DESTDIR)$(infodir)/$$f; \ + done; \ + else true; fi; \ + else true; fi; +- -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* ++ -chmod a-x $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* + + # Install the man pages. + install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man + -if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(man1dir)/$(GCC_CROSS_NAME)$(manext); \ +- $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(manext); \ +- chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(manext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext); \ ++ $(INSTALL_DATA) $(srcdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext); \ + else \ +- rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ +- $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ +- chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ +- fi +- -rm -f $(man1dir)/cccp$(manext) +- -$(INSTALL_DATA) $(srcdir)/cccp.1 $(man1dir)/cccp$(manext) +- -chmod a-x $(man1dir)/cccp$(manext) ++ rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ ++ $(INSTALL_DATA) $(srcdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ ++ fi ++ -rm -f $(DESTDIR)$(man1dir)/cccp$(manext) ++ -$(INSTALL_DATA) $(srcdir)/cccp.1 $(DESTDIR)$(man1dir)/cccp$(manext) ++ -chmod a-x $(DESTDIR)$(man1dir)/cccp$(manext) + + # Install the library. + install-libgcc: libgcc.a installdirs + -if [ -f libgcc.a ] ; then \ +- rm -f $(libsubdir)/libgcc.a; \ +- $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \ ++ rm -f $(DESTDIR)$(libsubdir)/libgcc.a; \ ++ $(INSTALL_DATA) libgcc.a $(DESTDIR)$(libsubdir)/libgcc.a; \ + if $(RANLIB_TEST_FOR_TARGET) ; then \ +- (cd $(libsubdir); $(RANLIB_FOR_TARGET) libgcc.a); else true; fi; \ +- chmod a-x $(libsubdir)/libgcc.a; \ ++ (cd $(DESTDIR)$(libsubdir); $(RANLIB_FOR_TARGET) libgcc.a); else true; fi; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/libgcc.a; \ + else true; fi + + # Install multiple versions of libgcc.a. + install-multilib: stmp-multilib installdirs + for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \ + dir=`echo $$i | sed -e 's/;.*$$//'`; \ +- if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \ ++ if [ -d $(DESTDIR)$(libsubdir)/$${dir} ]; then true; else mkdir $(DESTDIR)$(libsubdir)/$${dir}; fi; \ + for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \ +- rm -f $(libsubdir)/$${dir}/$${f}; \ +- $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \ ++ rm -f $(DESTDIR)$(libsubdir)/$${dir}/$${f}; \ ++ $(INSTALL_DATA) $${dir}/$${f} $(DESTDIR)$(libsubdir)/$${dir}/$${f}; \ + done; \ + if $(RANLIB_TEST_FOR_TARGET); then \ +- (cd $(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \ ++ (cd $(DESTDIR)$(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \ + else true; fi; \ +- chmod a-x $(libsubdir)/$${dir}/libgcc.a; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/$${dir}/libgcc.a; \ + done + + # Install all the header files built in the include subdirectory. +@@ -2613,23 +2613,23 @@ install-headers: install-include-dir $(I + # Fix symlinks to absolute paths in the installed include directory to + # point to the installed directory, not the build directory. + # Don't need to use LN_S here since we really do need ln -s and no substitutes. +- -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \ ++ -files=`cd $(DESTDIR)$(libsubdir)/include; find . -type l -print 2>/dev/null`; \ + if [ $$? -eq 0 ]; then \ + dir=`cd include; pwd`; \ + for i in $$files; do \ +- dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ ++ dest=`ls -ld $(DESTDIR)$(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ + if expr "$$dest" : "$$dir.*" > /dev/null; then \ +- rm -f $(libsubdir)/include/$$i; \ +- ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \ ++ rm -f $(DESTDIR)$(libsubdir)/include/$$i; \ ++ ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include/$$i; \ + fi; \ + done; \ + fi + + # Create or recreate the gcc private include file directory. + install-include-dir: installdirs +- -rm -rf $(libsubdir)/include +- mkdir $(libsubdir)/include +- -chmod a+rx $(libsubdir)/include ++ -rm -rf $(DESTDIR)$(libsubdir)/include ++ mkdir $(DESTDIR)$(libsubdir)/include ++ -chmod a+rx $(DESTDIR)$(libsubdir)/include + + # Install the include directory using tar. + install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir +@@ -2638,7 +2638,7 @@ install-headers-tar: stmp-headers $(STMP + # found in CDPATH, corrupting the output. We could just redirect the + # output of `cd', but some shells lose on redirection within `()'s + (cd `pwd`/include ; \ +- tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - ) ++ tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar $(TAROUTOPTS) - ) + # /bin/sh on some systems returns the status of the first tar, + # and that can lose with GNU tar which always writes a full block. + # So use `exit 0' to ignore its exit status. +@@ -2647,7 +2647,7 @@ install-headers-tar: stmp-headers $(STMP + install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir + # See discussion about the use of `pwd` above + cd `pwd`/include ; \ +- find . -print | cpio -pdum $(libsubdir)/include ++ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include + + # Put assert.h where it won't override GNU libc's assert.h. + # It goes in a dir that is searched after GNU libc's headers; +@@ -2657,26 +2657,26 @@ install-headers-cpio: stmp-headers $(STM + ## This code would be simpler if it tested for -f ... && ! grep ... + ## but supposedly the ! operator is missing in sh on some systems. + install-assert-h: assert.h installdirs +- if [ -f $(assertdir)/assert.h ]; \ ++ if [ -f $(DESTDIR)$(assertdir)/assert.h ]; \ + then \ +- if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \ ++ if grep "__eprintf" $(DESTDIR)$(assertdir)/assert.h >/dev/null; \ + then \ +- rm -f $(assertdir)/assert.h; \ +- $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ +- chmod a-x $(assertdir)/assert.h; \ ++ rm -f $(DESTDIR)$(assertdir)/assert.h; \ ++ $(INSTALL_DATA) $(srcdir)/assert.h $(DESTDIR)$(assertdir)/assert.h; \ ++ chmod a-x $(DESTDIR)$(assertdir)/assert.h; \ + else true; \ + fi; \ + else \ +- rm -f $(assertdir)/assert.h; \ +- $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ +- chmod a-x $(assertdir)/assert.h; \ ++ rm -f $(DESTDIR)$(assertdir)/assert.h; \ ++ $(INSTALL_DATA) $(srcdir)/assert.h $(DESTDIR)$(assertdir)/assert.h; \ ++ chmod a-x $(DESTDIR)$(assertdir)/assert.h; \ + fi + + # Use this target to install the program `collect2' under the name `collect2'. + install-collect2: collect2 installdirs +- $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext) ++ $(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libsubdir)/collect2$(exeext) + # Install the driver program as $(libsubdir)/gcc for collect2. +- $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) ++ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libsubdir)/gcc$(exeext) + + # Cancel installation by deleting the installed files. + uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP) diff --git a/lang/gcc/patches/patch-gcc_ch_Make-lang.in b/lang/gcc/patches/patch-gcc_ch_Make-lang.in new file mode 100644 index 00000000000..f0810cf6979 --- /dev/null +++ b/lang/gcc/patches/patch-gcc_ch_Make-lang.in @@ -0,0 +1,36 @@ +$NetBSD: patch-gcc_ch_Make-lang.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- gcc/ch/Make-lang.in.orig 1999-06-25 08:26:19.000000000 +0000 ++++ gcc/ch/Make-lang.in +@@ -130,13 +130,13 @@ CHILL.install-common: + -if [ -f cc1chill$(exeext) ] ; then \ + if [ -f chill.install ] ; then \ + if [ -f gcc-cross$(exeext) ]; then \ +- rm -f $(bindir)/$(CHILL_CROSS_NAME); \ +- $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_CROSS_NAME); \ +- chmod a+x $(bindir)/$(CHILL_CROSS_NAME); \ ++ rm -f $(DESTDIR)$(bindir)/$(CHILL_CROSS_NAME); \ ++ $(INSTALL_PROGRAM) chill.install $(DESTDIR)$(bindir)/$(CHILL_CROSS_NAME); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(CHILL_CROSS_NAME); \ + else \ +- rm -f $(bindir)/$(CHILL_INSTALL_NAME); \ +- $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \ +- chmod a+x $(bindir)/$(CHILL_INSTALL_NAME); \ ++ rm -f $(DESTDIR)$(bindir)/$(CHILL_INSTALL_NAME); \ ++ $(INSTALL_PROGRAM) chill.install $(DESTDIR)$(bindir)/$(CHILL_INSTALL_NAME); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(CHILL_INSTALL_NAME); \ + fi ; \ + fi ; \ + fi +@@ -145,9 +145,9 @@ CHILL.install-common: + # docs to install (in case LANGUAGES didn't contain chill earlier). + CHILL.install-info: + -for i in ch/chill.info*; do \ +- rm -f $(infodir)/chill.info*; \ ++ rm -f $(DESTDIR)$(infodir)/chill.info*; \ + realfile=`echo $$i | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ +- $(INSTALL_DATA) $$i $(infodir)/$$realfile; \ ++ $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$realfile; \ + done + + CHILL.install-man: diff --git a/lang/gcc/patches/patch-gcc_cp_Make-lang.in b/lang/gcc/patches/patch-gcc_cp_Make-lang.in new file mode 100644 index 00000000000..309a7b461fe --- /dev/null +++ b/lang/gcc/patches/patch-gcc_cp_Make-lang.in @@ -0,0 +1,68 @@ +$NetBSD: patch-gcc_cp_Make-lang.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- gcc/cp/Make-lang.in.orig 1999-04-26 23:50:36.000000000 +0000 ++++ gcc/cp/Make-lang.in +@@ -214,27 +214,27 @@ c++.install-normal: + c++.install-common: + -if [ -f cc1plus$(exeext) ] ; then \ + if [ -f g++-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ +- rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ +- $(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext) $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ +- $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ + fi ; \ + if [ x$(DEMANGLER_PROG) != x ] && [ -x "$(DEMANGLER_PROG)" ]; then \ + if [ -f g++-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ + fi ; \ + fi ; \ + fi +@@ -244,13 +244,13 @@ c++.install-info: + c++.install-man: $(srcdir)/cp/g++.1 + -if [ -f cc1plus$(exeext) ] ; then \ + if [ -f g++-cross$(exeext) ] ; then \ +- rm -f $(man1dir)/$(GXX_CROSS_NAME)$(manext); \ +- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_CROSS_NAME)$(manext); \ +- chmod a-x $(man1dir)/$(GXX_CROSS_NAME)$(manext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext); \ ++ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext); \ + else \ +- rm -f $(man1dir)/$(GXX_INSTALL_NAME)$(manext); \ +- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_INSTALL_NAME)$(manext); \ +- chmod a-x $(man1dir)/$(GXX_INSTALL_NAME)$(manext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext); \ ++ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext); \ + fi; \ + else true; fi + diff --git a/lang/gcc/patches/patch-gcc_f_Make-lang.in b/lang/gcc/patches/patch-gcc_f_Make-lang.in new file mode 100644 index 00000000000..e2ab7080ada --- /dev/null +++ b/lang/gcc/patches/patch-gcc_f_Make-lang.in @@ -0,0 +1,105 @@ +$NetBSD: patch-gcc_f_Make-lang.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- gcc/f/Make-lang.in.orig 1999-06-07 06:44:57.000000000 +0000 ++++ gcc/f/Make-lang.in +@@ -312,18 +312,18 @@ f77.install-normal: + # run, since we use libsubdir to store our `flag' file, lang-f77. + f77.install-common: installdirs + case "$(LANGUAGES)" in \ +- *[fF]77*) touch $(libsubdir)/lang-f77;; \ +- *) rm -f $(libsubdir)/lang-f77;; \ ++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \ ++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \ + esac +- -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \ ++ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \ + if [ -f g77-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(G77_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) g77-cross$(exeext) $(bindir)/$(G77_CROSS_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(G77_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) g77-cross$(exeext) $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(G77_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) g77$(exeext) $(bindir)/$(G77_INSTALL_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(G77_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ + fi ; \ + else true; fi + @if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \ +@@ -335,7 +335,7 @@ f77.install-common: installdirs + echo ' f77-install-ok in the source or build directory.)'; \ + echo ''; \ + else true; fi +- rm -f $(libsubdir)/lang-f77 ++ rm -f $(DESTDIR)$(libsubdir)/lang-f77 + + # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir + # to do the install. The sed rule was copied from stmp-int-hdrs. +@@ -343,44 +343,44 @@ f77.install-common: installdirs + # run, since we use libsubdir to store our `flag' file, lang-f77. + f77.install-info: f77.info installdirs + case "$(LANGUAGES)" in \ +- *[fF]77*) touch $(libsubdir)/lang-f77;; \ +- *) rm -f $(libsubdir)/lang-f77;; \ ++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \ ++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \ + esac +- if [ -f $(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \ +- rm -f $(infodir)/g77.info*; \ ++ if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \ ++ rm -f $(DESTDIR)$(infodir)/g77.info*; \ + for f in f/g77.info*; do \ + realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ +- $(INSTALL_DATA) $$f $(infodir)/$$realfile; \ ++ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \ + done; \ +- chmod a-x $(infodir)/g77.info*; \ ++ chmod a-x $(DESTDIR)$(infodir)/g77.info*; \ + else true; fi +- @if [ -f $(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \ ++ @if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \ + if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + echo " install-info --info-dir=$(infodir) $(infodir)/g77.info"; \ +- install-info --info-dir=$(infodir) $(infodir)/g77.info || : ; \ ++ install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \ + else : ; fi; \ + else : ; fi +- rm -f $(libsubdir)/lang-f77 ++ rm -f $(DESTDIR)$(libsubdir)/lang-f77 + + # Make sure `installdirs' target (from gcc Makefile) has been + # run, since we use libsubdir to store our `flag' file, lang-f77. + f77.install-man: $(srcdir)/f/g77.1 installdirs + case "$(LANGUAGES)" in \ +- *[fF]77*) touch $(libsubdir)/lang-f77;; \ +- *) rm -f $(libsubdir)/lang-f77;; \ ++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \ ++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \ + esac +- -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \ ++ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \ + if [ -f g77-cross$(exeext) ] ; then \ +- rm -f $(man1dir)/$(G77_CROSS_NAME)$(manext); \ +- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_CROSS_NAME)$(manext); \ +- chmod a-x $(man1dir)/$(G77_CROSS_NAME)$(manext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \ ++ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \ + else \ +- rm -f $(man1dir)/$(G77_INSTALL_NAME)$(manext); \ +- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_INSTALL_NAME)$(manext); \ +- chmod a-x $(man1dir)/$(G77_INSTALL_NAME)$(manext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \ ++ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \ + fi; \ + else true; fi +- rm -f $(libsubdir)/lang-f77 ++ rm -f $(DESTDIR)$(libsubdir)/lang-f77 + + # Make sure `installdirs' target (from gcc Makefile) has been + # run, since we use libsubdir to store our `flag' file, lang-f77. diff --git a/lang/gcc/patches/patch-gcc_intl_Makefile.in b/lang/gcc/patches/patch-gcc_intl_Makefile.in new file mode 100644 index 00000000000..8a3f335ee33 --- /dev/null +++ b/lang/gcc/patches/patch-gcc_intl_Makefile.in @@ -0,0 +1,39 @@ +$NetBSD: patch-gcc_intl_Makefile.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- gcc/intl/Makefile.in.orig 1999-02-02 18:49:16.000000000 +0000 ++++ gcc/intl/Makefile.in +@@ -114,26 +114,26 @@ install-exec: all + if test "$(PACKAGE)" = "gettext" \ + && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ + if test -r $(MKINSTALLDIRS); then \ +- $(MKINSTALLDIRS) $(libdir) $(includedir); \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ + else \ +- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ + fi; \ +- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ +- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ ++ $(INSTALL_DATA) intlh.inst $(DESTDIR)$(includedir)/libintl.h; \ ++ $(INSTALL_DATA) libintl.a $(DESTDIR)$(libdir)/libintl.a; \ + else \ + : ; \ + fi + install-data: all + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ +- $(MKINSTALLDIRS) $(gettextsrcdir); \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ + else \ +- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ + fi; \ +- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ ++ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ +- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ ++ $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ diff --git a/lang/gcc/patches/patch-gcc_java_Make-lang.in b/lang/gcc/patches/patch-gcc_java_Make-lang.in new file mode 100644 index 00000000000..0cb66e16254 --- /dev/null +++ b/lang/gcc/patches/patch-gcc_java_Make-lang.in @@ -0,0 +1,34 @@ +$NetBSD: patch-gcc_java_Make-lang.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- gcc/java/Make-lang.in.orig 1999-06-25 08:26:23.000000000 +0000 ++++ gcc/java/Make-lang.in +@@ -144,20 +144,20 @@ java.install-normal: + java.install-common: + -if [ -f $(GCJ)$(exeext) ]; then \ + if [ -f $(GCJ)-cross$(exeext) ]; then \ +- rm -f $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) $(GCJ)-cross$(exeext) $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) $(GCJ)-cross$(exeext) $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ + fi ; \ + fi ; \ + for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \ + if [ -f $$tool$(exeext) ]; then \ +- rm -f $(bindir)/$$tool$(exeext); \ +- $(INSTALL_PROGRAM) $$tool$(exeext) $(bindir)/$$tool$(exeext); \ +- chmod a+x $(bindir)/$$tool$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$$tool$(exeext); \ ++ $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$$tool$(exeext); \ + fi ; \ + done + diff --git a/lang/gcc/patches/patch-libchill_Makefile.in b/lang/gcc/patches/patch-libchill_Makefile.in new file mode 100644 index 00000000000..6c80575d7d8 --- /dev/null +++ b/lang/gcc/patches/patch-libchill_Makefile.in @@ -0,0 +1,19 @@ +$NetBSD: patch-libchill_Makefile.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- libchill/Makefile.in.orig 1999-08-07 05:36:10.000000000 +0000 ++++ libchill/Makefile.in +@@ -217,10 +217,10 @@ ${srcdir}/configure: configure.in + cd ${srcdir} && autoconf + + install: all +- $(INSTALL_DATA) libchill.a $(libsubdir)$(MULTISUBDIR)/libchill.a.n +- $(RANLIB) $(libsubdir)$(MULTISUBDIR)/libchill.a.n +- mv $(libsubdir)$(MULTISUBDIR)/libchill.a.n $(libsubdir)$(MULTISUBDIR)/libchill.a +- $(INSTALL_DATA) chillrt0.o $(libsubdir)$(MULTISUBDIR)/chillrt0.o ++ $(INSTALL_DATA) libchill.a $(DESTDIR)$(libsubdir)$(MULTISUBDIR)/libchill.a.n ++ $(RANLIB) $(DESTDIR)$(libsubdir)$(MULTISUBDIR)/libchill.a.n ++ mv $(DESTDIR)$(libsubdir)$(MULTISUBDIR)/libchill.a.n $(DESTDIR)$(libsubdir)$(MULTISUBDIR)/libchill.a ++ $(INSTALL_DATA) chillrt0.o $(DESTDIR)$(libsubdir)$(MULTISUBDIR)/chillrt0.o + @rootme=`pwd`/ ; export rootme ; \ + $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + diff --git a/lang/gcc/patches/patch-libf2c_Makefile.in b/lang/gcc/patches/patch-libf2c_Makefile.in new file mode 100644 index 00000000000..3ee0fc065b9 --- /dev/null +++ b/lang/gcc/patches/patch-libf2c_Makefile.in @@ -0,0 +1,19 @@ +$NetBSD: patch-libf2c_Makefile.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- libf2c/Makefile.in.orig 1999-08-07 05:36:10.000000000 +0000 ++++ libf2c/Makefile.in +@@ -197,10 +197,10 @@ check: + cd libU77; $(MAKE) G77DIR=../../../gcc/ check + + install: all +- $(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n +- ( cd $(libsubdir)/$(MULTISUBDIR) ; $(RANLIB) $(LIBG2C).n ) +- mv -f $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C) +- $(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h ++ $(INSTALL_DATA) $(LIBG2C) $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n ++ ( cd $(DESTDIR)$(libsubdir)/$(MULTISUBDIR) ; $(RANLIB) $(LIBG2C).n ) ++ mv -f $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C) ++ $(INSTALL_DATA) g2c.h $(DESTDIR)$(libsubdir)/include/g2c.h + @if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \ + echo ''; \ + echo 'Warning: g77 no longer installs libf2c.a or f2c.h.'; \ diff --git a/lang/gcc/patches/patch-libio_Makefile.in b/lang/gcc/patches/patch-libio_Makefile.in new file mode 100644 index 00000000000..a75f4c4b7dc --- /dev/null +++ b/lang/gcc/patches/patch-libio_Makefile.in @@ -0,0 +1,31 @@ +$NetBSD: patch-libio_Makefile.in,v 1.1 2011/07/15 08:47:22 asau Exp $ + +--- libio/Makefile.in.orig 2011-07-15 08:16:38.000000000 +0000 ++++ libio/Makefile.in +@@ -113,19 +113,19 @@ install: + if [ -z "$(MULTISUBDIR)" ]; then \ + if [ "$(_G_CONFIG_H)" != "" ]; then \ + if [ x$(enable_version_specific_runtime_libs) = xyes ]; then \ +- rm -f $(gxx_include_dir)/_G_config.h ; \ +- $(INSTALL_DATA) _G_config.h $(gxx_include_dir)/_G_config.h || exit 1; \ ++ rm -f $(DESTDIR)$(gxx_include_dir)/_G_config.h ; \ ++ $(INSTALL_DATA) _G_config.h $(DESTDIR)$(gxx_include_dir)/_G_config.h || exit 1; \ + else \ +- rm -f $(tooldir)/include/_G_config.h ; \ +- $(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1; \ ++ rm -f $(DESTDIR)$(tooldir)/include/_G_config.h ; \ ++ $(INSTALL_DATA) _G_config.h $(DESTDIR)$(tooldir)/include/_G_config.h || exit 1; \ + fi; \ + else true; \ + fi ; \ + cd $(srcdir); \ + for FILE in $(USER_INCLUDES); do if [ $$FILE != _G_config.h ]; then \ +- rm -f $(gxx_include_dir)/$$FILE ; \ +- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \ +- chmod a-x $(gxx_include_dir)/$$FILE ; \ ++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ ++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ ++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \ + else true; fi; done ; \ + else true; \ + fi |