2015-11-25 13:51:16 +01:00
|
|
|
# $NetBSD: Makefile,v 1.21 2015/11/25 12:51:16 jperkin Exp $
|
2013-04-01 23:06:15 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
GCC_PKGNAME= gcc48
|
|
|
|
.include "../../lang/${GCC_PKGNAME}/version.mk"
|
2013-04-01 23:06:15 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
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.
|
2015-03-12 15:56:13 +01:00
|
|
|
PKGREVISION= 1
|
2014-10-31 15:22:20 +01:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= # empty
|
|
|
|
DISTFILES= # empty
|
2013-04-01 23:06:15 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
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
|
2013-04-01 23:06:15 +02:00
|
|
|
|
2015-06-22 17:38:08 +02:00
|
|
|
USE_TOOLS+= pax
|
2014-05-31 15:06:25 +02:00
|
|
|
|
2015-06-22 17:38:08 +02:00
|
|
|
NO_BUILD= yes
|
|
|
|
CHECK_SHLIBS= no
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
## Depend on exactly ${GCC48_DIST_VERSION}.
|
|
|
|
BUILD_DEPENDS+= ${GCC_PKGNAME}-${GCC48_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc48
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
LIBGCC_SUBPREFIX= ${GCC_PKGNAME}
|
2015-11-25 13:51:16 +01:00
|
|
|
LIBGCC_PREFIX= ${LOCALBASE}/${LIBGCC_SUBPREFIX}
|
2014-10-31 15:22:20 +01:00
|
|
|
GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM}
|
|
|
|
BUILD_DEFS+= GCC_TARGET_MACHINE
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if ${_OPSYS_SHLIB_TYPE} == "dylib"
|
|
|
|
SHLIB_EXT= dylib
|
2014-05-20 21:12:36 +02:00
|
|
|
.else
|
2014-10-31 15:22:20 +01:00
|
|
|
SHLIB_EXT= so
|
2014-05-20 21:12:36 +02:00
|
|
|
.endif
|
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
LIBRARY_FILES= ${WRKDIR}/lib_files
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
GENERATE_PLIST+= ${SED} -e 's,^,${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/,' \
|
|
|
|
${LIBRARY_FILES};
|
|
|
|
GENERATE_PLIST+= ${GREP} -q 'lib/' ${LIBRARY_FILES} || \
|
|
|
|
${ECHO} '@pkgdir ${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/lib' ;
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
${LIBRARY_FILES}:
|
|
|
|
${PKG_INFO} -qL '${GCC_PKGNAME}-${GCC48_DIST_VERSION}*' | \
|
|
|
|
${SED} -n -e's,^${LIBGCC_PREFIX}/,,' -e'/libexec\//d' \
|
2015-03-12 16:01:21 +01:00
|
|
|
-e'/libgcj/d;/libgij/d;/libgo\./d;/libjvm/d' \
|
2014-10-31 15:22:20 +01:00
|
|
|
-e'/lib.*\.${SHLIB_EXT}/p' >${LIBRARY_FILES}
|
2014-04-22 22:46:41 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
do-install: ${LIBRARY_FILES}
|
|
|
|
${TEST} -d ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib || \
|
|
|
|
${MKDIR} ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib
|
|
|
|
cd ${LIBGCC_PREFIX} && \
|
|
|
|
${PAX} -rw ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE} <${LIBRARY_FILES}
|
2013-04-01 23:06:15 +02:00
|
|
|
|
2014-10-31 15:22:20 +01:00
|
|
|
.include "../../mk/dlopen.buildlink3.mk"
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|