Hi, Am Montag, den 25.08.2008, 18:05 +0200 schrieb =?ISO-8859-1?Q?Marian_Aldenh=F6vel_: > Hi, > > I tried my hand at another new package for T2. > > Esnacc is a compiler that can create C and C++ code for reading and writing > BER-encoded structures specified in ASN.1. > > I ran into two problems where I do not know what the proper T2-way of fixing > them would be. > > 1) Incorporate upstream patches > > The distribution consists of a tarball with the code for version 1.7 and two > separate tarballs updating that to version 1.7.3 and then to 1.7.4. These > tarballs contain files that replace the older ones. > > For now I have made the patch-tars part of the T2-package and written a > prepatch-hook that unpacks them. > > No doubt it would be much better to download them from the upstream sources > just like the 1.7 tarball and unpack from the download-directory. Can that > be done?
You can just add additional [D] lines to the .desc file. In your .conf file you may then apply the patch sets in your prepatch hook function: for PF in `match_source_file -p esna.*patch esnacc`; do tar ...; done If your patchfiles are plain text or bz2 compressed you can simply add them to the patchfiles variable: var_insert patchfiles ' ' '`match_source_file -p patch.bz2 esnacc`' > 2) Conditional patching? > > I am cross-compiling and the distribution includes examples that try to run > code that has just been cross-built. Failing miserably. I could not find > configure-options to disable these examples and thus have created a patch > that just removes them from the SUBDIRS traversed during the build. > > That of course means, that no one will get any examples compiled for them, > even if it were possible. > > Is there a better way? To only apply the patch when cross-compiling? If you rename the patchfile to 'no-examples.patch.cross' it will only be applied at cross-compile stage 1. > 3) Custom install-sh > > The package comes with it's own version of install-sh. Thus install is not > wrapped. Thus the files go outside of the build-directory and that's it. > > I have tried several approaches modifying confopt and makeinstopt but I > failed. Maybe the choice is then to set makeinstopt='', and write a postmake hook that manually copies or installs the file to the proper location, with respect to $root. Or you may modify and patch the Makefile or install script to take the DESTDIR variable into account. Michael ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe t2
