On Tue, Jul 20, 2010 at 12:12:16PM +0200, Sebastian Reitenbach wrote:
> Hi,

<snip>
>               * remove the ${DESTDIR}/Img not in the ports Makefile anymore, 
>                 updated the patch-Makefile_in to remove the dir in the 
>                 install: stage
> 
> I think that was all I did. Hope its better now. If there is a better way to 
> handle that two stage install, please let me know about it, or point me to a 
> port with a similar "problem"

Here's a patch-Makefile_in that works here, doing a single stage
install. No need for collate/install targets maze. and no need to call
${SUBST_CMD} on it.

Landry
$OpenBSD$

There is a two stage install in here, first collate: creates an Img directory
below the FAKEDIR, and afterwards in the install: process, it copies the files
to the right target directory

--- Makefile.in.orig    Wed Aug 18 19:10:38 2004
+++ Makefile.in Tue Jul 20 14:18:19 2010
@@ -49,7 +49,7 @@ INSTALL_SCRIPT        = @INSTALL_SCRIPT@
 # to be different than those used for actually reference files at
 # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
 # when installing files.
-INSTALL_ROOT =
+INSTALL_ROOT = ${DESTDIR}
 
 # Directory where libimg.a is at run-time:
 LIB_RUNTIME_DIR =      $(libdir)/$(EXTENSION)$(VERSION)
@@ -109,7 +109,7 @@ test:       all
                cd $$here ; \
        done
 
-collate: all
+install: all
        rm -f pkgIndex.tcl
        touch pkgIndex.tcl
        for sub in $(SUBDIRS) ; \
@@ -117,16 +117,16 @@ collate: all
                here=`pwd` ; \
                cd $$sub ; \
                $(MAKE) install \
-                       exec_prefix=$$here/Img/exec_prefix              \
-                       prefix=$$here/Img/prefix                        \
-                       pkglibdir=$$here/Img/exec_prefix/lib/Img        \
+                       exec_prefix=$(prefix)/          \
+                       prefix=$(prefix)/               \
+                       pkglibdir=$(LIB_RUNTIME_DIR)/   \
                        ;                                               \
                cd $$here ; \
-               cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl ; \
+               cat $$sub/pkgIndex.tcl >> pkgIndex.tcl ; \
        done
-       mv pkgIndex.tcl Img/exec_prefix/lib/Img/pkgIndex.tcl
+       mv pkgIndex.tcl $(INSTALL_ROOT)/$(LIB_RUNTIME_DIR)/pkgIndex.tcl
 
-install: collate
+foo: collate
        mkdir -p    $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
        for p in Img/exec_prefix/lib/Img/* ; do \
                $(INSTALL_PROGRAM) $$p 
$(INSTALL_ROOT)$(LIB_RUNTIME_DIR)/`basename $$p` ; \

Reply via email to