Forward port to latest release. Only change from previous, is that
current cygport CVS now checks for ${SRCDIR} before cd'ing into it, so
that part of the previous patch has been removed, below.
For further history and justifiation of this patch, see
http://cygwin.com/ml/cygwin/2007-01/msg00110.html and follow the
embedded links and threads.
--
Chuck
2007-02-05 Charles Wilson <...>
* cygport.in (src_prep_init_hook): new (empty) function
(src_prep_fini_hook): ditto
(src_prep): call src_prep_init_hook() after setting up the
cygport directory structure, unpacking all entities in SRC_URI,
but before applying any of the patches in PATCH_URI, and before
mirroring the origsrc directory to the src directory, or
applying the .src.patch and .cygwin.patch to the src directory).
(src_prep): call src_prep_fini_hook() after doing ALL of the
above.
(src_install_init_hook): new (empty) function
(src_install_fini_hook): new (empty) function
(main) [case inst*]: call src_install_init_hook FIRST, then
other automated installation steps, then src_install_fini_hook
LAST
(main): export all hook functions.
Index: bin/cygport.in
===================================================================
RCS file: /cvsroot/cygwin-ports/cygport/bin/cygport.in,v
retrieving revision 1.53
diff -u -r1.53 cygport.in
--- bin/cygport.in 5 Feb 2007 03:28:43 -0000 1.53
+++ bin/cygport.in 5 Feb 2007 21:34:38 -0000
@@ -572,6 +572,19 @@
fi
}
+# provides a hook for cygclasses/cygports to take action
+# *before* origsrc directory is mirrored to src directory
+# NOTE that all sources in SRC_URI have already been unpacked,
+# but the patches in PATCH_URI have NOT been applied,
+# when this function is invoked.
+src_prep_init_hook() {
+ :
+}
+# provides a hook for cygclasses/cygports to take action
+# *after* origsrc directory is mirrored to src directory
+src_prep_fini_hook() {
+ :
+}
src_prep() {
local sigext;
local src_patch;
@@ -623,8 +636,9 @@
error "SRC_DIR is not correctly defined"
fi
- cd ${origsrcdir}/${SRC_DIR};
+ src_prep_init_hook
+ cd ${origsrcdir}/${SRC_DIR};
for src_patch in ${_src_orig_patches}
do
apply_patch ${top}/${src_patch};
@@ -632,6 +646,7 @@
__step "Preparing working source directory";
+ cd ${top}
cp -fpr ${origsrcdir}/* ${srcdir};
mkdir -p ${C};
@@ -643,11 +658,15 @@
then
apply_patch ${top}/${cygwin_patchfile} ${top}/${src_patchfile};
fi
+
+ cd ${top}
+ src_prep_fini_hook
+ cd ${S}
}
# protect functions
readonly -f fetch src_fetch unpack gpg_verify __mkdirs apply_patch __oldpatch
src_prep
-
+export -f src_prep_init_hook src_prep_fini_hook
################################################################################
#
@@ -975,8 +994,21 @@
cyginstall
}
+# provides a hook for cygclasses/cygports to take action
+# *before* built-in preinstall steps.
+src_install_init_hook() {
+ :
+}
+
+# provides a hook for cygclasses/cygports to take action
+# *after* built-in postinstall steps.
+src_install_fini_hook() {
+ :
+}
+
# protect functions
export -f dodir docinto exeinto insinto
+export -f src_install_init_hook src_install_fini_hook
readonly -f dodir docinto exeinto insinto __prepinstalldirs cyginstall
@@ -1684,7 +1716,7 @@
;;
inst*)
__stage Installing;
- (__prepinstalldirs && src_install && src_postinst) 2>&1
| tee ${installlog};
+ (src_install_init_hook && __prepinstalldirs &&
src_install && src_postinst && src_install_fini_hook) 2>&1 | tee ${installlog};
_status=$?;
;;
postinst*)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/