|
From: Motoi W. <a6...@h8...> - 2005-05-06 15:21:08
|
On 2005/05/03, at 0:38, strk wrote: > On Mon, May 02, 2005 at 10:55:36PM +0900, Motoi Washida wrote: >> On 2005/05/02, at 18:26, strk wrote: >> >>> On Sun, May 01, 2005 at 11:42:03PM +0900, Motoi Washida wrote: >>>> Hi Ming developers, >>>> >>>> I'm trying to make Ming package for Fink. Fink is software to >>>> maintain >>>> open source software easily on Mac OS X, like RPM, Debian package, >>>> or >>>> Portage of Gentoo/Linux. >>>> http://fink.sourceforge.net >>>> >>>> Each Fink package is made from one package info file and one small >>>> patch file, if needed. The package info file contains information >>>> about >>>> its software, version, etc. One of the most important information >>>> is a >>>> process to install the software from source, such as configure >>>> options >>>> and make target. >>>> >>>> At first, I thought making package from Ming 0.3 beta1, but I had to >>>> make a long patch. CVS version of Ming looked better, and I can >>>> install >>>> shared libraries now. But there is still a few problems to make a >>>> package: >>>> 1. Fink installs libraries on /sw/lib, and I want to use -L/sw/lib >>>> linker option to use /sw/lib/libpng.dylib and /sw/lib/libgif.dylib. >>>> But >>>> I can't find how to set such option without any patch. I'm happy if >>>> I >>>> can set those options by running configure like this: >>>> $ ./configure --prefix=/sw CPPFLAGS=/sw/include LDFLAGS=/sw/lib Sorry, they should be "CPPFLAGS=-I/sw/include" and "LDFLAGS=-L/sw/lib". >>>> 2. Fink does not allow installing files directly. Instead, Fink >>>> installs those files on a temporary directory such as >>>> /sw/src/root-ming-0.3-1/ and create .deb package. We can specify >>>> such >>>> a >>>> directory if the Makefile of the software supports running command >>>> like: >>>> $ make install DESTDIR=/sw/src/root-ming-0.3-1 >>>> >>>> Any thoughts? I will write a patch if you like. >>> >>> LDFLAGS=-L/sw/lib should definitely work. If it doesn't patch is >>> accepted. >>> (probably Makefile.config needs using += when setting LDFLAGS if it >>> doesn't work). >> Utils/Makefile uses "LDFLAGS += -L.. -lming $(LIBS)", but if I set >> LDFLAGS=-L/sw, /sw/lib/libming.dylib is used to build executables. > > Please suggest the way you think it *should* work, not the way > it *does* work now. When I run configure and make like this: $ ./configure --prefix=/sw CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib $ make I want to use files such as /sw/lib/libpng.dylib /sw/lib/libgif.dylib and /sw/include/png.h if exist. I can specify those files by setting LDFLAGS and CFLAGS to make options, but building executables of util/ fails because it tries to find /sw/lib/libming.dylib before ../libming.dylib. And I think setting options such as LDFLAGS and CPPFLAGS as configure options is good idea because configure can check where to find those files. >>> DESTDIR should be --prefix=, agains should work already - patch >>> welcome >>> otherwise. >> I think DESTDIR should be different from --prefix. This is because >> prefix is not only used when copying files, but when building shared >> libraries on some systems (you know, one of them is Darwin :) ) to >> specify directory where the library is really installed. >> >> For example, if you set prefix to /sw and make with option like >> DESTDIR=/sw/src/root-ming-0.3-1, files are copied as such as >> /sw/src/root-ming-0.3-1/sw/lib/libming-0.3.0.dylib and >> /sw/src/root-ming-0.3.1/sw/bin/swftophp2. But swftophp2 tries to load >> Ming library from /sw/lib/libming-0.3.0.dylib. >> >> Maybe it is enough if I modify linker options to build shared library, >> but I think setting DESTDIR and LDFLAGS like above one is supported by >> many projects. > > Motoi, I'm afraid I'm not able to follow up on this, but I can just > trust you and invite to send a patch. In case it won't work for me > I'll let you know. If you're sure other projects are using these > variables I can trust them more. Thanks. I attached my patch to support DESTDIR. I think recent Perl and Ruby module to make Makefiles (maybe ExtUtils::MakeMaker and mkmf) support DESTDIR, and python seems to support the same feature by setting --root option. So I don't have to modify those files, although I can't build PHP, Ruby and TCL wrapper for now. :( > > --strk; > > -- Motoi Washida |