Sun Mar 5 10:40:18 2017 UTC ()
Fix path to cross-libtool-base in f2c.mk for crossbuilding


(kamil)
diff -r1.17 -r1.18 pkgsrc/mk/compiler/f2c.mk

cvs diff -r1.17 -r1.18 pkgsrc/mk/compiler/f2c.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/f2c.mk 2015/11/25 13:05:47 1.17
+++ pkgsrc/mk/compiler/f2c.mk 2017/03/05 10:40:18 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: f2c.mk,v 1.17 2015/11/25 13:05:47 jperkin Exp $ 1# $NetBSD: f2c.mk,v 1.18 2017/03/05 10:40:18 kamil Exp $
2# 2#
3# Copyright (c) 2005 The NetBSD Foundation, Inc. 3# Copyright (c) 2005 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -77,36 +77,36 @@ PKG_FC:= ${_F2C_FC} @@ -77,36 +77,36 @@ PKG_FC:= ${_F2C_FC}
77# XXX It should really be handled within the wrapper framework. 77# XXX It should really be handled within the wrapper framework.
78# 78#
79_WRAP_ENV.FC= PATH="${WRAPPER_BINDIR}:${_WRAP_PATH}"; export PATH 79_WRAP_ENV.FC= PATH="${WRAPPER_BINDIR}:${_WRAP_PATH}"; export PATH
80. endif 80. endif
81 81
82# Prepend the path the to the compiler to the PATH 82# Prepend the path the to the compiler to the PATH
83. if !empty(_LANGUAGES.f2c) 83. if !empty(_LANGUAGES.f2c)
84PREPEND_PATH+= ${_F2C_DIR}/bin 84PREPEND_PATH+= ${_F2C_DIR}/bin
85. endif 85. endif
86 86
87# Dependencies: 87# Dependencies:
88TOOL_DEPENDS+= f2c>=20090411nb2:../../lang/f2c # translator 88TOOL_DEPENDS+= f2c>=20090411nb2:../../lang/f2c # translator
89 89
90.if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mcross/libtool-base) # See below 90.if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mcross/cross-libtool-base) # See below
91. include "../../devel/libf2c/buildlink3.mk" # library 91. include "../../devel/libf2c/buildlink3.mk" # library
92.endif 92.endif
93 93
94. if defined(F2C_DIR) && !empty(F2C_DIR) 94. if defined(F2C_DIR) && !empty(F2C_DIR)
95PKGSRC_MAKE_ENV+= F2C_DIR=${F2C_DIR:Q} 95PKGSRC_MAKE_ENV+= F2C_DIR=${F2C_DIR:Q}
96. endif 96. endif
97 97
98# libtool-base is special as it only needs f77 to extract linker flags etc. 98# libtool-base is special as it only needs f77 to extract linker flags etc.
99.if !empty(PKGPATH:Mdevel/libtool-base) || !empty(PKGPATH:Mcross/libtool-base) 99.if !empty(PKGPATH:Mdevel/libtool-base) || !empty(PKGPATH:Mcross/cross-libtool-base)
100pre-configure: fake-f2c-libs 100pre-configure: fake-f2c-libs
101 101
102_WRAP_EXTRA_ARGS.FC+= -L${WRKDIR}/.f2c/lib -I${WRKDIR}/.f2c/include 102_WRAP_EXTRA_ARGS.FC+= -L${WRKDIR}/.f2c/lib -I${WRKDIR}/.f2c/include
103 103
104fake-f2c-libs: 104fake-f2c-libs:
105 ${MKDIR} ${WRKDIR}/.f2c/include 105 ${MKDIR} ${WRKDIR}/.f2c/include
106 ${MKDIR} ${WRKDIR}/.f2c/lib 106 ${MKDIR} ${WRKDIR}/.f2c/lib
107 ${ECHO} 'int main(void) { return 0; }' > ${WRKDIR}/.f2c/lib/main.c 107 ${ECHO} 'int main(void) { return 0; }' > ${WRKDIR}/.f2c/lib/main.c
108 ${CC} -c -o ${WRKDIR}/.f2c/lib/main.o ${WRKDIR}/.f2c/lib/main.c 108 ${CC} -c -o ${WRKDIR}/.f2c/lib/main.o ${WRKDIR}/.f2c/lib/main.c
109 ${AR} cq ${WRKDIR}/.f2c/lib/libf2c.a ${WRKDIR}/.f2c/lib/main.o 109 ${AR} cq ${WRKDIR}/.f2c/lib/libf2c.a ${WRKDIR}/.f2c/lib/main.o
110 ${RANLIB} ${WRKDIR}/.f2c/lib/libf2c.a 110 ${RANLIB} ${WRKDIR}/.f2c/lib/libf2c.a
111 ${TOUCH} ${WRKDIR}/.f2c/include/f2c.h 111 ${TOUCH} ${WRKDIR}/.f2c/include/f2c.h
112.endif 112.endif