diff options
author | ryoon <ryoon@pkgsrc.org> | 2015-07-16 12:07:07 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2015-07-16 12:07:07 +0000 |
commit | 1eb80ad7d893faad55319993441831a2d44b50da (patch) | |
tree | 3b7c349480c35bd8333faf9b2e56187a1d339f24 /lang/gcc5-libs | |
parent | 6609031a3da40dbd01c13fbb01a14d56cf61c1f5 (diff) | |
download | pkgsrc-1eb80ad7d893faad55319993441831a2d44b50da.tar.gz |
Import gcc5-libs-5.1.0nb1 as lang/gcc5-libs.
The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C,
Fortran, and Go, as well as libraries for these languages (libstdc++,
libgfortran, ...).
This packages provides GCC support libraries in a specific location and allows
packages to depend on just the libraries rather than having to pull in the full
GCC package.
Diffstat (limited to 'lang/gcc5-libs')
-rw-r--r-- | lang/gcc5-libs/DESCR | 7 | ||||
-rw-r--r-- | lang/gcc5-libs/Makefile | 69 | ||||
-rw-r--r-- | lang/gcc5-libs/buildlink3.mk | 46 |
3 files changed, 122 insertions, 0 deletions
diff --git a/lang/gcc5-libs/DESCR b/lang/gcc5-libs/DESCR new file mode 100644 index 00000000000..2801d164a1d --- /dev/null +++ b/lang/gcc5-libs/DESCR @@ -0,0 +1,7 @@ +The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C, +Fortran, and Go, as well as libraries for these languages (libstdc++, +libgfortran, ...). + +This packages provides GCC support libraries in a specific location and allows +packages to depend on just the libraries rather than having to pull in the full +GCC package. diff --git a/lang/gcc5-libs/Makefile b/lang/gcc5-libs/Makefile new file mode 100644 index 00000000000..cd9e9a1e808 --- /dev/null +++ b/lang/gcc5-libs/Makefile @@ -0,0 +1,69 @@ +# $NetBSD: Makefile,v 1.1 2015/07/16 12:07:07 ryoon Exp $ + +GCC_PKGNAME= gcc5 +.include "../../lang/${GCC_PKGNAME}/version.mk" + +DISTNAME= gcc-${GCC5_DIST_VERSION} +PKGNAME= ${GCC_PKGNAME}-libs-${GCC5_DIST_VERSION} + +## The PKGREVISION of this package needs to be at least 1 more than the +## PKGREVISION of the lang/gcc5 package so that with the dependence pattern +## '{gcc5,gcc5-libs}>=5.1.*' pkg_add will choose gcc5-libs over gcc5. +PKGREVISION= 1 + +CATEGORIES= lang +MASTER_SITES= # empty +DISTFILES= # empty + +MAINTAINER= pkgsrc-users@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 +CHECK_SHLIBS= no + +## Depend on exactly ${GCC5_DIST_VERSION}. +BUILD_DEPENDS+= ${GCC_PKGNAME}-${GCC5_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc5 + +.include "../../mk/bsd.prefs.mk" + +FIND_PREFIX:= GCC_PKG_PREFIX=${GCC_PKGNAME}-${GCC5_DIST_VERSION}* +.include "../../mk/find-prefix.mk" + +LIBGCC_SUBPREFIX= ${GCC_PKGNAME} +LIBGCC_PREFIX= ${GCC_PKG_PREFIX}/${LIBGCC_SUBPREFIX} +GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} +BUILD_DEFS+= GCC_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}/${GCC_TARGET_MACHINE}/,' \ + ${LIBRARY_FILES}; +GENERATE_PLIST+= ${GREP} -q 'lib/' ${LIBRARY_FILES} || \ + ${ECHO} '@pkgdir ${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/lib' ; + +${LIBRARY_FILES}: + ${PKG_INFO} -qL '${GCC_PKGNAME}-${GCC5_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}/${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} + +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/lang/gcc5-libs/buildlink3.mk b/lang/gcc5-libs/buildlink3.mk new file mode 100644 index 00000000000..369626ac469 --- /dev/null +++ b/lang/gcc5-libs/buildlink3.mk @@ -0,0 +1,46 @@ +# $NetBSD: buildlink3.mk,v 1.1 2015/07/16 12:07:07 ryoon Exp $ + +BUILDLINK_TREE+= gcc5-libs + +.if !defined(GCC5_LIBS_BUILDLINK3_MK) +GCC5_LIBS_BUILDLINK3_MK:= + +.if !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) +BUILDLINK_API_DEPENDS.gcc5-libs+= gcc5-libs>=5.1.0 +.else +BUILDLINK_API_DEPENDS.gcc5-libs+= {gcc5,gcc5-libs}>=5.1.0 +.endif +BUILDLINK_PKGSRCDIR.gcc5-libs= ../../lang/gcc5-libs +BUILDLINK_DEPMETHOD.gcc5-libs?= full + +BUILDLINK_PASSTHRU_DIRS+= ${BUILDLINK_PREFIX.gcc5-libs}/gcc5 + +BUILDLINK_FILES.gcc5-libs= #empty +BUILDLINK_AUTO_VARS.gcc5-libs= no + +.if !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) +# Use custom specs file to ensure we link against pkgsrc libraries. +SPECS_LIBGCC= ${WRAPPER_DIR}/specs.libgcc +WRAPPER_TARGETS+= ${SPECS_LIBGCC} + +LIBGCC_SUBPREFIX= gcc5 +LIBGCC_PREFIX= ${BUILDLINK_PREFIX.gcc5-libs}/${LIBGCC_SUBPREFIX} +GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} + +${SPECS_LIBGCC}: + @${ECHO} "*link_libgcc:" >${SPECS_LIBGCC} + @${ECHO} "%D $(LINKER_RPATH_FLAG)${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib/%M" >>${SPECS_LIBGCC} + +_WRAP_EXTRA_ARGS.CC+= -specs=${SPECS_LIBGCC} +_WRAP_EXTRA_ARGS.CXX+= -specs=${SPECS_LIBGCC} +_WRAP_EXTRA_ARGS.FC+= -specs=${SPECS_LIBGCC} +CWRAPPERS_APPEND.cc+= -specs=${SPECS_LIBGCC} +CWRAPPERS_APPEND.cxx+= -specs=${SPECS_LIBGCC} +CWRAPPERS_APPEND.f77+= -specs=${SPECS_LIBGCC} +.endif + +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.endif # GCC5_LIBS_BUILDLINK3_MK + +BUILDLINK_TREE+= -gcc5-libs |