libsoup 2.66.0

Closes #37789.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
This commit is contained in:
Tom Schoonjans 2019-03-12 08:55:53 +00:00 committed by Chongyu Zhu
parent 35e40199a5
commit f6e362f71f
No known key found for this signature in database
GPG key ID: 1A43E3C9100B38F5

View file

@ -1,8 +1,8 @@
class Libsoup < Formula
desc "HTTP client/server library for GNOME"
homepage "https://wiki.gnome.org/Projects/libsoup"
url "https://download.gnome.org/sources/libsoup/2.64/libsoup-2.64.2.tar.xz"
sha256 "75ddc194a5b1d6f25033bb9d355f04bfe5c03e0e1c71ed0774104457b3a786c6"
url "https://download.gnome.org/sources/libsoup/2.66/libsoup-2.66.0.tar.xz"
sha256 "51adc2ad6c8c670cf6339fcfa88190a3b58135a9cddd21f623a0f80fdb9c8921"
bottle do
sha256 "b53e3d934346b9329aa0bbaca1497a6da9dd04bd2ad7a1933a9faa11bcb2369d" => :mojave
@ -11,31 +11,29 @@ class Libsoup < Formula
end
depends_on "gobject-introspection" => :build
depends_on "intltool" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "python" => :build
depends_on "glib-networking"
depends_on "gnutls"
depends_on "libpsl"
depends_on "vala"
# submitted upstream as https://gitlab.gnome.org/GNOME/libsoup/merge_requests/49
patch :DATA
def install
args = %W[
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--disable-tls-check
--enable-introspection=yes
]
mkdir "build" do
system "meson", "--prefix=#{prefix}", ".."
system "ninja", "-v"
system "ninja", "install", "-v"
end
# ensures that the vala files remain within the keg
inreplace "libsoup/Makefile.in",
"VAPIDIR = @VAPIDIR@",
"VAPIDIR = @datadir@/vala/vapi"
system "./configure", *args
system "make", "install"
# to be removed when https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222 is fixed
%w[Soup-2.4 SoupGNOME-2.4].each do |gir|
inreplace share/"gir-1.0/#{gir}.gir", "@rpath", lib.to_s
system "g-ir-compiler", "--includedir=#{share}/gir-1.0", "--output=#{lib}/girepository-1.0/#{gir}.typelib", share/"gir-1.0/#{gir}.gir"
end
end
test do
@ -74,3 +72,47 @@ class Libsoup < Formula
system "./test"
end
end
__END__
diff --git a/libsoup/meson.build b/libsoup/meson.build
index 5f2a215..92b615f 100644
--- a/libsoup/meson.build
+++ b/libsoup/meson.build
@@ -229,6 +229,7 @@ libsoup = library('soup-@0@'.format(apiversion),
soup_enums,
version : libversion,
soversion : soversion,
+ darwin_versions: darwin_versions,
c_args : libsoup_c_args + hidden_visibility_flag,
include_directories : configinc,
install : true,
@@ -260,6 +261,7 @@ if enable_gnome
soup_gnome_sources + soup_gnome_headers,
version : libversion,
soversion : soversion,
+ darwin_versions: darwin_versions,
c_args : libsoup_c_args + hidden_visibility_flag,
include_directories : configinc,
install : true,
diff --git a/meson.build b/meson.build
index a979362..e4c5d75 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('libsoup', 'c',
version: '2.66.0',
- meson_version : '>=0.47',
+ meson_version : '>=0.48',
license : 'LGPL2',
default_options : 'c_std=c89')
@@ -16,6 +16,11 @@ libversion = '1.8.0'
apiversion = '2.4'
soversion = '1'
libsoup_api_name = '@0@-@1@'.format(meson.project_name(), apiversion)
+libversion_arr = libversion.split('.')
+darwin_version_major = libversion_arr[0].to_int()
+darwin_version_minor = libversion_arr[1].to_int()
+darwin_version_micro = libversion_arr[2].to_int()
+darwin_versions = [darwin_version_major + darwin_version_minor + 1, '@0@.@1@'.format(darwin_version_major + darwin_version_minor + 1, darwin_version_micro)]
host_system = host_machine.system()