This is the mail archive of the cygwin-apps@cygwin.com 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: [PATCH] generic build script


On Tue, 8 Jun 2004, Gerrit P. Haase wrote:

> Hello Igor,
>
> found it useful (I want to build LibJasper which is only available as
> zipped archive):
>
> --- gbs~        2004-06-08 16:56:20.215388800 +0200
> +++ gbs 2004-06-08 16:42:53.791884800 +0200
> @@ -53,6 +53,9 @@
>  elif [ -e ${BASEPKG}.tar ] ; then
>    export opt_decomp=
>    export src_orig_pkg_name=${BASEPKG}.tar
> +elif [ -e ${BASEPKG}.zip ] ; then
> +  export opt_decomp=zip
> +  export src_orig_pkg_name=${BASEPKG}.zip
>  else
>    echo Cannot find original package.
>    exit 1
> @@ -116,7 +119,11 @@
>  # change this if the original package was not tarred
>  # or if it doesn't unpack to a correct directory
>  unpack() {
> -  tar xv${opt_decomp}f "$1"
> +  if [ "x"$opt_decomp = "xzip" ] ; then \
> +    unzip "$1" ; \
> +  else \
> +    tar xv${opt_decomp}f "$1" ; \
> +  fi
>  }
>
>  mkdirs() {
>
> Gerrit

Gerrit,

As one of the packages I maintain is only available as a compressed shar
archive, I have already included a method into the GBS for easily dealing
with this.  Simply edit the line to set "src_orig_pkg_name" to
"LibJasper.zip", and then edit the definition of "unpack()" to invoke
unzip instead of tar.  This kind of change is easy to maintain as a local
patch, which should apply with a minimum of fuzz in the future versions of
GBS.  I'm a bit reluctant at this point to include any changes that are
only needed for one package...  Maybe later we could look at restructuring
the unpack() function and augmenting the archive type detection code.
	Igor
P.S. BTW, your patch won't apply as-is, since the file is named
"generic-build-script", and not "gbs".  It also lacks a ChangeLog.
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


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