diff options
author | obache <obache@pkgsrc.org> | 2011-05-27 13:16:04 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-05-27 13:16:04 +0000 |
commit | 3960ba61222fbb8a9ca320fb1150ee497de8cf41 (patch) | |
tree | fa461d655b055b8d11fa52eda64f335673b2907c /lang | |
parent | 89bcaf9cb46b3da922bcae3460efcf9c7549599d (diff) | |
download | pkgsrc-3960ba61222fbb8a9ca320fb1150ee497de8cf41.tar.gz |
Add user-destdir installation support.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/oo2c/Makefile | 24 | ||||
-rw-r--r-- | lang/oo2c/distinfo | 3 | ||||
-rw-r--r-- | lang/oo2c/patches/patch-Makefile | 29 |
3 files changed, 47 insertions, 9 deletions
diff --git a/lang/oo2c/Makefile b/lang/oo2c/Makefile index 11ce24d78e9..b499fd82a73 100644 --- a/lang/oo2c/Makefile +++ b/lang/oo2c/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2007/03/24 19:21:25 joerg Exp $ +# $NetBSD: Makefile,v 1.24 2011/05/27 13:16:04 obache Exp $ DISTNAME= oo2c_${BITS}-2.0.11 PKGNAME= oo2c-2.0.11 @@ -14,6 +14,8 @@ COMMENT= Optimizing Oberon-2 Compiler DEPENDS+= libtool-base-[0-9]*:../../devel/libtool-base DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt +PKG_DESTDIR_SUPPORT= user-destdir + .if ${MACHINE_ARCH} == alpha || ${MACHINE_ARCH} == sparc64 \ || ${MACHINE_ARCH} == x86_64 BITS=64 @@ -30,15 +32,21 @@ LIBTOOL_PREFIX_DEFAULT= ${LOCALBASE} INSTALLATION_DIRS= share/doc/html share/emacs/site-lisp -pre-install: - for f in ${WRKSRC}/rsrc/OOC/oo2crc.xml; do \ - ${SED} -e 's,${BUILDLINK_DIR},${LIBTOOL_PREFIX},g' \ - $$f > $$f.tmp && ${MV} $$f.tmp $$f; \ - done +SUBST_CLASSES+= destdir +SUBST_STAGE.destdir= pre-install +SUBST_FILES.destdir= oo2crc-install.xml +SUBST_SED.destdir= -e 's,>${PREFIX}/lib<,>${DESTDIR}${PREFIX}/lib<,g' +SUBST_SED.destdir+= -e 's,>${PREFIX}/lib/oo2c<,>${DESTDIR}${PREFIX}/lib/oo2c<,g' +SUBST_SED.destdir+= -e 's,>${PREFIX}/bin<,>${DESTDIR}${PREFIX}/bin<,g' + +SUBST_CLASSES+= pkg-unwrap +SUBST_STAGE.pkg-unwrap= post-install +SUBST_FILES.pkg-unwrap= ${DESTDIR}${PREFIX}/lib/oo2c/oo2crc.xml +SUBST_SED.pkg-unwrap= -e 's,${WRAPPER_DIR},${LIBTOOL_PREFIX},g' post-install: - ${LN} -sf ${PREFIX}/lib/oo2c/oocdoc/html ${PREFIX}/share/doc/html/oo2c - ${LN} -sf ${PREFIX}/lib/oo2c/emacs ${PREFIX}/share/emacs/site-lisp/oo2c + ${LN} -sf ${PREFIX}/lib/oo2c/oocdoc/html ${DESTDIR}${PREFIX}/share/doc/html/oo2c + ${LN} -sf ${PREFIX}/lib/oo2c/emacs ${DESTDIR}${PREFIX}/share/emacs/site-lisp/oo2c .include "../../devel/boehm-gc/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/lang/oo2c/distinfo b/lang/oo2c/distinfo index 496ad7d7856..aae2d737b17 100644 --- a/lang/oo2c/distinfo +++ b/lang/oo2c/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2005/10/20 18:20:35 wiz Exp $ +$NetBSD: distinfo,v 1.9 2011/05/27 13:16:04 obache Exp $ SHA1 (oo2c_32-2.0.11.tar.bz2) = b8962b7fdf9505dc1769602ade44d8e56eda8d45 RMD160 (oo2c_32-2.0.11.tar.bz2) = c51dc82ec09c9d2f82cb1f10ee7814b3cce38502 @@ -6,6 +6,7 @@ Size (oo2c_32-2.0.11.tar.bz2) = 1500827 bytes SHA1 (oo2c_64-2.0.11.tar.bz2) = 047992978c584cdd8c47ff07c40dfba79ea97ebe RMD160 (oo2c_64-2.0.11.tar.bz2) = ac44ecd15e447326dc851f99b1d064193322a140 Size (oo2c_64-2.0.11.tar.bz2) = 1504997 bytes +SHA1 (patch-Makefile) = 7a2e9bcdc36fb56117303f483596dd9d2fff8cd2 SHA1 (patch-aa) = 0d2e00b36fe9bb022ff499b49408dc420f57b0d0 SHA1 (patch-ab) = c53da4768af73eebfea2a747876054fa1d9fb733 SHA1 (patch-ac) = 9313e4b921f18d69abaa0a07f356ebf2734a46db diff --git a/lang/oo2c/patches/patch-Makefile b/lang/oo2c/patches/patch-Makefile new file mode 100644 index 00000000000..8887e6ee00b --- /dev/null +++ b/lang/oo2c/patches/patch-Makefile @@ -0,0 +1,29 @@ +$NetBSD: patch-Makefile,v 1.1 2011/05/27 13:16:04 obache Exp $ + +* destdir installation support + +--- Makefile.orig 2003-07-12 13:14:07.000000000 +0000 ++++ Makefile +@@ -159,17 +159,17 @@ uninstall-man: + + ### Install manual pages. + install-man: uninstall-man +- $(INSTALL) -d $(mandir) ++ $(INSTALL) -d $(DESTDIR)$(mandir) + for i in oo2c oob ooef oowhereis; do \ +- $(INSTALL_DATA) man/$$i.1 $(mandir)/$$i$(manext); \ ++ $(INSTALL_DATA) man/$$i.1 $(DESTDIR)$(mandir)/$$i$(manext); \ + done + + install: lib/obj/liboo2c.la bin/oo2c install-man +- $(INSTALL) -d $(oocdir)/pkginfo ++ $(INSTALL) -d $(DESTDIR)$(oocdir)/pkginfo + $(BOOTSTRAP_COMPILER) --config oo2crc-install.xml -r lib -r . --install-program "$(INSTALL_PROGRAM)" $(OFLAGS) --install-package liboo2c + $(BOOTSTRAP_COMPILER) --config oo2crc-install.xml -r lib -r . --install-program "$(INSTALL_PROGRAM)" $(OFLAGS) --install-package oo2c +- $(INSTALL_SCRIPT) rsrc/OOC/oobacktrace $(bindir)/oobacktrace +- chmod a+x $(oocdir)/install-sh ++ $(INSTALL_SCRIPT) rsrc/OOC/oobacktrace $(DESTDIR)$(bindir)/oobacktrace ++ chmod a+x $(DESTDIR)$(oocdir)/install-sh + + install-strip: + ${MAKE} INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install |