Add 'Building from tarball' to README.md

This commit is contained in:
Tim Rühsen 2020-10-25 11:55:17 +01:00
parent 03df58fc96
commit 5ccf1e85fe
2 changed files with 23 additions and 16 deletions

View File

@ -106,6 +106,24 @@ See the LICENSE file that accompanies this distribution for the full text of the
src/psl-make-dafsa and src/lookup_string_in_fixed_set.c are licensed under the term written in src/psl-make-dafsa and src/lookup_string_in_fixed_set.c are licensed under the term written in
src/LICENSE.chromium. src/LICENSE.chromium.
Building from tarball
---------------------
Choose a release from https://github.com/rockdaboot/libpsl/tags an download the tarball
named `libpsl-{version}.tar.*`. Unpack with `tar xf <filename>`, cd into the libsl* directory.
Build with
```
./configure
make
make check
```
Install with
```
sudo make install
```
Building from git Building from git
----------------- -----------------

View File

@ -1,6 +1,6 @@
project('libpsl', 'c', project('libpsl', 'c',
version : '0.21.1', version : '0.21.1',
meson_version : '>=0.49.0') meson_version : '>=0.47.0')
# Derived from LIBPSL_SO_VERSION in configure.ac # Derived from LIBPSL_SO_VERSION in configure.ac
lt_version = '5.3.2' lt_version = '5.3.2'
@ -10,24 +10,15 @@ cc = meson.get_compiler('c')
enable_runtime = get_option('runtime') enable_runtime = get_option('runtime')
enable_builtin = get_option('builtin') enable_builtin = get_option('builtin')
# We need to know the CRT being used to determine what .lib files we need on # We need to know the build type to determine what .lib files we need on Visual Studio
# Visual Studio for dependencies that don't normally come with pkg-config files # for dependencies that don't normally come with pkg-config files for Visual Studio builds
vs_crt = 'release' buildtype = get_option('buildtype')
vs_crt_opt = get_option('b_vscrt')
if vs_crt_opt in ['mdd', 'mtd']
vs_crt = 'debug'
elif vs_crt_opt == 'from_buildtype'
if get_option('buildtype') == 'debug'
vs_crt = 'debug'
endif
endif
notfound = dependency('', required : false) notfound = dependency('', required : false)
libidn2_dep = notfound libidn2_dep = notfound
libicu_dep = notfound libicu_dep = notfound
libidn_dep = notfound libidn_dep = notfound
libunistring = notfound libunistring = notfound
libiconv = notfound
networking_deps = notfound networking_deps = notfound
# FIXME: Cleanup this when Meson gets 'feature-combo': # FIXME: Cleanup this when Meson gets 'feature-combo':
@ -57,7 +48,7 @@ if ['libicu', 'auto'].contains(enable_runtime) or ['libicu', 'auto'].contains(en
# MSVC: the debug configuration of ICU generated the libraries with d suffix # MSVC: the debug configuration of ICU generated the libraries with d suffix
# we must handle this and search for the right library depending on the # we must handle this and search for the right library depending on the
# build type. Note debugoptimized is just a release build with .pdb files enabled # build type. Note debugoptimized is just a release build with .pdb files enabled
if cc.get_id() in ['msvc', 'clang-cl'] and vs_crt == 'debug' if cc.get_id() == 'msvc' and buildtype == 'debug'
libicu_dep = cc.find_library('icuucd', required : false) libicu_dep = cc.find_library('icuucd', required : false)
else else
libicu_dep = cc.find_library('icuuc', required : false) libicu_dep = cc.find_library('icuuc', required : false)
@ -95,7 +86,6 @@ endif
if libidn2_dep.found() or libidn_dep.found() if libidn2_dep.found() or libidn_dep.found()
# Check for libunistring, we need it for psl_str_to_utf8lower() # Check for libunistring, we need it for psl_str_to_utf8lower()
libunistring = cc.find_library('unistring') libunistring = cc.find_library('unistring')
libiconv = cc.find_library('libiconv')
endif endif
if host_machine.system() == 'windows' if host_machine.system() == 'windows'
@ -121,7 +111,6 @@ config.set('HAVE_UNISTD_H', cc.check_header('unistd.h'))
config.set('HAVE_STDINT_H', cc.check_header('stdint.h')) config.set('HAVE_STDINT_H', cc.check_header('stdint.h'))
config.set('HAVE_ALLOCA_H', cc.check_header('alloca.h')) config.set('HAVE_ALLOCA_H', cc.check_header('alloca.h'))
config.set('HAVE_DIRENT_H', cc.check_header('dirent.h')) config.set('HAVE_DIRENT_H', cc.check_header('dirent.h'))
config.set('HAVE_STRINGS_H', cc.check_header('strings.h'))
config.set('HAVE_ALLOCA', cc.has_function('alloca')) config.set('HAVE_ALLOCA', cc.has_function('alloca'))
config.set('HAVE_STRNDUP', cc.has_function('strndup')) config.set('HAVE_STRNDUP', cc.has_function('strndup'))
config.set('HAVE_CLOCK_GETTIME', cc.has_function('clock_gettime')) config.set('HAVE_CLOCK_GETTIME', cc.has_function('clock_gettime'))