X-Spam-Check-By: sourceware.org Message-ID: <45C7A8F0.6080506@cwilson.fastmail.fm> Date: Mon, 05 Feb 2007 17:00:16 -0500 From: Charles Wilson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: [patch] cygport-0.2.9 hooks for additional prep, install customization References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------060004080500080001030906" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------060004080500080001030906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------060004080500080001030906 Content-Type: text/plain; name="cygport-hooks.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygport-hooks.patch" 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*) --------------060004080500080001030906 Content-Type: text/plain; charset=us-ascii -- 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/ --------------060004080500080001030906--