X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_20,SPF_NEUTRAL,TW_GT,TW_YG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4F5A97FB.6080809@cornell.edu> Date: Fri, 09 Mar 2012 18:53:31 -0500 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygport suggestion: src_postinstall References: <4F5A7582 DOT 3050204 AT cornell DOT edu> <4F5A8B16 DOT 50305 AT users DOT sourceforge DOT net> In-Reply-To: <4F5A8B16.50305@users.sourceforge.net> Content-Type: multipart/mixed; boundary="------------020500000308040805020107" X-PMX-CORNELL-SPAM-CHECKED: Pawpaw X-Original-Sender: kbrown AT cornell DOT edu - Fri Mar 9 18:53:40 2012 X-PMX-CORNELL-REASON: CU_White_List_Override X-IsSubscribed: yes 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 --------------020500000308040805020107 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 3/9/2012 5:58 PM, Yaakov (Cygwin/X) wrote: > On 2012-03-09 15:26, Ken Brown wrote: >> My immediate reason for this request is that I'm thinking about ITP-ing >> emacs-auctex > > This too is in Ports: > > http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/emacs-auctex Yes, I know. That was my starting point. > >> and I don't like some of the things that are done in __src_postinst when > > I build that package. > > Could you specify? There are two things: 1. I don't think __prepemacs should be called for this package because the compile process explicitly byte compiles most of the *.el files. There are three (at the top level of /usr/share/emacs/site-lisp) that it does not byte compile. I don't know the reason, but I don't think the Cygwin build should override this upstream decision. 2. I would prefer that __prep_texlive not be called, since it causes the postinstall script to do unnecessary work. All that's needed for auctex is mktexlsr. I'm attaching my .cygport and .cygwin.patch files so you can see how I dealt with this (after changing src_postinst.cygpart so that I could redefine __src_postinst). Ken --------------020500000308040805020107 Content-Type: text/plain; name="emacs-auctex-11.86-1.cygport" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="emacs-auctex-11.86-1.cygport" HOMEPAGE="http://www.gnu.org/software/auctex/" SRC_URI="mirror://gnu/auctex/${P#emacs-}.tar.gz" SRC_DIR=${P#emacs-} src_compile() { lndirs cd ${B} cygconf --localstatedir=/var/lib cygmake } my_prepetc() { local d; local f; local -i n; local s; if inherited cross then # postinst/prerm does not apply to cross-compiles return fi for s in postinstall preremove do if [ -f ${C}/${s}.sh -a -f ${C}/${PN}.${s} ] then error "Only one of ${s}.sh and ${PN}.${s} can exist"; fi for f in ${s}.sh ${PN}.${s} do if [ -f ${C}/${f} ] then dodir /etc/${s}; cat >> ${D}/etc/${s}/${PN}.sh < ${C}/${f}; fi done n=1; while [ -n "${pkg_name[${n}]}" ] do if [ -f ${C}/${pkg_name[${n}]}.${s} ] then dodir /etc/${s}; cat >> ${D}/etc/${s}/${pkg_name[${n}]}.sh < ${C}/${pkg_name[${n}]}.${s}; fi n+=1 done done if [ -f ${C}/profile.d.sh ] then exeinto /etc/profile.d; newexe ${C}/profile.d.sh ${PN}.sh; fi if [ -f ${C}/profile.d.csh ] then exeinto /etc/profile.d; newexe ${C}/profile.d.csh ${PN}.csh; fi # System fonts if [ -d ${D}/usr/share/fonts ] then __prep_fonts_dir || error "Fonts postinstall failed" fi # GIO modules if [ -d ${D}/usr/lib/gio/modules ] then __prep_gio_modules || error "GIO modules postinstall failed" fi # GdkPixbuf modules if [ -d ${D}/usr/lib/gdk-pixbuf-2.0 ] then __prep_gdk_pixbuf_modules || error "GdkPixbuf modules postinstall failed" fi # GTK+ 2.x modules if [ -d ${D}/usr/share/icons ] then __prep_gtk_icon_theme || error "GTK+ icon theme postinstall failed" fi # GTK+ 2.x modules if [ -d ${D}/usr/lib/gtk-2.0 ] then __prep_gtk2_modules || error "GTK+ modules postinstall failed" fi # GTK+ 3.x modules if [ -d ${D}/usr/lib/gtk-3.0 ] then __prep_gtk3_modules || error "GTK+ modules postinstall failed" fi # GConf schemas if [ -d ${D}/etc/gconf/schemas ] && ! defined _CYGPORT_RESTRICT_postinst_gconf_ then __prep_gconf_schemas || error "GConf schemas postinstall failed" fi # GSettings schemas if [ -d ${D}/usr/share/glib-2.0/schemas ] then __prep_gsettings_schemas || error "GSettings schemas postinstall failed" fi # MateConf schemas if [ -d ${D}/etc/mateconf/schemas ] && ! defined _CYGPORT_RESTRICT_postinst_mateconf_ then __prep_mateconf_schemas || error "MateConf schemas postinstall failed" fi # Freedesktop.org Shared Mime Info if [ -d ${D}/usr/share/applications -o -d ${D}/usr/share/mime ] then __prep_freedesktop_mime || error "Shared Mime Info postinstall failed" fi # for d in /usr/share/texmf{,-dist} # do # if [ -d ${D}${d} ] # then # __prep_texlive # break # fi # done for d in /etc/postinstall /etc/preremove do if [ -d ${D}${d} ] then find ${D}${d} -type f -exec chmod 0755 '{}' +; fi done } __src_postinst() { __prepdoc; __prep_symlinks; # __prepemacs; # __prepetc; my_prepetc __prepman; __prepinfo; __prepvargames; __prep_libtool_modules; __prepstrip; __prepuac; __prep_empty_dirs; } --------------020500000308040805020107 Content-Type: text/plain; name="emacs-auctex-11.86-1.cygwin.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="emacs-auctex-11.86-1.cygwin.patch" --- origsrc/auctex-11.86/CYGWIN-PATCHES/postinstall.sh 1969-12-31 19:00:00.000000000 -0500 +++ src/auctex-11.86/CYGWIN-PATCHES/postinstall.sh 2012-03-09 18:28:00.085175700 -0500 @@ -0,0 +1 @@ +/usr/bin/mktexlsr --- origsrc/auctex-11.86/CYGWIN-PATCHES/setup.hint 1969-12-31 19:00:00.000000000 -0500 +++ src/auctex-11.86/CYGWIN-PATCHES/setup.hint 2012-03-09 18:27:39.759013100 -0500 @@ -0,0 +1,10 @@ +category: Editors +requires: emacs texinfo texlive texlive-collection-basic texlive-collection-latex texlive-collection-latexrecommended texlive-collection-texinfo +sdesc: "TeX macros for Emacs" +ldesc: "AUCTEX is an extensible package for writing and formatting TEX +files in GNU Emacs and XEmacs. It supports many different TEX macro +packages, including AMS-TEX, LATEX, Texinfo, ConTEXt, and docTEX (dtx +files). AUCTEX includes preview-latex which makes LATEX a tightly +integrated component of your editing workflow by visualizing selected +source chunks (such as single formulas or graphics) directly as images +in the source buffer." --------------020500000308040805020107 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --------------020500000308040805020107--