Over a million developers have joined DZone.

Building Expat.xs On Solaris

·
(For yum)

#!/bin/bash

rm -r XML-Parser-2.36
gzcat XML-Parser-2.36.tar.gz | tar xvf -
cd XML-Parser-2.36
export PATH="/opt/yum/libs/common/bin:/usr/local/bin:/usr/sfw/bin:$PATH:/usr/ccs/bin"
unset LANG LC_MONETARY LC_TIME LC_MESSAGES LC_CTYPE LC_COLLATE LC_NUMERIC
perl Makefile.PL PREFIX=/opt/yum/libs/perl EXPATLIBPATH=/opt/yum/libs/common/lib EXPATINCPATH=/opt/yum/libs/common/include

patch Makefile < CC = gcc
> CCCDLFLAGS = -fPIC
35c35
< LD = cc
---
> LD = gcc
342c342
< OPTIMIZE = -xO3 -xspace -xildoff
---
> OPTIMIZE =
EOT

patch Expat/Makefile < CC = gcc
> CCCDLFLAGS = -fPIC
36c36
< LD = cc
---
> LD = gcc
247c247
< OPTIMIZE = -xO3 -xspace -xildoff
---
> OPTIMIZE =
EOT

patch Expat/Expat.c < #define PERL_POLLUTE
>
129c131
< #if PATCHLEVEL < 5 && SUBVERSION < 5
---
> #if PATCHLEVEL < 0 && SUBVERSION < 5
EOT

patch Expat/Expat.xs < #define PERL_POLLUTE
>
120c122
< #if PATCHLEVEL < 5 && SUBVERSION < 5
---
> #if PATCHLEVEL < 0 && SUBVERSION < 5
EOT
make
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}