blob: 926621fd2116b7e2aaa735ec4cbc562b430859f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# $NetBSD: Makefile,v 1.7 2013/06/14 09:01:41 jperkin Exp $
GCC_PKGNAME= gcc48
.include "../../lang/${GCC_PKGNAME}/version.mk"
DISTNAME= gcc-${GCC48_DIST_VERSION}
PKGNAME= ${GCC_PKGNAME}-libs-${GCC48_DIST_VERSION}
## The PKGREVISION of this package needs to be at least 1 more than the
## PKGREVISION of the lang/gcc48 package so that with the dependence pattern
## '{gcc48,gcc48-libs}>=4.8.*' pkg_all will choose gcc48-libs over gcc48.
PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= sbd@NetBSD.org
HOMEPAGE= http://gcc.gnu.org/
COMMENT= The GNU Compiler Collection (GCC) support shared libraries.
LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
USE_TOOLS+= pax
NO_BUILD= yes
## Depend on exactly ${GCC48_DIST_VERSION}.
BUILD_DEPENDS+= ${GCC_PKGNAME}-${GCC48_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc48
.include "../../mk/bsd.prefs.mk"
FIND_PREFIX:= GCC_PKG_PREFIX=${GCC_PKGNAME}-${GCC48_DIST_VERSION}*
.include "../../mk/find-prefix.mk"
LIBGCC_SUBPREFIX= ${GCC_PKGNAME}
LIBGCC_PREFIX= ${GCC_PKG_PREFIX}/${LIBGCC_SUBPREFIX}
LIBGCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM}
BUILD_DEFS+= LIBGCC_TARGET_MACHINE
.include "../../mk/bsd.prefs.mk"
.if ${_OPSYS_SHLIB_TYPE} == "dylib"
SHLIB_EXT= dylib
.else
SHLIB_EXT= so
.endif
LIBRARY_FILES= ${WRKDIR}/lib_files
GENERATE_PLIST+= ${SED} -e 's,^,${LIBGCC_SUBPREFIX}/${LIBGCC_TARGET_MACHINE}/,' \
${LIBRARY_FILES};
GENERATE_PLIST+= ${GREP} -q 'lib/' ${LIBRARY_FILES} || \
${ECHO} '@pkgdir ${LIBGCC_SUBPREFIX}/${LIBGCC_TARGET_MACHINE}/lib' ;
${LIBRARY_FILES}:
${PKG_INFO} -qL '${GCC_PKGNAME}-${GCC48_DIST_VERSION}*' | \
${SED} -n -e's,^${LIBGCC_PREFIX}/,,' -e'/libexec\//d' \
-e'/libgij/d;/libgcj/d;/libjvm/d' \
-e'/lib.*\.${SHLIB_EXT}/p' >${LIBRARY_FILES}
do-install: ${LIBRARY_FILES}
${TEST} -d ${DESTDIR}${LIBGCC_PREFIX}/${LIBGCC_TARGET_MACHINE}/lib || \
${MKDIR} ${DESTDIR}${LIBGCC_PREFIX}/${LIBGCC_TARGET_MACHINE}/lib
cd ${LIBGCC_PREFIX} && \
${PAX} -rw ${DESTDIR}${LIBGCC_PREFIX}/${LIBGCC_TARGET_MACHINE} <${LIBRARY_FILES}
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|