Skip to content
Snippets Groups Projects
Commit b1465bab authored by Gabriel Mazetto's avatar Gabriel Mazetto :spy_tone1:
Browse files

Update python-docutils build to use python3 and preserve cache

parent eae7c931
No related branches found
No related tags found
No related merge requests found
link readline directly to ncurses since it needs symbols from it
upstream readline does this on purpose (no direct linking), but
it doesn't make much sense in a Linux world
--- a/support/shobj-conf
+++ b/support/shobj-conf
@@ -42,7 +42,7 @@
SHOBJ_LIBS=
SHLIB_XLDFLAGS=
-SHLIB_LIBS=
+SHLIB_LIBS='-lncurses -ltinfo'
SHLIB_DOT='.'
SHLIB_LIBPREF='lib'
Loading
Loading
@@ -20,10 +20,9 @@ name "python-docutils"
 
default_version "0.11"
 
dependency "pip"
dependency "python"
dependency "python3"
 
build do
env = with_standard_compiler_flags(with_embedded_path)
command "#{install_dir}/embedded/bin/pip install --compile --build #{Time.now.to_i} docutils==#{version}", env: env
command "#{install_dir}/embedded/bin/pip3 install --compile docutils==#{version}", env: env
end
#
# Copyright:: Copyright (c) 2013-2014 Chef Software, Inc.
# Copyright:: Copyright (c) 2016 GitLab B.V.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name "python3"
default_version "3.4.3"
dependency "readline"
dependency "ncurses"
dependency "zlib"
dependency "openssl"
dependency "bzip2"
source :url => "http://python.org/ftp/python/#{version}/Python-#{version}.tgz",
:md5 => '4281ff86778db65892c05151d5de738d'
relative_path "Python-#{version}"
LIB_PATH = %W(#{install_dir}/embedded/lib #{install_dir}/embedded/lib64 #{install_dir}/embedded/libexec #{install_dir}/lib #{install_dir}/lib64 #{install_dir}/libexec)
env = {
"CFLAGS" => "-I#{install_dir}/embedded/include -O3 -g -pipe",
"LDFLAGS" => "-Wl,-rpath,#{LIB_PATH.join(',-rpath,')} -L#{LIB_PATH.join(' -L')} -I#{install_dir}/embedded/include"
}
build do
command ["./configure",
"--prefix=#{install_dir}/embedded",
"--enable-shared",
"--disable-sqlite3",
"--with-dbmliborder="].join(" "), env: env
make env: env
make "install", env: env
# There exists no configure flag to tell Python to not compile readline support :(
block do
FileUtils.rm_f(Dir.glob("#{install_dir}/lib/python3.4/lib-dynload/dbm.*"))
end
end
name "readline"
default_version "6.2"
# http://buildroot-busybox.2317881.n4.nabble.com/PATCH-readline-link-directly-against-ncurses-td24410.html
# https://bugzilla.redhat.com/show_bug.cgi?id=499837
# http://lists.osgeo.org/pipermail/grass-user/2003-September/010290.html
# http://trac.sagemath.org/attachment/ticket/14405/readline-tinfo.diff
dependency "ncurses"
source :url => "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz",
:md5 => "67948acb2ca081f23359d0256e9a271c"
relative_path "#{name}-#{version}"
build do
env = {
"CFLAGS" => "-I#{install_dir}/embedded/include",
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib"
}
configure_command = [
"./configure",
"--with-curses",
"--prefix=#{install_dir}/embedded"
].join(" ")
patch :source => "readline-6.2-curses-link.patch" , :plevel => 1
command configure_command, :env => env
command "make", :env => env
command "make install", :env => env
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment