Commit c6ec0005 authored by Kirill Smelkov's avatar Kirill Smelkov

component/postgresql: Factor out common build stuff to postgresql-common

Currently we have recipes to build both postgresql 9.1 and 9.2 (see
9f1f0759 "provide both postgres 9.1 and 9.2") which mostly duplicate
each other with minor difference that 9.1 is built with perl and 9.2
without (perl added to 9.1 in dbbd9a96 "Include Perl in Postgres").

To reduce the duplication let's move common compilation bits to common
section.

NOTE I've tried to add perl to postgresql 9.2 as well and got the
following compilation error:

    ld: .../perl/libs-c/libperl.a(op.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
    .../parts/perl/libs-c/libperl.a: could not read symbols: Bad value

which happens because libperl.a is not compiled with fPIC.

For now we don't need perl in postgresql92 and this is not handled, and
we just deduplicate building recipes without any actual change for
resulting commands how the software is built.
parent 9bb0f265
......@@ -12,21 +12,26 @@ parts = postgresql
<= postgresql92
[postgresql91]
[postgresql-common]
recipe = slapos.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.1.13/postgresql-9.1.13.tar.bz2
md5sum = f50e201b4ef7e0581bf32a1a32c9f14c
configure-options = --with-openssl --with-perl
configure-options = --with-openssl
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${perl:location}/libs-c -Wl,-rpath=${perl:location}/libs-c
[postgresql91]
<= postgresql-common
url = http://ftp.postgresql.org/pub/source/v9.1.13/postgresql-9.1.13.tar.bz2
md5sum = f50e201b4ef7e0581bf32a1a32c9f14c
configure-options += --with-perl
[postgresql92]
recipe = slapos.recipe.cmmi
<= postgresql-common
url = http://ftp.postgresql.org/pub/source/v9.2.8/postgresql-9.2.8.tar.bz2
md5sum = c5c65a9b45ee53ead0b659be21ca1b97
configure-options = --with-openssl
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${perl:location}/libs-c -Wl,-rpath=${perl:location}/libs-c
# ld: .../perl/libs-c/libperl.a(op.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
# .../parts/perl/libs-c/libperl.a: could not read symbols: Bad value
# (because libperl.a is not compiled with fPIC)
# -> no --with-perl
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment