Date: Sat, 9 Nov 2013 12:18:45 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r333282 - in head/lang: gnatdroid-armv5 gnatdroid-armv5/files gnatdroid-armv7 gnatdroid-armv7/files Message-ID: <201311091218.rA9CIjdf059426@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Sat Nov 9 12:18:45 2013 New Revision: 333282 URL: http://svnweb.freebsd.org/changeset/ports/333282 Log: lang/gnatdroid-armv(5,7): Convert to staging * PORTREVISION bumped because previous package added empty directories. * GPLv3 LICENSE added, but not installed as it messed up dynamic PLIST * pkg-message used instead of post-install echoes * Custom do-build target removed, default works after modifications * OPTIONS_SUB=yes to handle standard PLIST_SUB conversions * Auto-PLIST logic improvements * To simplify Auto-PLIST, non-bin entries were removed from pkg-plist * It was necessary to add pre-install target to pre-create directories that are no longer present when port is installed in clean stage. Added: head/lang/gnatdroid-armv5/files/ head/lang/gnatdroid-armv5/files/pkg-message.in (contents, props changed) head/lang/gnatdroid-armv7/files/ head/lang/gnatdroid-armv7/files/pkg-message.in (contents, props changed) Modified: head/lang/gnatdroid-armv5/Makefile head/lang/gnatdroid-armv5/pkg-plist head/lang/gnatdroid-armv7/Makefile head/lang/gnatdroid-armv7/pkg-plist Modified: head/lang/gnatdroid-armv5/Makefile ============================================================================== --- head/lang/gnatdroid-armv5/Makefile Sat Nov 9 12:03:14 2013 (r333281) +++ head/lang/gnatdroid-armv5/Makefile Sat Nov 9 12:18:45 2013 (r333282) @@ -3,7 +3,7 @@ PORTNAME= armv5 PORTVERSION= ${SNAPSHOT} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_GCC} MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION} @@ -16,13 +16,16 @@ DISTFILES= gcc-core-${GCC_VERSION}.tar.b MAINTAINER= marino@FreeBSD.org COMMENT= C/Ada cross-compiler, target: Android ARMv5 +LICENSE= GPLv3 + BUILD_DEPENDS= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils \ gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux RUN_DEPENDS:= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils -NO_STAGE= yes +NO_LICENSES_INSTALL= yes + .include "${.CURDIR}/../gnat-aux/Makefile.common" LANGS= c ada @@ -33,6 +36,7 @@ NO_MTREE= YES OPTIONS_DEFINE= FORT OBJC #CXX OPTIONS_DEFAULT= +OPTIONS_SUB= yes CXX_DESC= Also build c++ language FORT_DESC= Also build Fortran language OBJC_DESC= Also build Objective-C language @@ -42,23 +46,24 @@ DROID_ARCH= armv5te ARMVERSION= ARMv5 FPU= vfp WRKSRC= ${WRKDIR}/gcc-${GCC_VERSION} -BUILDDIR= ${WRKDIR}/build -FILESDIR= ${.CURDIR}/../gnat-aux/files +BUILD_WRKSRC= ${WRKDIR}/build +PATCHDIR= ${.CURDIR}/../gnat-aux/files CFG_SCRIPT= ${WRKSRC}/configure REVFILE= ${WRKSRC}/gcc/REVISION SRPREFIX= ${LOCALBASE}/android9 PREFIX= ${SRPREFIX}/${ARMVERSION} FULL_GNATGCC= ${LOCALBASE}/bin/gnatgcc -INSTALLDIRS= lib/gcc libexec/gcc share -INSTALLDIRS+= ${DROID_TARGET}/lib/armv7-a -INSTALLDIRS+= ${DROID_TARGET}/lib/thumb +INSTALLDIRS= lib libexec share +INSTALLDIRS+= ${DROID_TARGET}/lib PLIST_SUB+= TARGET="${DROID_TARGET}" PLIST_SUB+= GCCVERS="${GCC_VERSION}" +SUB_FILES= pkg-message +SUB_LIST= TARGET="${DROID_TARGET}" ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC} +ALL_TARGET= all .include <bsd.port.pre.mk> -.include <bsd.port.options.mk> .if ${ARCH:S/amd64/x86_64/} == x86_64 OS_LABEL4VERS= "[${OPSYS}64 x Android ${ARMVERSION}]" @@ -75,9 +80,6 @@ LANGS+= c++ APPLY_DIFFS+= cxx cxx-testsuite DISTFILES+= gcc-g++-${GCC_VERSION}.tar.bz2 INSTALLDIRS+= include/c++/${GCC_VERSION} -PLIST_SUB+= CXX="" -.else -PLIST_SUB+= CXX="@comment " .endif ############### @@ -88,9 +90,6 @@ PLIST_SUB+= CXX="@comment " LANGS+= fortran APPLY_DIFFS+= fortran DISTFILES+= gcc-fortran-${GCC_VERSION}.tar.bz2 -PLIST_SUB+= FRT="" -.else -PLIST_SUB+= FRT="@comment " .endif ################### @@ -132,7 +131,7 @@ post-extract: @${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE} # Create new directories in preparation of applying diff files -.if defined(WITH_CXX) +.if ${PORT_OPTIONS:MCXX} ${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly ${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly .endif @@ -140,45 +139,45 @@ post-extract: # Apply required composite diff files .for suffix in ${APPLY_DIFFS} @${ECHO} "Applying composite patch diff-${suffix}" - @${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix} + @${PATCH} -d ${WRKSRC} -s -E < ${PATCHDIR}/diff-${suffix} .endfor do-configure: - ${MKDIR} ${BUILDDIR} - cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \ + ${MKDIR} ${BUILD_WRKSRC} + cd ${BUILD_WRKSRC} && ${SETENV} ${ADA_CONFIGURE_ENV} \ ${CFG_SCRIPT} ${CONFIGURE_ARGS} -do-build: - cd ${BUILDDIR} && ${GMAKE} ${_MAKE_JOBS} all +pre-install: + # The "native tools" won't install unless a directory exists + ${MKDIR} ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin do-install: - cd ${BUILDDIR} && ${GMAKE} install-strip DESTDIR=${DESTDIR} - ${MV} ${PREFIX}/bin/${DROID_TARGET}-gcc \ - ${PREFIX}/bin/${DROID_TARGET}-gnatgcc - ${MV} ${PREFIX}/${DROID_TARGET}/bin/gcc \ - ${PREFIX}/${DROID_TARGET}/bin/gnatgcc -.if defined(WITH_FORT) - ${MV} ${PREFIX}/bin/${DROID_TARGET}-gfortran \ - ${PREFIX}/bin/${DROID_TARGET}-gnatgfortran - ${MV} ${PREFIX}/${DROID_TARGET}/bin/gfortran \ - ${PREFIX}/${DROID_TARGET}/bin/gnatgfortran + cd ${BUILD_WRKSRC} && ${GMAKE} install-strip DESTDIR=${STAGEDIR} + ${MV} ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gcc \ + ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gnatgcc + ${MV} ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gcc \ + ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gnatgcc +.if ${PORT_OPTIONS:MFORT} + ${MV} ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gfortran \ + ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gnatgfortran + ${MV} ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gfortran \ + ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gnatgfortran .endif post-install: .for d in ${INSTALLDIRS} - cd ${PREFIX}; ${FIND} $d \( -type f -or -type l \) | ${SORT} >> ${TMPPLIST} - cd ${PREFIX}; ${FIND} $d -type d | ${SORT} -dr | \ - ${SED} -e 's/^/@dirrm /g' >> ${TMPPLIST} + cd ${STAGEDIR}${PREFIX}; ${FIND} $d \( -type f -or -type l \) | \ + ${SORT} >> ${TMPPLIST} +.endfor +.for loop in A B + cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d -empty | \ + ${SORT} -dr | ${XARGS} ${RMDIR} .endfor - @${ECHO} "@dirrm include" >> ${TMPPLIST} - @${ECHO} "@dirrm libexec" >> ${TMPPLIST} - @${ECHO} "@dirrm lib" >> ${TMPPLIST} - - @${ECHO} "============================================================" - @${ECHO} " Add to path: ${PREFIX}/bin" - @${ECHO} " All binaries have prefix of ${DROID_TARGET}-" - @${ECHO} " e.g. ${DROID_TARGET}-gnatgcc" - @${ECHO} " ${DROID_TARGET}-gnatmake" - @${ECHO} "============================================================" + cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d | ${SORT} -dr | \ + ${SED} -e '/^bin$$/d' \ + -e '/^${DROID_TARGET}\/bin$$/d' \ + -e '/^${DROID_TARGET}\/lib$$/d' \ + -e '/^${DROID_TARGET}$$/d' \ + -e 's/^/@dirrm /g' >> ${TMPPLIST} .include <bsd.port.post.mk> Added: head/lang/gnatdroid-armv5/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gnatdroid-armv5/files/pkg-message.in Sat Nov 9 12:18:45 2013 (r333282) @@ -0,0 +1,4 @@ + Add to path: %%PREFIX%%/bin + All binaries have prefix of %%TARGET%%- + e.g. %%TARGET%%-gnatgcc + %%TARGET%%-gnatmake Modified: head/lang/gnatdroid-armv5/pkg-plist ============================================================================== --- head/lang/gnatdroid-armv5/pkg-plist Sat Nov 9 12:03:14 2013 (r333281) +++ head/lang/gnatdroid-armv5/pkg-plist Sat Nov 9 12:18:45 2013 (r333282) @@ -14,8 +14,7 @@ bin/%%TARGET%%-gcov bin/%%TARGET%%-cpp bin/%%TARGET%%-gnatgcc bin/%%TARGET%%-gcc-%%GCCVERS%% -%%FRT%%bin/%%TARGET%%-gnatgfortran -lib/libiberty.a +%%FORT%%bin/%%TARGET%%-gnatgfortran %%TARGET%%/bin/gnatbind %%TARGET%%/bin/gnatchop %%TARGET%%/bin/gnat @@ -25,7 +24,4 @@ lib/libiberty.a %%TARGET%%/bin/gnatmake %%TARGET%%/bin/gnatprep %%TARGET%%/bin/gnatgcc -%%FRT%%%%TARGET%%/bin/gnatgfortran -%%FRT%%%%TARGET%%/lib/libgfortran.a -%%FRT%%%%TARGET%%/lib/libgfortran.la -%%FRT%%%%TARGET%%/lib/libgfortran.spec +%%FORT%%%%TARGET%%/bin/gnatgfortran Modified: head/lang/gnatdroid-armv7/Makefile ============================================================================== --- head/lang/gnatdroid-armv7/Makefile Sat Nov 9 12:03:14 2013 (r333281) +++ head/lang/gnatdroid-armv7/Makefile Sat Nov 9 12:18:45 2013 (r333282) @@ -3,7 +3,7 @@ PORTNAME= armv7 PORTVERSION= ${SNAPSHOT} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_GCC} MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION} @@ -16,13 +16,16 @@ DISTFILES= gcc-core-${GCC_VERSION}.tar.b MAINTAINER= marino@FreeBSD.org COMMENT= C/Ada cross-compiler, target: Android ARMv7 +LICENSE= GPLv3 + BUILD_DEPENDS= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils \ gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux RUN_DEPENDS:= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils -NO_STAGE= yes +NO_LICENSES_INSTALL= yes + .include "${.CURDIR}/../gnat-aux/Makefile.common" LANGS= c ada @@ -33,6 +36,7 @@ NO_MTREE= YES OPTIONS_DEFINE= FORT OBJC #CXX OPTIONS_DEFAULT= +OPTIONS_SUB= yes CXX_DESC= Also build c++ language FORT_DESC= Also build Fortran language OBJC_DESC= Also build Objective-C language @@ -42,23 +46,24 @@ DROID_ARCH= armv7-a ARMVERSION= ARMv7 FPU= neon WRKSRC= ${WRKDIR}/gcc-${GCC_VERSION} -BUILDDIR= ${WRKDIR}/build -FILESDIR= ${.CURDIR}/../gnat-aux/files +BUILD_WRKSRC= ${WRKDIR}/build +PATCHDIR= ${.CURDIR}/../gnat-aux/files CFG_SCRIPT= ${WRKSRC}/configure REVFILE= ${WRKSRC}/gcc/REVISION SRPREFIX= ${LOCALBASE}/android9 PREFIX= ${SRPREFIX}/${ARMVERSION} FULL_GNATGCC= ${LOCALBASE}/bin/gnatgcc -INSTALLDIRS= lib/gcc libexec/gcc share -INSTALLDIRS+= ${DROID_TARGET}/lib/armv7-a -INSTALLDIRS+= ${DROID_TARGET}/lib/thumb +INSTALLDIRS= lib libexec share +INSTALLDIRS+= ${DROID_TARGET}/lib PLIST_SUB+= TARGET="${DROID_TARGET}" PLIST_SUB+= GCCVERS="${GCC_VERSION}" +SUB_FILES= pkg-message +SUB_LIST= TARGET="${DROID_TARGET}" ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC} +ALL_TARGET= all .include <bsd.port.pre.mk> -.include <bsd.port.options.mk> .if ${ARCH:S/amd64/x86_64/} == x86_64 OS_LABEL4VERS= "[${OPSYS}64 x Android ${ARMVERSION}]" @@ -75,9 +80,6 @@ LANGS+= c++ APPLY_DIFFS+= cxx cxx-testsuite DISTFILES+= gcc-g++-${GCC_VERSION}.tar.bz2 INSTALLDIRS+= include/c++/${GCC_VERSION} -PLIST_SUB+= CXX="" -.else -PLIST_SUB+= CXX="@comment " .endif ############### @@ -88,16 +90,13 @@ PLIST_SUB+= CXX="@comment " LANGS+= fortran APPLY_DIFFS+= fortran DISTFILES+= gcc-fortran-${GCC_VERSION}.tar.bz2 -PLIST_SUB+= FRT="" -.else -PLIST_SUB+= FRT="@comment " .endif ################### ## Objective-C ## ################### -.if ${PORT_OPTIONS:MWITH_OBJC} +.if ${PORT_OPTIONS:MOBJC} LANGS+= objc DISTFILES+= gcc-objc-${GCC_VERSION}.tar.bz2 .endif @@ -132,7 +131,7 @@ post-extract: @${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE} # Create new directories in preparation of applying diff files -.if defined(WITH_CXX) +.if ${PORT_OPTIONS:MCXX} ${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly ${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly .endif @@ -140,45 +139,45 @@ post-extract: # Apply required composite diff files .for suffix in ${APPLY_DIFFS} @${ECHO} "Applying composite patch diff-${suffix}" - @${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix} + @${PATCH} -d ${WRKSRC} -s -E < ${PATCHDIR}/diff-${suffix} .endfor do-configure: - ${MKDIR} ${BUILDDIR} - cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \ + ${MKDIR} ${BUILD_WRKSRC} + cd ${BUILD_WRKSRC} && ${SETENV} ${ADA_CONFIGURE_ENV} \ ${CFG_SCRIPT} ${CONFIGURE_ARGS} -do-build: - cd ${BUILDDIR} && ${GMAKE} ${_MAKE_JOBS} all +pre-install: + # The "native tools" won't install unless a directory exists + ${MKDIR} ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin do-install: - cd ${BUILDDIR} && ${GMAKE} install-strip DESTDIR=${DESTDIR} - ${MV} ${PREFIX}/bin/${DROID_TARGET}-gcc \ - ${PREFIX}/bin/${DROID_TARGET}-gnatgcc - ${MV} ${PREFIX}/${DROID_TARGET}/bin/gcc \ - ${PREFIX}/${DROID_TARGET}/bin/gnatgcc -.if defined(WITH_FORT) - ${MV} ${PREFIX}/bin/${DROID_TARGET}-gfortran \ - ${PREFIX}/bin/${DROID_TARGET}-gnatgfortran - ${MV} ${PREFIX}/${DROID_TARGET}/bin/gfortran \ - ${PREFIX}/${DROID_TARGET}/bin/gnatgfortran + cd ${BUILD_WRKSRC} && ${GMAKE} install-strip DESTDIR=${STAGEDIR} + ${MV} ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gcc \ + ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gnatgcc + ${MV} ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gcc \ + ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gnatgcc +.if ${PORT_OPTIONS:MFORT} + ${MV} ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gfortran \ + ${STAGEDIR}${PREFIX}/bin/${DROID_TARGET}-gnatgfortran + ${MV} ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gfortran \ + ${STAGEDIR}${PREFIX}/${DROID_TARGET}/bin/gnatgfortran .endif post-install: .for d in ${INSTALLDIRS} - cd ${PREFIX}; ${FIND} $d \( -type f -or -type l \) | ${SORT} >> ${TMPPLIST} - cd ${PREFIX}; ${FIND} $d -type d | ${SORT} -dr | \ - ${SED} -e 's/^/@dirrm /g' >> ${TMPPLIST} + cd ${STAGEDIR}${PREFIX}; ${FIND} $d \( -type f -or -type l \) | \ + ${SORT} >> ${TMPPLIST} +.endfor +.for loop in A B + cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d -empty | \ + ${SORT} -dr | ${XARGS} ${RMDIR} .endfor - @${ECHO} "@dirrm include" >> ${TMPPLIST} - @${ECHO} "@dirrm libexec" >> ${TMPPLIST} - @${ECHO} "@dirrm lib" >> ${TMPPLIST} - - @${ECHO} "============================================================" - @${ECHO} " Add to path: ${PREFIX}/bin" - @${ECHO} " All binaries have prefix of ${DROID_TARGET}-" - @${ECHO} " e.g. ${DROID_TARGET}-gnatgcc" - @${ECHO} " ${DROID_TARGET}-gnatmake" - @${ECHO} "============================================================" + cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d | ${SORT} -dr | \ + ${SED} -e '/^bin$$/d' \ + -e '/^${DROID_TARGET}\/bin$$/d' \ + -e '/^${DROID_TARGET}\/lib$$/d' \ + -e '/^${DROID_TARGET}$$/d' \ + -e 's/^/@dirrm /g' >> ${TMPPLIST} .include <bsd.port.post.mk> Added: head/lang/gnatdroid-armv7/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gnatdroid-armv7/files/pkg-message.in Sat Nov 9 12:18:45 2013 (r333282) @@ -0,0 +1,4 @@ + Add to path: %%PREFIX%%/bin + All binaries have prefix of %%TARGET%%- + e.g. %%TARGET%%-gnatgcc + %%TARGET%%-gnatmake Modified: head/lang/gnatdroid-armv7/pkg-plist ============================================================================== --- head/lang/gnatdroid-armv7/pkg-plist Sat Nov 9 12:03:14 2013 (r333281) +++ head/lang/gnatdroid-armv7/pkg-plist Sat Nov 9 12:18:45 2013 (r333282) @@ -14,8 +14,7 @@ bin/%%TARGET%%-gcov bin/%%TARGET%%-cpp bin/%%TARGET%%-gnatgcc bin/%%TARGET%%-gcc-%%GCCVERS%% -%%FRT%%bin/%%TARGET%%-gnatgfortran -lib/libiberty.a +%%FORT%%bin/%%TARGET%%-gnatgfortran %%TARGET%%/bin/gnatbind %%TARGET%%/bin/gnatchop %%TARGET%%/bin/gnat @@ -25,4 +24,4 @@ lib/libiberty.a %%TARGET%%/bin/gnatmake %%TARGET%%/bin/gnatprep %%TARGET%%/bin/gnatgcc -%%FRT%%%%TARGET%%/bin/gnatgfortran +%%FORT%%%%TARGET%%/bin/gnatgfortran
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311091218.rA9CIjdf059426>