This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updated (and new) cygport patches


Now, number 7:

This one just adds hooks for cygports that need to intervene during the automated portions of 'cygport ... install'. The ordinary sequence of events is:

__prepinstalldirs && src_install && src_postinst

where __prepinstalldirs and src_postinst are both readonly. This patch adds:

   src_install_init_hook &&\
      __prepinstalldirs && src_install && src_postinst && \
   src_install_fini_hook

I needed this because rxvt-unicode-X has $PN = "rxvt-unicode-X" but all documentation is provided by the subpackage rxvt-unicode-common, and I want that documentation to be in
/usr/share/doc/rxvt-unicode-${VER}/


cygport is rather insistent that ${P}[== ${PN}-${PV}] and subdirectories under ${P} will used throughout for docdir (it's even hardcoded in /usr/lib/cygport/bin/dodoc). This patch allowed me to "go with the flow", and then:

src_install_fini_hook() {
        cd ${D}
        mv usr/share/doc/${P} usr/share/doc/${BASE_PN}-${PV}
}

2006-12-18 Charles Wilson <...>

	* bin/cygport.in (src_install_init_hook): new placeholder
        function
	(src_install_fini_hook): new placeholder function
	(main) [inst*]: call them.

--
Chuck

Yaakov: Of the 7 patches I've posted recently, I expect that only two will require in-depth analysis before you apply them. The rest are pretty straightforward:

Simple:
--------------
[1] cygport-ac2.61.patch and
[1a] http://www.cygwin.com/ml/cygwin/2006-11/msg00720.html
       these two are holding up the release of autoconf2.5-2.61

[2] cygport-mixedmode.patch [*]
[3] cygport-multiple-postinstall.patch
[4] cygport-install-hooks.patch (this one)

[*] also includes what could be termed "prep hooks" similar to the install hooks provided by the attached patch, but which allow cygports to intervene in the automated portion of src_prep. I could split this out into a separate patch if you prefer.

Complicated:
--------------
[5] cygport-relocatable.patch
[6] cygport-custom-cmds.patch

I'd appreciate it if you could give at least a few of the first five patches a look. Except for [1] and [1a], these patches are all independent.



--- bin/cygport.in	2006-12-09 01:38:31.031250000 -0500
+++ bin/cygport.in	2006-12-17 21:05:06.529951800 -0500
@@ -1130,8 +1130,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
 
 
@@ -1917,7 +1930,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=$?;
 			;;
 		list)

--
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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]