summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-10-25 21:04:21 +0000
committerjlam <jlam@pkgsrc.org>2007-10-25 21:04:21 +0000
commitb5e6ca3a7e36bba97ce2153247efaeb97ac6facb (patch)
treeb8aa93dd00c811788670e0756c30a0c0cb8dea62 /lang
parent65d4b8652df4e0ae4c1dad6ea540fe4351790f8b (diff)
downloadpkgsrc-b5e6ca3a7e36bba97ce2153247efaeb97ac6facb.tar.gz
Move code that generates a dynamic PLIST from the {pre,do,post}-install
targets and into a GENERATE_PLIST variable definition. Remove some unnecessary empty PLISTs as a result of properly setting GENERATE_PLIST.
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc3-c/Makefile16
-rw-r--r--lang/gcc34/Makefile16
-rw-r--r--lang/ruby/Makefile19
3 files changed, 25 insertions, 26 deletions
diff --git a/lang/gcc3-c/Makefile b/lang/gcc3-c/Makefile
index 2016e2894d3..f1eae06fad8 100644
--- a/lang/gcc3-c/Makefile
+++ b/lang/gcc3-c/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2007/10/13 15:06:29 heinz Exp $
+# $NetBSD: Makefile,v 1.23 2007/10/25 21:04:22 jlam Exp $
PKGNAME= gcc3${GCC3_PKGMODIF}-c-${GCC_VERSION}
COMMENT= GNU Compiler Collection, v3 - C compiler
@@ -11,7 +11,6 @@ INFO_FILES= yes
# The "gcc" frontend knows all languages (by patch)
CONFIGURE_ARGS+= --enable-languages=c
-PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
MAKE_ENV+= ALL_GCC=${ALL_GCC:Q}
MAKE_ENV+= ALL_GCC_C=${ALL_GCC_C:Q}
@@ -26,6 +25,12 @@ BUILD_TARGET= bootstrap
post-build:
${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
+GENERATE_PLIST+= \
+ ${FIND} ${DESTDIR:Q}${GCC_PREFIX} \( -type f -o -type l \) -print \
+ | ${SORT} | ${SED} -e "s,${DESTDIR}${PREFIX}/,,g"; \
+ ${FIND} ${DESTDIR:Q}${GCC_PREFIX} -type d -print \
+ | ${SORT} -r | ${SED} -e "s,${DESTDIR}${PREFIX}/,@dirrm ,g";
+
post-install:
.if ${OPSYS} == "SunOS"
cd ${DESTDIR:Q}${GCC_ARCHDIR}/include && ${RM} -f fixed
@@ -39,12 +44,5 @@ post-install:
${INSTALL_DATA_DIR} ${DESTDIR:Q}${GCC_PREFIX}/mk
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${DESTDIR:Q}${GCC_PREFIX}/mk/c.mk
${LN} -f ${DESTDIR:Q}${GCC_PREFIX}/bin/gcc ${DESTDIR:Q}${GCC_PREFIX}/bin/cc
- ${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
- ${FIND} ${DESTDIR:Q}${GCC_PREFIX} \( -type f -o -type l \) -print \
- | ${SORT} | ${SED} -e "s,${DESTDIR}${PREFIX}/,,g" \
- >> ${PLIST_SRC}
- ${FIND} ${DESTDIR:Q}${GCC_PREFIX} -type d -print \
- | ${SORT} -r | ${SED} -e "s,${DESTDIR}${PREFIX}/,@dirrm ,g" \
- >> ${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/gcc34/Makefile b/lang/gcc34/Makefile
index 9abfb504bd8..5a9a3f559dd 100644
--- a/lang/gcc34/Makefile
+++ b/lang/gcc34/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2007/04/07 22:23:01 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.40 2007/10/25 21:04:22 jlam Exp $
#
DISTNAME= gcc-${GCC_VERSION}
@@ -115,7 +115,6 @@ USE_TOOLS+= gmake makeinfo msgfmt
HAS_CONFIGURE= YES # no GNU_CONFIGURE!
CONFIG_SHELL?= ${SH}
CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL:Q}
-PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
.if !empty(BUILD_ADA:M[Yy][Ee][Ss])
@@ -226,14 +225,11 @@ do-install:
done )
.endif
-post-install:
- ${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
- ${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
- | ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
- >> ${PLIST_SRC}
- ${FIND} ${GCC_PREFIX} -type d -print \
- | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
- >> ${PLIST_SRC}
+GENERATE_PLIST+= \
+ ${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
+ | ${SORT} | ${SED} -e "s,${PREFIX}/,,g"; \
+ ${FIND} ${GCC_PREFIX} -type d -print \
+ | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g";
.include "../../mk/bsd.prefs.mk"
.if !empty(BUILD_ADA:M[Yy][Ee][Ss])
diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile
index 757c2144838..d8014602eae 100644
--- a/lang/ruby/Makefile
+++ b/lang/ruby/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2007/09/09 14:20:26 taca Exp $
+# $NetBSD: Makefile,v 1.45 2007/10/25 21:04:22 jlam Exp $
DISTNAME= # empty
PKGNAME= ruby-${RUBY_VERSION_SUFFIX}
@@ -14,7 +14,6 @@ CONFLICTS= pkg_alternatives-[0-9]*
NO_CHECKSUM= yes
NO_CONFIGURE= yes
NO_BUILD= yes
-PLIST_SRC= ${WRKDIR}/PLIST
.include "../../lang/ruby/rubyversion.mk"
@@ -27,15 +26,21 @@ RUBY_COMMANDS+= erb h2rb rdoc ri testrb
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
+.if ${RUBY_NAME} == "ruby"
+GENERATE_PLIST+= ${ECHO} "@comment This plist intentionally left empty";
+.else
+. for f in ${RUBY_COMMANDS}
+GENERATE_PLIST+= ${ECHO} bin/${f};
+. endfor
+GENERATE_PLIST+= ${ECHO} man/man1/ruby.1;
+.endif
+
do-install:
- ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
.if ${RUBY_NAME} != "ruby"
-.for f in ${RUBY_COMMANDS}
+. for f in ${RUBY_COMMANDS}
${LN} -sf ${f}${RUBY_VER} ${PREFIX}/bin/${f}
- ${ECHO} bin/${f} >> ${PLIST_SRC}
-.endfor
+. endfor
${LN} -sf ${RUBY_NAME}.1 ${PREFIX}/${PKGMANDIR}/man1/ruby.1
- ${ECHO} man/man1/ruby.1 >> ${PLIST_SRC}
.endif
.include "../../mk/bsd.pkg.mk"