Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modernize distribution #17

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ printf "\nSet up environmet variables\n\n"
###################################################
## Perl 5
# Look at http://www.cpan.org/src/README.html for the latest stable release of Perl
PERL_VERSION=5.22.0
PERL_VERSION=5.26.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If already updating, then why 5.26 and not 5.36 ?


## OpenSSL is needed by Net::SSLEay which is needed by LWP::Protocol::https
# and Business::PayPal and more.
Expand All @@ -21,31 +21,35 @@ PERL_VERSION=5.22.0
# 2014.08.06: openssl-1.0.1i.tar.gz
# 2015.01.22: openssl-1.0.2.tar.gz
# 2015.10.16: openssl-1.0.2d.tar.gz
OPENSSL=openssl-1.0.2d
# 2018.04.04: openssl-1.0.2o.tar.gz
OPENSSL=openssl-1.0.2o

## libxml2 and zlib are needed for XML::LibXML
# See http://xmlsoft.org/ and ftp://xmlsoft.org/libxml2/
# 2014.10.16: libxml2-2.9.2
LIBXML2=libxml2-2.9.2
# 2018.04.04: libxml2-2.9.8
LIBXML2=libxml2-2.9.8

## zlib
# See http://www.zlib.net/
ZLIB=zlib-1.2.8
ZLIB=zlib-1.2.11

## expat
# XML::Parser needs expat.
# Visit http://sourceforge.net/projects/expat/
# and http://sourceforge.net/projects/expat/files/expat/ to see what is the latest
# 2012.03.24 expat-2.1.0
EXPAT=expat-2.1.0
# 2018.04.04 expat-2.2.5
EXPAT=expat-2.2.5

## Geo::IP
# Needed by Geo::IP
# Visit http://dev.maxmind.com/geoip/legacy/downloadable/
# that links to https://github.com/maxmind/geoip-api-c/releases
# 2015.02.26 1.6.5
# 2015.07.28 1.6.6
GEOIP=GeoIP-1.6.6
# 2018.04.04 1.6.12
GEOIP=GeoIP-1.6.12
###################################################


Expand Down Expand Up @@ -170,13 +174,15 @@ case $1 in
;;

cpanm)
$PREFIX_PERL/bin/perl $SOURCE_HOME/src/cpanm --local-lib=$PREFIX_PERL --mirror file://$SOURCE_HOME/local/cache/ --mirror-only App::cpanminus
$PREFIX_PERL/bin/perl $SOURCE_HOME/src/cpanm --local-lib=$PREFIX_PERL App::cpanminus
# $PREFIX_PERL/bin/perl $SOURCE_HOME/src/cpanm --local-lib=$PREFIX_PERL --mirror file://$SOURCE_HOME/local/cache/ --mirror-only App::cpanminus
# $PREFIX_PERL/bin/perl src/cpanm --local-lib=$PREFIX_PERL --mirror file://$SOURCE_HOME/local/cache/ local::lib
;;

dwim)
cd $SOURCE_HOME/src/DWIM
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose .
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --verbose .
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose .
;;

external)
Expand All @@ -189,7 +195,8 @@ case $1 in

openssl)
cd $BUILD_TMP
tar xzf $SOURCE_HOME/src/$OPENSSL_SOURCE_ZIP_FILE
mkdir -p $OPENSSL
tar xzf $SOURCE_HOME/src/$OPENSSL_SOURCE_ZIP_FILE -C $OPENSSL --strip-components=1
cd $OPENSSL

# instead of patching broken PODs that cause "make install" to fail we just remove them:
Expand Down Expand Up @@ -292,34 +299,39 @@ case $1 in
gunzip GeoIP.dat.gz
mkdir -p $PREFIX_C/share/GeoIP/
mv GeoIP.dat $PREFIX_C/share/GeoIP/
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose Geo::IP
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --verbose Geo::IP
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose Geo::IP
rm -f $PREFIX_C/share/GeoIP/GeoIP.dat
;;

# TODO: See Issue #2
xml-libxml)
#export XMLPREFIX=$PREFIX_C
#echo $XMLPREFIX
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --configure-args "LIBS='-L$PREFIX_C/lib/' INC='-I$PREFIX_C/include/ -I/$PREFIX_C/include/libxml2'" XML::LibXML
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --configure-args "LIBS='-L$PREFIX_C/lib/' INC='-I$PREFIX_C/include/ -I/$PREFIX_C/include/libxml2'" XML::LibXML
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --configure-args "LIBS='-L$PREFIX_C/lib/' INC='-I$PREFIX_C/include/ -I/$PREFIX_C/include/libxml2'" XML::LibXML
;;

xml-parser)
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --configure-args "EXPATLIBPATH=$PREFIX_C/lib EXPATINCPATH=$PREFIX_C/include" XML::Parser
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --configure-args "EXPATLIBPATH=$PREFIX_C/lib EXPATINCPATH=$PREFIX_C/include" XML::Parser
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --configure-args "EXPATLIBPATH=$PREFIX_C/lib EXPATINCPATH=$PREFIX_C/include" XML::Parser
;;


verbose)
source $ROOT/dwim.sh
CPAN_MODULE=$2
echo MODULE=$CPAN_MODULE
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose $CPAN_MODULE
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --verbose $CPAN_MODULE
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose $CPAN_MODULE
;;

notest)
source $ROOT/dwim.sh
CPAN_MODULE=$2
echo MODULE=$CPAN_MODULE
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose --notest $CPAN_MODULE
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --verbose --notest $CPAN_MODULE
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --mirror file://$SOURCE_HOME/local/cache/ --mirror-only --verbose --notest $CPAN_MODULE
;;

try)
Expand All @@ -345,7 +357,8 @@ case $1 in

cd $SOURCE_HOME
HARNESS_OPTIONS=j3
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --installdeps --mirror file://$SOURCE_HOME/local/cache/ --mirror-only .
$PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --installdeps .
# $PREFIX_PERL/bin/perl $PREFIX_PERL/bin/cpanm --installdeps --mirror file://$SOURCE_HOME/local/cache/ --mirror-only .
;;

test_perl)
Expand Down
Binary file added src/GeoIP-1.6.12.tar.gz
Binary file not shown.
99 changes: 62 additions & 37 deletions src/cpanm

Large diffs are not rendered by default.

Binary file added src/expat-2.2.5.tar.gz
Binary file not shown.
Binary file added src/libxml2-2.9.8.tar.gz
Binary file not shown.
Binary file added src/openssl-1.0.2o.tar.gz
Binary file not shown.
Binary file added src/zlib-1.2.11.tar.gz
Binary file not shown.