[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Source build dependencies?



> I would like to have blt build two packages,
>  - blt (with a library linked against tk8.2)
>  - blt8.0 (with a library linked against tk8.0)

Why not blt8.2 and blt8.0?

> Some people want blt linked against the newest tk library (which results
> in an unstable blt library), while others want it liked to tk8.0 (which
> results in a quite usable and stable library)...
> 
> (1) If I split this into two different source packages, the ftp site will have
>     two 1.5 MByte source archives containing 99.9% the same files. Can I
>     share a source file between multiple packages and thus produce two
>     different diff trees, one for one set of packages and one for another?

What is the difference between compiling for tk8.2 and tk8.0?  Is it
just part of an gcc/ld command or is there significantly more?  Is it
a configure option?

Whichever, I would strongly suggest having only one source package and
a debian/rules file which does something along the lines of:

build-8.0: # Whatever you need to do to build it against tk8.0
           ./configure --prefix=/usr \
             --with-tk-library-path=/usr/lib/libtk8.0.so
           $(MAKE) all
           touch build.stamp.8.0

install-8.0: build.stamp.8.0
           $(MAKE) install prefix=`tmp`/debian/tmp-8.0/usr

binary-8.0: build.stamp.8.0 install-8.0
           dh_...

clean-8.0:
           $(MAKE) distclean
           rm -f build.stamp.8.0

build-8.2: # Whatever you need to do to build it against tk8.2
           ./configure --prefix=/usr \
             --with-tk-library-path=/usr/lib/libtk8.2.so
           $(MAKE) all
           touch build.stamp.8.2

install-8.2: build.stamp.8.2
           $(MAKE) install prefix=`pwd`/debian/tmp-8.2/usr

binary-8.2: build.stamp.8.2 install-8.2
           dh_...

clean-8.2:
           $(MAKE) distclean
           rm -f build.stamp.8.2

binary-indep:
           # Nothing to do

binary-arch:
           $(MAKE) -f debian/rules build-8.0 install-8.0
           $(MAKE) -f debian/rules clean-8.0
           $(MAKE) -f debian/rules build-8.2 install-8.2

Have a look at Perl's debian/rules.

> (2) How can I make a source dependency so that a package must be built using
>     tk8.0, and another using tk8.2? Sure, I can do this for myself by hand
>     but when an autobuilder picks it up (eg for m68k architectures) how
>     is it going to know which of tk8.0-dev or tk8.2-dev to have loaded before
>     compiling?

Let it depend on both.

> (3) I would prefer all the blt packages to be built from a single control
>     file - but I would have to unload tk8.0-dev and load tk8.2-dev half way
>     through. The only way I can think of doing this is to have both of
>     these packages in the source of the blt source archive, build them
>     both and then direct blt to use them one after another... surely I am
>     missing something?

tk8.0-dev and tk8.2-dev do not conflict.  Have the control file
specify both.

> (4) Is it possible to have two libraries with exactly the same name, but
>     selecting the one you want dynamically at library load time depending
>     on whether tk8.0 or tk8.2 is loaded? I take it not, which means the
>     libraries will have to have different names...

I'm not quite sure what you want to do.  The tk libraries have
different names and can both be present.  Let your libraries have
different names too, if you would like.  Or have the blt8.0/blt8.2
packages conflict and call the library libbltk in both cases.
Whichever you want.

HTH,

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg


Reply to: