Hi William,
Am 19.04.2009 um 11:00 schrieb William Bonnet:
I am building X11 libs and i need to set PKG_CONFIG_PATH and i have
a few problems... i am looking for the good way to define the
PKG_CONFIG_PATH variable and add to its value /opt/csw/X11/lib/
pkgconfig.
I tried either setting
EXTRA_PKGCONFIG_PATH = /opt/csw/X11/lib/pkgconfig
or
PKG_CONFIG_PATH = /opt/csw/X11/lib/pkgconfig
in Makefile or category file, but it is not taken in account by GAR
scripts.
This is basically ok, however I have some remarks.
You use this in x11/category.mk:
# pkg-config options
PKG_CONFIG_PATH = /opt/csw/X11/lib/pkgconfig
PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/lib/pkgconfig
PKG_CONFIG_PATH += $(DESTDIR)/opt/csw/X11/lib/pkgconfig
Please avoid DESTDIR as much as possible as it circumvents the standard
workflow of
build base -> release -> install -> build dependent
There should be something to add category-specific stuff to pkgconfig:
_CATEGORY_PKG_CONFIG_PATH = $(abspath $(prefix)/X11/lib/$
(MM_LIBDIR)/pkgconfig)
I committed the appropriate changes in r4413 and changed x11/category.mk
accordingly.
You can always check the value of PKG_CONFIG_PATH by typing
build8s% gmake modenv
Arch: sparc
Kernel: sparcv9
Default ISA 32: sparcv8
Default ISA 64: sparcv9
Requested ISAs: sparcv8 sparcv9 i386 amd64
Needed ISAs: sparcv8 sparcv9
Build ISAs: sparcv8 sparcv9
ISAEXEC dirs: /opt/csw/bin /opt/csw/sbin /opt/csw/libexec
ISAEXEC files:
Merge include:
Merge exclude: /opt/csw/share/info/dir /opt/csw/lib/.*\.la .*
\~ /opt/csw/lib/.*\.a
Modulators: ISA
Modulations: isa-sparcv8 isa-sparcv9
Requested compiler flags:
* Modulation isa-sparcv8: ISA=sparcv8
PATH = /home/dam/mgar/pkg/x11/libXdmcp/trunk/work/install-
isa-sparcv8/opt/csw/bin:/home/dam/mgar/pkg/x11/libXdmcp/trunk/work/
install-isa-sparcv8/opt/csw/bin:/home/dam/mgar/pkg/x11/libXdmcp/
trunk/work/install-isa-sparcv8/opt/csw/sbin:/home/dam/mgar/pkg/x11/
libXdmcp/trunk/work/install-isa-sparcv8/opt/csw/sbin:/opt/csw/bin:/
opt/csw/bin:/opt/csw/sbin:/opt/csw/sbin:/opt/studio/SOS11/SUNWspro/
bin:/home/dam/mgar/pkg/x11/libXdmcp/trunk/gar/bin:/usr/bin:/usr/
sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin
PKG_CONFIG_PATH = /opt/csw/lib/pkgconfig:/opt/csw/lib/X11/pkgconfig
CFLAGS = -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION -
xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION -xlibmil -
errtags=yes -erroff=E_EMPTY_DECLARATION
CXXFLAGS = -xlibmil -xlibmopt -features=tmplife -norunpath -
xlibmil -xlibmopt -features=tmplife -norunpath -xlibmil -xlibmopt -
features=tmplife -norunpath
CPPFLAGS =
LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -R/
opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib
ASFLAGS =
OPTFLAGS = -xO3 -xarch=v8
* Modulation isa-sparcv9: ISA=sparcv9
PATH = /home/dam/mgar/pkg/x11/libXdmcp/trunk/work/install-
isa-sparcv9/opt/csw/bin/sparcv9:/home/dam/mgar/pkg/x11/libXdmcp/
trunk/work/install-isa-sparcv9/opt/csw/bin:/home/dam/mgar/pkg/x11/
libXdmcp/trunk/work/install-isa-sparcv9/opt/csw/sbin/sparcv9:/home/
dam/mgar/pkg/x11/libXdmcp/trunk/work/install-isa-sparcv9/opt/csw/
sbin:/opt/csw/bin/sparcv9:/opt/csw/bin:/opt/csw/sbin/sparcv9:/opt/
csw/sbin:/opt/studio/SOS11/SUNWspro/bin:/home/dam/mgar/pkg/x11/
libXdmcp/trunk/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/
bin:/usr/openwin/bin
PKG_CONFIG_PATH = /opt/csw/lib/64/pkgconfig:/opt/csw/lib/64/X11/
pkgconfig
CFLAGS = -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION -
xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION -xlibmil -
errtags=yes -erroff=E_EMPTY_DECLARATION
CXXFLAGS = -xlibmil -xlibmopt -features=tmplife -norunpath -
xlibmil -xlibmopt -features=tmplife -norunpath -xlibmil -xlibmopt -
features=tmplife -norunpath
CPPFLAGS =
LDFLAGS = -L/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib -R/
opt/csw/lib -L/opt/csw/lib -R/opt/csw/lib
ASFLAGS =
OPTFLAGS = -xO3 -xarch=v9
The only work around i dound is to set it and export into the shell
before calling gmake.
Well, it is only passed during configure-time:
<http://apps.sourceforge.net/trac/gar/browser/csw/mgar/gar/v2/gar.conf.mk#L567
>
If you need it during build-time too you can set
EXTRA_BUILD_EXPORTS = PKG_CONFIG_PATH
but it usually shouldn't be necessary.
So please anyone to explain me what i did wrong ? :)
The code looks like this:
1 comand # This is for foo-config chaos
2471 dmichelsen PKG_CONFIG_DIRS ?= $(libdir_install) $
(EXTRA_PKG_CONFIG_DIRS)
2471 dmichelsen PKG_CONFIG_PATH ?= $(call MAKEPATH,$(foreach D,$
(PKG_CONFIG_DIRS),$(abspath $D/$(MM_LIBDIR)/pkgconfig)) $(EXTRA_PKGCON
FIG_PATH))
The mistyping of PKGCONFIG is a bug, as pkg-config itself uses
PKG_CONFIG, this should be used.
This too is fixed in r4413 too (now EXTRA_PKG_CONFIG_PATH, it hadn't
been used anyway).
Additionally, I removed in r2471 in gar.conf.mk (line 547)
http://apps.sourceforge.net/trac/gar/changeset/2471
the export as I was not aware that it was really needed in a forked
process.
This is fixed in r4415.
BTW, there is a much easier way to use dynamic licenses. Just use
dynamic gspecs
and everything will be done automatically as the license has the
default name.
I converted this package as example for you and the package builds
fine now,
however, only 32 bit. For 64 bit the category.mk must have all the
MM_*-stuff
from gar.conf.mk that differentiates pathes for isa-specific stuff
during
install and merge. I'll take a look at that tomorrow.
I apologize for this accumulation of inaccuracies and confusion.
Best regards
-- Dago
_______________________________________________
maintainers mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/maintainers