Difference between revisions of "Xorg7/Utilities"
(Added a multilib note on the installation location of util-macros) |
|||
(41 intermediate revisions by 12 users not shown) | |||
Line 2: | Line 2: | ||
|- | |- | ||
!Download Source: | !Download Source: | ||
− | | | + | | {{Xorg7-Mirror}}/util/ |
− | |||
|} | |} | ||
Back to [[Xorg7/Protocol_Headers|Protocol Headers]] | Back to [[Xorg7/Protocol_Headers|Protocol Headers]] | ||
− | + | {{Package-Introduction|There are five utilities. Note that the download source, above is the base URL. Each could be downloaded individually, but it is probably easiest to use wget and append either *.bz2 or *.gz to the base URL to pull them all down to your system. | |
− | + | Alternately, if you chose to use subdirectories, the tarballs can be retrieved as follows. This will prevent multiple versions from being downloaded when multiple versions exist. | |
− | + | wget {{Filepathlink|Util-{{Xorg7-Version}}.wget}} && | |
+ | mkdir -p util && | ||
+ | cd util && | ||
+ | wget -B {{Xorg7-Mirror}}/util/ -i ../Util-{{Xorg7-Version}}.wget | ||
− | + | The utilities xorg-cf-files, imake, and gccmakedep should be built in order before the other utilities. Utilities lndir and makedepend can be built in either order.}} | |
− | |||
− | |||
− | |||
− | |||
== Dependencies == | == Dependencies == | ||
+ | === Required === | ||
* [[pkg-config]] | * [[pkg-config]] | ||
* [[Xorg7/Protocol_Headers|Protocol Headers]] | * [[Xorg7/Protocol_Headers|Protocol Headers]] | ||
+ | |||
+ | == Configuration Information == | ||
+ | |||
+ | The imake utility has some configuration options that prevent default applications from being built. | ||
+ | |||
+ | {|style="text-align: left" | ||
+ | |- | ||
+ | |<i>--disable-revpath:</i> don't build revpath. | ||
+ | |- | ||
+ | |<i>--disable-makeg:</i> don't build makeg. | ||
+ | |- | ||
+ | |<i>--disable-xmkmf:</i> don't build xmkmf. | ||
+ | |- | ||
+ | |<i>--disable-ccmakedep:</i> don't build ccmakedep. | ||
+ | |- | ||
+ | |<i>--disable-mergelib:</i> don't build mergelib. | ||
+ | |- | ||
+ | |<i>--disable-mkdirhier:</i> don't build mkdirhier. | ||
+ | |- | ||
+ | |<i>--disable-cleanlinks:</i> don't build cleanlinks. | ||
+ | |- | ||
+ | |<i>--disable-mkhtmlindex:</i> don't build mkhtmlindex. | ||
+ | |} | ||
== Non-Multilib == | == Non-Multilib == | ||
− | + | There is a hardcoded path in X11.tmpl for the Motif directory in the xorg-cf-files package. To correct this: | |
+ | |||
+ | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl | ||
+ | |||
+ | Install the xorg-cf-files package with the following commands: | ||
− | |||
./configure $XORG_CONFIG && | ./configure $XORG_CONFIG && | ||
make install | make install | ||
− | Build the | + | Build the remaining packages with the standard build commands: |
./configure $XORG_CONFIG && | ./configure $XORG_CONFIG && | ||
Line 41: | Line 66: | ||
make install | make install | ||
+ | |||
+ | == Semi-Automated Build == | ||
+ | |||
+ | The semi-automated build assumes that you have created the subdirectories discussed in the introduction. After entering the utils directory, unpack the packages: | ||
+ | |||
+ | for i in *.tar.bz2; do | ||
+ | tar xvf $i; | ||
+ | done | ||
+ | |||
+ | Make and install xorg-cf-files: | ||
+ | |||
+ | cd xorg-cf-files* && | ||
+ | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | ||
+ | ./configure $XORG_CONFIG && | ||
+ | make && | ||
+ | make install && | ||
+ | cd .. | ||
+ | |||
+ | Make and install the packages: | ||
+ | |||
+ | for dir in imake gccmakedep util-macros lndir makedepend; do | ||
+ | cd ${dir}* && | ||
+ | ./configure $XORG_CONFIG && | ||
+ | make && | ||
+ | make install && | ||
+ | cd ..; | ||
+ | done | ||
== Multilib == | == Multilib == | ||
− | + | {{note|On my system (AMD64) at least, util-macros installs it's pkg-config file to '$XORG_PREFX/share/pkg-config/' instead of '$XORG_PREFIX/lib{,64}/pkgconfig'. Moving the 'xorg-macros.pc' file to the correct location fixed some later errors.}} | |
=== 32Bit === | === 32Bit === | ||
Line 49: | Line 101: | ||
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | ||
− | PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | + | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ |
./configure $XORG_CONFIG32 && | ./configure $XORG_CONFIG32 && | ||
make install | make install | ||
− | + | On at least my ppc64, running a 32-bit xmkmf still picks up -m64 and lib64 references. comments in the template suggest at least part of this might be arch-specific. You can either test xmkmf after installing imake, or apply the following brute-force sed to one of the templates you have just installed: | |
− | PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | + | sed -i -e 's/m64/m32/g' \ |
− | ./configure $XORG_CONFIG32 && | + | -e 's%lib64%lib%g' ${XORG_PREFIX}/lib/X11/config/linux.cf |
+ | |||
+ | Next, install the imake package with the following commands: | ||
+ | |||
+ | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | ||
+ | ./configure $XORG_CONFIG32 --with-script-preproc-cmd="gcc ${BUILD32} -E" && | ||
+ | make && | ||
make install && | make install && | ||
mv -v ${XORG_PREFIX}/bin/imake{,-32} && | mv -v ${XORG_PREFIX}/bin/imake{,-32} && | ||
− | mv -v ${XORG_PREFIX}/bin/xmkmf{,-32} | + | mv -v ${XORG_PREFIX}/bin/xmkmf{,-32} && |
+ | mv -v ${XORG_PREFIX}/bin/ccmakedep{,-32} | ||
+ | |||
+ | At this point you can test xmkmf to make sure it finds the 32-bit values. If these are wrong, it will break the compilation of 32-bit packages which use xmkmf to find where X is installed. The test creates a minimal Imakefile and then uses that to create a Makefile. | ||
+ | |||
+ | cat >Imakefile <<'_ACEOF' | ||
+ | incroot: | ||
+ | @echo incroot='${INCROOT}' | ||
+ | usrlibdir: | ||
+ | @echo usrlibdir='${USRLIBDIR}' | ||
+ | libdir: | ||
+ | @echo libdir='${LIBDIR}' | ||
+ | _ACEOF | ||
+ | |||
+ | ln -sv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf | ||
+ | ln -sv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake | ||
+ | USE_ARCH=32 PKG_CONFIG_DIR=/usr/lib/pkgconfig \ | ||
+ | CC="gcc ${BUILD32}" xmkmf | ||
+ | rm ${XORG_PREFIX}/bin/{xmkmf,imake} | ||
− | Build the | + | If running this test, examine the Makefile it generated - all the libraries, particularly SYSTEMUSRLIBDIR, should be lib not lib64, and all invocations of gcc, particularly PREPROCESSCMD and LD, should use -m32 instead of -m64. |
+ | |||
+ | If your result is different, backup the linux.cf file from the 32-bit xorg-cf you installed, run the sed, and retest. | ||
+ | |||
+ | Next, install the gccmakedep package with the following commands: | ||
+ | |||
+ | sed -i '/-DCCCMD=/s/$(CC)/"\\"&\\""/' Makefile.in && | ||
+ | CC="gcc ${BUILD32}" ./configure $XORG_CONFIG32 && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/gccmakedep{,-32} | ||
+ | |||
+ | Build the three remaining packages with the standard build commands: | ||
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | ||
Line 73: | Line 161: | ||
=== N32 === | === N32 === | ||
− | First install the xorg-cf-files package with the following commands: | + | First, install the xorg-cf-files package with the following commands: |
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | ||
− | PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ | + | CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ |
./configure $XORG_CONFIGN32 && | ./configure $XORG_CONFIGN32 && | ||
− | make install | + | make install && |
+ | echo "#define ManDirectoryRoot /usr/share/man" >> /usr/lib32/X11/config/host.def && | ||
+ | sed -i -e "s/LibDirName *lib$/LibDirName lib32/" /usr/lib32/X11/config/Imake.tmpl && | ||
+ | sed -i -e "s/LibDirName *lib$/LibDirName lib32/" /usr/lib32/X11/config/X11.tmpl | ||
− | + | Next, install the imake package with the following commands: | |
− | PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ | + | CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ |
− | ./configure $XORG_CONFIGN32 && | + | ./configure $XORG_CONFIGN32 --with-script-preproc-cmd="gcc ${BUILDN32} -E" && |
+ | make && | ||
make install && | make install && | ||
mv -v ${XORG_PREFIX}/bin/imake{,-n32} && | mv -v ${XORG_PREFIX}/bin/imake{,-n32} && | ||
− | mv -v ${XORG_PREFIX}/bin/xmkmf{,-n32} | + | mv -v ${XORG_PREFIX}/bin/xmkmf{,-n32} && |
+ | mv -v ${XORG_PREFIX}/bin/ccmakedep{,-n32} | ||
+ | |||
+ | Next, install the gccmakedep package with the following commands: | ||
+ | |||
+ | sed -i '/-DCCCMD=/s/$(CC)/"\\"&\\""/' Makefile.in && | ||
+ | CC="gcc ${BUILDN32}" ./configure $XORG_CONFIGN32 && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/gccmakedep{,-n32} | ||
− | Build the | + | Build the three remaining packages with the standard build commands: |
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ | CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ | ||
Line 100: | Line 201: | ||
=== 64Bit === | === 64Bit === | ||
− | First install the xorg-cf-files package with the following commands: | + | First, install the xorg-cf-files package with the following commands: |
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | ||
− | PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | + | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ |
./configure $XORG_CONFIG64 && | ./configure $XORG_CONFIG64 && | ||
− | make install | + | make install && |
+ | sed -i -e "s/LibDirName *lib$/LibDirName lib64/" ${XORG_PREFIX}/lib64/X11/config/Imake.tmpl && | ||
+ | sed -i -e "s/LibDirName *lib$/LibDirName lib64/" ${XORG_PREFIX}/lib64/X11/config/X11.tmpl | ||
− | + | Next, install the imake package with the following commands: | |
− | PKG_CONFIG_PATH="${ | + | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ |
− | ./configure $ | + | ./configure $XORG_CONFIG64 --with-script-preproc-cmd="gcc ${BUILD64} -E" && |
+ | make && | ||
make install && | make install && | ||
mv -v ${XORG_PREFIX}/bin/imake{,-64} && | mv -v ${XORG_PREFIX}/bin/imake{,-64} && | ||
mv -v ${XORG_PREFIX}/bin/xmkmf{,-64} && | mv -v ${XORG_PREFIX}/bin/xmkmf{,-64} && | ||
+ | mv -v ${XORG_PREFIX}/bin/ccmakedep{,-64} && | ||
ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake && | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake && | ||
− | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf | + | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf && |
+ | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/ccmakedep | ||
− | Build the | + | Next, install the gccmakedep package with the following commands: |
+ | |||
+ | sed -i '/-DCCCMD=/s/$(CC)/"\\"&\\""/' Makefile.in && | ||
+ | CC="gcc ${BUILD64}" ./configure $XORG_CONFIG64 && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/gccmakedep{,-64} && | ||
+ | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/gccmakedep | ||
+ | |||
+ | Build the three remaining packages with the standard build commands: | ||
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | ||
Line 127: | Line 242: | ||
make install | make install | ||
+ | == Semi-Automated Build == | ||
+ | |||
+ | The semi-automated build assumes that you have created the subdirectories discussed in the introduction. After entering the utils directory, unpack the packages: | ||
+ | |||
+ | for i in *.tar.bz2; do | ||
+ | tar xvf $i; | ||
+ | done | ||
+ | |||
+ | Make and install xorg-cf-files: | ||
+ | |||
+ | cd xorg-cf-files* && | ||
+ | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | ||
+ | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | ||
+ | ./configure $XORG_CONFIG32 && | ||
+ | make install && | ||
+ | make clean && | ||
+ | sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && | ||
+ | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | ||
+ | ./configure $XORG_CONFIG64 && | ||
+ | make install && | ||
+ | cd .. | ||
+ | |||
+ | Make and install imake: | ||
+ | |||
+ | cd imake* && | ||
+ | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | ||
+ | ./configure $XORG_CONFIG32 --with-script-preproc-cmd="gcc ${BUILD32} -E" && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/imake{,-32} && | ||
+ | mv -v ${XORG_PREFIX}/bin/xmkmf{,-32} && | ||
+ | mv -v ${XORG_PREFIX}/bin/ccmakedep{,-32} && | ||
+ | make clean && | ||
+ | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | ||
+ | ./configure $XORG_CONFIG64 --with-script-preproc-cmd="gcc ${BUILD64} -E" && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/imake{,-64} && | ||
+ | mv -v ${XORG_PREFIX}/bin/xmkmf{,-64} && | ||
+ | mv -v ${XORG_PREFIX}/bin/ccmakedep{,-64} && | ||
+ | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake && | ||
+ | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf && | ||
+ | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/ccmakedep | ||
+ | cd .. | ||
+ | |||
+ | Next, install the gccmakedep package with the following commands: | ||
+ | |||
+ | cd gccmakedep* && | ||
+ | sed -i '/-DCCCMD=[^"]/s/$(CC)/"\\"&\\""/' Makefile.in && | ||
+ | CC="gcc ${BUILD32}" ./configure $XORG_CONFIG32 && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/gccmakedep{,-32} && | ||
+ | make clean && | ||
+ | sed -i '/-DCCCMD=[^"]/s/$(CC)/"\\"&\\""/' Makefile.in && | ||
+ | CC="gcc ${BUILD64}" ./configure $XORG_CONFIG64 && | ||
+ | make && | ||
+ | make install && | ||
+ | mv -v ${XORG_PREFIX}/bin/gccmakedep{,-64} && | ||
+ | ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/gccmakedep && | ||
+ | cd .. | ||
+ | |||
+ | Make and install the remaining packages: | ||
+ | |||
+ | for dir in util-macros lndir makedepend; do | ||
+ | cd ${dir}* && | ||
+ | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | ||
+ | ./configure $XORG_CONFIG32 && | ||
+ | make && | ||
+ | make install && | ||
+ | make clean && | ||
+ | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | ||
+ | ./configure $XORG_CONFIG64 && | ||
+ | make && | ||
+ | make install && | ||
+ | cd ..; | ||
+ | done | ||
Next install the [[Xorg7/Libraries|Libraries]] | Next install the [[Xorg7/Libraries|Libraries]] | ||
+ | |||
+ | = Contents = | ||
+ | |||
+ | {| style="text-align: left;" | ||
+ | |-valign="top" | ||
+ | ! Installed Directories: | ||
+ | | ${XORG_PREFIX}/lib/X11/config, ${XORG_PREFIX}/bin | ||
+ | |-valign="top" | ||
+ | ! Installed Programs: | ||
+ | | imake, makedepend, lndir, ccmakedep, mergelib, revpath, makedirhier, makeg, cleanlinks, mkhtmlindex, xmkmf | ||
+ | |} | ||
+ | |||
+ | === Short Description === | ||
+ | |||
+ | {| style="text-align: left;" | ||
+ | |-valign="top" | ||
+ | !xorg-cf-files | ||
+ | |provides templates, rules, and configuration information used to build Xorg components. | ||
+ | |- | ||
+ | !imake | ||
+ | |is the include make program. Imake takes a template file (Imake.tmpl) and a prototype (Imakefile) and runs cpp on them producing a Makefile. It then optionally runs make on the Makefile. | ||
+ | |- | ||
+ | !gccmakedep | ||
+ | |creates dependencies in makefiles. Same as makedepend except it uses gcc. | ||
+ | |- | ||
+ | !lndir | ||
+ | |is used to create a copy of the a directory tree that has links for all non-directories. | ||
+ | |- | ||
+ | !makedepend | ||
+ | |creates dependencies in makefiles. | ||
+ | |} |
Latest revision as of 21:19, 29 August 2011
Download Source: | http://xorg.freedesktop.org/releases/individual/util/ |
---|
Back to Protocol Headers
Contents
Introduction to Xorg7/Utilities
There are five utilities. Note that the download source, above is the base URL. Each could be downloaded individually, but it is probably easiest to use wget and append either *.bz2 or *.gz to the base URL to pull them all down to your system.
Alternately, if you chose to use subdirectories, the tarballs can be retrieved as follows. This will prevent multiple versions from being downloaded when multiple versions exist.
wget https://cblfs.clfs.org/Special:Filepath/Util-20101205.wget && mkdir -p util && cd util && wget -B http://xorg.freedesktop.org/releases/individual/util/ -i ../Util-20101205.wget
The utilities xorg-cf-files, imake, and gccmakedep should be built in order before the other utilities. Utilities lndir and makedepend can be built in either order.
Project Homepage: Unknown
Dependencies
Required
Configuration Information
The imake utility has some configuration options that prevent default applications from being built.
--disable-revpath: don't build revpath. |
--disable-makeg: don't build makeg. |
--disable-xmkmf: don't build xmkmf. |
--disable-ccmakedep: don't build ccmakedep. |
--disable-mergelib: don't build mergelib. |
--disable-mkdirhier: don't build mkdirhier. |
--disable-cleanlinks: don't build cleanlinks. |
--disable-mkhtmlindex: don't build mkhtmlindex. |
Non-Multilib
There is a hardcoded path in X11.tmpl for the Motif directory in the xorg-cf-files package. To correct this:
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl
Install the xorg-cf-files package with the following commands:
./configure $XORG_CONFIG && make install
Build the remaining packages with the standard build commands:
./configure $XORG_CONFIG && make
Install the package:
make install
Semi-Automated Build
The semi-automated build assumes that you have created the subdirectories discussed in the introduction. After entering the utils directory, unpack the packages:
for i in *.tar.bz2; do tar xvf $i; done
Make and install xorg-cf-files:
cd xorg-cf-files* && sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && ./configure $XORG_CONFIG && make && make install && cd ..
Make and install the packages:
for dir in imake gccmakedep util-macros lndir makedepend; do cd ${dir}* && ./configure $XORG_CONFIG && make && make install && cd ..; done
Multilib
32Bit
First install the xorg-cf-files package with the following commands:
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ ./configure $XORG_CONFIG32 && make install
On at least my ppc64, running a 32-bit xmkmf still picks up -m64 and lib64 references. comments in the template suggest at least part of this might be arch-specific. You can either test xmkmf after installing imake, or apply the following brute-force sed to one of the templates you have just installed:
sed -i -e 's/m64/m32/g' \ -e 's%lib64%lib%g' ${XORG_PREFIX}/lib/X11/config/linux.cf
Next, install the imake package with the following commands:
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ ./configure $XORG_CONFIG32 --with-script-preproc-cmd="gcc ${BUILD32} -E" && make && make install && mv -v ${XORG_PREFIX}/bin/imake{,-32} && mv -v ${XORG_PREFIX}/bin/xmkmf{,-32} && mv -v ${XORG_PREFIX}/bin/ccmakedep{,-32}
At this point you can test xmkmf to make sure it finds the 32-bit values. If these are wrong, it will break the compilation of 32-bit packages which use xmkmf to find where X is installed. The test creates a minimal Imakefile and then uses that to create a Makefile.
cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF
ln -sv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf ln -sv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake USE_ARCH=32 PKG_CONFIG_DIR=/usr/lib/pkgconfig \ CC="gcc ${BUILD32}" xmkmf rm ${XORG_PREFIX}/bin/{xmkmf,imake}
If running this test, examine the Makefile it generated - all the libraries, particularly SYSTEMUSRLIBDIR, should be lib not lib64, and all invocations of gcc, particularly PREPROCESSCMD and LD, should use -m32 instead of -m64.
If your result is different, backup the linux.cf file from the 32-bit xorg-cf you installed, run the sed, and retest.
Next, install the gccmakedep package with the following commands:
sed -i '/-DCCCMD=/s/$(CC)/"\\"&\\""/' Makefile.in && CC="gcc ${BUILD32}" ./configure $XORG_CONFIG32 && make && make install && mv -v ${XORG_PREFIX}/bin/gccmakedep{,-32}
Build the three remaining packages with the standard build commands:
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ ./configure $XORG_CONFIG32 && make
Install the package:
make install
N32
First, install the xorg-cf-files package with the following commands:
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ ./configure $XORG_CONFIGN32 && make install && echo "#define ManDirectoryRoot /usr/share/man" >> /usr/lib32/X11/config/host.def && sed -i -e "s/LibDirName *lib$/LibDirName lib32/" /usr/lib32/X11/config/Imake.tmpl && sed -i -e "s/LibDirName *lib$/LibDirName lib32/" /usr/lib32/X11/config/X11.tmpl
Next, install the imake package with the following commands:
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ ./configure $XORG_CONFIGN32 --with-script-preproc-cmd="gcc ${BUILDN32} -E" && make && make install && mv -v ${XORG_PREFIX}/bin/imake{,-n32} && mv -v ${XORG_PREFIX}/bin/xmkmf{,-n32} && mv -v ${XORG_PREFIX}/bin/ccmakedep{,-n32}
Next, install the gccmakedep package with the following commands:
sed -i '/-DCCCMD=/s/$(CC)/"\\"&\\""/' Makefile.in && CC="gcc ${BUILDN32}" ./configure $XORG_CONFIGN32 && make && make install && mv -v ${XORG_PREFIX}/bin/gccmakedep{,-n32}
Build the three remaining packages with the standard build commands:
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ ./configure $XORG_CONFIGN32 && make
Install the package:
make install
64Bit
First, install the xorg-cf-files package with the following commands:
sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ ./configure $XORG_CONFIG64 && make install && sed -i -e "s/LibDirName *lib$/LibDirName lib64/" ${XORG_PREFIX}/lib64/X11/config/Imake.tmpl && sed -i -e "s/LibDirName *lib$/LibDirName lib64/" ${XORG_PREFIX}/lib64/X11/config/X11.tmpl
Next, install the imake package with the following commands:
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ ./configure $XORG_CONFIG64 --with-script-preproc-cmd="gcc ${BUILD64} -E" && make && make install && mv -v ${XORG_PREFIX}/bin/imake{,-64} && mv -v ${XORG_PREFIX}/bin/xmkmf{,-64} && mv -v ${XORG_PREFIX}/bin/ccmakedep{,-64} && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/ccmakedep
Next, install the gccmakedep package with the following commands:
sed -i '/-DCCCMD=/s/$(CC)/"\\"&\\""/' Makefile.in && CC="gcc ${BUILD64}" ./configure $XORG_CONFIG64 && make && make install && mv -v ${XORG_PREFIX}/bin/gccmakedep{,-64} && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/gccmakedep
Build the three remaining packages with the standard build commands:
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ ./configure $XORG_CONFIG64 && make
Install the package:
make install
Semi-Automated Build
The semi-automated build assumes that you have created the subdirectories discussed in the introduction. After entering the utils directory, unpack the packages:
for i in *.tar.bz2; do tar xvf $i; done
Make and install xorg-cf-files:
cd xorg-cf-files* && sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ ./configure $XORG_CONFIG32 && make install && make clean && sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ ./configure $XORG_CONFIG64 && make install && cd ..
Make and install imake:
cd imake* && CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ ./configure $XORG_CONFIG32 --with-script-preproc-cmd="gcc ${BUILD32} -E" && make && make install && mv -v ${XORG_PREFIX}/bin/imake{,-32} && mv -v ${XORG_PREFIX}/bin/xmkmf{,-32} && mv -v ${XORG_PREFIX}/bin/ccmakedep{,-32} && make clean && CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ ./configure $XORG_CONFIG64 --with-script-preproc-cmd="gcc ${BUILD64} -E" && make && make install && mv -v ${XORG_PREFIX}/bin/imake{,-64} && mv -v ${XORG_PREFIX}/bin/xmkmf{,-64} && mv -v ${XORG_PREFIX}/bin/ccmakedep{,-64} && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/ccmakedep cd ..
Next, install the gccmakedep package with the following commands:
cd gccmakedep* && sed -i '/-DCCCMD=[^"]/s/$(CC)/"\\"&\\""/' Makefile.in && CC="gcc ${BUILD32}" ./configure $XORG_CONFIG32 && make && make install && mv -v ${XORG_PREFIX}/bin/gccmakedep{,-32} && make clean && sed -i '/-DCCCMD=[^"]/s/$(CC)/"\\"&\\""/' Makefile.in && CC="gcc ${BUILD64}" ./configure $XORG_CONFIG64 && make && make install && mv -v ${XORG_PREFIX}/bin/gccmakedep{,-64} && ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/gccmakedep && cd ..
Make and install the remaining packages:
for dir in util-macros lndir makedepend; do cd ${dir}* && CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ ./configure $XORG_CONFIG32 && make && make install && make clean && CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ ./configure $XORG_CONFIG64 && make && make install && cd ..; done
Next install the Libraries
Contents
Installed Directories: | ${XORG_PREFIX}/lib/X11/config, ${XORG_PREFIX}/bin |
---|---|
Installed Programs: | imake, makedepend, lndir, ccmakedep, mergelib, revpath, makedirhier, makeg, cleanlinks, mkhtmlindex, xmkmf |
Short Description
xorg-cf-files | provides templates, rules, and configuration information used to build Xorg components. |
---|---|
imake | is the include make program. Imake takes a template file (Imake.tmpl) and a prototype (Imakefile) and runs cpp on them producing a Makefile. It then optionally runs make on the Makefile. |
gccmakedep | creates dependencies in makefiles. Same as makedepend except it uses gcc. |
lndir | is used to create a copy of the a directory tree that has links for all non-directories. |
makedepend | creates dependencies in makefiles. |