| @@ -1,75 +1,74 @@ | | | @@ -1,75 +1,74 @@ |
1 | # $NetBSD: buildlink3.mk,v 1.6 2011/07/14 19:54:55 hans Exp $ | | 1 | # $NetBSD: buildlink3.mk,v 1.7 2012/02/01 21:17:05 hans Exp $ |
2 | | | 2 | |
3 | BUILDLINK_TREE+= gcc44 | | 3 | BUILDLINK_TREE+= gcc44 |
4 | | | 4 | |
5 | .if !defined(GCC44_BUILDLINK3_MK) | | 5 | .if !defined(GCC44_BUILDLINK3_MK) |
6 | GCC44_BUILDLINK3_MK:= | | 6 | GCC44_BUILDLINK3_MK:= |
7 | | | 7 | |
8 | FIND_PREFIX:= BUILDLINK_PREFIX.gcc44=gcc44 | | 8 | FIND_PREFIX:= BUILDLINK_PREFIX.gcc44=gcc44 |
9 | .include "../../mk/find-prefix.mk" | | 9 | .include "../../mk/find-prefix.mk" |
10 | | | 10 | |
11 | _GCC44_SUBDIR= gcc44 | | 11 | _GCC44_SUBDIR= gcc44 |
12 | _GCC44_PREFIX= ${BUILDLINK_PREFIX.gcc44}/${_GCC44_SUBDIR} | | 12 | _GCC44_PREFIX= ${BUILDLINK_PREFIX.gcc44}/${_GCC44_SUBDIR} |
13 | | | 13 | |
14 | BUILDLINK_API_DEPENDS.gcc44+= gcc44>=${_GCC_REQD} | | 14 | BUILDLINK_API_DEPENDS.gcc44+= gcc44>=${_GCC_REQD} |
15 | BUILDLINK_ABI_DEPENDS.gcc44?= gcc44>=4.4.5nb2 | | 15 | BUILDLINK_ABI_DEPENDS.gcc44?= gcc44>=4.4.5nb2 |
16 | BUILDLINK_PKGSRCDIR.gcc44?= ../../lang/gcc44 | | 16 | BUILDLINK_PKGSRCDIR.gcc44?= ../../lang/gcc44 |
17 | | | 17 | |
18 | .if exists(${_GCC44_PREFIX}/bin/gcc) | | 18 | .if exists(${_GCC44_PREFIX}/bin/gcc) |
19 | | | 19 | |
20 | # logic for detecting the ADA compiler (not yet supported) | | 20 | # logic for detecting the ADA compiler (not yet supported) |
21 | #gcc44_GNAT1!=${_GCC44_PREFIX}/bin/gcc -print-prog-name=gnat1 | | 21 | #gcc44_GNAT1!=${_GCC44_PREFIX}/bin/gcc -print-prog-name=gnat1 |
22 | #. if exists(${gcc44_GNAT1}) | | 22 | #. if exists(${gcc44_GNAT1}) |
23 | #CONFIGURE_ENV+= ADAC=${_GCC44_PREFIX}/bin/gcc | | 23 | #CONFIGURE_ENV+= ADAC=${_GCC44_PREFIX}/bin/gcc |
24 | #MAKE_ENV+= ADAC=${_GCC44_PREFIX}/bin/gcc | | 24 | #MAKE_ENV+= ADAC=${_GCC44_PREFIX}/bin/gcc |
25 | #. endif | | 25 | #. endif |
26 | | | 26 | |
27 | # add libraries | | 27 | # add libraries |
28 | BUILDLINK_LIBDIRS.gcc44+= ${_GCC44_SUBDIR}/lib | | 28 | BUILDLINK_LIBDIRS.gcc44+= ${_GCC44_SUBDIR}/lib |
29 | | | 29 | |
30 | # find the gcc architecture | | 30 | # find the gcc architecture |
31 | gcc44_GCC_ARCHDIR!= ${DIRNAME} `${_GCC44_PREFIX}/bin/gcc --print-libgcc-file-name` | | 31 | gcc44_GCC_ARCHDIR!= ${DIRNAME} `${_GCC44_PREFIX}/bin/gcc --print-libgcc-file-name` |
32 | | | 32 | |
33 | # add the architecture dep libraries | | 33 | # add the architecture dep libraries |
34 | . if empty(gcc44_GCC_ARCHDIR:M*not_found*) | | 34 | . if empty(gcc44_GCC_ARCHDIR:M*not_found*) |
35 | BUILDLINK_LIBDIRS.gcc44+= ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/ | | 35 | BUILDLINK_LIBDIRS.gcc44+= ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/ |
36 | | | 36 | |
37 | # add the ada libraries (not yet supported) | | 37 | # add the ada libraries (not yet supported) |
38 | #. if exists(${gcc44_GNAT1}) | | 38 | #. if exists(${gcc44_GNAT1}) |
39 | #BUILDLINK_LIBDIRS.gcc44+= ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/adalib | | 39 | #BUILDLINK_LIBDIRS.gcc44+= ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/adalib |
40 | #. endif | | 40 | #. endif |
41 | | | 41 | |
42 | # add the header files | | 42 | # add the header files |
43 | BUILDLINK_INCDIRS.gcc44+= ${_GCC44_SUBDIR}/include ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/include | | 43 | BUILDLINK_INCDIRS.gcc44+= ${_GCC44_SUBDIR}/include ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/include |
44 | . endif | | 44 | . endif |
45 | .endif | | 45 | .endif |
46 | | | 46 | |
47 | BUILDLINK_FILES_CMD.gcc44= \ | | 47 | BUILDLINK_FILES_CMD.gcc44= \ |
48 | (cd ${BUILDLINK_PREFIX.gcc44} && \ | | 48 | (cd ${BUILDLINK_PREFIX.gcc44} && \ |
49 | ${FIND} ${_GCC44_SUBDIR}/bin ${_GCC44_SUBDIR}/libexec ${_GCC44_SUBDIR}/lib \( -type f -o -type l \) -print) | | 49 | ${FIND} ${_GCC44_SUBDIR}/bin ${_GCC44_SUBDIR}/include ${_GCC44_SUBDIR}/libexec ${_GCC44_SUBDIR}/lib \( -type f -o -type l \) -print) |
50 | BUILDLINK_FNAME_TRANSFORM.gcc44= -e s:buildlink:buildlink/gcc44: | | | |
51 | | | 50 | |
52 | # When not using the GNU linker, gcc will always link shared libraries | | 51 | # When not using the GNU linker, gcc will always link shared libraries |
53 | # against the shared version of libgcc. Always enable _USE_GCC_SHILB on | | 52 | # against the shared version of libgcc. Always enable _USE_GCC_SHILB on |
54 | # platforms that don't use the GNU linker, such as SunOS. | | 53 | # platforms that don't use the GNU linker, such as SunOS. |
55 | .include "../../mk/bsd.prefs.mk" | | 54 | .include "../../mk/bsd.prefs.mk" |
56 | .if ${OPSYS} == "SunOS" | | 55 | .if ${OPSYS} == "SunOS" |
57 | _USE_GCC_SHLIB= yes | | 56 | _USE_GCC_SHLIB= yes |
58 | .endif | | 57 | .endif |
59 | | | 58 | |
60 | # Packages that link against shared libraries need a full dependency. | | 59 | # Packages that link against shared libraries need a full dependency. |
61 | .if defined(_USE_GCC_SHLIB) | | 60 | .if defined(_USE_GCC_SHLIB) |
62 | BUILDLINK_DEPMETHOD.gcc44+= full | | 61 | BUILDLINK_DEPMETHOD.gcc44+= full |
63 | .else | | 62 | .else |
64 | BUILDLINK_DEPMETHOD.gcc44?= build | | 63 | BUILDLINK_DEPMETHOD.gcc44?= build |
65 | .endif | | 64 | .endif |
66 | | | 65 | |
67 | .include "../../mk/pthread.buildlink3.mk" | | 66 | .include "../../mk/pthread.buildlink3.mk" |
68 | pkgbase := gcc44 | | 67 | pkgbase := gcc44 |
69 | .include "../../mk/pkg-build-options.mk" | | 68 | .include "../../mk/pkg-build-options.mk" |
70 | .if !empty(PKG_BUILD_OPTIONS.gcc44:Mnls) | | 69 | .if !empty(PKG_BUILD_OPTIONS.gcc44:Mnls) |
71 | .include "../../devel/gettext-lib/buildlink3.mk" | | 70 | .include "../../devel/gettext-lib/buildlink3.mk" |
72 | .endif | | 71 | .endif |
73 | .endif # GCC44_BUILDLINK3_MK | | 72 | .endif # GCC44_BUILDLINK3_MK |
74 | | | 73 | |
75 | BUILDLINK_TREE+= -gcc44 | | 74 | BUILDLINK_TREE+= -gcc44 |