Add user-destdir installation support.

This commit is contained in:
obache 2011-04-09 08:58:51 +00:00
parent 0402fe0b7d
commit 05174cc941
3 changed files with 18 additions and 14 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2009/07/06 22:35:22 joerg Exp $
# $NetBSD: Makefile,v 1.3 2011/04/09 08:58:51 obache Exp $
DISTNAME= lablgtk-1.2.7
PKGNAME= lablgtk1-1.2.7
@ -10,6 +10,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html
COMMENT= GTK+ bindings for ocaml
PKG_DESTDIR_SUPPORT= user-destdir
MAKE_JOBS_SAFE= no
USE_TOOLS+= gmake
@ -45,6 +47,8 @@ post-build:
opt
.endif
INSTALLATION_DIRS+= bin
.include "../../x11/gtk/buildlink3.mk"
.include "../../lang/ocaml/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.2 2009/07/06 22:35:22 joerg Exp $
$NetBSD: distinfo,v 1.3 2011/04/09 08:58:51 obache Exp $
SHA1 (lablgtk-1.2.7.tar.gz) = fe43512efdc7ab4e0dafb7dc8254a784857a1ade
RMD160 (lablgtk-1.2.7.tar.gz) = 27be7ff29fe4370bc9a1bbef8c0fa0db590f27c4
Size (lablgtk-1.2.7.tar.gz) = 468443 bytes
SHA1 (patch-aa) = 58feff2dd3f93ec6dca05056b164ccd9a86109f5
SHA1 (patch-aa) = 409f983195d41d4712688a0c03b693f0a9641096

View file

@ -1,4 +1,4 @@
$NetBSD: patch-aa,v 1.2 2009/07/06 22:35:22 joerg Exp $
$NetBSD: patch-aa,v 1.3 2011/04/09 08:58:51 obache Exp $
--- src/Makefile.orig 2003-05-15 16:17:53.000000000 +0200
+++ src/Makefile
@ -25,29 +25,29 @@ $NetBSD: patch-aa,v 1.2 2009/07/06 22:35:22 joerg Exp $
- cp lablgtktop varcc $(INSTALLDIR)
- if test -f lablgtktop_t; then cp lablgtktop_t $(INSTALLDIR); fi
- cp -p *.h $(INSTALLDIR)
+ if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} ${INSTALLDIR}; fi
+ if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${INSTALLDIR}; fi
+ for F in $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) *.mli \
+ $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) \
+ $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(CLIBS) *.h; \
+ do \
+ ${BSD_INSTALL_DATA} $$F ${INSTALLDIR}; \
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}${INSTALLDIR}; \
+ done
+ ${BSD_INSTALL_SCRIPT} lablgtktop $(INSTALLDIR)
+ ${BSD_INSTALL_SCRIPT} varcc $(INSTALLDIR)
+ if test -f lablgtktop_t; then ${BSD_INSTALL_SCRIPT} lablgtktop_t $(INSTALLDIR); fi
+ ${BSD_INSTALL_SCRIPT} lablgtktop ${DESTDIR}$(INSTALLDIR)
+ ${BSD_INSTALL_SCRIPT} varcc ${DESTDIR}$(INSTALLDIR)
+ if test -f lablgtktop_t; then ${BSD_INSTALL_SCRIPT} lablgtktop_t ${DESTDIR}$(INSTALLDIR); fi
if test -f lablgtk.cmxa; then $(MAKE) installopt; fi
+ ${BSD_INSTALL_DATA_DIR} $(DLLDIR)
+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(DLLDIR)
if test -f dlllablgtk.so; then \
- if test -d $(DLLDIR); then : ; else mkdir -p $(DLLDIR); fi; \
- cp $(CLIBS:lib%.a=dll%.so) $(DLLDIR) || \
- echo "Couldn't install dlls in default location"; \
+ for F in $(CLIBS:lib%.a=dll%.so); \
+ do \
+ ${BSD_INSTALL_DATA} $$F $(DLLDIR); \
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}$(DLLDIR); \
+ done; \
fi
- cp lablgtk $(BINDIR)
+ ${BSD_INSTALL_SCRIPT} lablgtk $(BINDIR)
+ ${BSD_INSTALL_SCRIPT} lablgtk ${DESTDIR}$(BINDIR)
if test -f lablgladecc; then cp lablgladecc $(BINDIR); fi
installopt:
@ -58,13 +58,13 @@ $NetBSD: patch-aa,v 1.2 2009/07/06 22:35:22 joerg Exp $
+ for F in $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \
+ $(ALLOBJS:.cmo=.cmx) $(INITOBJS:.cmo=.o); \
+ do \
+ ${BSD_INSTALL_DATA} $$F $(INSTALLDIR); \
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}$(INSTALLDIR); \
+ done
if test -f gtkThread.cmx; then \
- cp $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o) $(INSTALLDIR); fi
+ for F in $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o); \
+ do \
+ ${BSD_INSTALL_DATA} $$F $(INSTALLDIR); \
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}$(INSTALLDIR); \
+ done; \
+ fi